wikijs-fork/server/views/legacy/page.pug

61 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

2019-07-13 19:15:35 +00:00
extends master.pug
block head
if injectCode.css
style(type='text/css')!= injectCode.css
if injectCode.head
!= injectCode.head
block body
#root
.header
span.header-title= siteConfig.title
span.header-deprecated!= t('outdatedBrowserWarning', { modernBrowser: '<a href="https://bestvpn.org/outdatedbrowser/en" rel="nofollow">' + t('modernBrowser') + '</a>', interpolation: { escapeValue: false } })
2019-07-13 19:15:35 +00:00
span.header-login
if !isAuthenticated
a(href='/login', title='Login')
2020-05-17 22:24:48 +00:00
i.mdi.mdi-account-circle
else
a(href='/logout', title='Logout')
2020-05-17 22:24:48 +00:00
i.mdi.mdi-logout
2019-07-13 19:15:35 +00:00
.main
.sidebar
each navItem in sidebar
2020-05-17 22:24:48 +00:00
if navItem.k === 'link'
a.sidebar-link(href=navItem.t)
i.mdi(class=navItem.c)
span= navItem.l
else if navItem.k === 'divider'
2019-07-13 19:15:35 +00:00
.sidebar-divider
2020-05-17 22:24:48 +00:00
else if navItem.k === 'header'
.sidebar-title= navItem.l
2019-07-13 19:15:35 +00:00
.main-container
.page-header
.page-header-left
h1= page.title
h2= page.description
//- .page-header-right
//- .page-header-right-title Last edited by
//- .page-header-right-author= page.authorName
//- .page-header-right-updated= page.updatedAt
2020-05-17 22:24:48 +00:00
.page-contents.v-content
2019-07-13 19:15:35 +00:00
.contents
div!= page.render
if page.toc.length
.toc
.toc-title= t('page.toc')
2019-07-13 19:15:35 +00:00
each tocItem, tocIdx in page.toc
2020-05-17 22:24:48 +00:00
a.toc-tile(href=tocItem.anchor)
i.mdi.mdi-chevron-right
2019-07-13 19:15:35 +00:00
span= tocItem.title
if tocIdx < page.toc.length - 1 || tocItem.children.length
.toc-divider
each tocSubItem in tocItem.children
2020-05-17 22:24:48 +00:00
a.toc-tile.inset(href=tocSubItem.anchor)
i.mdi.mdi-chevron-right
2019-07-13 19:15:35 +00:00
span= tocSubItem.title
if tocIdx < page.toc.length - 1
.toc-divider.inset
if injectCode.body
!= injectCode.body