Create mode + Source view + UI enhancements
This commit is contained in:
		| @@ -4,7 +4,7 @@ footer.footer | ||||
| 			p | ||||
| 				= t('footer.poweredby') + ' ' | ||||
| 				a(href='https://github.com/Requarks/wiki') Requarks Wiki | ||||
| 				| . | ||||
| 				p | ||||
| 					a.icon(href='https://github.com/Requarks/wiki') | ||||
| 						i.fa.fa-github | ||||
| 			p | ||||
| 				a.icon(href='https://github.com/Requarks/wiki') | ||||
| 					i.fa.fa-github | ||||
| 					 | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
|  | ||||
| nav.nav.has-shadow.stickyscroll | ||||
| nav.nav.has-shadow.stickyscroll#header | ||||
| 	.nav-left | ||||
| 		block rootNavLeft | ||||
| 			a.nav-item.is-brand(href='/') | ||||
| @@ -17,16 +17,16 @@ nav.nav.has-shadow.stickyscroll | ||||
| 	.nav-right.nav-menu | ||||
| 		block rootNavRight | ||||
| 			i.nav-item#notifload | ||||
| 			a.nav-item(href='#') | ||||
| 			a.nav-item(href='/history/' + pageData.meta.path) | ||||
| 				| History | ||||
| 			a.nav-item(href='#') | ||||
| 			a.nav-item(href='/source/' + pageData.meta.path) | ||||
| 				| Source | ||||
| 			span.nav-item | ||||
| 				a.button | ||||
| 				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");') | ||||
| 				a.button.is-primary.btn-create-prompt | ||||
| 					span.icon | ||||
| 						i.fa.fa-plus | ||||
| 					span Create | ||||
|   | ||||
							
								
								
									
										17
									
								
								views/modals/create.pug
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								views/modals/create.pug
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | ||||
|  | ||||
| .modal#modal-create-prompt | ||||
| 	.modal-background | ||||
| 	.modal-container | ||||
| 		.modal-content | ||||
| 			.card.is-fullwidth | ||||
| 				header.card-header | ||||
| 					p.card-header-title Create New Page | ||||
| 				.card-content | ||||
| 					.content | ||||
| 						label.label Enter the new document path: | ||||
| 						p.control | ||||
| 							input.input(type='text', placeholder='page-name')#txt-create-prompt | ||||
| 							span.help.is-danger.is-hidden This document path is invalid! | ||||
| 				footer.card-footer | ||||
| 					a.card-footer-item.btn-create-prompt Discard | ||||
| 					a.card-footer-item.btn-create-go Create | ||||
							
								
								
									
										14
									
								
								views/modals/edit.pug
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								views/modals/edit.pug
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
|  | ||||
| .modal#modal-edit-discard | ||||
| 	.modal-background | ||||
| 	.modal-container | ||||
| 		.modal-content | ||||
| 			.card.is-fullwidth | ||||
| 				header.card-header.is-warning | ||||
| 					p.card-header-title Discard? | ||||
| 				.card-content | ||||
| 					.content | ||||
| 						| Are you sure you want to leave this page and loose any modifications? | ||||
| 				footer.card-footer | ||||
| 					a.card-footer-item.btn-edit-discard Stay on page | ||||
| 					a.card-footer-item(href='/' + pageData.meta.path) Discard | ||||
							
								
								
									
										36
									
								
								views/pages/create.pug
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								views/pages/create.pug
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| extends ../layout | ||||
|  | ||||
| block rootNavCenter | ||||
| 	h2.nav-item Create New Document | ||||
|  | ||||
| block rootNavRight | ||||
| 	i.nav-item#notifload | ||||
| 	span.nav-item | ||||
| 		a.button.is-warning.btn-create-discard | ||||
| 			span.icon | ||||
| 				i.fa.fa-times | ||||
| 			span Discard | ||||
| 		a.button.is-success.btn-create-save | ||||
| 			span.icon | ||||
| 				i.fa.fa-check | ||||
| 			span Save Document | ||||
|  | ||||
| block content | ||||
|  | ||||
| 	#page-type-create(data-entrypath=pageData.meta.path) | ||||
| 		section.section.is-small | ||||
| 			textarea#mk-editor= pageData.markdown | ||||
|  | ||||
| 	.modal#modal-create-discard | ||||
| 		.modal-background | ||||
| 		.modal-container | ||||
| 			.modal-content | ||||
| 				.card.is-fullwidth | ||||
| 					header.card-header.is-warning | ||||
| 						p.card-header-title Discard? | ||||
| 					.card-content | ||||
| 						.content | ||||
| 							| Are you sure you want to leave this page and loose anything you wrote so far? | ||||
| 					footer.card-footer | ||||
| 						a.card-footer-item.btn-create-discard Stay on page | ||||
| 						a.card-footer-item(href='/') Discard | ||||
| @@ -5,9 +5,9 @@ block rootNavCenter | ||||
|  | ||||
| block rootNavRight | ||||
| 	i.nav-item#notifload | ||||
| 	a.nav-item(href='#') | ||||
| 	a.nav-item(href='/history/' + pageData.meta.path, target='_blank') | ||||
| 		| History | ||||
| 	a.nav-item(href='#') | ||||
| 	a.nav-item(href='/source/' + pageData.meta.path, target='_blank') | ||||
| 		| Source | ||||
| 	span.nav-item | ||||
| 		a.button.is-warning.btn-edit-discard | ||||
| @@ -25,16 +25,4 @@ block content | ||||
| 		section.section.is-small | ||||
| 			textarea#mk-editor= pageData.markdown | ||||
|  | ||||
| 	.modal#modal-edit-discard | ||||
| 		.modal-background | ||||
| 		.modal-container | ||||
| 			.modal-content | ||||
| 				.card.is-fullwidth | ||||
| 					header.card-header.is-warning | ||||
| 						p.card-header-title Discard? | ||||
| 					.card-content | ||||
| 						.content | ||||
| 							| Are you sure you want to leave this page and loose any modifications? | ||||
| 					footer.card-footer | ||||
| 						a.card-footer-item.btn-edit-discard Stay on page | ||||
| 						a.card-footer-item(href='/' + pageData.meta.path) Discard | ||||
| 	include ../modals/edit | ||||
							
								
								
									
										9
									
								
								views/pages/source.pug
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								views/pages/source.pug
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| extends ../layout | ||||
|  | ||||
| block content | ||||
|  | ||||
| 	#page-type-source(data-entrypath=pageData.meta.path) | ||||
| 		.ace-container | ||||
| 			#source-display= pageData.markdown | ||||
|  | ||||
| 	include ../modals/create | ||||
| @@ -10,16 +10,16 @@ mixin tocMenu(ti) | ||||
|  | ||||
| block rootNavRight | ||||
| 	i.nav-item#notifload | ||||
| 	a.nav-item(href='#') | ||||
| 	a.nav-item(href='/history/' + pageData.meta.path) | ||||
| 		| History | ||||
| 	a.nav-item(href='#') | ||||
| 	a.nav-item(href='/source/' + pageData.meta.path) | ||||
| 		| 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");') | ||||
| 		a.button.is-primary.btn-create-prompt | ||||
| 			span.icon | ||||
| 				i.fa.fa-plus | ||||
| 			span Create | ||||
| @@ -61,18 +61,4 @@ block content | ||||
| 						.content.mkcontent | ||||
| 							!= pageData.html | ||||
|  | ||||
| 	.modal | ||||
| 		.modal-background | ||||
| 		.modal-container | ||||
| 			.modal-content | ||||
| 				.card.is-fullwidth | ||||
| 					header.card-header | ||||
| 						p.card-header-title Create New Page | ||||
| 					.card-content | ||||
| 						.content | ||||
| 							label.label Enter the new document name: | ||||
| 							p.control | ||||
| 								input.input(type='text', placeholder='page-name') | ||||
| 					footer.card-footer | ||||
| 						a.card-footer-item(onclick='$(".modal").removeClass("is-active");') Discard | ||||
| 						a.card-footer-item.featured Create | ||||
| 	include ../modals/create | ||||
|   | ||||
		Reference in New Issue
	
	Block a user