* MOD: Remove Toboto font

* MOD: Remove iqs theme, use overrite default
pull/8020/head
Daniel Gore 1 month ago
parent 170317fb61
commit 367c246d0c

@ -315,7 +315,6 @@ export default {
.v-application.admin {
code {
box-shadow: none;
font-family: 'Roboto Mono', monospace;
color: mc('pink', '500');
}
}

@ -164,6 +164,5 @@ export default {
display: flex;
justify-content: flex-start;
align-items: center;
font-family: 'Roboto Mono', monospace;
}
</style>

@ -252,7 +252,6 @@ export default {
<style lang='scss'>
.v-textarea.is-monospaced textarea {
font-family: 'Roboto Mono', 'Courier New', Courier, monospace;
font-size: 13px;
font-weight: 600;
line-height: 1.4;

@ -546,7 +546,6 @@ export default {
color: #FFF;
font-weight: 400;
font-size: .85rem;
font-family: Roboto Mono, monospace;
}
}
}

@ -666,7 +666,6 @@ $editor-ascii-height-mobile: calc(100vh - 112px - 16px);
.CodeMirror {
height: auto;
font-family: 'Roboto Mono', monospace;
font-size: .9rem;
.cm-header-1 {

@ -1041,7 +1041,6 @@ $editor-height-mobile: calc(100vh - 112px - 16px);
.CodeMirror {
height: auto;
font-family: 'Roboto Mono', monospace;
font-size: .9rem;
.cm-header-1 {
@ -1096,7 +1095,6 @@ $editor-height-mobile: calc(100vh - 112px - 16px);
border: 1px solid mc('grey', '700');
background: mc('grey', '900');
font-family: 'Roboto Mono', monospace;
font-size: .9rem;
max-height: 150px;

@ -300,7 +300,6 @@ export default {
&-source {
background-color: mc('blue-grey', '900') !important;
border-radius: 7px;
font-family: 'Roboto Mono', monospace;
font-size: 14px;
color: #FFF !important;

@ -87,7 +87,6 @@ export default {
box-shadow: none;
background-color: transparent;
color: mc('grey', '800');
font-family: 'Roboto Mono', sans-serif;
font-weight: 400;
font-size: 1rem;

@ -30,13 +30,7 @@
font-style: normal;
}
@font-face {
font-family: 'Roboto Mono';
src: url('../../fonts/default/RobotoMono-Regular.woff2') format('woff2'),
url('../../fonts/default/RobotoMono-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
}
html:lang(ar) {
font-family: Tajawal, sans-serif;

@ -1,55 +0,0 @@
@font-face {
font-family: 'Roboto';
src: url('../../fonts/default/Roboto-MediumItalic.woff2') format('woff2'),
url('../../fonts/default/Roboto-MediumItalic.woff') format('woff');
font-weight: 500;
font-style: italic;
}
@font-face {
font-family: 'Roboto';
src: url('../../fonts/default/Roboto-Italic.woff2') format('woff2'),
url('../../fonts/default/Roboto-Italic.woff') format('woff');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'Roboto';
src: url('../../fonts/default/Roboto-Bold.woff2') format('woff2'),
url('../../fonts/default/Roboto-Bold.woff') format('woff');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: 'Roboto';
src: url('../../fonts/default/Roboto-Regular.woff2') format('woff2'),
url('../../fonts/default/Roboto-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'Roboto';
src: url('../../fonts/default/Roboto-BoldItalic.woff2') format('woff2'),
url('../../fonts/default/Roboto-BoldItalic.woff') format('woff');
font-weight: bold;
font-style: italic;
}
@font-face {
font-family: 'Roboto';
src: url('../../fonts/default/Roboto-Medium.woff2') format('woff2'),
url('../../fonts/default/Roboto-Medium.woff') format('woff');
font-weight: 500;
font-style: normal;
}
@font-face {
font-family: 'Roboto Mono';
src: url('../../fonts/default/RobotoMono-Regular.woff2') format('woff2'),
url('../../fonts/default/RobotoMono-Regular.woff') format('woff');
font-weight: normal;
font-style: normal;
}

@ -49,7 +49,6 @@ html {
body {
margin: 0;
padding: 0;
font-family: "Roboto",sans-serif;
line-height: 1.5;
min-height: 100vh;
}

@ -6,7 +6,7 @@
justify-content: center;
align-items: center;
color: mc('grey', '50');
font-family: Roboto, Arial, sans-serif;
img {
width: 250px;

@ -6,7 +6,7 @@
template(v-else-if='company && company.length > 0 && contentLicense !== ``')
span(v-if='contentLicense === `alr`') {{ $t('common:footer.copyright', { company: company, year: currentYear, interpolation: { escapeValue: false } }) }} |&nbsp;
span(v-else) {{ $t('common:footer.license', { company: company, license: $t('common:license.' + contentLicense), interpolation: { escapeValue: false } }) }} |&nbsp;
span {{ $t('common:footer.poweredBy') }} #[a(href='https://wiki.js.org', ref='nofollow') Wiki.js]
span {{ $t('common:footer.poweredBy') }} #[a(href='https://wiki.js.org', target='_blank', rel='noopener nofollow') Wiki.js]
</template>
<script>

@ -1,102 +1,33 @@
<template lang="pug">
div
.pa-3.d-flex(v-if='navMode === `MIXED`', :class='$vuetify.theme.dark ? `grey darken-5` : `blue darken-3`')
v-btn(
depressed
:color='$vuetify.theme.dark ? `grey darken-4` : `blue darken-2`'
style='min-width:0;'
@click='goHome'
:aria-label='$t(`common:header.home`)'
)
v-icon(size='20') mdi-home
v-btn.ml-3(
v-if='currentMode === `custom`'
depressed
:color='$vuetify.theme.dark ? `grey darken-4` : `blue darken-2`'
style='flex: 1 1 100%;'
@click='switchMode(`browse`)'
)
v-icon(left) mdi-file-tree
.body-2.text-none {{$t('common:sidebar.browse')}}
v-btn.ml-3(
v-else-if='currentMode === `browse`'
depressed
:color='$vuetify.theme.dark ? `grey darken-4` : `blue darken-2`'
style='flex: 1 1 100%;'
@click='switchMode(`tree`)'
)
v-icon(left) mdi-file-tree
.body-2.text-none {{$t('common:sidebar.tree')}}
v-btn.ml-3(
v-else-if='currentMode === `tree`'
depressed
:color='$vuetify.theme.dark ? `grey darken-4` : `blue darken-2`'
style='flex: 1 1 100%;'
@click='switchMode(`custom`)'
)
v-icon(left) mdi-navigation
.body-2.text-none {{$t('common:sidebar.mainMenu')}}
v-divider
//-> Custom Navigation
v-list.py-2(v-if='currentMode === `custom`', dense, :class='color', :dark='dark')
v-list.py-6.mx-3(v-if='currentMode === `custom`', dense, :class='color', :dark='false')
template(v-for='item of items')
v-list-item(
v-if='item.k === `link`'
:href='item.t'
:input-value='item.t === `/` + locale + `/` + path'
:target='item.y === `externalblank` ? `_blank` : `_self`'
:rel='item.y === `externalblank` ? `noopener` : ``'
)
v-list-item-avatar(size='24', tile)
v-icon(v-if='item.c.match(/fa[a-z] fa-/)', size='19') {{ item.c }}
v-icon(v-else) {{ item.c }}
v-list-item-title {{ item.l }}
v-divider.my-2(v-else-if='item.k === `divider`')
v-subheader.pl-4(v-else-if='item.k === `header`') {{ item.l }}
//-> Tree Navigation
v-treeview(
v-else-if='currentMode === `tree`'
activatable
open-on-click
:color='"white"'
:active='treeDefaultActive'
:open='treeDefaultOpen'
:items='treeItems'
:load-children='fetchTreeChild'
@update:active='activeTreeItem'
)
template(v-slot:prepend="{ item, open }")
v-icon(v-if="!item.children") mdi-text-box
v-icon(v-else-if="open") mdi-folder-open
v-icon(v-else) mdi-folder
template(v-slot:label="{ item }")
div(class='tree-item')
a(v-if="!item.children" :href="'/'+item.locale+'/'+item.path")
span {{item.name}}
span(v-else) {{item.name}}
v-list-item-title.ps-2.py-2 {{ item.l }}
v-divider.my-2.mx-2(v-else-if='item.k === `divider`')
v-subheader.py-2.px-0.mx-2(v-else-if='item.k === `header`') {{ item.l }}
//-> Browse
v-list.py-2(v-else-if='currentMode === `browse`', dense, :class='color', :dark='dark')
v-list.py-2(v-else-if='currentMode === `browse`', dense, :class='color', :dark='false')
template(v-if='currentParent.id > 0')
v-list-item(v-for='(item, idx) of parents', :key='`parent-` + item.id', @click='fetchBrowseItems(item)', style='min-height: 30px;')
v-list-item-avatar(size='18', :style='`padding-left: ` + (idx * 8) + `px; width: auto; margin: 0 5px 0 0;`')
v-icon(small) mdi-folder-open
v-list-item-title {{ item.title }}
v-list-item-title.ps-2.py-2 {{ item.title }}
v-divider.mt-2
v-list-item.mt-2(v-if='currentParent.pageId > 0', :href='`/` + currentParent.locale + `/` + currentParent.path', :key='`directorypage-` + currentParent.id', :input-value='path === currentParent.path')
v-list-item-avatar(size='24')
v-icon mdi-text-box
v-list-item-title {{ currentParent.title }}
v-subheader.pl-4 {{$t('common:sidebar.currentDirectory')}}
v-list-item-title.ps-2.py-2 {{ currentParent.title }}
v-subheader {{$t('common:sidebar.currentDirectory')}}
template(v-for='item of currentItems')
v-list-item(v-if='item.isFolder', :key='`childfolder-` + item.id', @click='fetchBrowseItems(item)')
v-list-item-avatar(size='24')
v-icon mdi-folder
v-list-item-title {{ item.title }}
v-list-item-title.ps-2.py-2 {{ item.title }}
v-list-item(v-else, :href='`/` + item.locale + `/` + item.path', :key='`childpage-` + item.id', :input-value='path === item.path')
v-list-item-avatar(size='24')
v-icon mdi-text-box
v-list-item-title {{ item.title }}
v-list-item-title.ps-2.py-2 {{ item.title }}
</template>
<script>
@ -110,11 +41,11 @@ export default {
props: {
color: {
type: String,
default: 'primary'
default: 'secondary'
},
dark: {
type: Boolean,
default: true
default: false
},
items: {
type: Array,
@ -134,10 +65,7 @@ export default {
title: '/ (root)'
},
parents: [],
loadedCache: [],
treeItems: [],
treeDefaultOpen: [],
treeDefaultActive: [],
loadedCache: []
}
},
computed: {
@ -151,9 +79,6 @@ export default {
if (mode === `browse` && this.loadedCache.length < 1) {
this.loadFromCurrentPath()
}
if (mode === 'tree') {
this.fetchTreeRoot();
}
},
async fetchBrowseItems (item) {
this.$store.commit(`loadingStart`, 'browse-load')
@ -257,95 +182,7 @@ export default {
},
goHome () {
window.location.assign(siteLangs.length > 0 ? `/${this.locale}/home` : '/')
},
pageItem2TreeItem(item,level) {
if (item.isFolder) {
return { id: item.id, level: level, pageId: item.pageId, path: item.path, locale: item.locale, name: item.title, children: [] }
} else {
return { id: item.id, level: level, path: item.path, locale: item.locale, name: item.title }
}
},
activeTreeItem(id) {
const find = (items) => {
for(const item of items) {
if(item.id == id) {
return item
}
if(item.children && item.children.length) {
const v = find(item.children)
if(v) {
return v
}
}
}
}
const item = find(this.treeItems)
if(item) {
if(!this.treeDefaultActive.includes(item.id)) {
location.href = `/${item.locale}/${item.path}`
} else {
setTimeout(() => {
const el = document.querySelector(".v-treeview-node--active")
el.scrollIntoViewIfNeeded()
})
}
}
},
async fetchTreeChild(parent) {
const items = await this.fetchPages(parent.id)
parent.children = []
if(parent.pageId){
parent.children.push({
id: parent.pageId,level: parent.level+1, path: parent.path, locale: parent.locale, name: parent.name
})
}
parent.children.push(
...items.map(item => this.pageItem2TreeItem(item, parent.level+1))
)
this.checkTreeDefaultOpen(parent.children);
},
async fetchTreeRoot(){
const children = await this.fetchPages(0)
this.treeItems = children.map(item => this.pageItem2TreeItem(item, 0))
this.checkTreeDefaultOpen(this.treeItems, 0);
},
async checkTreeDefaultOpen(items){
const item = items.find(item => item.children && this.path.startsWith(item.path))
if(item) {
setTimeout(()=>{
this.treeDefaultOpen.push(item.id)
})
}
const active = items.find(item => item.path == this.path)
if(active) {
this.treeDefaultActive.push(active.id)
}
},
async fetchPages(id) {
const resp = await this.$apollo.query({
query: gql`
query($parent: Int, $locale: String!) {
pages {
tree(parent: $parent, mode: ALL, locale: $locale) {
id
path
title
isFolder
pageId
parent
locale
}
}
}
`,
fetchPolicy: 'cache-first',
variables: {
parent: id,
locale: this.locale
}
})
return _.get(resp, 'data.pages.tree', [])
},
}
},
mounted () {
this.currentParent.title = `/ ${this.$t('common:sidebar.root')}`
@ -353,37 +190,12 @@ export default {
this.currentMode = 'browse'
} else if (this.navMode === 'STATIC') {
this.currentMode = 'custom'
} else if (this.navMode === 'NEWTREE') {
this.currentMode = 'tree'
} else {
this.currentMode = window.localStorage.getItem('navPref') || 'custom'
}
if (this.currentMode === 'browse') {
this.loadFromCurrentPath()
}
if (this.currentMode === "tree") {
this.fetchTreeRoot();
}
}
}
</script>
<style lang="scss">
.v-treeview{
.tree-item {
font-weight: 500;
line-height: 1rem;
font-size: 0.8rem;
}
a {
text-decoration: none;
}
&.theme--dark{
a {
color: white;
}
}
}
</style>

@ -3,8 +3,7 @@
nav-header(v-if='!printView')
v-navigation-drawer(
v-if='navMode !== `NONE` && !printView'
:class='$vuetify.theme.dark ? `grey darken-4-d4` : `primary`'
dark
:class='$vuetify.theme.dark ? `grey darken-4-d4` : `secondary`'
app
clipped
mobile-breakpoint='600'
@ -13,7 +12,7 @@
:right='$vuetify.rtl'
)
vue-scroll(:ops='scrollStyle')
nav-sidebar(:color='$vuetify.theme.dark ? `grey darken-4-d4` : `primary`', :items='sidebarDecoded', :nav-mode='navMode')
nav-sidebar(:color='$vuetify.theme.dark ? `grey darken-4-d4` : `secondary`', :items='sidebarDecoded', :nav-mode='navMode')
v-fab-transition(v-if='navMode !== `NONE`')
v-btn(
@ -32,7 +31,7 @@
v-main(ref='content')
template(v-if='path !== `home`')
v-toolbar(:color='$vuetify.theme.dark ? `grey darken-4-d3` : `grey lighten-3`', flat, dense, v-if='$vuetify.breakpoint.smAndUp')
v-toolbar(:color='$vuetify.theme.dark ? `grey darken-4-d3` : `white`', flat, dense, v-if='$vuetify.breakpoint.smAndUp')
//- v-btn.pl-0(v-if='$vuetify.breakpoint.xsOnly', flat, @click='toggleNavigation')
//- v-icon(color='grey darken-2', left) menu
//- span Navigation
@ -42,25 +41,25 @@
)
template(slot='item', slot-scope='props')
v-icon(v-if='props.item.path === "/"', small, @click='goHome') mdi-home
v-btn.ma-0(v-else, :href='props.item.path', small, text) {{props.item.name}}
v-btn.ma-0.text-capitalize(v-else, :href='props.item.path', small, text) {{props.item.name}}
template(v-if='!isPublished')
v-spacer
.caption.red--text {{$t('common:page.unpublished')}}
status-indicator.ml-3(negative, pulse)
v-divider
v-container.grey.pa-0(fluid, :class='$vuetify.theme.dark ? `darken-4-l3` : `lighten-4`')
v-row.page-header-section(no-gutters, align-content='center', style='height: 90px;')
v-container.grey.pa-0(fluid, :class='$vuetify.theme.dark ? `darken-4-l3` : `white`')
v-row.page-header-section(no-gutters, align-content='center')
v-col.page-col-content.is-page-header(
:offset-xl='tocPosition === `left` ? 2 : 0'
:offset-lg='tocPosition === `left` ? 3 : 0'
:xl='tocPosition === `right` ? 10 : false'
:lg='tocPosition === `right` ? 9 : false'
style='margin-top: auto; margin-bottom: auto;'
:class='$vuetify.rtl ? `pr-4` : `pl-4`'
style='margin-top: 1.5rem; margin-bottom: 1.5rem;'
:class='$vuetify.rtl ? `pr-6` : `pl-6`'
)
.page-header-headings
.headline.grey--text(:class='$vuetify.theme.dark ? `text--lighten-2` : `text--darken-3`') {{title}}
.caption.grey--text.text--darken-1 {{description}}
.headline(style='font-weight: 600') {{title}}
.caption {{description}}
.page-edit-shortcuts(
v-if='editShortcutsObj.editMenuBar'
:class='tocPosition === `right` ? `is-right` : ``'
@ -162,25 +161,25 @@
v-icon(:color='$vuetify.theme.dark ? `blue-grey lighten-1` : `blue-grey darken-2`', dense) mdi-comment-plus
span {{$t('common:comments.newComment')}}
v-card.page-author-card.mb-5
.pa-5
.overline.indigo--text.d-flex(:class='$vuetify.theme.dark ? `text--lighten-3` : ``')
span {{$t('common:page.lastEditedBy')}}
v-spacer
v-tooltip(right, v-if='isAuthenticated')
template(v-slot:activator='{ on }')
v-btn.btn-animate-edit(
icon
:href='"/h/" + locale + "/" + path'
v-on='on'
x-small
v-if='hasReadHistoryPermission'
:aria-label='$t(`common:header.history`)'
)
v-icon(color='indigo', dense) mdi-history
span {{$t('common:header.history')}}
.page-author-card-name.body-2.grey--text(:class='$vuetify.theme.dark ? `` : `text--darken-3`') {{ authorName }}
.page-author-card-date.caption.grey--text.text--darken-1 {{ updatedAt | moment('calendar') }}
//- v-card.page-author-card.mb-5
//- .pa-5
//- .overline.indigo--text.d-flex(:class='$vuetify.theme.dark ? `text--lighten-3` : ``')
//- span {{$t('common:page.lastEditedBy')}}
//- v-spacer
//- v-tooltip(right, v-if='isAuthenticated')
//- template(v-slot:activator='{ on }')
//- v-btn.btn-animate-edit(
//- icon
//- :href='"/h/" + locale + "/" + path'
//- v-on='on'
//- x-small
//- v-if='hasReadHistoryPermission'
//- :aria-label='$t(`common:header.history`)'
//- )
//- v-icon(color='indigo', dense) mdi-history
//- span {{$t('common:header.history')}}
//- .page-author-card-name.body-2.grey--text(:class='$vuetify.theme.dark ? `` : `text--darken-3`') {{ authorName }}
//- .page-author-card-date.caption.grey--text.text--darken-1 {{ updatedAt | moment('calendar') }}
//- v-card.mb-5
//- .pa-5
@ -195,30 +194,30 @@
//- )
//- .caption.grey--text 5 votes
v-card.page-shortcuts-card(flat)
v-toolbar(:color='$vuetify.theme.dark ? `grey darken-4-d3` : `grey lighten-3`', flat, dense)
v-spacer
//- v-tooltip(bottom)
//- template(v-slot:activator='{ on }')
//- v-btn(icon, tile, v-on='on', :aria-label='$t(`common:page.bookmark`)'): v-icon(color='grey') mdi-bookmark
//- span {{$t('common:page.bookmark')}}
v-menu(offset-y, bottom, min-width='300')
template(v-slot:activator='{ on: menu }')
v-tooltip(bottom)
template(v-slot:activator='{ on: tooltip }')
v-btn(icon, tile, v-on='{ ...menu, ...tooltip }', :aria-label='$t(`common:page.share`)'): v-icon(color='grey') mdi-share-variant
span {{$t('common:page.share')}}
social-sharing(
:url='pageUrl'
:title='title'
:description='description'
)
v-tooltip(bottom)
template(v-slot:activator='{ on }')
v-btn(icon, tile, v-on='on', @click='print', :aria-label='$t(`common:page.printFormat`)')
v-icon(:color='printView ? `primary` : `grey`') mdi-printer
span {{$t('common:page.printFormat')}}
v-spacer
//- v-card.page-shortcuts-card(flat)
//- v-toolbar(:color='$vuetify.theme.dark ? `grey darken-4-d3` : `grey lighten-3`', flat, dense)
//- v-spacer
//- //- v-tooltip(bottom)
//- //- template(v-slot:activator='{ on }')
//- //- v-btn(icon, tile, v-on='on', :aria-label='$t(`common:page.bookmark`)'): v-icon(color='grey') mdi-bookmark
//- //- span {{$t('common:page.bookmark')}}
//- v-menu(offset-y, bottom, min-width='300')
//- template(v-slot:activator='{ on: menu }')
//- v-tooltip(bottom)
//- template(v-slot:activator='{ on: tooltip }')
//- v-btn(icon, tile, v-on='{ ...menu, ...tooltip }', :aria-label='$t(`common:page.share`)'): v-icon(color='grey') mdi-share-variant
//- span {{$t('common:page.share')}}
//- social-sharing(
//- :url='pageUrl'
//- :title='title'
//- :description='description'
//- )
//- v-tooltip(bottom)
//- template(v-slot:activator='{ on }')
//- v-btn(icon, tile, v-on='on', @click='print', :aria-label='$t(`common:page.printFormat`)')
//- v-icon(:color='printView ? `primary` : `grey`') mdi-printer
//- span {{$t('common:page.printFormat')}}
//- v-spacer
v-flex.page-col-content(
xs12
@ -721,9 +720,6 @@ export default {
.breadcrumbs-nav {
.v-btn {
min-width: 0;
&__content {
text-transform: none;
}
}
.v-breadcrumbs__divider:nth-child(2n) {
padding: 0 6px;

@ -1,18 +1,193 @@
/* THEME SPECIFIC STYLES */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
* {
font-family: 'Inter', sans-serif !important;
}
.v-application {
color: #2D3748 !important;
.headline {
font-size: 2rem !important;
margin-bottom: 0.25rem;
font-family: 'Inter', sans-serif !important;
}
.caption {
font-size: 0.875rem !important;
font-family: 'Inter', sans-serif !important;
font-weight: 500 !important;
}
}
.theme--dark.v-text-field--solo>.v-input__control>.v-input__slot {
background-color: white !important;
border: 1px solid #E2E8F0 !important;
border-radius: 12px !important;
padding-left: 0.5rem !important;
padding-right: 0.5rem !important;
}
.theme--dark.v-icon {
color: #2D3748 !important;
}
.theme--dark.v-label {
color: #2D3748 !important;
}
.theme--dark.v-input,
.theme--dark.v-input input,
.theme--dark.v-input textarea {
color: #2D3748 !important;
}
.subheading {
color: #2D3748 !important;
font-weight: 600 !important;
font-size: 18px !important;
}
.v-navigation-drawer .v-list.secondary .v-subheader {
color: #718096 !important;
font-size: 0.75rem !important;
font-weight: 500 !important;
height: auto !important;
line-height: normal !important;
}
.page-toc-card .overline {
font-family: 'Inter', sans-serif !important;
color: #718096 !important;
font-size: 12px !important;
font-weight: 500 !important;
line-height: 16px !important;
font-weight: 500 !important;
letter-spacing: normal !important;
}
.page-toc-card .v-list-item {
max-height: 32px !important;
}
.v-navigation-drawer .v-list.secondary>.v-list-item,
.v-navigation-drawer .v-list.secondary .v-list-item__title {
color: #2D3748 !important;
font-size: .875rem !important;
height: auto !important;
border-radius: 0.5rem;
}
.v-navigation-drawer .v-list.secondary>.v-list-item {
min-height: 0 !important;
padding: 0;
}
.v-navigation-drawer .v-list.secondary .v-icon {
color: #4A5568 !important;
}
.v-navigation-drawer .v-divider {
border-color: #E2E8F0 !important;
}
.page-toc-card {
border-radius: 0.75rem !important;
border: 1px solid #E2E8F0 !important;
box-shadow: 0 0 1rem 0 rgba(13, 24, 41, 0.05) !important;
}
.page-toc-card .overline {
text-transform: none !important;
}
.page-toc-card .v-list {
padding: 1rem !important;
}
.page-toc-card .v-list-item {
min-height: auto !important;
padding-left: 0 !important;
padding-right: 0 !important;
}
.page-toc-card .v-list-item + .v-list-item {
margin-top: 0.75rem !important;
}
.page-col-sd .v-btn,
.page-col-sd .v-list-item--link {
&::before,
&:hover::before,
&:focus::before,
&:active::before {
display: none !important;
opacity: 0 !important;
background-color: transparent !important;
}
.v-ripple__container {
display: none !important;
}
&:hover,
&:focus,
&:active {
background-color: transparent !important;
box-shadow: none !important;
}
}
.v-navigation-drawer .v-list.secondary>.v-list-item {
&::before {
display: none !important;
}
.v-ripple__container {
display: none !important;
}
&:hover {
background-color: #e4ecf7 !important;
}
&.v-list-item--active,
&.v-list-item--active .v-list-item__title,
&.v-list-item--active .v-icon {
color: #1976D2 !important;
}
}
.v-main .contents {
color: mc('grey', '800');
color: #2D3748;
padding: .5rem 0 50px;
position: relative;
> div > *:first-child {
>div>*:first-child {
margin-top: 0;
}
@at-root .theme--dark & {
color: mc('grey', '300');
}
.v-list.secondary .v-icon {
color: #4A5568 !important;
}
// ---------------------------------
// LINKS
// ---------------------------------
@ -47,12 +222,25 @@
}
}
.nav-header {
background-color: white !important;
color: black !important;
}
// ---------------------------------
// HEADERS
// ---------------------------------
h1, h2, h3, h4, h5, h6 {
h1,
h2,
h3,
h4,
h5,
h6 {
position: relative;
font-weight: 600;
line-height: normal !important;
color: #2D3748 !important;
&:first-child {
padding-top: 0;
@ -74,11 +262,15 @@
color: mc('grey', '500');
}
& + h2, & + h3, & + h4, & + h5, & + h6 {
&+h2,
&+h3,
&+h4,
&+h5,
&+h6 {
margin-top: 8px;
}
& + hr.footnotes-sep {
&+hr.footnotes-sep {
display: none;
}
}
@ -92,29 +284,8 @@
@at-root .theme--dark & {
color: mc('grey', '300');
}
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 2px;
background: linear-gradient(to right, mc('theme', 'primary'), rgba(mc('theme', 'primary'), 0));
border-radius: 3px;
@at-root .theme--dark & {
background: linear-gradient(to right, mc('blue', '300') 0%, mc('blue', '500') 10%, rgba(mc('blue', '900'), 0) 100%);
}
@at-root .is-rtl & {
background: linear-gradient(to left, mc('theme', 'primary'), rgba(mc('theme', 'primary'), 0));
}
@at-root .theme--dark.is-rtl & {
background: linear-gradient(to left, mc('grey', '600'), rgba(mc('grey', '600'), 0));
}
}
}
h2 {
margin: 1rem 0 0 0;
color: mc('grey', '800');
@ -123,28 +294,8 @@
@at-root .theme--dark & {
color: mc('grey', '400');
}
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 1px;
background: linear-gradient(to right, mc('grey', '700'), rgba(mc('grey', '700'), 0));
@at-root .theme--dark & {
background: linear-gradient(to right, mc('grey', '300'), rgba(mc('grey', '700'), 0));
}
@at-root .is-rtl & {
background: linear-gradient(to left, mc('grey', '700'), rgba(mc('grey', '700'), 0));
}
@at-root .theme--dark.is-rtl & {
background: linear-gradient(to left, mc('grey', '300'), rgba(mc('grey', '700'), 0));
}
}
}
h3 {
margin: 8px 0 0 0;
color: mc('grey', '700');
@ -153,18 +304,11 @@
@at-root .theme--dark & {
color: mc('grey', '600');
}
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 1px;
background: linear-gradient(to right, mc('grey', '500'), rgba(mc('grey', '500'), 0) 90%);
}
}
h4, h5, h6 {
h4,
h5,
h6 {
font-size: 1rem;
margin: 8px 0 0 0;
color: mc('grey', '700');
@ -173,28 +317,9 @@
@at-root .theme--dark & {
color: mc('grey', '600');
}
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 1px;
background: linear-gradient(to right, mc('grey', '500'), rgba(mc('grey', '500'), 0) 70%);
}
}
h5 {
&::after {
background: linear-gradient(to right, mc('grey', '500'), rgba(mc('grey', '500'), 0) 50%);
}
}
h6 {
&::after {
background: linear-gradient(to right, mc('grey', '500'), rgba(mc('grey', '500'), 0) 30%);
}
}
// ---------------------------------
// PARAGRAPHS
// ---------------------------------
@ -203,7 +328,7 @@
padding: 1rem 0 0 0;
margin: 0;
@at-root .contents > div > p:first-child {
@at-root .contents>div>p:first-child {
padding-top: 0;
}
@ -231,12 +356,15 @@
.text-huge {
font-size: 1.8em;
}
.text-big {
font-size: 1.4em;
}
.text-small {
font-size: .85em;
}
.text-tiny {
font-size: .7em;
}
@ -264,11 +392,11 @@
content: "\F0757";
}
> p:first-child .emoji {
>p:first-child .emoji {
margin-right: .5rem;
}
&.valign-center > p {
&.valign-center>p {
display: flex;
align-items: center;
}
@ -293,6 +421,7 @@
border-color: mc('blue', '500');
}
}
&.is-warning {
background-color: mc('orange', '50');
border-color: mc('orange', '300');
@ -314,6 +443,7 @@
box-shadow: 0 0 2px 0 mc('grey', '900');
}
}
&.is-danger {
background-color: mc('red', '50');
border-color: mc('red', '300');
@ -334,6 +464,7 @@
border-color: mc('red', '500');
}
}
&.is-success {
background-color: mc('green', '50');
border-color: mc('green', '300');
@ -391,10 +522,12 @@
td.icon {
background-color: mc('blue', '300');
color: mc('blue', '50');
&::before {
content: "\F02FC";
}
}
td.content {
color: darken(mc('blue', '900'), 10%);
background-color: mc('blue', '50');
@ -405,14 +538,17 @@
}
}
}
&.tip {
td.icon {
background-color: mc('green', '300');
color: mc('green', '50');
&::before {
content: "\F0335";
}
}
td.content {
color: darken(mc('green', '900'), 10%);
background-color: mc('green', '50');
@ -423,16 +559,19 @@
}
}
}
&.warning {
background-color: transparent !important;
td.icon {
background-color: mc('orange', '300');
color: #FFF;
&::before {
content: "\F0026";
}
}
td.content {
color: darken(mc('orange', '900'), 10%);
background-color: mc('orange', '50');
@ -443,14 +582,17 @@
}
}
}
&.caution {
td.icon {
background-color: mc('purple', '300');
color: mc('purple', '50');
&::before {
content: "\f0238";
}
}
td.content {
color: darken(mc('purple', '900'), 10%);
background-color: mc('purple', '50');
@ -461,14 +603,17 @@
}
}
}
&.important {
td.icon {
background-color: mc('red', '300');
color: mc('red', '50');
&::before {
content: "\F0159";
}
}
td.content {
color: darken(mc('red', '900'), 10%);
background-color: mc('red', '50');
@ -482,7 +627,7 @@
}
.exampleblock {
> .title {
>.title {
font-style: italic;
font-size: 1rem !important;
color: #7a2717;
@ -491,18 +636,21 @@
color: mc('brown', '300');
}
}
> .content {
>.content {
border: 1px solid mc('grey', '200');
border-radius: 7px;
margin-bottom: 12px;
padding: 16px;
}
}
// ---------------------------------
// LISTS
// ---------------------------------
ol, ul:not(.tabset-tabs) {
ol,
ul:not(.tabset-tabs) {
padding-top: 1rem;
width: 100%;
@ -511,7 +659,8 @@
padding-right: 1rem;
}
li > ul, li > ol {
li>ul,
li>ol {
padding-top: .5rem;
padding-left: 1rem;
@ -521,7 +670,7 @@
}
}
li + li {
li+li {
margin-top: .5rem;
}
@ -565,13 +714,13 @@
display: none;
}
> a {
>a {
display: block;
text-decoration: none;
margin: -1rem;
padding: 1rem;
> em {
>em {
font-weight: 400;
font-style: normal;
color: mc('grey', '700');
@ -589,7 +738,7 @@
}
}
> em {
>em {
font-weight: 400;
font-style: normal;
}
@ -643,7 +792,7 @@
background-color: mc('grey', '100');
}
& + li {
&+li {
margin-top: 0;
}
@ -665,7 +814,8 @@
ul:not(.tabset-tabs):not(.contains-task-list) {
list-style: none;
> li::before {
>li::before {
position: absolute;
left: -1.1rem;
content: '\25b8';
@ -678,13 +828,16 @@
}
}
}
ol, ul:not(.tabset-tabs) {
> li {
ol,
ul:not(.tabset-tabs) {
>li {
position: relative;
> p {
display:inline-block;
vertical-align:top;
padding-top:0;
>p {
display: inline-block;
vertical-align: top;
padding-top: 0;
&:first-child {
width: 100%;
@ -704,7 +857,7 @@
margin-left: 1.125em;
margin-bottom: 0.75em;
> p {
>p {
padding: 0;
}
}
@ -718,12 +871,12 @@
background-color: mc('indigo', '50');
padding: 0 5px;
color: mc('indigo', '800');
font-family: 'Roboto Mono', monospace;
font-weight: normal;
font-size: 1rem;
box-shadow: none;
&::before, &::after {
&::before,
&::after {
display: none;
}
@ -733,7 +886,7 @@
}
}
.prismjs{
.prismjs {
border: none;
border-radius: 5px;
box-shadow: initial;
@ -745,16 +898,16 @@
background-color: darken(mc('grey', '900'), 5%);
}
> code {
>code {
background-color: transparent;
padding: 0;
color: #FFF;
box-shadow: initial;
display: block;
font-size: .85rem;
font-family: 'Roboto Mono', monospace;
&:after, &:before {
&:after,
&:before {
content: initial;
letter-spacing: initial;
}
@ -819,7 +972,7 @@
}
}
&[checked]::after {
&[checked]::after {
content: '';
}
}
@ -844,7 +997,9 @@
}
&.dense {
td, th {
td,
th {
font-size: .85rem;
padding: .5rem;
}
@ -865,6 +1020,7 @@
&:first-child {
border-top-left-radius: 7px;
}
&:last-child {
border-top-right-radius: 7px;
}
@ -922,6 +1078,7 @@
&:first-child {
border-bottom-left-radius: 7px;
}
&:last-child {
border-bottom-right-radius: 7px;
}
@ -933,7 +1090,7 @@
figure.table {
margin: 0;
> table {
>table {
background-color: #FFF;
margin: 0;
border-collapse: collapse;
@ -943,7 +1100,8 @@
background-color: darken(mc('grey', '900'), 3%);
}
td, th {
td,
th {
border: 1px solid mc('blue-grey', '100');
box-shadow: inset -1px -1px 0 0 #FFF, inset 1px 0 0 #FFF;
padding: .5rem .75rem;
@ -951,7 +1109,7 @@
@at-root .theme--dark & {
border-color: mc('grey', '700');
box-shadow: inset -1px -1px 0 0 rgba(0,0,0, .5);
box-shadow: inset -1px -1px 0 0 rgba(0, 0, 0, .5);
}
}
@ -1001,17 +1159,20 @@
float: left;
margin: 0 1rem 1rem 0;
}
&.align-right {
float: right;
margin: 0 0 1rem 1rem;
z-index: 1;
position: relative;
}
&.align-center {
display: block;
max-width: 100%;
margin: auto;
}
&.align-abstopright {
position: absolute;
top: -90px;
@ -1024,12 +1185,15 @@
right: initial;
}
}
&.decor-shadow {
box-shadow: 0 3px 8px 0 rgba(116, 129, 141, 0.1);
}
&.decor-outline {
border: 1px solid mc('grey', '400');
}
&.uml-diagram {
margin: 1rem 0;
}
@ -1041,6 +1205,7 @@
img {
margin: 0 auto;
}
figcaption {
padding: 4px 1rem;
text-align: center;
@ -1073,11 +1238,11 @@
border: 1px solid mc('grey', '300');
border-radius: 7px;
> p {
>p {
padding-left: 0;
}
> summary {
>summary {
border-radius: 7px;
background-color: mc('grey', '50');
cursor: pointer;
@ -1091,7 +1256,12 @@
background-color: mc('grey', '100');
}
> h1, h2, h3, h4, h5, h6 {
>h1,
h2,
h3,
h4,
h5,
h6 {
width: 95%;
display: inline-block;
@ -1108,7 +1278,7 @@
&[open] {
padding: 1rem;
> summary {
>summary {
background-color: mc('grey', '100');
border-bottom: 1px solid mc('grey', '300');
border-bottom-left-radius: 0;
@ -1121,12 +1291,12 @@
background-color: mc('grey', '900');
border-color: mc('grey', '700');
> summary {
>summary {
background-color: mc('grey', '900');
border-color: mc('grey', '700');
}
&[open] > summary {
&[open]>summary {
background-color: lighten(mc('grey', '900'), 5%);
}
}
@ -1142,19 +1312,24 @@
color: mc('red', '500');
background-color: initial;
}
&.pen-green {
color: mc('green', '500');
background-color: initial;
}
&.marker-blue {
background-color: mc('blue', '300');
}
&.marker-yellow {
background-color: mc('yellow', '300');
}
&.marker-pink {
background-color: mc('pink', '300');
}
&.marker-green {
background-color: mc('green', '300');
}
@ -1171,6 +1346,8 @@
}
// ---------------------------------
// COMMENTS
// ---------------------------------
@ -1229,12 +1406,12 @@
// ---------------
@media print {
.nav-header,
.v-navigation-drawer,
.v-btn--fab,
.page-col-sd,
.v-tooltip__content
{
.v-tooltip__content {
display: none !important;
}
@ -1248,11 +1425,11 @@
max-width: 100% !important;
margin-left: 0 !important;
> .v-toolbar {
>.v-toolbar {
border: 1px solid mc('grey', '300') !important;
border-radius: 7px !important;
& + .v-divider {
&+.v-divider {
display: none !important;
}
}
@ -1272,7 +1449,7 @@
color: #000;
}
.prismjs{
.prismjs {
box-shadow: none;
background-color: #FFF;
@ -1280,7 +1457,7 @@
background-color: #FFF;
}
> code {
>code {
color: #000;
box-shadow: none;
text-shadow: none;

@ -1,6 +1,6 @@
name: Default
author: requarks.io
site: https://wiki.requarks.io/
name: iQuant Knowledge Base
author: iQuant Devs
site: https://wiki.iquantsolutions.com/
version: 1.0.0
requirements:
minimum: '>= 2.0.0'
@ -19,32 +19,32 @@ props:
icon: mdi-border-vertical
showTOC:
type: Boolean
default: true
default: false
title: Display the Table of Contents
order: 2
showTags:
type: Boolean
default: true
default: false
title: Display the Page Tags
order: 3
showTags:
type: Boolean
default: true
default: false
title: Display the Page Author and Date
order: 4
showTags:
type: Boolean
default: true
default: false
title: Display the Page Rating
order: 5
showSocialBar:
type: Boolean
default: true
default: false
title: Display the Social Links Bar
order: 6
showEditSpeedDial:
type: Boolean
default: true
default: false
title: Display the Edit Speed Dial
hint: Shown in the lower right corner of the page.
order: 7

@ -1,75 +0,0 @@
<template lang="pug">
v-footer.justify-center(:color='bgColor', inset)
.caption.grey--text(:class='$vuetify.theme.dark ? `text--lighten-1` : `text--darken-1`')
template(v-if='footerOverride')
span(v-html='footerOverrideRender + ` |&nbsp;`')
template(v-else-if='company && company.length > 0 && contentLicense !== ``')
span(v-if='contentLicense === `alr`') {{ $t('common:footer.copyright', { company: company, year: currentYear, interpolation: { escapeValue: false } }) }} |&nbsp;
span(v-else) {{ $t('common:footer.license', { company: company, license: $t('common:license.' + contentLicense), interpolation: { escapeValue: false } }) }} |&nbsp;
span {{ $t('common:footer.poweredBy') }} #[a(href='https://wiki.js.org', target='_blank', rel='noopener nofollow') Wiki.js]
</template>
<script>
import { get } from 'vuex-pathify'
import MarkdownIt from 'markdown-it'
const md = new MarkdownIt({
html: false,
breaks: false,
linkify: true
})
export default {
props: {
color: {
type: String,
default: 'grey lighten-3'
},
darkColor: {
type: String,
default: 'grey darken-3'
}
},
data() {
return {
currentYear: (new Date()).getFullYear()
}
},
computed: {
company: get('site/company'),
contentLicense: get('site/contentLicense'),
footerOverride: get('site/footerOverride'),
footerOverrideRender () {
if (!this.footerOverride) { return '' }
return md.renderInline(this.footerOverride)
},
bgColor() {
if (!this.$vuetify.theme.dark) {
return this.color
} else {
return this.darkColor
}
}
}
}
</script>
<style lang="scss">
.v-footer {
a {
text-decoration: none;
}
&.altbg {
background: mc('theme', 'primary');
span {
color: mc('blue', '300');
}
a {
color: mc('blue', '200');
}
}
}
</style>

@ -1,201 +0,0 @@
<template lang="pug">
div
//-> Custom Navigation
v-list.py-6.mx-3(v-if='currentMode === `custom`', dense, :class='color', :dark='false')
template(v-for='item of items')
v-list-item(
v-if='item.k === `link`'
:href='item.t'
:input-value='item.t === `/` + locale + `/` + path'
:target='item.y === `externalblank` ? `_blank` : `_self`'
:rel='item.y === `externalblank` ? `noopener` : ``'
)
v-list-item-title.ps-2.py-2 {{ item.l }}
v-divider.my-2.mx-2(v-else-if='item.k === `divider`')
v-subheader.py-2.px-0.mx-2(v-else-if='item.k === `header`') {{ item.l }}
//-> Browse
v-list.py-2(v-else-if='currentMode === `browse`', dense, :class='color', :dark='false')
template(v-if='currentParent.id > 0')
v-list-item(v-for='(item, idx) of parents', :key='`parent-` + item.id', @click='fetchBrowseItems(item)', style='min-height: 30px;')
v-list-item-title.ps-2.py-2 {{ item.title }}
v-divider.mt-2
v-list-item.mt-2(v-if='currentParent.pageId > 0', :href='`/` + currentParent.locale + `/` + currentParent.path', :key='`directorypage-` + currentParent.id', :input-value='path === currentParent.path')
v-list-item-title.ps-2.py-2 {{ currentParent.title }}
v-subheader {{$t('common:sidebar.currentDirectory')}}
template(v-for='item of currentItems')
v-list-item(v-if='item.isFolder', :key='`childfolder-` + item.id', @click='fetchBrowseItems(item)')
v-list-item-avatar(size='24')
v-list-item-title.ps-2.py-2 {{ item.title }}
v-list-item(v-else, :href='`/` + item.locale + `/` + item.path', :key='`childpage-` + item.id', :input-value='path === item.path')
v-list-item-title.ps-2.py-2 {{ item.title }}
</template>
<script>
import _ from 'lodash'
import gql from 'graphql-tag'
import { get } from 'vuex-pathify'
/* global siteLangs */
export default {
props: {
color: {
type: String,
default: 'secondary'
},
dark: {
type: Boolean,
default: false
},
items: {
type: Array,
default: () => []
},
navMode: {
type: String,
default: 'MIXED'
}
},
data() {
return {
currentMode: 'custom',
currentItems: [],
currentParent: {
id: 0,
title: '/ (root)'
},
parents: [],
loadedCache: []
}
},
computed: {
path: get('page/path'),
locale: get('page/locale')
},
methods: {
switchMode (mode) {
this.currentMode = mode
window.localStorage.setItem('navPref', mode)
if (mode === `browse` && this.loadedCache.length < 1) {
this.loadFromCurrentPath()
}
},
async fetchBrowseItems (item) {
this.$store.commit(`loadingStart`, 'browse-load')
if (!item) {
item = this.currentParent
}
if (this.loadedCache.indexOf(item.id) < 0) {
this.currentItems = []
}
if (item.id === 0) {
this.parents = []
} else {
const flushRightIndex = _.findIndex(this.parents, ['id', item.id])
if (flushRightIndex >= 0) {
this.parents = _.take(this.parents, flushRightIndex)
}
if (this.parents.length < 1) {
this.parents.push(this.currentParent)
}
this.parents.push(item)
}
this.currentParent = item
const resp = await this.$apollo.query({
query: gql`
query ($parent: Int, $locale: String!) {
pages {
tree(parent: $parent, mode: ALL, locale: $locale) {
id
path
title
isFolder
pageId
parent
locale
}
}
}
`,
fetchPolicy: 'cache-first',
variables: {
parent: item.id,
locale: this.locale
}
})
this.loadedCache = _.union(this.loadedCache, [item.id])
this.currentItems = _.get(resp, 'data.pages.tree', [])
this.$store.commit(`loadingStop`, 'browse-load')
},
async loadFromCurrentPath() {
this.$store.commit(`loadingStart`, 'browse-load')
const resp = await this.$apollo.query({
query: gql`
query ($path: String, $locale: String!) {
pages {
tree(path: $path, mode: ALL, locale: $locale, includeAncestors: true) {
id
path
title
isFolder
pageId
parent
locale
}
}
}
`,
fetchPolicy: 'cache-first',
variables: {
path: this.path,
locale: this.locale
}
})
const items = _.get(resp, 'data.pages.tree', [])
const curPage = _.find(items, ['pageId', this.$store.get('page/id')])
if (!curPage) {
console.warn('Could not find current page in page tree listing!')
return
}
let curParentId = curPage.parent
let invertedAncestors = []
while (curParentId) {
const curParent = _.find(items, ['id', curParentId])
if (!curParent) {
break
}
invertedAncestors.push(curParent)
curParentId = curParent.parent
}
this.parents = [this.currentParent, ...invertedAncestors.reverse()]
this.currentParent = _.last(this.parents)
this.loadedCache = [curPage.parent]
this.currentItems = _.filter(items, ['parent', curPage.parent])
this.$store.commit(`loadingStop`, 'browse-load')
},
goHome () {
window.location.assign(siteLangs.length > 0 ? `/${this.locale}/home` : '/')
}
},
mounted () {
this.currentParent.title = `/ ${this.$t('common:sidebar.root')}`
if (this.navMode === 'TREE') {
this.currentMode = 'browse'
} else if (this.navMode === 'STATIC') {
this.currentMode = 'custom'
} else {
this.currentMode = window.localStorage.getItem('navPref') || 'custom'
}
if (this.currentMode === 'browse') {
this.loadFromCurrentPath()
}
}
}
</script>

@ -1,800 +0,0 @@
<template lang="pug">
v-app(v-scroll='upBtnScroll', :dark='$vuetify.theme.dark', :class='$vuetify.rtl ? `is-rtl` : `is-ltr`')
nav-header(v-if='!printView')
v-navigation-drawer(
v-if='navMode !== `NONE` && !printView'
:class='$vuetify.theme.dark ? `grey darken-4-d4` : `primary`'
dark
app
clipped
mobile-breakpoint='600'
:temporary='$vuetify.breakpoint.smAndDown'
v-model='navShown'
:right='$vuetify.rtl'
)
vue-scroll(:ops='scrollStyle')
nav-sidebar(:color='$vuetify.theme.dark ? `grey darken-4-d4` : `primary`', :items='sidebarDecoded', :nav-mode='navMode')
v-fab-transition(v-if='navMode !== `NONE`')
v-btn(
fab
color='primary'
fixed
bottom
:right='$vuetify.rtl'
:left='!$vuetify.rtl'
small
@click='navShown = !navShown'
v-if='$vuetify.breakpoint.mdAndDown'
v-show='!navShown'
)
v-icon mdi-menu
v-main(ref='content')
template(v-if='path !== `home`')
v-toolbar(:color='$vuetify.theme.dark ? `grey darken-4-d3` : `grey lighten-3`', flat, dense, v-if='$vuetify.breakpoint.smAndUp')
//- v-btn.pl-0(v-if='$vuetify.breakpoint.xsOnly', flat, @click='toggleNavigation')
//- v-icon(color='grey darken-2', left) menu
//- span Navigation
v-breadcrumbs.breadcrumbs-nav.pl-0(
:items='breadcrumbs'
divider='/'
)
template(slot='item', slot-scope='props')
v-icon(v-if='props.item.path === "/"', small, @click='goHome') mdi-home
v-btn.ma-0(v-else, :href='props.item.path', small, text) {{props.item.name}}
template(v-if='!isPublished')
v-spacer
.caption.red--text {{$t('common:page.unpublished')}}
status-indicator.ml-3(negative, pulse)
v-divider
v-container.grey.pa-0(fluid, :class='$vuetify.theme.dark ? `darken-4-l3` : `lighten-4`')
v-row.page-header-section(no-gutters, align-content='center', style='height: 90px;')
v-col.page-col-content.is-page-header(
:offset-xl='tocPosition === `left` ? 2 : 0'
:offset-lg='tocPosition === `left` ? 3 : 0'
:xl='tocPosition === `right` ? 10 : false'
:lg='tocPosition === `right` ? 9 : false'
style='margin-top: auto; margin-bottom: auto;'
:class='$vuetify.rtl ? `pr-4` : `pl-4`'
)
.page-header-headings
.headline.grey--text(:class='$vuetify.theme.dark ? `text--lighten-2` : `text--darken-3`') {{title}}
.caption.grey--text.text--darken-1 {{description}}
.page-edit-shortcuts(
v-if='editShortcutsObj.editMenuBar'
:class='tocPosition === `right` ? `is-right` : ``'
)
v-btn(
v-if='editShortcutsObj.editMenuBtn'
@click='pageEdit'
depressed
small
)
v-icon.mr-2(small) mdi-pencil
span.text-none {{$t(`common:actions.edit`)}}
v-btn(
v-if='editShortcutsObj.editMenuExternalBtn'
:href='editMenuExternalUrl'
target='_blank'
depressed
small
)
v-icon.mr-2(small) {{ editShortcutsObj.editMenuExternalIcon }}
span.text-none {{$t(`common:page.editExternal`, { name: editShortcutsObj.editMenuExternalName })}}
v-divider
v-container.pl-5.pt-4(fluid, grid-list-xl)
v-layout(row)
v-flex.page-col-sd(
v-if='tocPosition !== `off` && $vuetify.breakpoint.lgAndUp'
:order-xs1='tocPosition !== `right`'
:order-xs2='tocPosition === `right`'
lg3
xl2
)
v-card.page-toc-card.mb-5(v-if='tocDecoded.length')
.overline.pa-5.pb-0(:class='$vuetify.theme.dark ? `blue--text text--lighten-2` : `primary--text`') {{$t('common:page.toc')}}
v-list.pb-3(dense, nav, :class='$vuetify.theme.dark ? `darken-3-d3` : ``')
template(v-for='(tocItem, tocIdx) in tocDecoded')
v-list-item(@click='$vuetify.goTo(tocItem.anchor, scrollOpts)')
v-icon(color='grey', small) {{ $vuetify.rtl ? `mdi-chevron-left` : `mdi-chevron-right` }}
v-list-item-title.px-3 {{tocItem.title}}
//- v-divider(v-if='tocIdx < toc.length - 1 || tocItem.children.length')
template(v-for='tocSubItem in tocItem.children')
v-list-item(@click='$vuetify.goTo(tocSubItem.anchor, scrollOpts)')
v-icon.px-3(color='grey lighten-1', small) {{ $vuetify.rtl ? `mdi-chevron-left` : `mdi-chevron-right` }}
v-list-item-title.px-3.caption.grey--text(:class='$vuetify.theme.dark ? `text--lighten-1` : `text--darken-1`') {{tocSubItem.title}}
//- v-divider(inset, v-if='tocIdx < toc.length - 1')
v-card.page-tags-card.mb-5(v-if='tags.length > 0')
.pa-5
.overline.teal--text.pb-2(:class='$vuetify.theme.dark ? `text--lighten-3` : ``') {{$t('common:page.tags')}}
v-chip.mr-1.mb-1(
label
:color='$vuetify.theme.dark ? `teal darken-1` : `teal lighten-5`'
v-for='(tag, idx) in tags'
:href='`/t/` + tag.tag'
:key='`tag-` + tag.tag'
)
v-icon(:color='$vuetify.theme.dark ? `teal lighten-3` : `teal`', left, small) mdi-tag
span(:class='$vuetify.theme.dark ? `teal--text text--lighten-5` : `teal--text text--darken-2`') {{tag.title}}
v-chip.mr-1.mb-1(
label
:color='$vuetify.theme.dark ? `teal darken-1` : `teal lighten-5`'
:href='`/t/` + tags.map(t => t.tag).join(`/`)'
:aria-label='$t(`common:page.tagsMatching`)'
)
v-icon(:color='$vuetify.theme.dark ? `teal lighten-3` : `teal`', size='20') mdi-tag-multiple
v-card.page-comments-card.mb-5(v-if='commentsEnabled && commentsPerms.read')
.pa-5
.overline.pb-2.blue-grey--text.d-flex.align-center(:class='$vuetify.theme.dark ? `text--lighten-3` : `text--darken-2`')
span {{$t('common:comments.sdTitle')}}
//- v-spacer
//- v-chip.text-center(
//- v-if='!commentsExternal'
//- label
//- x-small
//- :color='$vuetify.theme.dark ? `blue-grey darken-3` : `blue-grey darken-2`'
//- dark
//- style='min-width: 50px; justify-content: center;'
//- )
//- span {{commentsCount}}
.d-flex
v-btn.text-none(
@click='goToComments()'
:color='$vuetify.theme.dark ? `blue-grey` : `blue-grey darken-2`'
outlined
style='flex: 1 1 100%;'
small
)
span.blue-grey--text(:class='$vuetify.theme.dark ? `text--lighten-1` : `text--darken-2`') {{$t('common:comments.viewDiscussion')}}
v-tooltip(right, v-if='commentsPerms.write')
template(v-slot:activator='{ on }')
v-btn.ml-2(
@click='goToComments(true)'
v-on='on'
outlined
small
:color='$vuetify.theme.dark ? `blue-grey` : `blue-grey darken-2`'
:aria-label='$t(`common:comments.newComment`)'
)
v-icon(:color='$vuetify.theme.dark ? `blue-grey lighten-1` : `blue-grey darken-2`', dense) mdi-comment-plus
span {{$t('common:comments.newComment')}}
v-card.page-author-card.mb-5
.pa-5
.overline.indigo--text.d-flex(:class='$vuetify.theme.dark ? `text--lighten-3` : ``')
span {{$t('common:page.lastEditedBy')}}
v-spacer
v-tooltip(right, v-if='isAuthenticated')
template(v-slot:activator='{ on }')
v-btn.btn-animate-edit(
icon
:href='"/h/" + locale + "/" + path'
v-on='on'
x-small
v-if='hasReadHistoryPermission'
:aria-label='$t(`common:header.history`)'
)
v-icon(color='indigo', dense) mdi-history
span {{$t('common:header.history')}}
.page-author-card-name.body-2.grey--text(:class='$vuetify.theme.dark ? `` : `text--darken-3`') {{ authorName }}
.page-author-card-date.caption.grey--text.text--darken-1 {{ updatedAt | moment('calendar') }}
//- v-card.mb-5
//- .pa-5
//- .overline.pb-2.yellow--text(:class='$vuetify.theme.dark ? `text--darken-3` : `text--darken-4`') Rating
//- .text-center
//- v-rating(
//- v-model='rating'
//- color='yellow darken-3'
//- background-color='grey lighten-1'
//- half-increments
//- hover
//- )
//- .caption.grey--text 5 votes
v-card.page-shortcuts-card(flat)
v-toolbar(:color='$vuetify.theme.dark ? `grey darken-4-d3` : `grey lighten-3`', flat, dense)
v-spacer
//- v-tooltip(bottom)
//- template(v-slot:activator='{ on }')
//- v-btn(icon, tile, v-on='on', :aria-label='$t(`common:page.bookmark`)'): v-icon(color='grey') mdi-bookmark
//- span {{$t('common:page.bookmark')}}
v-menu(offset-y, bottom, min-width='300')
template(v-slot:activator='{ on: menu }')
v-tooltip(bottom)
template(v-slot:activator='{ on: tooltip }')
v-btn(icon, tile, v-on='{ ...menu, ...tooltip }', :aria-label='$t(`common:page.share`)'): v-icon(color='grey') mdi-share-variant
span {{$t('common:page.share')}}
social-sharing(
:url='pageUrl'
:title='title'
:description='description'
)
v-tooltip(bottom)
template(v-slot:activator='{ on }')
v-btn(icon, tile, v-on='on', @click='print', :aria-label='$t(`common:page.printFormat`)')
v-icon(:color='printView ? `primary` : `grey`') mdi-printer
span {{$t('common:page.printFormat')}}
v-spacer
v-flex.page-col-content(
xs12
:lg9='tocPosition !== `off`'
:xl10='tocPosition !== `off`'
:order-xs1='tocPosition === `right`'
:order-xs2='tocPosition !== `right`'
)
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl', v-if='hasAnyPagePermissions && editShortcutsObj.editFab')
template(v-slot:activator='{ on: onEditActivator }')
v-speed-dial(
v-model='pageEditFab'
direction='top'
open-on-hover
transition='scale-transition'
bottom
:right='!$vuetify.rtl'
:left='$vuetify.rtl'
fixed
dark
)
template(v-slot:activator)
v-btn.btn-animate-edit(
fab
color='primary'
v-model='pageEditFab'
@click='pageEdit'
v-on='onEditActivator'
:disabled='!hasWritePagesPermission'
:aria-label='$t(`common:page.editPage`)'
)
v-icon mdi-pencil
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl', v-if='hasReadHistoryPermission')
template(v-slot:activator='{ on }')
v-btn(
fab
small
color='white'
light
v-on='on'
@click='pageHistory'
)
v-icon(size='20') mdi-history
span {{$t('common:header.history')}}
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl', v-if='hasReadSourcePermission')
template(v-slot:activator='{ on }')
v-btn(
fab
small
color='white'
light
v-on='on'
@click='pageSource'
)
v-icon(size='20') mdi-code-tags
span {{$t('common:header.viewSource')}}
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl', v-if='hasWritePagesPermission')
template(v-slot:activator='{ on }')
v-btn(
fab
small
color='white'
light
v-on='on'
@click='pageConvert'
)
v-icon(size='20') mdi-lightning-bolt
span {{$t('common:header.convert')}}
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl', v-if='hasWritePagesPermission')
template(v-slot:activator='{ on }')
v-btn(
fab
small
color='white'
light
v-on='on'
@click='pageDuplicate'
)
v-icon(size='20') mdi-content-duplicate
span {{$t('common:header.duplicate')}}
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl', v-if='hasManagePagesPermission')
template(v-slot:activator='{ on }')
v-btn(
fab
small
color='white'
light
v-on='on'
@click='pageMove'
)
v-icon(size='20') mdi-content-save-move-outline
span {{$t('common:header.move')}}
v-tooltip(:right='$vuetify.rtl', :left='!$vuetify.rtl', v-if='hasDeletePagesPermission')
template(v-slot:activator='{ on }')
v-btn(
fab
dark
small
color='red'
v-on='on'
@click='pageDelete'
)
v-icon(size='20') mdi-trash-can-outline
span {{$t('common:header.delete')}}
span {{$t('common:page.editPage')}}
v-alert.mb-5(v-if='!isPublished', color='red', outlined, icon='mdi-minus-circle', dense)
.caption {{$t('common:page.unpublishedWarning')}}
.contents(ref='container')
slot(name='contents')
.comments-container#discussion(v-if='commentsEnabled && commentsPerms.read && !printView')
.comments-header
v-icon.mr-2(dark) mdi-comment-text-outline
span {{$t('common:comments.title')}}
.comments-main
slot(name='comments')
nav-footer
notify
search-results
v-fab-transition
v-btn(
v-if='upBtnShown'
fab
fixed
bottom
:right='$vuetify.rtl'
:left='!$vuetify.rtl'
small
:depressed='this.$vuetify.breakpoint.mdAndUp'
@click='$vuetify.goTo(0, scrollOpts)'
color='primary'
dark
:style='upBtnPosition'
:aria-label='$t(`common:actions.returnToTop`)'
)
v-icon mdi-arrow-up
</template>
<script>
import { StatusIndicator } from 'vue-status-indicator'
import Tabset from './tabset.vue'
import NavSidebar from './nav-sidebar.vue'
import Prism from 'prismjs'
import mermaid from 'mermaid'
import { get, sync } from 'vuex-pathify'
import _ from 'lodash'
import ClipboardJS from 'clipboard'
import Vue from 'vue'
/* global siteLangs */
Vue.component('Tabset', Tabset)
Prism.plugins.autoloader.languages_path = '/_assets/js/prism/'
Prism.plugins.NormalizeWhitespace.setDefaults({
'remove-trailing': true,
'remove-indent': true,
'left-trim': true,
'right-trim': true,
'remove-initial-line-feed': true,
'tabs-to-spaces': 2
})
Prism.plugins.toolbar.registerButton('copy-to-clipboard', (env) => {
let linkCopy = document.createElement('button')
linkCopy.textContent = 'Copy'
const clip = new ClipboardJS(linkCopy, {
text: () => { return env.code }
})
clip.on('success', () => {
linkCopy.textContent = 'Copied!'
resetClipboardText()
})
clip.on('error', () => {
linkCopy.textContent = 'Press Ctrl+C to copy'
resetClipboardText()
})
return linkCopy
function resetClipboardText() {
setTimeout(() => {
linkCopy.textContent = 'Copy'
}, 5000)
}
})
export default {
components: {
NavSidebar,
StatusIndicator
},
props: {
pageId: {
type: Number,
default: 0
},
locale: {
type: String,
default: 'en'
},
path: {
type: String,
default: 'home'
},
title: {
type: String,
default: 'Untitled Page'
},
description: {
type: String,
default: ''
},
createdAt: {
type: String,
default: ''
},
updatedAt: {
type: String,
default: ''
},
tags: {
type: Array,
default: () => ([])
},
authorName: {
type: String,
default: 'Unknown'
},
authorId: {
type: Number,
default: 0
},
editor: {
type: String,
default: ''
},
isPublished: {
type: Boolean,
default: false
},
toc: {
type: String,
default: ''
},
sidebar: {
type: String,
default: ''
},
navMode: {
type: String,
default: 'MIXED'
},
commentsEnabled: {
type: Boolean,
default: false
},
effectivePermissions: {
type: String,
default: ''
},
commentsExternal: {
type: Boolean,
default: false
},
editShortcuts: {
type: String,
default: ''
},
filename: {
type: String,
default: ''
}
},
data() {
return {
locales: siteLangs,
navShown: false,
navExpanded: false,
upBtnShown: false,
pageEditFab: false,
scrollOpts: {
duration: 1500,
offset: 0,
easing: 'easeInOutCubic'
},
scrollStyle: {
vuescroll: {},
scrollPanel: {
initialScrollX: 0.01, // fix scrollbar not disappearing on load
scrollingX: false,
speed: 50
},
rail: {
gutterOfEnds: '2px'
},
bar: {
onlyShowBarOnScroll: false,
background: '#42A5F5',
hoverStyle: {
background: '#64B5F6'
}
}
},
winWidth: 0
}
},
computed: {
isAuthenticated: get('user/authenticated'),
commentsCount: get('page/commentsCount'),
commentsPerms: get('page/effectivePermissions@comments'),
editShortcutsObj: get('page/editShortcuts'),
rating: {
get () {
return 3.5
},
set (val) {
}
},
breadcrumbs() {
return [{ path: '/', name: 'Home' }].concat(
_.reduce(this.path.split('/'), (result, value) => {
result.push({
path: _.get(_.last(result), 'path', this.locales.length > 0 ? `/${this.locale}` : '') + `/${value}`,
name: value
})
return result
}, []))
},
pageUrl () { return window.location.href },
upBtnPosition () {
if (this.$vuetify.breakpoint.mdAndUp) {
return this.$vuetify.rtl ? `right: 235px;` : `left: 235px;`
} else {
return this.$vuetify.rtl ? `right: 65px;` : `left: 65px;`
}
},
sidebarDecoded () {
return JSON.parse(Buffer.from(this.sidebar, 'base64').toString())
},
tocDecoded () {
return JSON.parse(Buffer.from(this.toc, 'base64').toString())
},
tocPosition: get('site/tocPosition'),
hasAdminPermission: get('page/effectivePermissions@system.manage'),
hasWritePagesPermission: get('page/effectivePermissions@pages.write'),
hasManagePagesPermission: get('page/effectivePermissions@pages.manage'),
hasDeletePagesPermission: get('page/effectivePermissions@pages.delete'),
hasReadSourcePermission: get('page/effectivePermissions@source.read'),
hasReadHistoryPermission: get('page/effectivePermissions@history.read'),
hasAnyPagePermissions () {
return this.hasAdminPermission || this.hasWritePagesPermission || this.hasManagePagesPermission ||
this.hasDeletePagesPermission || this.hasReadSourcePermission || this.hasReadHistoryPermission
},
printView: sync('site/printView'),
editMenuExternalUrl () {
if (this.editShortcutsObj.editMenuBar && this.editShortcutsObj.editMenuExternalBtn) {
return this.editShortcutsObj.editMenuExternalUrl.replace('{filename}', this.filename)
} else {
return ''
}
}
},
created() {
this.$store.set('page/authorId', this.authorId)
this.$store.set('page/authorName', this.authorName)
this.$store.set('page/createdAt', this.createdAt)
this.$store.set('page/description', this.description)
this.$store.set('page/isPublished', this.isPublished)
this.$store.set('page/id', this.pageId)
this.$store.set('page/locale', this.locale)
this.$store.set('page/path', this.path)
this.$store.set('page/tags', this.tags)
this.$store.set('page/title', this.title)
this.$store.set('page/editor', this.editor)
this.$store.set('page/updatedAt', this.updatedAt)
if (this.effectivePermissions) {
this.$store.set('page/effectivePermissions', JSON.parse(Buffer.from(this.effectivePermissions, 'base64').toString()))
}
if (this.editShortcuts) {
this.$store.set('page/editShortcuts', JSON.parse(Buffer.from(this.editShortcuts, 'base64').toString()))
}
this.$store.set('page/mode', 'view')
},
mounted () {
if (this.$vuetify.theme.dark) {
this.scrollStyle.bar.background = '#424242'
}
// -> Check side navigation visibility
this.handleSideNavVisibility()
window.addEventListener('resize', _.debounce(() => {
this.handleSideNavVisibility()
}, 500))
// -> Highlight Code Blocks
Prism.highlightAllUnder(this.$refs.container)
// -> Render Mermaid diagrams
mermaid.mermaidAPI.initialize({
startOnLoad: true,
theme: this.$vuetify.theme.dark ? `dark` : `default`
})
// -> Handle anchor scrolling
if (window.location.hash && window.location.hash.length > 1) {
if (document.readyState === 'complete') {
this.$nextTick(() => {
this.$vuetify.goTo(decodeURIComponent(window.location.hash), this.scrollOpts)
})
} else {
window.addEventListener('load', () => {
this.$vuetify.goTo(decodeURIComponent(window.location.hash), this.scrollOpts)
})
}
}
// -> Handle anchor links within the page contents
this.$nextTick(() => {
this.$refs.container.querySelectorAll(`a[href^="#"], a[href^="${window.location.href.replace(window.location.hash, '')}#"]`).forEach(el => {
el.onclick = ev => {
ev.preventDefault()
ev.stopPropagation()
this.$vuetify.goTo(decodeURIComponent(ev.currentTarget.hash), this.scrollOpts)
}
})
window.boot.notify('page-ready')
})
},
methods: {
goHome () {
if (this.locales && this.locales.length > 0) {
window.location.assign(`/${this.locale}/home`)
} else {
window.location.assign('/')
}
},
toggleNavigation () {
this.navOpen = !this.navOpen
},
upBtnScroll () {
const scrollOffset = window.pageYOffset || document.documentElement.scrollTop
this.upBtnShown = scrollOffset > window.innerHeight * 0.33
},
print () {
if (this.printView) {
this.printView = false
} else {
this.printView = true
this.$nextTick(() => {
window.print()
})
}
},
pageEdit () {
this.$root.$emit('pageEdit')
},
pageHistory () {
this.$root.$emit('pageHistory')
},
pageSource () {
this.$root.$emit('pageSource')
},
pageConvert () {
this.$root.$emit('pageConvert')
},
pageDuplicate () {
this.$root.$emit('pageDuplicate')
},
pageMove () {
this.$root.$emit('pageMove')
},
pageDelete () {
this.$root.$emit('pageDelete')
},
handleSideNavVisibility () {
if (window.innerWidth === this.winWidth) { return }
this.winWidth = window.innerWidth
if (this.$vuetify.breakpoint.mdAndUp) {
this.navShown = true
} else {
this.navShown = false
}
},
goToComments (focusNewComment = false) {
this.$vuetify.goTo('#discussion', this.scrollOpts)
if (focusNewComment) {
document.querySelector('#discussion-new').focus()
}
}
}
}
</script>
<style lang="scss">
.breadcrumbs-nav {
.v-btn {
min-width: 0;
&__content {
text-transform: none;
}
}
.v-breadcrumbs__divider:nth-child(2n) {
padding: 0 6px;
}
.v-breadcrumbs__divider:nth-child(2) {
padding: 0 6px 0 12px;
}
}
.page-col-sd {
margin-top: -90px;
align-self: flex-start;
position: sticky;
top: 64px;
max-height: calc(100vh - 64px);
overflow-y: auto;
-ms-overflow-style: none;
}
.page-col-sd::-webkit-scrollbar {
display: none;
}
.page-header-section {
position: relative;
> .is-page-header {
position: relative;
}
.page-header-headings {
min-height: 52px;
display: flex;
justify-content: center;
flex-direction: column;
}
.page-edit-shortcuts {
position: absolute;
bottom: -33px;
right: 10px;
.v-btn {
border-right: 1px solid #DDD !important;
border-bottom: 1px solid #DDD !important;
border-radius: 0;
color: #777;
background-color: #FFF !important;
@at-root .theme--dark & {
background-color: #222 !important;
border-right-color: #444 !important;
border-bottom-color: #444 !important;
color: #CCC;
}
.v-icon {
color: mc('blue', '700');
}
&:first-child {
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
}
&:last-child {
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
}
}
}
}
</style>

@ -1,209 +0,0 @@
<template lang="pug">
.tabset.elevation-2
ul.tabset-tabs(ref='tabs', role='tablist')
slot(name='tabs')
.tabset-content(ref='content')
slot(name='content')
</template>
<script>
import { customAlphabet } from 'nanoid/non-secure'
const nanoid = customAlphabet('1234567890abcdef', 10)
export default {
data() {
return {
currentTab: 0
}
},
watch: {
currentTab (newValue, oldValue) {
this.setActiveTab()
}
},
methods: {
setActiveTab () {
this.$refs.tabs.childNodes.forEach((node, idx) => {
if (idx === this.currentTab) {
node.className = 'is-active'
node.setAttribute('aria-selected', 'true')
} else {
node.className = ''
node.setAttribute('aria-selected', 'false')
}
})
this.$refs.content.childNodes.forEach((node, idx) => {
if (idx === this.currentTab) {
node.className = 'tabset-panel is-active'
node.removeAttribute('hidden')
} else {
node.className = 'tabset-panel'
node.setAttribute('hidden', '')
}
})
}
},
mounted () {
// Handle scroll to header on load within hidden tab content
if (window.location.hash && window.location.hash.length > 1) {
const headerId = decodeURIComponent(window.location.hash)
let foundIdx = -1
this.$refs.content.childNodes.forEach((node, idx) => {
if (node.querySelector(headerId)) {
foundIdx = idx
}
})
if (foundIdx >= 0) {
this.currentTab = foundIdx
}
}
this.setActiveTab()
const tabRefId = nanoid()
this.$refs.tabs.childNodes.forEach((node, idx) => {
node.setAttribute('id', `${tabRefId}-${idx}`)
node.setAttribute('role', 'tab')
node.setAttribute('aria-controls', `${tabRefId}-${idx}-tab`)
node.setAttribute('tabindex', '0')
node.addEventListener('click', ev => {
this.currentTab = [].indexOf.call(ev.target.parentNode.children, ev.target)
})
node.addEventListener('keydown', ev => {
if (ev.key === 'ArrowLeft' && idx > 0) {
this.currentTab = idx - 1
this.$refs.tabs.childNodes[idx - 1].focus()
} else if (ev.key === 'ArrowRight' && idx < this.$refs.tabs.childNodes.length - 1) {
this.currentTab = idx + 1
this.$refs.tabs.childNodes[idx + 1].focus()
} else if (ev.key === 'Enter' || ev.key === ' ') {
this.currentTab = idx
node.focus()
} else if (ev.key === 'Home') {
this.currentTab = 0
ev.preventDefault()
ev.target.parentNode.children[0].focus()
} else if (ev.key === 'End') {
this.currentTab = this.$refs.tabs.childNodes.length - 1
ev.preventDefault()
ev.target.parentNode.children[this.$refs.tabs.childNodes.length - 1].focus()
}
})
})
this.$refs.content.childNodes.forEach((node, idx) => {
node.setAttribute('id', `${tabRefId}-${idx}-tab`)
node.setAttribute('role', 'tabpanel')
node.setAttribute('aria-labelledby', `${tabRefId}-${idx}`)
node.setAttribute('tabindex', '0')
})
}
}
</script>
<style lang="scss">
.tabset {
border-radius: 5px;
margin-top: 10px;
@at-root .theme--dark & {
background-color: #292929;
}
> .tabset-tabs {
padding-left: 0;
margin: 0;
display: flex;
align-items: stretch;
background: linear-gradient(to bottom, #FFF, #FAFAFA);
box-shadow: inset 0 -1px 0 0 #DDD;
border-radius: 5px 5px 0 0;
overflow: auto;
@at-root .theme--dark & {
background: linear-gradient(to bottom, #424242, #333);
box-shadow: inset 0 -1px 0 0 #555;
}
> li {
display: block;
padding: 16px;
margin-top: 0;
cursor: pointer;
transition: color 1s ease;
border-right: 1px solid #FFF;
font-size: 14px;
font-weight: 500;
margin-bottom: 1px;
user-select: none;
@at-root .theme--dark & {
border-right-color: #555;
}
&.is-active {
background-color: #FFF;
margin-bottom: 0;
padding-bottom: 17px;
padding-top: 13px;
color: mc('blue', '700');
border-top: 3px solid mc('blue', '700');
@at-root .theme--dark & {
background-color: #292929;
color: mc('blue', '300');
}
}
&:last-child {
border-right: none;
&.is-active {
border-right: 1px solid #EEE;
@at-root .theme--dark & {
border-right-color: #555;
}
}
}
&:hover {
background-color: rgba(#CCC, .1);
@at-root .theme--dark & {
background-color: rgba(#222, .25);
}
&.is-active {
background-color: #FFF;
@at-root .theme--dark & {
background-color: #292929;
}
}
}
& + li {
border-left: 1px solid #EEE;
@at-root .theme--dark & {
border-left-color: #222;
}
}
}
}
> .tabset-content {
.tabset-panel {
padding: 2px 16px 16px;
display: none;
&.is-active {
display: block;
}
}
}
}
</style>

@ -1 +0,0 @@
/* THEME SPECIFIC JAVASCRIPT */

File diff suppressed because it is too large Load Diff

@ -1,51 +0,0 @@
name: iQuant Knowledge Base
author: iQuant Devs
site: https://wiki.iquantsolutions.com/
version: 1.0.0
requirements:
minimum: '>= 2.0.0'
maximum: '< 3.0.0'
props:
sdPosition:
type: String
default: 'left'
title: Table of Contents Position
hint: Should the content sidebar be shown on the left or right.
enum:
- 'hidden'
- 'left'
- 'right'
order: 1
icon: mdi-border-vertical
showTOC:
type: Boolean
default: true
title: Display the Table of Contents
order: 2
showTags:
type: Boolean
default: false
title: Display the Page Tags
order: 3
showTags:
type: Boolean
default: false
title: Display the Page Author and Date
order: 4
showTags:
type: Boolean
default: false
title: Display the Page Rating
order: 5
showSocialBar:
type: Boolean
default: false
title: Display the Social Links Bar
order: 6
showEditSpeedDial:
type: Boolean
default: false
title: Display the Edit Speed Dial
hint: Shown in the lower right corner of the page.
order: 7
Loading…
Cancel
Save