0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-04 16:52:38 +00:00
This commit is contained in:
Victor Losada Hernandez
2023-01-30 20:34:15 +01:00
12 changed files with 2035 additions and 2023 deletions

View File

@@ -134,7 +134,7 @@ const BrewRenderer = createClass({
renderStyle : function() { renderStyle : function() {
if(!this.props.style) return; if(!this.props.style) return;
return <div style={{ display: 'none' }} dangerouslySetInnerHTML={{ __html: `<style> ${this.props.style} </style>` }} />; return <div style={{ display: 'none' }} dangerouslySetInnerHTML={{ __html: `<style>@layer styleTab {\n${this.props.style}\n} </style>` }} />;
}, },
renderPage : function(pageText, index){ renderPage : function(pageText, index){

View File

@@ -219,12 +219,13 @@ const ListPage = createClass({
render : function(){ render : function(){
return <div className='listPage sitePage'> return <div className='listPage sitePage'>
<style>@layer V3_5ePHB, bundle;</style>
<link href='/themes/V3/5ePHB/style.css' rel='stylesheet'/> <link href='/themes/V3/5ePHB/style.css' rel='stylesheet'/>
{this.props.navItems} {this.props.navItems}
{this.renderSortOptions()} {this.renderSortOptions()}
<div className='content V3'> <div className='content V3'>
<div className='phb page'> <div className='page'>
{this.renderBrewCollection(this.state.brewCollection)} {this.renderBrewCollection(this.state.brewCollection)}
</div> </div>
</div> </div>

View File

@@ -10,14 +10,14 @@
-moz-column-width : auto; -moz-column-width : auto;
-webkit-column-gap : auto; -webkit-column-gap : auto;
-moz-column-gap : auto; -moz-column-gap : auto;
}
.listPage{
.content{
.phb{
.noColumns();
height : auto; height : auto;
min-height : 279.4mm; min-height : 279.4mm;
margin : 20px auto; margin : 20px auto;
}
.listPage{
.content{
.page{
.noColumns() !important; //Needed to override PHB Theme since this is on a lower @layer
&::after{ &::after{
display : none; display : none;
} }

View File

@@ -60,7 +60,7 @@ const PrintPage = createClass({
renderStyle : function() { renderStyle : function() {
if(!this.state.brew.style) return; if(!this.state.brew.style) return;
return <div style={{ display: 'none' }} dangerouslySetInnerHTML={{ __html: `<style> ${this.state.brew.style} </style>` }} />; return <div style={{ display: 'none' }} dangerouslySetInnerHTML={{ __html: `<style>@layer styleTab {\n${this.state.brew.style}\n} </style>` }} />;
}, },
renderPages : function(){ renderPages : function(){

28
package-lock.json generated
View File

@@ -46,8 +46,8 @@
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git" "vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.32.0", "eslint": "^8.33.0",
"eslint-plugin-react": "^7.32.1", "eslint-plugin-react": "^7.32.2",
"jest": "^29.4.1", "jest": "^29.4.1",
"supertest": "^6.3.3" "supertest": "^6.3.3"
}, },
@@ -6186,9 +6186,9 @@
} }
}, },
"node_modules/eslint": { "node_modules/eslint": {
"version": "8.32.0", "version": "8.33.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.32.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.33.0.tgz",
"integrity": "sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ==", "integrity": "sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@eslint/eslintrc": "^1.4.1", "@eslint/eslintrc": "^1.4.1",
@@ -6242,9 +6242,9 @@
} }
}, },
"node_modules/eslint-plugin-react": { "node_modules/eslint-plugin-react": {
"version": "7.32.1", "version": "7.32.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz",
"integrity": "sha512-vOjdgyd0ZHBXNsmvU+785xY8Bfe57EFbTYYk8XrROzWpr9QBvpjITvAXt9xqcE6+8cjR/g1+mfumPToxsl1www==", "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"array-includes": "^3.1.6", "array-includes": "^3.1.6",
@@ -21434,9 +21434,9 @@
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="
}, },
"eslint": { "eslint": {
"version": "8.32.0", "version": "8.33.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.32.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.33.0.tgz",
"integrity": "sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ==", "integrity": "sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@eslint/eslintrc": "^1.4.1", "@eslint/eslintrc": "^1.4.1",
@@ -21553,9 +21553,9 @@
} }
}, },
"eslint-plugin-react": { "eslint-plugin-react": {
"version": "7.32.1", "version": "7.32.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz",
"integrity": "sha512-vOjdgyd0ZHBXNsmvU+785xY8Bfe57EFbTYYk8XrROzWpr9QBvpjITvAXt9xqcE6+8cjR/g1+mfumPToxsl1www==", "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==",
"dev": true, "dev": true,
"requires": { "requires": {
"array-includes": "^3.1.6", "array-includes": "^3.1.6",

View File

@@ -104,8 +104,8 @@
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git" "vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^8.32.0", "eslint": "^8.33.0",
"eslint-plugin-react": "^7.32.1", "eslint-plugin-react": "^7.32.2",
"jest": "^29.4.1", "jest": "^29.4.1",
"supertest": "^6.3.3" "supertest": "^6.3.3"
} }

View File

@@ -20,7 +20,8 @@ const transforms = {
}; };
const build = async ({ bundle, render, ssr })=>{ const build = async ({ bundle, render, ssr })=>{
const css = await lessTransform.generate({ paths: './shared' }); let css = await lessTransform.generate({ paths: './shared' });
css = `@layer bundle {\n${css}\n}`;
await fs.outputFile('./build/homebrew/bundle.css', css); await fs.outputFile('./build/homebrew/bundle.css', css);
await fs.outputFile('./build/homebrew/bundle.js', bundle); await fs.outputFile('./build/homebrew/bundle.js', bundle);
await fs.outputFile('./build/homebrew/ssr.js', ssr); await fs.outputFile('./build/homebrew/ssr.js', ssr);

View File

@@ -1,3 +1,4 @@
@layer Legacy_5ePHB {
@import (less) './themes/fonts/5e legacy/fonts.less'; @import (less) './themes/fonts/5e legacy/fonts.less';
@import (less) './themes/assets/assets.less'; @import (less) './themes/assets/assets.less';
@import (less) './themes/phb.depricated.less'; @import (less) './themes/phb.depricated.less';
@@ -495,3 +496,4 @@ body {
margin-bottom : 10px; margin-bottom : 10px;
} }
} }
}

View File

@@ -1,3 +1,4 @@
@layer V3_5eDMG {
:root { :root {
//Colors //Colors
--HB_Color_Accent : #EBCEC3; // Salmon --HB_Color_Accent : #EBCEC3; // Salmon
@@ -17,3 +18,4 @@
bottom : 40px; bottom : 40px;
} }
} }
}

View File

@@ -1,3 +1,4 @@
@layer V3_5ePHB {
@import (less) './themes/fonts/5e/fonts.less'; @import (less) './themes/fonts/5e/fonts.less';
@import (less) './themes/assets/assets.less'; @import (less) './themes/assets/assets.less';
@@ -794,3 +795,4 @@ body {
.page h1 + *{ .page h1 + *{
margin-top : 0; margin-top : 0;
} }
}

View File

@@ -1,3 +1,4 @@
@layer V3_Blank {
@import (less) './themes/fonts/5e/fonts.less'; @import (less) './themes/fonts/5e/fonts.less';
@import (less) './themes/assets/assets.less'; @import (less) './themes/assets/assets.less';
@@ -274,3 +275,4 @@ body {
} }
} }
} }
}

View File

@@ -1,3 +1,4 @@
@layer V3_Journal {
@import (less) './themes/fonts/Journal/fonts.less'; @import (less) './themes/fonts/Journal/fonts.less';
@import (less) './themes/assets/assets.less'; @import (less) './themes/assets/assets.less';
@@ -557,3 +558,4 @@
.page .wide { .page .wide {
margin-bottom : 0.45cm; margin-bottom : 0.45cm;
} }
}