Headers section styling
This commit is contained in:
parent
593481c7e1
commit
63f1ec30b4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -177,13 +177,33 @@ const parseContent = (content) => {
|
|||||||
if(cr(elm).children().length > 0) {
|
if(cr(elm).children().length > 0) {
|
||||||
let bqLastChild = cr(elm).children().last()[0];
|
let bqLastChild = cr(elm).children().last()[0];
|
||||||
let bqLastChildClasses = cr(bqLastChild).attr('class');
|
let bqLastChildClasses = cr(bqLastChild).attr('class');
|
||||||
if(bqLastChildClasses.length > 0) {
|
if(bqLastChildClasses && bqLastChildClasses.length > 0) {
|
||||||
cr(bqLastChild).removeAttr('class');
|
cr(bqLastChild).removeAttr('class');
|
||||||
cr(elm).addClass(bqLastChildClasses);
|
cr(elm).addClass(bqLastChildClasses);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//-> Enclose content below headers
|
||||||
|
|
||||||
|
cr('h2').each((i, elm) => {
|
||||||
|
let subH2Content = cr(elm).nextUntil('h1, h2');
|
||||||
|
cr(elm).after('<div class="indent-h2"></div>');
|
||||||
|
let subH2Container = cr(elm).next('.indent-h2');
|
||||||
|
_.forEach(subH2Content, (ch) => {
|
||||||
|
cr(subH2Container).append(ch);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
cr('h3').each((i, elm) => {
|
||||||
|
let subH3Content = cr(elm).nextUntil('h1, h2, h3');
|
||||||
|
cr(elm).after('<div class="indent-h3"></div>');
|
||||||
|
let subH3Container = cr(elm).next('.indent-h3');
|
||||||
|
_.forEach(subH3Content, (ch) => {
|
||||||
|
cr(subH3Container).append(ch);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
output = cr.html();
|
output = cr.html();
|
||||||
|
|
||||||
return output;
|
return output;
|
||||||
|
@ -24,6 +24,6 @@ html
|
|||||||
body(class='is-forbidden')
|
body(class='is-forbidden')
|
||||||
.container
|
.container
|
||||||
a(href='/'): img(src='/favicons/android-icon-96x96.png')
|
a(href='/'): img(src='/favicons/android-icon-96x96.png')
|
||||||
h1.title(style={ 'margin-top': '30px'}) Forbidden
|
h1 Forbidden
|
||||||
h2.subtitle(style={ 'margin-bottom': '50px'}) Sorry, you don't have the necessary permissions to access this page.
|
h2 Sorry, you don't have the necessary permissions to access this page.
|
||||||
a.button.is-amber.is-inverted(href='/') Go Home
|
a.button.is-amber.is-inverted(href='/') Go Home
|
@ -26,5 +26,5 @@ html
|
|||||||
a(href='/'): img(src='/favicons/android-icon-96x96.png')
|
a(href='/'): img(src='/favicons/android-icon-96x96.png')
|
||||||
h1= message
|
h1= message
|
||||||
h2 Would you like to create this entry?
|
h2 Would you like to create this entry?
|
||||||
a.button.is-amber.is-inverted(href='/create/' + newpath) Create
|
a.button.is-amber.is-inverted.is-featured(href='/create/' + newpath) Create
|
||||||
a.button.is-amber.is-inverted(href='/') Go Home
|
a.button.is-amber.is-inverted(href='/') Go Home
|
Loading…
Reference in New Issue
Block a user