view.pug 1.59 KB
Newer Older
1
extends ../layout.pug
NGPixel's avatar
NGPixel committed
2

3 4 5 6 7 8 9 10
mixin tocMenu(ti)
	each node in ti
		li
			a(href='#' + node.anchor, title=node.content)= node.content
			if node.nodes.length > 0
				ul
					+tocMenu(node.nodes)

NGPixel's avatar
NGPixel committed
11
block rootNavRight
12
	i.nav-item#notifload
NGPixel's avatar
NGPixel committed
13
	.nav-item
14 15 16 17
		if rights.write
			a.button.is-outlined.btn-move-prompt.is-hidden
				i.icon-shuffle
				span Move
NGPixel's avatar
NGPixel committed
18 19 20
		a.button.is-outlined(href='/source/' + pageData.meta.path)
			i.icon-loader
			span Source
21 22 23 24 25 26 27
		if rights.write
			a.button(href='/edit/' + pageData.meta.path)
				i.icon-document-text
				span Edit
			a.button.btn-create-prompt
				i.icon-plus
				span Create
NGPixel's avatar
NGPixel committed
28

NGPixel's avatar
NGPixel committed
29 30
block content

31
	#page-type-view(data-entrypath=pageData.meta.path)
NGPixel's avatar
NGPixel committed
32 33
		.container.is-fluid
			.columns.is-gapless
NGPixel's avatar
NGPixel committed
34

NGPixel's avatar
NGPixel committed
35
				.column.is-narrow.is-hidden-touch.sidebar
NGPixel's avatar
NGPixel committed
36

NGPixel's avatar
NGPixel committed
37 38 39 40 41 42 43 44 45 46 47 48 49 50
					aside
						.sidebar-label
							i.icon-th-small
							span Navigation
						ul.sidebar-menu
							li
								a(href='/')
									i.icon-home
									span Home
							if pageData.parent
								li
									a(href='/' + pageData.parent.path)
										i.icon-reply
										span= pageData.parent.title
51 52 53 54 55
							if !isGuest
								li
									a(href='/admin')
										i.icon-head
										span Account
NGPixel's avatar
NGPixel committed
56 57 58 59 60 61 62
					aside.stickyscroll(data-margin-top=40)
						.sidebar-label
							i.icon-th-list
							span Contents
						ul.sidebar-menu
							li: a(href='#root', title='Start') Start
							+tocMenu(pageData.tree)
NGPixel's avatar
NGPixel committed
63

NGPixel's avatar
NGPixel committed
64
				.column
65

NGPixel's avatar
NGPixel committed
66
					.hero
67 68 69
						h1.title#title= pageData.meta.title
						if pageData.meta.subtitle
							h2.subtitle= pageData.meta.subtitle
NGPixel's avatar
NGPixel committed
70 71
					.content.mkcontent
						!= pageData.html
NGPixel's avatar
NGPixel committed
72

73
	include ../modals/create.pug
NGPixel's avatar
NGPixel committed
74
	include ../modals/move.pug