Modals styling + Fix for gapless first <p>
This commit is contained in:
parent
985761556c
commit
fc7e7d3d5a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -152,9 +152,17 @@ const parseContent = (content) => {
|
|||||||
let output = mkdown.render(content);
|
let output = mkdown.render(content);
|
||||||
let cr = cheerio.load(output);
|
let cr = cheerio.load(output);
|
||||||
|
|
||||||
//-> Style table headers
|
//-> Check for empty first element
|
||||||
|
|
||||||
//cr('table').addClass('table is-bordered is-striped is-narrow');
|
let firstElm = cr.root().children().first()[0];
|
||||||
|
if(firstElm.type === 'tag' && firstElm.name === 'p') {
|
||||||
|
let firstElmChildren = firstElm.children;
|
||||||
|
if(firstElmChildren.length < 1) {
|
||||||
|
firstElm.remove();
|
||||||
|
} else if(firstElmChildren.length === 1 && firstElmChildren[0].type === 'tag' && firstElmChildren[0].name === 'img') {
|
||||||
|
cr(firstElm).addClass('is-gapless');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//-> Remove links in headers
|
//-> Remove links in headers
|
||||||
|
|
||||||
|
@ -2,12 +2,9 @@
|
|||||||
.modal-background
|
.modal-background
|
||||||
.modal-container
|
.modal-container
|
||||||
.modal-content
|
.modal-content
|
||||||
.card.is-fullwidth
|
header.is-orange Discard?
|
||||||
header.card-header.is-warning
|
section
|
||||||
p.card-header-title Discard?
|
span Are you sure you want to leave this page and loose anything you wrote so far?
|
||||||
.card-content
|
footer
|
||||||
.content
|
a.button.is-grey.is-outlined.btn-create-discard Stay on page
|
||||||
| Are you sure you want to leave this page and loose anything you wrote so far?
|
a.button.is-orange(href='/') Discard
|
||||||
footer.card-footer
|
|
||||||
a.card-footer-item.btn-create-discard Stay on page
|
|
||||||
a.card-footer-item(href='/') Discard
|
|
@ -3,15 +3,12 @@
|
|||||||
.modal-background
|
.modal-background
|
||||||
.modal-container
|
.modal-container
|
||||||
.modal-content
|
.modal-content
|
||||||
.card.is-fullwidth
|
header.is-light-blue Create New Document
|
||||||
header.card-header
|
section
|
||||||
p.card-header-title Create New Page
|
label.label Enter the new document path:
|
||||||
.card-content
|
p.control.is-fullwidth
|
||||||
.content
|
input.input(type='text', placeholder='page-name')#txt-create-prompt
|
||||||
label.label Enter the new document path:
|
span.help.is-danger.is-hidden This document path is invalid!
|
||||||
p.control
|
footer
|
||||||
input.input(type='text', placeholder='page-name')#txt-create-prompt
|
a.button.is-grey.is-outlined.btn-create-prompt Discard
|
||||||
span.help.is-danger.is-hidden This document path is invalid!
|
a.button.is-light-blue.btn-create-go Create
|
||||||
footer.card-footer
|
|
||||||
a.card-footer-item.btn-create-prompt Discard
|
|
||||||
a.card-footer-item.btn-create-go Create
|
|
@ -3,12 +3,9 @@
|
|||||||
.modal-background
|
.modal-background
|
||||||
.modal-container
|
.modal-container
|
||||||
.modal-content
|
.modal-content
|
||||||
.card.is-fullwidth
|
header.is-orange Discard?
|
||||||
header.card-header.is-warning
|
section
|
||||||
p.card-header-title Discard?
|
span Are you sure you want to leave this page and loose any modifications?
|
||||||
.card-content
|
footer
|
||||||
.content
|
a.button.is-grey.is-outlined.btn-edit-discard Stay on page
|
||||||
| Are you sure you want to leave this page and loose any modifications?
|
a.button.is-orange(href='/' + pageData.meta.path) Discard
|
||||||
footer.card-footer
|
|
||||||
a.card-footer-item.btn-edit-discard Stay on page
|
|
||||||
a.card-footer-item(href='/' + pageData.meta.path) Discard
|
|
@ -3,16 +3,13 @@
|
|||||||
.modal-background
|
.modal-background
|
||||||
.modal-container
|
.modal-container
|
||||||
.modal-content
|
.modal-content
|
||||||
.card.is-fullwidth
|
header.is-indigo Move document
|
||||||
header.card-header.is-info
|
section
|
||||||
p.card-header-title Move document
|
label.label Enter the new document path:
|
||||||
.card-content
|
p.control.is-fullwidth
|
||||||
.content
|
input.input(type='text', placeholder='page-name')#txt-move-prompt
|
||||||
label.label Enter the new document path:
|
span.help.is-red.is-hidden This document path is invalid or not allowed!
|
||||||
p.control
|
span.note Note that moving or renaming documents can lead to broken links. Make sure to edit any page that links to this document afterwards!
|
||||||
input.input(type='text', placeholder='page-name')#txt-move-prompt
|
footer
|
||||||
span.help.is-danger.is-hidden This document path is invalid or not allowed!
|
a.button.is-grey.is-outlined.btn-move-prompt Discard
|
||||||
span Note that moving or renaming documents can lead to broken links. Make sure to edit any page that links to this document afterwards!
|
a.button.is-indigo.btn-move-go Move
|
||||||
footer.card-footer
|
|
||||||
a.card-footer-item.btn-move-prompt Discard
|
|
||||||
a.card-footer-item.btn-move-go Move
|
|
Loading…
Reference in New Issue
Block a user