mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-07 09:52:41 +00:00
Give spellList "wide" class for consistency
This commit is contained in:
@@ -131,7 +131,7 @@ const BrewRenderer = createClass({
|
|||||||
if(this.props.renderer == 'legacy')
|
if(this.props.renderer == 'legacy')
|
||||||
return <div className='phb page' id={`p${index + 1}`} dangerouslySetInnerHTML={{ __html: MarkdownLegacy.render(pageText) }} key={index} />;
|
return <div className='phb page' id={`p${index + 1}`} dangerouslySetInnerHTML={{ __html: MarkdownLegacy.render(pageText) }} key={index} />;
|
||||||
else {
|
else {
|
||||||
pageText += `\n\\column\n `; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
|
pageText += `\n \n\\column\n `; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
|
||||||
return (
|
return (
|
||||||
<div className='page' id={`p${index + 1}`} key={index} >
|
<div className='page' id={`p${index + 1}`} key={index} >
|
||||||
<div className='columnWrapper' dangerouslySetInnerHTML={{ __html: Markdown.render(pageText) }} />
|
<div className='columnWrapper' dangerouslySetInnerHTML={{ __html: Markdown.render(pageText) }} />
|
||||||
|
|||||||
@@ -60,13 +60,13 @@ module.exports = {
|
|||||||
const levels = ['Cantrips (0 Level)', '1st Level', '2nd Level', '3rd Level', '4th Level', '5th Level', '6th Level', '7th Level', '8th Level', '9th Level'];
|
const levels = ['Cantrips (0 Level)', '1st Level', '2nd Level', '3rd Level', '4th Level', '5th Level', '6th Level', '7th Level', '8th Level', '9th Level'];
|
||||||
|
|
||||||
const content = _.map(levels, (level)=>{
|
const content = _.map(levels, (level)=>{
|
||||||
const spells = _.map(_.sampleSize(spellNames, _.random(5, 15)), (spell)=>{
|
const spells = _.map(_.sampleSize(spellNames, _.random(4, 10)), (spell)=>{
|
||||||
return `- ${spell}`;
|
return `- ${spell}`;
|
||||||
}).join('\n');
|
}).join('\n');
|
||||||
return `##### ${level} \n${spells} \n`;
|
return `##### ${level} \n${spells} \n`;
|
||||||
}).join('\n');
|
}).join('\n');
|
||||||
|
|
||||||
return `{{spellList\n${content}\n}}`;
|
return `{{spellList,wide\n${content}\n}}`;
|
||||||
},
|
},
|
||||||
|
|
||||||
spell : function(){
|
spell : function(){
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const PrintPage = createClass({
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return _.map(this.state.brewText.split(/^\\page$/gm), (pageText, index)=>{
|
return _.map(this.state.brewText.split(/^\\page$/gm), (pageText, index)=>{
|
||||||
pageText += `\n\\column\n `; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
|
pageText += `\n \n\\column\n `; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
|
||||||
return (
|
return (
|
||||||
<div className='page' id={`p${index + 1}`} key={index} >
|
<div className='page' id={`p${index + 1}`} key={index} >
|
||||||
<div className='columnWrapper' dangerouslySetInnerHTML={{ __html: Markdown.render(pageText) }} />
|
<div className='columnWrapper' dangerouslySetInnerHTML={{ __html: Markdown.render(pageText) }} />
|
||||||
|
|||||||
@@ -567,10 +567,7 @@ body {
|
|||||||
// *****************************/
|
// *****************************/
|
||||||
.page .spellList{
|
.page .spellList{
|
||||||
.useSansSerif();
|
.useSansSerif();
|
||||||
column-count : 4;
|
column-count : 2;
|
||||||
column-span : all;
|
|
||||||
-webkit-column-span : all;
|
|
||||||
-moz-column-span : all;
|
|
||||||
ul+h5{
|
ul+h5{
|
||||||
margin-top : 15px;
|
margin-top : 15px;
|
||||||
}
|
}
|
||||||
@@ -587,6 +584,9 @@ body {
|
|||||||
page-break-inside : auto;
|
page-break-inside : auto;
|
||||||
break-inside : auto;
|
break-inside : auto;
|
||||||
}
|
}
|
||||||
|
&.wide{
|
||||||
|
column-count : 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************
|
//*****************************
|
||||||
@@ -717,7 +717,7 @@ body {
|
|||||||
break-inside : avoid;
|
break-inside : avoid;
|
||||||
display : inline-block;
|
display : inline-block;
|
||||||
min-width : 100%;
|
min-width : 100%;
|
||||||
-webkit-transform : translateZ(0); //Prevents shadows from breaking across columns
|
//-webkit-transform : translateZ(0); //Prevents shadows from breaking across columns
|
||||||
}
|
}
|
||||||
.inline-block {
|
.inline-block {
|
||||||
display : inline-block;
|
display : inline-block;
|
||||||
|
|||||||
Reference in New Issue
Block a user