diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index fde91fc68..9208a2b90 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -45,12 +45,13 @@ let rawPages = []; const BrewRenderer = (props)=>{ props = { - text : '', - style : '', - renderer : 'legacy', - theme : '5ePHB', - lang : '', - errors : [], + text : '', + style : '', + renderer : 'legacy', + theme : '5ePHB', + lang : '', + errors : [], + currentEditorPage : 0, ...props }; @@ -94,6 +95,9 @@ const BrewRenderer = (props)=>{ if(Math.abs(index - state.viewablePageNumber) <= 3) return true; + if(index + 1 == props.currentEditorPage) + return true; + return false; }; @@ -143,6 +147,9 @@ const BrewRenderer = (props)=>{ if(props.errors && props.errors.length) return renderedPages; + if(rawPages.length != renderedPages.length) // Re-render all pages when page count changes + renderedPages.length = 0; + _.forEach(rawPages, (page, index)=>{ if((shouldRender(index) || !renderedPages[index]) && typeof window !== 'undefined'){ renderedPages[index] = renderPage(page, index); // Render any page not yet rendered, but only re-render those in PPR range diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx index d60e51388..75fe0d736 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.jsx +++ b/client/homebrew/editor/snippetbar/snippetbar.jsx @@ -74,6 +74,7 @@ const Snippetbar = createClass({ } }, + mergeCustomizer : function(valueA, valueB, key) { if(key == 'snippets') { const result = _.reverse(_.unionBy(_.reverse(valueB), _.reverse(valueA), 'name')); // Join snippets together, with preference for the current theme over the base theme @@ -102,10 +103,12 @@ const Snippetbar = createClass({ this.props.onInject(injectedText); }, - toggleThemeSelector : function(){ - this.setState({ - themeSelector : !this.state.themeSelector - }); + toggleThemeSelector : function(e){ + if(e.target.tagName != 'SELECT'){ + this.setState({ + themeSelector : !this.state.themeSelector + }); + } }, changeTheme : function(e){ @@ -119,7 +122,7 @@ const Snippetbar = createClass({ renderThemeSelector : function(){ return
- {EditorThemes.map((theme, key)=>{ return ; })} @@ -176,8 +179,9 @@ const Snippetbar = createClass({
+ {this.state.themeSelector && this.renderThemeSelector()}
- {this.state.themeSelector && this.renderThemeSelector()} +
this.props.onViewChange('text')}> @@ -228,7 +232,7 @@ const SnippetGroup = createClass({ return _.map(snippets, (snippet)=>{ return
this.handleSnippetClick(e, snippet)}> - {snippet.name} + {snippet.name} {snippet.experimental && beta} {snippet.subsnippets && <> diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less index 7d00229b4..c6f3152a7 100644 --- a/client/homebrew/editor/snippetbar/snippetbar.less +++ b/client/homebrew/editor/snippetbar/snippetbar.less @@ -1,173 +1,190 @@ @import (less) './client/icons/customIcons.less'; -.snippetBar{ +@import (less) '././././themes/fonts/5e/fonts.less'; + +.snippetBar { @menuHeight : 25px; position : relative; height : @menuHeight; - background-color : #ddd; - color : black; + color : black; + background-color : #DDDDDD; - .editors{ + .editors { position : absolute; - display : flex; top : 0px; right : 0px; - height : @menuHeight; + display : flex; justify-content : space-between; - &>div{ - height : @menuHeight; + height : @menuHeight; + & > div { width : @menuHeight; - cursor : pointer; + height : @menuHeight; line-height : @menuHeight; text-align : center; - &:hover,&.selected{ - background-color : #999; - } - &.text{ + cursor : pointer; + &:hover,&.selected { background-color : #999999; } + &.text { .tooltipLeft('Brew Editor'); } - &.style{ + &.style { .tooltipLeft('Style Editor'); } - &.meta{ + &.meta { .tooltipLeft('Properties'); } - &.undo{ + &.undo { .tooltipLeft('Undo'); font-size : 0.75em; color : grey; - &.active{ - color : inherit; - } + &.active { color : inherit; } } - &.redo{ + &.redo { .tooltipLeft('Redo'); font-size : 0.75em; color : grey; - &.active{ - color : inherit; - } + &.active { color : inherit; } } - &.foldAll{ + &.foldAll { .tooltipLeft('Fold All'); font-size : 0.75em; color : inherit; } - &.unfoldAll{ + &.unfoldAll { .tooltipLeft('Unfold All'); font-size : 0.75em; color : inherit; } - &.editorTheme{ + &.editorTheme { .tooltipLeft('Editor Themes'); font-size : 0.75em; - color : inherit; - &.active{ - color : white; - background-color: black; + color : black; + &.active { + position : relative; + background-color : #999999; } } &.divider { - background: linear-gradient(currentColor, currentColor) no-repeat center/1px 100%; - width: 5px; - &:hover{ - background-color: inherit; - } + width : 5px; + background : linear-gradient(currentColor, currentColor) no-repeat center/1px 100%; + &:hover { background-color : inherit; } } } - .themeSelector{ - position: absolute; - left: -65px; - top: 30px; - z-index: 999; - width: 170px; - background-color: black; - border-radius: 5px; + .themeSelector { + position : absolute; + top : 25px; + right : 0; + z-index : 1; + display : flex; + align-items : center; + justify-content : center; + width : 170px; + height : inherit; + background-color : inherit; } } - .snippetBarButton{ - height : @menuHeight; - line-height : @menuHeight; + .snippetBarButton { display : inline-block; + height : @menuHeight; padding : 0px 5px; - font-weight : 800; font-size : 0.625em; + font-weight : 800; + line-height : @menuHeight; text-transform : uppercase; cursor : pointer; - &:hover, &.selected{ - background-color : #999; - } - i{ - vertical-align : middle; + &:hover, &.selected { background-color : #999999; } + i { margin-right : 3px; font-size : 1.4em; + vertical-align : middle; } } - .toggleMeta{ - position : absolute; - top : 0px; - right : 0px; - border-left : 1px solid black; - .tooltipLeft("Edit Brew Properties"); + .toggleMeta { + position : absolute; + top : 0px; + right : 0px; + border-left : 1px solid black; + .tooltipLeft('Edit Brew Properties'); } - .snippetGroup{ + .snippetGroup { border-right : 1px solid currentColor; - &:hover{ - &>.dropdown{ - visibility : visible; - } + &:hover { + & > .dropdown { visibility : visible; } } - .dropdown{ + .dropdown { position : absolute; top : 100%; - visibility : hidden; z-index : 1000; - margin-left : -5px; padding : 0px; - background-color : #ddd; - .snippet{ - position: relative; - .animate(background-color); + margin-left : -5px; + visibility : hidden; + background-color : #DDDDDD; + .snippet { + position : relative; display : flex; align-items : center; min-width : max-content; padding : 5px; - cursor : pointer; font-size : 10px; - i{ + cursor : pointer; + .animate(background-color); + i { + height : 1.2em; margin-right : 8px; font-size : 1.2em; - height : 1.2em; - &~i{ - margin-right: 0; - margin-left: 5px; + & ~ i { + margin-right : 0; + margin-left : 5px; + } + /* Fonts */ + &.font { + height : auto; + &::before { + font-size : 1.4em; + content : 'ABC'; + } + + &.OpenSans {font-family : 'OpenSans';} + &.CodeBold {font-family : 'CodeBold';} + &.CodeLight {font-family : 'CodeLight';} + &.ScalySansRemake {font-family : 'ScalySansRemake';} + &.BookInsanityRemake {font-family : 'BookInsanityRemake';} + &.MrEavesRemake {font-family : 'MrEavesRemake';} + &.SolberaImitationRemake {font-family : 'SolberaImitationRemake';} + &.ScalySansSmallCapsRemake {font-family : 'ScalySansSmallCapsRemake';} + &.WalterTurncoat {font-family : 'WalterTurncoat';} + &.Lato {font-family : 'Lato';} + &.Courier {font-family : 'Courier';} + &.NodestoCapsCondensed {font-family : 'NodestoCapsCondensed';} + &.Overpass {font-family : 'Overpass';} + &.Davek {font-family : 'Davek';} + &.Iokharic {font-family : 'Iokharic';} + &.Rellanic {font-family : 'Rellanic';} + &.TimesNewRoman {font-family : 'Times New Roman';} } } - .name { - margin-right : auto; - } + .name { margin-right : auto; } .beta { - color : white; - padding : 4px 6px; - line-height : 1em; - margin-left : 5px; align-self : center; + padding : 4px 6px; + margin-left : 5px; + font-family : monospace; + line-height : 1em; + color : white; background : grey; border-radius : 12px; - font-family : monospace; } - &:hover{ - background-color : #999; - &>.dropdown{ + &:hover { + background-color : #999999; + & > .dropdown { visibility : visible; &.side { - left: 100%; - top: 0%; - margin-left:0; - box-shadow: -1px 1px 2px 0px #999; + top : 0%; + left : 100%; + margin-left : 0; + box-shadow : -1px 1px 2px 0px #999999; } } } } } } -} +} \ No newline at end of file diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx index bb9b5ca52..bec60d6a8 100644 --- a/client/homebrew/pages/editPage/editPage.jsx +++ b/client/homebrew/pages/editPage/editPage.jsx @@ -50,7 +50,8 @@ const EditPage = createClass({ url : '', autoSave : true, autoSaveWarning : false, - unsavedTime : new Date() + unsavedTime : new Date(), + currentEditorPage : 0 }; }, savedBrew : null, @@ -109,9 +110,10 @@ const EditPage = createClass({ if(htmlErrors.length) htmlErrors = Markdown.validate(text); this.setState((prevState)=>({ - brew : { ...prevState.brew, text: text }, - isPending : true, - htmlErrors : htmlErrors + brew : { ...prevState.brew, text: text }, + isPending : true, + htmlErrors : htmlErrors, + currentEditorPage : this.refs.editor.getCurrentPage() }), ()=>{if(this.state.autoSave) this.trySave();}); }, @@ -405,6 +407,7 @@ const EditPage = createClass({ theme={this.state.brew.theme} errors={this.state.htmlErrors} lang={this.state.brew.lang} + currentEditorPage={this.state.currentEditorPage} />
diff --git a/package-lock.json b/package-lock.json index 87629d055..c4b70d07e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "license": "MIT", "dependencies": { "@babel/core": "^7.23.7", - "@babel/plugin-transform-runtime": "^7.23.6", + "@babel/plugin-transform-runtime": "^7.23.7", "@babel/preset-env": "^7.23.8", "@babel/preset-react": "^7.23.3", "@googleapis/drive": "^8.5.0", @@ -32,7 +32,7 @@ "marked": "5.1.1", "marked-extended-tables": "^1.0.8", "marked-gfm-heading-id": "^3.1.2", - "marked-smartypants-lite": "^1.0.1", + "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", "mongoose": "^8.0.4", @@ -41,14 +41,14 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-frame-component": "^4.1.3", - "react-router-dom": "6.21.0", + "react-router-dom": "6.21.2", "sanitize-filename": "1.6.3", "superagent": "^8.1.2", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" }, "devDependencies": { - "eslint": "^8.55.0", - "eslint-plugin-jest": "^27.6.1", + "eslint": "^8.56.0", + "eslint-plugin-jest": "^27.6.2", "eslint-plugin-react": "^7.33.2", "jest": "^29.7.0", "jest-expect-message": "^1.1.3", @@ -57,7 +57,7 @@ "stylelint-config-recess-order": "^4.4.0", "stylelint-config-recommended": "^13.0.0", "stylelint-stylistic": "^0.4.3", - "supertest": "^6.3.3" + "supertest": "^6.3.4" }, "engines": { "node": "^20.8.x", @@ -1455,15 +1455,15 @@ } }, "node_modules/@babel/plugin-transform-runtime": { - "version": "7.23.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.6.tgz", - "integrity": "sha512-kF1Zg62aPseQ11orDhFRw+aPG/eynNQtI+TyY+m33qJa2cJ5EEvza2P2BNTIA9E5MyqFABHEyY6CPHwgdy9aNg==", + "version": "7.23.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.23.7.tgz", + "integrity": "sha512-fa0hnfmiXc9fq/weK34MUV0drz2pOL/vfKWvN7Qw127hiUPabFCUMgAbYWcchRzMJit4o5ARsK/s+5h0249pLw==", "dependencies": { "@babel/helper-module-imports": "^7.22.15", "@babel/helper-plugin-utils": "^7.22.5", - "babel-plugin-polyfill-corejs2": "^0.4.6", - "babel-plugin-polyfill-corejs3": "^0.8.5", - "babel-plugin-polyfill-regenerator": "^0.5.3", + "babel-plugin-polyfill-corejs2": "^0.4.7", + "babel-plugin-polyfill-corejs3": "^0.8.7", + "babel-plugin-polyfill-regenerator": "^0.5.4", "semver": "^6.3.1" }, "engines": { @@ -1957,9 +1957,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", - "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2837,9 +2837,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.14.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.14.0.tgz", - "integrity": "sha512-WOHih+ClN7N8oHk9N4JUiMxQJmRVaOxcg8w7F/oHUXzJt920ekASLI/7cYX8XkntDWRhLZtsk6LbGrkgOAvi5A==", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.14.2.tgz", + "integrity": "sha512-ACXpdMM9hmKZww21yEqWwiLws/UPLhNKvimN8RrYSqPSvB3ov7sLvAcfvaxePeLvccTQKGdkDIhLYApZVDFuKg==", "engines": { "node": ">=14.0.0" } @@ -5587,15 +5587,15 @@ } }, "node_modules/eslint": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", - "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.55.0", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -5642,9 +5642,9 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "27.6.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.1.tgz", - "integrity": "sha512-WEYkyVXD9NlmFBKvrkmzrC+C9yZoz5pAml2hO19PlS3spJtoiwj4p2u8spd/7zx5IvRsZsCmsoImaAvBB9X93Q==", + "version": "27.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.2.tgz", + "integrity": "sha512-CI1AlKrsNhYFoP48VU8BVWOi7+qHTq4bRxyUlGjeU8SfFt8abjXhjOuDzUoMp68DoXIx17KpNpIkMrl4s4ZW0g==", "dev": true, "dependencies": { "@typescript-eslint/utils": "^5.10.0" @@ -10071,11 +10071,11 @@ } }, "node_modules/marked-smartypants-lite": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/marked-smartypants-lite/-/marked-smartypants-lite-1.0.1.tgz", - "integrity": "sha512-XeK3ephFrim4MBLJCCSxx6whqE9HiIt9JsSLR5x3FySid5iopUJkI23/rx+HUhuavFFdRAnPIIaDxHsFBc5clg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/marked-smartypants-lite/-/marked-smartypants-lite-1.0.2.tgz", + "integrity": "sha512-cEANts+s3+gnTzXPvPT2z4V8NfbMEL9QooKUviug0DkaKkXQWrUwDAmFnQAkLSJCw2BQcD8YPDyxu0HJ3mg36w==", "peerDependencies": { - "marked": ">= 4.0.0 < 10" + "marked": ">=4 <12" } }, "node_modules/markedLegacy": { @@ -11873,11 +11873,11 @@ "dev": true }, "node_modules/react-router": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.21.0.tgz", - "integrity": "sha512-hGZ0HXbwz3zw52pLZV3j3+ec+m/PQ9cTpBvqjFQmy2XVUWGn5MD+31oXHb6dVTxYzmAeaiUBYjkoNz66n3RGCg==", + "version": "6.21.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.21.2.tgz", + "integrity": "sha512-jJcgiwDsnaHIeC+IN7atO0XiSRCrOsQAHHbChtJxmgqG2IaYQXSnhqGb5vk2CU/wBQA12Zt+TkbuJjIn65gzbA==", "dependencies": { - "@remix-run/router": "1.14.0" + "@remix-run/router": "1.14.2" }, "engines": { "node": ">=14.0.0" @@ -11887,12 +11887,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.21.0.tgz", - "integrity": "sha512-1dUdVj3cwc1npzJaf23gulB562ESNvxf7E4x8upNJycqyUm5BRRZ6dd3LrlzhtLaMrwOCO8R0zoiYxdaJx4LlQ==", + "version": "6.21.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.21.2.tgz", + "integrity": "sha512-tE13UukgUOh2/sqYr6jPzZTzmzc70aGRP4pAjG2if0IP3aUT+sBtAKUJh0qMh0zylJHGLmzS+XWVaON4UklHeg==", "dependencies": { - "@remix-run/router": "1.14.0", - "react-router": "6.21.0" + "@remix-run/router": "1.14.2", + "react-router": "6.21.2" }, "engines": { "node": ">=14.0.0" @@ -13519,13 +13519,13 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/supertest": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.3.tgz", - "integrity": "sha512-EMCG6G8gDu5qEqRQ3JjjPs6+FYT1a7Hv5ApHvtSghmOFJYtsU5S+pSb6Y2EUeCEY3CmEL3mmQ8YWlPOzQomabA==", + "version": "6.3.4", + "resolved": "https://registry.npmjs.org/supertest/-/supertest-6.3.4.tgz", + "integrity": "sha512-erY3HFDG0dPnhw4U+udPfrzXa4xhSG+n4rxfRuZWCUvjFWwKl+OxWf/7zk50s84/fAAs7vf5QAb9uRa0cCykxw==", "dev": true, "dependencies": { "methods": "^1.1.2", - "superagent": "^8.0.5" + "superagent": "^8.1.2" }, "engines": { "node": ">=6.4.0" diff --git a/package.json b/package.json index 8d0cd668f..f8777da3f 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ }, "dependencies": { "@babel/core": "^7.23.7", - "@babel/plugin-transform-runtime": "^7.23.6", + "@babel/plugin-transform-runtime": "^7.23.7", "@babel/preset-env": "^7.23.8", "@babel/preset-react": "^7.23.3", "@googleapis/drive": "^8.5.0", @@ -101,7 +101,7 @@ "marked": "5.1.1", "marked-extended-tables": "^1.0.8", "marked-gfm-heading-id": "^3.1.2", - "marked-smartypants-lite": "^1.0.1", + "marked-smartypants-lite": "^1.0.2", "markedLegacy": "npm:marked@^0.3.19", "moment": "^2.30.1", "mongoose": "^8.0.4", @@ -110,14 +110,14 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-frame-component": "^4.1.3", - "react-router-dom": "6.21.0", + "react-router-dom": "6.21.2", "sanitize-filename": "1.6.3", "superagent": "^8.1.2", "vitreum": "git+https://git@github.com/calculuschild/vitreum.git" }, "devDependencies": { - "eslint": "^8.55.0", - "eslint-plugin-jest": "^27.6.1", + "eslint": "^8.56.0", + "eslint-plugin-jest": "^27.6.2", "eslint-plugin-react": "^7.33.2", "jest": "^29.7.0", "jest-expect-message": "^1.1.3", @@ -126,6 +126,6 @@ "stylelint-config-recess-order": "^4.4.0", "stylelint-config-recommended": "^13.0.0", "stylelint-stylistic": "^0.4.3", - "supertest": "^6.3.3" + "supertest": "^6.3.4" } } diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 209e54b08..6c6634ce7 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -1,5 +1,6 @@ @import (less) './themes/fonts/5e/fonts.less'; @import (less) './themes/assets/assets.less'; +@import (less) './themes/fonts/icon fonts/font-icons.less'; :root { //Colors diff --git a/themes/V3/Blank/snippets.js b/themes/V3/Blank/snippets.js index e437c0535..122666055 100644 --- a/themes/V3/Blank/snippets.js +++ b/themes/V3/Blank/snippets.js @@ -304,6 +304,99 @@ module.exports = [ } ] }, + /**************** FONTS *************/ + { + groupName : 'Fonts', + icon : 'fas fa-keyboard', + view : 'text', + snippets : [ + { + name : 'Open Sans', + icon : 'font OpenSans', + gen : dedent`{{font-family:OpenSans Dummy Text}}` + }, + { + name : 'Code Bold', + icon : 'font CodeBold', + gen : dedent`{{font-family:CodeBold Dummy Text}}` + }, + { + name : 'Code Light', + icon : 'font CodeLight', + gen : dedent`{{font-family:CodeLight Dummy Text}}` + }, + { + name : 'Scaly Sans Remake', + icon : 'font ScalySansRemake', + gen : dedent`{{font-family:ScalySansRemake Dummy Text}}` + }, + { + name : 'Book Insanity Remake', + icon : 'font BookInsanityRemake', + gen : dedent`{{font-family:BookInsanityRemake Dummy Text}}` + }, + { + name : 'Mr Eaves Remake', + icon : 'font MrEavesRemake', + gen : dedent`{{font-family:MrEavesRemake Dummy Text}}` + }, + { + name: 'Solbera Imitation Remake', + icon: 'font SolberaImitationRemake', + gen: dedent`{{font-family:SolberaImitationRemake Dummy Text}}` + }, + { + name: 'Scaly Sans Small Caps Remake', + icon: 'font ScalySansSmallCapsRemake', + gen: dedent`{{font-family:ScalySansSmallCapsRemake Dummy Text}}` + }, + { + name: 'Walter Turncoat', + icon: 'font WalterTurncoat', + gen: dedent`{{font-family:WalterTurncoat Dummy Text}}` + }, + { + name: 'Lato', + icon: 'font Lato', + gen: dedent`{{font-family:Lato Dummy Text}}` + }, + { + name: 'Courier', + icon: 'font Courier', + gen: dedent`{{font-family:Courier Dummy Text}}` + }, + { + name: 'Nodesto Caps Condensed', + icon: 'font NodestoCapsCondensed', + gen: dedent`{{font-family:NodestoCapsCondensed Dummy Text}}` + }, + { + name: 'Overpass', + icon: 'font Overpass', + gen: dedent`{{font-family:Overpass Dummy Text}}` + }, + { + name: 'Davek', + icon: 'font Davek', + gen: dedent`{{font-family:Davek Dummy Text}}` + }, + { + name: 'Iokharic', + icon: 'font Iokharic', + gen: dedent`{{font-family:Iokharic Dummy Text}}` + }, + { + name: 'Rellanic', + icon: 'font Rellanic', + gen: dedent`{{font-family:Rellanic Dummy Text}}` + }, + { + name: 'Times New Roman', + icon: 'font TimesNewRoman', + gen: dedent`{{font-family:"Times New Roman" Dummy Text}}` + } + ] + }, /**************** PAGE *************/ diff --git a/themes/fonts/icon fonts/Elderberry-Inn-Icons.woff2 b/themes/fonts/icon fonts/Elderberry-Inn-Icons.woff2 new file mode 100644 index 000000000..030deb92a Binary files /dev/null and b/themes/fonts/icon fonts/Elderberry-Inn-Icons.woff2 differ diff --git a/themes/fonts/icon fonts/font-icons.less b/themes/fonts/icon fonts/font-icons.less new file mode 100644 index 000000000..f8eb19f11 --- /dev/null +++ b/themes/fonts/icon fonts/font-icons.less @@ -0,0 +1,224 @@ +/* Main Font, serif */ +@font-face { + font-family : 'Eldeberry-Inn'; + font-style : normal; + font-weight : normal; + src : url('../../../fonts/icon fonts/Elderberry-Inn-Icons.woff2'); +} + +.page { + span.ei { + display : inline-block; + margin-right : 3px; + font-family : 'Eldeberry-Inn'; + line-height : 1; + vertical-align : baseline; + -moz-osx-font-smoothing : grayscale; + -webkit-font-smoothing : antialiased; + text-rendering : auto; + + &.book::before { content : '\E900'; } + &.screen::before { content : '\E901'; } + + /* Spell levels */ + &.spell-0::before { content : '\E902'; } + &.spell-1::before { content : '\E903'; } + &.spell-2::before { content : '\E904'; } + &.spell-3::before { content : '\E905'; } + &.spell-4::before { content : '\E906'; } + &.spell-5::before { content : '\E907'; } + &.spell-6::before { content : '\E908'; } + &.spell-7::before { content : '\E909'; } + &.spell-8::before { content : '\E90A'; } + &.spell-9::before { content : '\E90B'; } + + /* Damage types */ + &.acid::before { content : '\E90C'; } + &.bludgeoning::before { content : '\E90D'; } + &.cold::before { content : '\E90E'; } + &.fire::before { content : '\E90F'; } + &.force::before { content : '\E910'; } + &.lightning::before { content : '\E911'; } + &.necrotic::before { content : '\E912'; } + &.piercing::before { content : '\E914'; } + &.poison::before { content : '\E913'; } + &.psychic::before { content : '\E915'; } + &.radiant::before { content : '\E916'; } + &.slashing::before { content : '\E917'; } + &.thunder::before { content : '\E918'; } + + /* DnD Conditions */ + &.blinded::before { content : '\E919'; } + &.charmed::before { content : '\E91A'; } + &.deafened::before { content : '\E91B'; } + &.exhaust-1::before { content : '\E91C'; } + &.exhaust-2::before { content : '\E91D'; } + &.exhaust-3::before { content : '\E91E'; } + &.exhaust-4::before { content : '\E91F'; } + &.exhaust-5::before { content : '\E920'; } + &.exhaust-6::before { content : '\E921'; } + &.frightened::before { content : '\E922'; } + &.grappled::before { content : '\E923'; } + &.incapacitated::before { content : '\E924'; } + &.invisible::before { content : '\E926'; } + &.paralyzed::before { content : '\E927'; } + &.petrified::before { content : '\E928'; } + &.poisoned::before { content : '\E929'; } + &.prone::before { content : '\E92A'; } + &.restrained::before { content : '\E92B'; } + &.stunned::before { content : '\E92C'; } + &.unconscious::before { content : '\E925'; } + + /* Character Classes and Features */ + &.barbarian-rage::before { content : '\E92D'; } + &.barbarian-reckless-attack::before { content : '\E92E'; } + &.bardic-inspiration::before { content : '\E92F'; } + &.cleric-channel-divinity::before { content : '\E930'; } + &.druid-wild-shape::before { content : '\E931'; } + &.fighter-action-surge::before { content : '\E932'; } + &.fighter-second-wind::before { content : '\E933'; } + &.monk-flurry-blows::before { content : '\E934'; } + &.monk-patient-defense::before { content : '\E935'; } + &.monk-step-of-the-wind::before { content : '\E936'; } + &.monk-step-of-the-wind-2::before { content : '\E937'; } + &.monk-step-of-the-wind-3::before { content : '\E938'; } + &.monk-stunning-strike::before { content : '\E939'; } + &.monk-stunning-strike-2::before { content : '\E939'; } + &.paladin-divine-smite::before { content : '\E93B'; } + &.paladin-lay-on-hands::before { content : '\E93C'; } + &.barbarian-abilities::before { content : '\E93D'; } + &.barbarian::before { content : '\E93E'; } + &.bard-abilities::before { content : '\E93F'; } + &.bard::before { content : '\E940'; } + &.cleric-abilities::before { content : '\E941'; } + &.cleric::before { content : '\E942'; } + &.druid-abilities::before { content : '\E943'; } + &.druid::before { content : '\E944'; } + &.fighter-abilities::before { content : '\E945'; } + &.fighter::before { content : '\E946'; } + &.monk-abilities::before { content : '\E947'; } + &.monk::before { content : '\E948'; } + &.paladin-abilities::before { content : '\E949'; } + &.paladin::before { content : '\E94A'; } + &.ranger-abilities::before { content : '\E94B'; } + &.ranger::before { content : '\E94C'; } + &.rogue-abilities::before { content : '\E94D'; } + &.rogue::before { content : '\E94E'; } + &.sorcerer-abilities::before { content : '\E94F'; } + &.sorcerer::before { content : '\E950'; } + &.warlock-abilities::before { content : '\E951'; } + &.warlock::before { content : '\E952'; } + &.wizard-abilities::before { content : '\E953'; } + &.wizard::before { content : '\E954'; } + + /* Types of actions */ + &.movement::before { content : '\E955'; } + &.action::before { content : '\E956'; } + &.bonus-action::before { content : '\E957'; } + &.reaction::before { content : '\E958'; } + + /* SRD Spells */ + &.acid-arrow::before { content : '\E959'; } + &.action-1::before { content : '\E95A'; } + &.alter-self::before { content : '\E95B'; } + &.alter-self-2::before { content : '\E95C'; } + &.animal-friendship::before { content : '\E95E'; } + &.animate-dead::before { content : '\E95F'; } + &.animate-objects::before { content : '\E960'; } + &.animate-objects-2::before { content : '\E961'; } + &.bane::before { content : '\E962'; } + &.bless::before { content : '\E963'; } + &.blur::before { content : '\E964'; } + &.bonus::before { content : '\E965'; } + &.branding-smite::before { content : '\E966'; } + &.burning-hands::before { content : '\E967'; } + &.charm-person::before { content : '\E968'; } + &.chill-touch::before { content : '\E969'; } + &.cloudkill::before { content : '\E96A'; } + &.comprehend-languages::before { content : '\E96B'; } + &.cone-of-cold::before { content : '\E96C'; } + &.conjure-elemental::before { content : '\E96D'; } + &.conjure-minor-elemental::before { content : '\E96E'; } + &.control-water::before { content : '\E96F'; } + &.counterspell::before { content : '\E970'; } + &.cure-wounds::before { content : '\E971'; } + &.dancing-lights::before { content : '\E972'; } + &.darkness::before { content : '\E973'; } + &.detect-magic::before { content : '\E974'; } + &.disguise-self::before { content : '\E975'; } + &.disintegrate::before { content : '\E976'; } + &.dispel-evil-and-good::before { content : '\E977'; } + &.dispel-magic::before { content : '\E978'; } + &.dominate-monster::before { content : '\E979'; } + &.dominate-person::before { content : '\E97A'; } + &.eldritch-blast::before { content : '\E97B'; } + &.enlarge-reduce::before { content : '\E97C'; } + &.entangle::before { content : '\E97D'; } + &.faerie-fire::before { content : '\E97E'; } + &.faerie-fire2::before { content : '\E97F'; } + &.feather-fall::before { content : '\E980'; } + &.find-familiar::before { content : '\E981'; } + &.finger-of-death::before { content : '\E982'; } + &.fireball::before { content : '\E983'; } + &.floating-disk::before { content : '\E984'; } + &.fly::before { content : '\E985'; } + &.fog-cloud::before { content : '\E986'; } + &.gaseous-form::before { content : '\E987'; } + &.gaseous-form2::before { content : '\E988'; } + &.gentle-repose::before { content : '\E989'; } + &.gentle-repose2::before { content : '\E98A'; } + &.globe-of-invulnerability::before { content : '\E98B'; } + &.guiding-bolt::before { content : '\E98C'; } + &.healing-word::before { content : '\E98D'; } + &.heat-metal::before { content : '\E98E'; } + &.hellish-rebuke::before { content : '\E98F'; } + &.heroes-feast::before { content : '\E990'; } + &.heroism::before { content : '\E991'; } + &.hideous-laughter::before { content : '\E992'; } + &.identify::before { content : '\E993'; } + &.illusory-script::before { content : '\E994'; } + &.inflict-wounds::before { content : '\E995'; } + &.light::before { content : '\E996'; } + &.longstrider::before { content : '\E997'; } + &.mage-armor::before { content : '\E998'; } + &.mage-hand::before { content : '\E999'; } + &.magic-missile::before { content : '\E99A'; } + &.mass-cure-wounds::before { content : '\E99B'; } + &.mass-healing-word::before { content : '\E99C'; } + &.Mending::before { content : '\E99D'; } + &.message::before { content : '\E99E'; } + &.Minor-illusion::before { content : '\E99F'; } + &.movement1::before { content : '\E9A0'; } + &.polymorph::before { content : '\E9A1'; } + &.power-word-kill::before { content : '\E9A2'; } + &.power-word-stun::before { content : '\E9A3'; } + &.prayer-of-healing::before { content : '\E9A4'; } + &.prestidigitation::before { content : '\E9A5'; } + &.protection-from-evil-and-good::before { content : '\E9A6'; } + &.raise-read::before { content : '\E9A7'; } + &.raise-read2::before { content : '\E9A8'; } + &.reaction1::before { content : '\E9A9'; } + &.resurrection::before { content : '\E9AA'; } + &.resurrection2::before { content : '\E9AB'; } + &.revivify::before { content : '\E9AC'; } + &.revivify2::before { content : '\E9AD'; } + &.sacred-flame::before { content : '\E9AE'; } + &.sanctuary::before { content : '\E9AF'; } + &.scorching-ray::before { content : '\E9B0'; } + &.sending::before { content : '\E9B1'; } + &.shatter::before { content : '\E9B2'; } + &.shield::before { content : '\E9B3'; } + &.silent-image::before { content : '\E9B4'; } + &.sleep::before { content : '\E9B5'; } + &.speak-with-animals::before { content : '\E9B6'; } + &.telekinesis::before { content : '\E9B7'; } + &.true-strike::before { content : '\E9B8'; } + &.vicious-mockery::before { content : '\E9B9'; } + &.wall-of-fire::before { content : '\E9BA'; } + &.wall-of-force::before { content : '\E9BB'; } + &.wall-of-ice::before { content : '\E9BC'; } + &.wall-of-stone::before { content : '\E9BD'; } + &.wall-of-thorns::before { content : '\E9BE'; } + &.wish::before { content : '\E9BF'; } + } +} \ No newline at end of file