Caching + Edit Mode UI
This commit is contained in:
		| @@ -1,30 +1,33 @@ | ||||
|  | ||||
| nav.nav.has-shadow.stickyscroll | ||||
| 	.nav-left | ||||
| 		a.nav-item.is-brand(href='/') | ||||
| 			img(src='/favicons/android-icon-96x96.png', alt='Wiki') | ||||
| 		a.nav-item(href='/') | ||||
| 			h1.title Wiki | ||||
| 		block rootNavLeft | ||||
| 			a.nav-item.is-brand(href='/') | ||||
| 				img(src='/favicons/android-icon-96x96.png', alt='Wiki') | ||||
| 			a.nav-item(href='/') | ||||
| 				h1.title Wiki | ||||
| 	.nav-center | ||||
| 		p.nav-item | ||||
| 			input.input(type='text', placeholder='Search...', style= { 'max-width': '300px', width: '33vw' }) | ||||
| 		block rootNavCenter | ||||
| 			p.nav-item | ||||
| 				input.input(type='text', placeholder='Search...', style= { 'max-width': '300px', width: '33vw' }) | ||||
| 	span.nav-toggle | ||||
| 		span | ||||
| 		span | ||||
| 		span | ||||
| 	.nav-right.nav-menu | ||||
| 		a.nav-item(href='#') | ||||
| 			| History | ||||
| 		a.nav-item(href='#') | ||||
| 			| Source | ||||
| 		span.nav-item | ||||
| 			a.button | ||||
| 				span.icon | ||||
| 					i.fa.fa-edit | ||||
| 				span Edit | ||||
| 			a.button.is-primary(href='#', onclick='$(".modal").addClass("is-active");') | ||||
| 				span.icon | ||||
| 					i.fa.fa-plus | ||||
| 				span Create | ||||
| 		block rootNavRight | ||||
| 			a.nav-item(href='#') | ||||
| 				| History | ||||
| 			a.nav-item(href='#') | ||||
| 				| Source | ||||
| 			span.nav-item | ||||
| 				a.button | ||||
| 					span.icon | ||||
| 						i.fa.fa-edit | ||||
| 					span Edit | ||||
| 				a.button.is-primary(href='#', onclick='$(".modal").addClass("is-active");') | ||||
| 					span.icon | ||||
| 						i.fa.fa-plus | ||||
| 					span Create | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -3,14 +3,22 @@ html | ||||
| 	head | ||||
| 		meta(http-equiv='X-UA-Compatible', content='IE=edge') | ||||
| 		meta(charset='UTF-8') | ||||
| 		meta(name='viewport', content='width=device-width, initial-scale=1') | ||||
| 		meta(name='theme-color', content='#009688') | ||||
| 		meta(name='msapplication-TileColor', content='#009688') | ||||
| 		meta(name='msapplication-TileImage', content='/favicons/ms-icon-144x144.png') | ||||
| 		title= appconfig.title | ||||
|  | ||||
| 		// Favicon | ||||
| 		each favsize in [57, 60, 72, 76, 114, 120, 144, 152, 180] | ||||
| 			link(rel='apple-touch-icon', sizes=favsize + 'x' + favsize, href='/favicons/apple-icon-' + favsize + 'x' + favsize + '.png') | ||||
| 		link(rel='icon', type='image/png', sizes='192x192', href='/favicons/android-icon-192x192.png') | ||||
| 		each favsize in [32, 96, 16] | ||||
| 			link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize href='/images/favicon-' + favsize + 'x' + favsize + '.png') | ||||
| 			link(rel='icon', type='image/png', sizes=favsize + 'x' + favsize, href='/favicons/favicon-' + favsize + 'x' + favsize + '.png') | ||||
| 		link(rel='manifest', href='/manifest.json') | ||||
|  | ||||
| 		// CSS | ||||
| 		link(href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700|Inconsolata', rel='stylesheet', type='text/css') | ||||
| 		link(type='text/css', rel='stylesheet', href='/css/libs.css') | ||||
| 		link(type='text/css', rel='stylesheet', href='/css/app.css') | ||||
|  | ||||
| 	body(class='server-error') | ||||
|   | ||||
							
								
								
									
										24
									
								
								views/pages/edit.pug
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								views/pages/edit.pug
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| extends ../layout | ||||
|  | ||||
| block rootNavCenter | ||||
| 	h2.nav-item= pageData.meta.title | ||||
|  | ||||
| block rootNavRight | ||||
| 	a.nav-item(href='#') | ||||
| 		| History | ||||
| 	a.nav-item(href='#') | ||||
| 		| Source | ||||
| 	span.nav-item | ||||
| 		a.button.is-danger(href='/' + pageData.meta.path) | ||||
| 			span.icon | ||||
| 				i.fa.fa-times | ||||
| 			span Discard | ||||
| 		a.button.is-success(href='#', onclick='$(".modal").addClass("is-active");') | ||||
| 			span.icon | ||||
| 				i.fa.fa-check | ||||
| 			span Save Changes | ||||
|  | ||||
| block content | ||||
|  | ||||
| 	section.section.is-small | ||||
| 		textarea#mk-editor= pageData.markdown | ||||
| @@ -8,6 +8,21 @@ mixin tocMenu(ti) | ||||
| 				ul | ||||
| 					+tocMenu(node.nodes) | ||||
|  | ||||
| block rootNavRight | ||||
| 	a.nav-item(href='#') | ||||
| 		| History | ||||
| 	a.nav-item(href='#') | ||||
| 		| Source | ||||
| 	span.nav-item | ||||
| 		a.button(href='/edit/' + pageData.meta.path) | ||||
| 			span.icon | ||||
| 				i.fa.fa-edit | ||||
| 			span Edit | ||||
| 		a.button.is-primary(href='#', onclick='$(".modal").addClass("is-active");') | ||||
| 			span.icon | ||||
| 				i.fa.fa-plus | ||||
| 			span Create | ||||
|  | ||||
| block content | ||||
|  | ||||
| 	section.section | ||||
| @@ -23,8 +38,9 @@ block content | ||||
| 							ul.menu-list | ||||
| 								li | ||||
| 									a(href='/') Home | ||||
| 								li | ||||
| 									a(href='/') Storage | ||||
| 								if pageData.parent | ||||
| 									li | ||||
| 										a(href='/' + pageData.parent.path)= pageData.parent.title | ||||
| 								li | ||||
| 									a(href='/account') Account | ||||
| 					.box.stickyscroll(data-margin-top=70) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user