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

61 lines
2.1 KiB
Plaintext
Raw 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')
i.material-icons account_circle
else
a(href='/logout', title='Logout')
i.material-icons logout
2019-07-13 19:15:35 +00:00
.main
.sidebar
each navItem in sidebar
if navItem.kind === 'link'
a.sidebar-link(href=navItem.target)
i.material-icons= navItem.icon
span= navItem.label
else if navItem.kind === 'divider'
.sidebar-divider
else if navItem.kind === 'header'
.sidebar-title= navItem.label
.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
2019-07-13 19:15:35 +00:00
.page-contents
.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
a.toc-tile(href='#' + tocItem.anchor)
i.material-icons arrow_right
span= tocItem.title
if tocIdx < page.toc.length - 1 || tocItem.children.length
.toc-divider
each tocSubItem in tocItem.children
a.toc-tile.inset(href='#' + tocSubItem.anchor)
i.material-icons arrow_right
span= tocSubItem.title
if tocIdx < page.toc.length - 1
.toc-divider.inset
if injectCode.body
!= injectCode.body