mirror of
https://github.com/stolksdorf/homebrewery.git
synced 2025-12-17 22:11:29 +00:00
Spelllist is rendering nicely
This commit is contained in:
@@ -8,9 +8,14 @@ var renderer = new Markdown.Renderer();
|
|||||||
//Processes the markdown within an HTML block if it's just a class-wrapper
|
//Processes the markdown within an HTML block if it's just a class-wrapper
|
||||||
renderer.html = function (html) {
|
renderer.html = function (html) {
|
||||||
if(_.startsWith(html, '<div class=') && _.endsWith(_.trim(html), '</div>')){
|
if(_.startsWith(html, '<div class=') && _.endsWith(_.trim(html), '</div>')){
|
||||||
var openTag = html.substring(0, html.indexOf('>'));
|
var openTag = html.substring(0, html.indexOf('>')+1);
|
||||||
html = html.substring(html.indexOf('>')+1);
|
html = html.substring(html.indexOf('>')+1);
|
||||||
html = html.substring(0, html.lastIndexOf('</div>'));
|
html = html.substring(0, html.lastIndexOf('</div>'));
|
||||||
|
|
||||||
|
console.log(html);
|
||||||
|
|
||||||
|
console.log(Markdown(html));
|
||||||
|
|
||||||
return `${openTag} ${Markdown(html)} </div>`;
|
return `${openTag} ${Markdown(html)} </div>`;
|
||||||
}
|
}
|
||||||
return html;
|
return html;
|
||||||
|
|||||||
@@ -64,17 +64,17 @@
|
|||||||
}
|
}
|
||||||
ul{
|
ul{
|
||||||
margin-bottom : 0.8em;
|
margin-bottom : 0.8em;
|
||||||
|
padding-left : 1.4em;
|
||||||
line-height : 1.3em;
|
line-height : 1.3em;
|
||||||
list-style-position : outside;
|
list-style-position : outside;
|
||||||
list-style-type : disc;
|
list-style-type : disc;
|
||||||
padding-left: 1.4em;
|
|
||||||
}
|
}
|
||||||
ol{
|
ol{
|
||||||
margin-bottom : 0.8em;
|
margin-bottom : 0.8em;
|
||||||
|
padding-left : 1.4em;
|
||||||
line-height : 1.3em;
|
line-height : 1.3em;
|
||||||
list-style-position : outside;
|
list-style-position : outside;
|
||||||
list-style-type : decimal;
|
list-style-type : decimal;
|
||||||
padding-left: 1.4em;
|
|
||||||
}
|
}
|
||||||
img{
|
img{
|
||||||
z-index : -1;
|
z-index : -1;
|
||||||
@@ -169,15 +169,15 @@
|
|||||||
// *****************************/
|
// *****************************/
|
||||||
blockquote{
|
blockquote{
|
||||||
.useSansSerif();
|
.useSansSerif();
|
||||||
box-sizing : border-box;
|
box-sizing : border-box;
|
||||||
margin-bottom : 1em;
|
margin-bottom : 1em;
|
||||||
padding : 5px 10px;
|
padding : 5px 10px;
|
||||||
background-color : @noteGreen;
|
background-color : @noteGreen;
|
||||||
border-style: solid;
|
border-style : solid;
|
||||||
border-width: 11px;
|
border-width : 11px;
|
||||||
border-image: @noteBorderImage 11;
|
border-image : @noteBorderImage 11;
|
||||||
border-image-outset: 9px 0px;
|
border-image-outset : 9px 0px;
|
||||||
box-shadow : 1px 4px 14px #888;
|
box-shadow : 1px 4px 14px #888;
|
||||||
p, ul{
|
p, ul{
|
||||||
font-size : 0.352cm;
|
font-size : 0.352cm;
|
||||||
line-height : 1.1em;
|
line-height : 1.1em;
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
}
|
}
|
||||||
//If a note starts a column, give it space at the top to render border
|
//If a note starts a column, give it space at the top to render border
|
||||||
pre+blockquote{
|
pre+blockquote{
|
||||||
margin-top: 11px;
|
margin-top : 11px;
|
||||||
}
|
}
|
||||||
//*****************************
|
//*****************************
|
||||||
// * MONSTER STAT BLOCK
|
// * MONSTER STAT BLOCK
|
||||||
@@ -222,8 +222,8 @@
|
|||||||
margin : 0;
|
margin : 0;
|
||||||
column-span : 1;
|
column-span : 1;
|
||||||
background-color : transparent;
|
background-color : transparent;
|
||||||
|
border-style : none;
|
||||||
border-image : none;
|
border-image : none;
|
||||||
border-style : none;
|
|
||||||
-webkit-column-span : 1;
|
-webkit-column-span : 1;
|
||||||
tbody{
|
tbody{
|
||||||
tr:nth-child(odd), tr:nth-child(even){
|
tr:nth-child(odd), tr:nth-child(even){
|
||||||
@@ -339,7 +339,7 @@
|
|||||||
-moz-column-span : all;
|
-moz-column-span : all;
|
||||||
}
|
}
|
||||||
//Column Break
|
//Column Break
|
||||||
pre{
|
pre, code{
|
||||||
visibility : hidden;
|
visibility : hidden;
|
||||||
-webkit-column-break-after : always;
|
-webkit-column-break-after : always;
|
||||||
break-after : always;
|
break-after : always;
|
||||||
@@ -367,6 +367,31 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//*****************************
|
//*****************************
|
||||||
|
// * SPELL LIST
|
||||||
|
// *****************************/
|
||||||
|
.phb .spellList{
|
||||||
|
.useSansSerif();
|
||||||
|
column-count : 4;
|
||||||
|
column-span : all;
|
||||||
|
-webkit-column-span : all;
|
||||||
|
-moz-column-span : all;
|
||||||
|
ul+h5{
|
||||||
|
margin-top : 15px;
|
||||||
|
}
|
||||||
|
p, ul{
|
||||||
|
font-size : 0.352cm;
|
||||||
|
line-height : 1.3em;
|
||||||
|
}
|
||||||
|
ul{
|
||||||
|
margin-bottom : 0.5em;
|
||||||
|
padding-left : 1em;
|
||||||
|
text-indent : -1em;
|
||||||
|
list-style-type : none;
|
||||||
|
-webkit-column-break-inside : auto;
|
||||||
|
column-break-inside : auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//*****************************
|
||||||
// * PRINT
|
// * PRINT
|
||||||
// *****************************/
|
// *****************************/
|
||||||
.phb.print{
|
.phb.print{
|
||||||
|
|||||||
Reference in New Issue
Block a user