view.pug 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. i.nav-item#notifload
  11. .nav-item
  12. if rights.write
  13. a.button.is-outlined.btn-move-prompt.is-hidden
  14. i.icon-shuffle
  15. span Move
  16. a.button.is-outlined(href='/source/' + pageData.meta.path)
  17. i.icon-loader
  18. span Source
  19. if rights.write
  20. a.button(href='/edit/' + pageData.meta.path)
  21. i.icon-document-text
  22. span Edit
  23. a.button.btn-create-prompt
  24. i.icon-plus
  25. span Create
  26. block content
  27. #page-type-view.page-type-container(data-entrypath=pageData.meta.path)
  28. .container.is-fluid.has-mkcontent
  29. .columns.is-gapless
  30. .column.is-narrow.is-hidden-touch.sidebar
  31. aside
  32. .sidebar-label
  33. span Navigation
  34. ul.sidebar-menu
  35. li
  36. a(href='/')
  37. i.icon-home
  38. span Home
  39. li
  40. a(href='/all')
  41. i.icon-paper
  42. span All Pages
  43. if pageData.parent
  44. li
  45. a(href='/' + pageData.parent.path)
  46. i.icon-reply
  47. span= pageData.parent.title
  48. if !isGuest
  49. li
  50. a(href='/admin')
  51. i.icon-head
  52. span Account
  53. else
  54. li
  55. a(href='/login')
  56. i.icon-unlock
  57. span Login
  58. aside.stickyscroll
  59. .sidebar-label
  60. span Page Contents
  61. ul.sidebar-menu
  62. li: a(href='#root', title='Top of Page')
  63. i.icon-arrow-up2
  64. +tocMenu(pageData.tree)
  65. .column
  66. .hero
  67. h1.title#title= pageData.meta.title
  68. if pageData.meta.subtitle
  69. h2.subtitle= pageData.meta.subtitle
  70. .content.mkcontent
  71. != pageData.html
  72. include ../modals/create.pug
  73. include ../modals/move.pug