You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.5 KiB

  1. extends ../layout.pug
  2. mixin tocMenu(ti)
  3. each node in ti
  4. li
  5. a(href='#' + node.anchor, title=node.content)= node.content
  6. if node.nodes.length > 0
  7. ul
  8. +tocMenu(node.nodes)
  9. block rootNavRight
  10. loading-spinner
  11. .nav-item
  12. if rights.write && pageData.meta.path !== 'home'
  13. a.button.is-outlined(v-on:click='$store.dispatch("modalMovePage/open")')
  14. i.icon-shuffle
  15. span= t('nav.move')
  16. a.button.is-outlined(href='/source/' + pageData.meta.path)
  17. i.icon-loader
  18. span= t('nav.source')
  19. //- a.button.is-outlined(href='/hist/' + pageData.meta.path)
  20. i.icon-clock
  21. span= t('nav.history')
  22. if rights.write
  23. a.button(href='/edit/' + pageData.meta.path)
  24. i.icon-document-text
  25. span= t('nav.edit')
  26. a.button(v-on:click='$store.dispatch("modalCreatePage/open")')
  27. i.icon-plus
  28. span= t('nav.create')
  29. block content
  30. content-view(inline-template)
  31. .container.is-fluid.has-mkcontent
  32. .columns.is-gapless
  33. .column.is-narrow.is-hidden-touch.sidebar
  34. aside
  35. .sidebar-label
  36. span= t('sidebar.navigation')
  37. ul.sidebar-menu
  38. li
  39. a(href='/')
  40. i.icon-home
  41. span= t('nav.root')
  42. li
  43. a(href='/all')
  44. i.icon-paper
  45. span= t('nav.allpages')
  46. if pageData.parent
  47. li
  48. a(href='/' + pageData.parent.path)
  49. i.icon-reply
  50. span= pageData.parent.title
  51. if !isGuest
  52. li
  53. a(href='/admin')
  54. i.icon-cog
  55. span= t('nav.settings')
  56. else
  57. li
  58. a(href='/login')
  59. i.icon-unlock
  60. span= t('nav.login')
  61. aside.sidebar-pagecontents
  62. .sidebar-label
  63. span= t('sidebar.pagecontents')
  64. ul.sidebar-menu
  65. li.is-hidden-until-scroll: a(href='#root', title='Top of Page')
  66. i.icon-arrow-up2
  67. +tocMenu(pageData.tree)
  68. .column
  69. .hero
  70. h1.title#title= pageData.meta.title
  71. if pageData.meta.subtitle
  72. h2.subtitle= pageData.meta.subtitle
  73. .content.mkcontent(v-pre)
  74. != pageData.html
  75. modal-create-page(basepath=pageData.meta.path)
  76. modal-move-page(current-path=pageData.meta.path)
  77. anchor