Commit 63f1ec30 authored by NGPixel's avatar NGPixel

Headers section styling

parent 593481c7
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -177,13 +177,33 @@ const parseContent = (content) => {
if(cr(elm).children().length > 0) {
let bqLastChild = cr(elm).children().last()[0];
let bqLastChildClasses = cr(bqLastChild).attr('class');
if(bqLastChildClasses.length > 0) {
if(bqLastChildClasses && bqLastChildClasses.length > 0) {
cr(bqLastChild).removeAttr('class');
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();
return output;
......
......@@ -24,6 +24,6 @@ html
body(class='is-forbidden')
.container
a(href='/'): img(src='/favicons/android-icon-96x96.png')
h1.title(style={ 'margin-top': '30px'}) Forbidden
h2.subtitle(style={ 'margin-bottom': '50px'}) Sorry, you don't have the necessary permissions to access this page.
h1 Forbidden
h2 Sorry, you don't have the necessary permissions to access this page.
a.button.is-amber.is-inverted(href='/') Go Home
\ No newline at end of file
......@@ -26,5 +26,5 @@ html
a(href='/'): img(src='/favicons/android-icon-96x96.png')
h1= message
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
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment