mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-26 20:33:11 +00:00
Compare commits
86 Commits
PreventInt
...
fdfcc88b97
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdfcc88b97 | ||
|
|
05ffd97f3a | ||
|
|
b120bac424 | ||
|
|
a9280b65ee | ||
|
|
7e4facb478 | ||
|
|
c9f1413a2d | ||
|
|
85252abeb5 | ||
|
|
ac583c64bc | ||
|
|
de75100200 | ||
|
|
d8aabb2f57 | ||
|
|
a823034d6e | ||
|
|
aa2362d822 | ||
|
|
2b58bf49d0 | ||
|
|
11d3cddff0 | ||
|
|
47c84428c7 | ||
|
|
3c3ca7981b | ||
|
|
d728126480 | ||
|
|
27861ba796 | ||
|
|
3f29eb227a | ||
|
|
f604d0a41f | ||
|
|
9f48755f80 | ||
|
|
33f5d26b39 | ||
|
|
3ad463cff7 | ||
|
|
6c8265688f | ||
|
|
d1f5c9da0d | ||
|
|
43e465ceb8 | ||
|
|
b864e9b677 | ||
|
|
28e02f1863 | ||
|
|
333614f866 | ||
|
|
efc8561447 | ||
|
|
9e80151eda | ||
|
|
d695f8f7bc | ||
|
|
ae47442ed5 | ||
|
|
34ee1853e1 | ||
|
|
fbf0d425e2 | ||
|
|
8fcadd87d4 | ||
|
|
2de151d348 | ||
|
|
1eff2dbedd | ||
|
|
4ccec08f21 | ||
|
|
3be62bd254 | ||
|
|
0d38b8607e | ||
|
|
5e35ae0c8b | ||
|
|
5f72dd2023 | ||
|
|
8b2c8c0feb | ||
|
|
4a5bb1efb1 | ||
|
|
460b12e356 | ||
|
|
c17a5e72b9 | ||
|
|
88bc9b79c9 | ||
|
|
a14ea89562 | ||
|
|
bb0a840113 | ||
|
|
d40f8ff380 | ||
|
|
99a85ccbca | ||
|
|
5ae2f3fff7 | ||
|
|
8bc5f7312e | ||
|
|
2b138e56db | ||
|
|
f141c0bebd | ||
|
|
7c050fb9a9 | ||
|
|
da134ffdcc | ||
|
|
a9b7a37c1b | ||
|
|
0ab882a33c | ||
|
|
917153e154 | ||
|
|
d6a7d0272a | ||
|
|
4fca207e0e | ||
|
|
d171077798 | ||
|
|
fdd4b3c1d5 | ||
|
|
785af639c7 | ||
|
|
4aadb0b238 | ||
|
|
005c05376c | ||
|
|
7af22c9da7 | ||
|
|
4b2142b00b | ||
|
|
fd8cc8d1a1 | ||
|
|
1ae37e3a27 | ||
|
|
11335f0bda | ||
|
|
60b1ee7db8 | ||
|
|
b915584f59 | ||
|
|
0ab56788c1 | ||
|
|
4d8ab13101 | ||
|
|
99d5c1b9e3 | ||
|
|
1a52347e9b | ||
|
|
2ed17e44e4 | ||
|
|
a2dd8af6d7 | ||
|
|
f7e4e1aa2a | ||
|
|
f6869d9c13 | ||
|
|
6aa35de27e | ||
|
|
5de7ea368e | ||
|
|
26a5cb9fab |
@@ -47,9 +47,7 @@ Make an changes you need to `config/docker.json` then build the image. If it doe
|
||||
"naturalcrit_url" : "local.naturalcrit.com:8010",
|
||||
"secret" : "secret",
|
||||
"web_port" : 8000,
|
||||
"enable_v3" : true,
|
||||
"mongodb_uri": "mongodb://172.17.0.2/homebrewery",
|
||||
"enable_themes" : true
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -409,7 +409,6 @@ const Editor = createClass({
|
||||
|
||||
//Called when there are changes to the editor's dimensions
|
||||
update : function(){
|
||||
this.codeEditor.current?.updateSize();
|
||||
const snipHeight = document.querySelector('.editor > .snippetBar').offsetHeight;
|
||||
if(snipHeight !== this.state.snippetbarHeight)
|
||||
this.setState({ snippetbarHeight: snipHeight });
|
||||
|
||||
@@ -207,8 +207,6 @@ const MetadataEditor = createClass({
|
||||
},
|
||||
|
||||
renderThemeDropdown : function(){
|
||||
if(!global.enable_themes) return;
|
||||
|
||||
const mergedThemes = _.merge(Themes, this.props.userThemes);
|
||||
|
||||
const listThemes = (renderer)=>{
|
||||
@@ -307,8 +305,6 @@ const MetadataEditor = createClass({
|
||||
},
|
||||
|
||||
renderRenderOptions : function(){
|
||||
if(!global.enable_v3) return;
|
||||
|
||||
return <div className='field systems'>
|
||||
<label>Renderer</label>
|
||||
<div className='value'>
|
||||
|
||||
@@ -27,8 +27,6 @@ const Homebrew = (props)=>{
|
||||
url = '',
|
||||
version = '0.0.0',
|
||||
account = null,
|
||||
enable_v3 = false,
|
||||
enable_themes,
|
||||
config,
|
||||
brew = {
|
||||
title : '',
|
||||
@@ -45,8 +43,6 @@ const Homebrew = (props)=>{
|
||||
|
||||
global.account = account;
|
||||
global.version = version;
|
||||
global.enable_v3 = enable_v3;
|
||||
global.enable_themes = enable_themes;
|
||||
global.config = config;
|
||||
|
||||
const backgroundObject = ()=>{
|
||||
|
||||
@@ -112,6 +112,15 @@ const ErrorNavItem = ({ error = '', clearError })=>{
|
||||
</Nav.item>;
|
||||
}
|
||||
|
||||
if(HBErrorCode === '13') {
|
||||
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
|
||||
Oops!
|
||||
<div className='errorContainer' onClick={clearError}>
|
||||
Server has lost connection to the database.
|
||||
</div>
|
||||
</Nav.item>;
|
||||
}
|
||||
|
||||
if(errorCode === 'ECONNABORTED') {
|
||||
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
|
||||
Oops!
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
flex-grow : 1;
|
||||
min-width : 300px;
|
||||
}
|
||||
>.brewTitle {
|
||||
cursor:auto;
|
||||
}
|
||||
}
|
||||
// "NaturalCrit" logo
|
||||
.navLogo {
|
||||
|
||||
@@ -196,6 +196,12 @@ const errorIndex = (props)=>{
|
||||
|
||||
**Brew ID:** ${props.brew.brewId}`,
|
||||
|
||||
// Database Connection Lost
|
||||
'13' : dedent`
|
||||
## Database connection has been lost.
|
||||
|
||||
The server could not communicate with the database.`,
|
||||
|
||||
//account page when account is not defined
|
||||
'50' : dedent`
|
||||
## You are not signed in
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
"naturalcrit_url" : "local.naturalcrit.com:8010",
|
||||
"secret" : "secret",
|
||||
"web_port" : 8000,
|
||||
"enable_v3" : true,
|
||||
"enable_themes" : true,
|
||||
"local_environments" : ["docker", "local"],
|
||||
"publicUrl" : "https://homebrewery.naturalcrit.com",
|
||||
"hb_images" : null,
|
||||
|
||||
1044
package-lock.json
generated
1044
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
30
package.json
30
package.json
@@ -83,19 +83,19 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.27.1",
|
||||
"@babel/plugin-transform-runtime": "^7.28.0",
|
||||
"@babel/preset-env": "^7.28.0",
|
||||
"@babel/core": "^7.28.4",
|
||||
"@babel/plugin-transform-runtime": "^7.28.3",
|
||||
"@babel/preset-env": "^7.28.3",
|
||||
"@babel/preset-react": "^7.27.1",
|
||||
"@babel/runtime": "^7.27.6",
|
||||
"@babel/runtime": "^7.28.4",
|
||||
"@dmsnell/diff-match-patch": "^1.1.0",
|
||||
"@googleapis/drive": "^13.0.1",
|
||||
"@googleapis/drive": "^19.1.0",
|
||||
"@sanity/diff-match-patch": "^3.2.0",
|
||||
"body-parser": "^2.2.0",
|
||||
"classnames": "^2.5.1",
|
||||
"codemirror": "^5.65.6",
|
||||
"cookie-parser": "^1.4.7",
|
||||
"core-js": "^3.44.0",
|
||||
"core-js": "^3.46.0",
|
||||
"cors": "^2.8.5",
|
||||
"create-react-class": "^15.7.0",
|
||||
"dedent-tabs": "^0.10.3",
|
||||
@@ -104,7 +104,7 @@
|
||||
"express-async-handler": "^1.2.0",
|
||||
"express-static-gzip": "3.0.0",
|
||||
"fflate": "^0.8.2",
|
||||
"fs-extra": "11.3.0",
|
||||
"fs-extra": "11.3.2",
|
||||
"hash-wasm": "^4.12.0",
|
||||
"idb-keyval": "^6.2.2",
|
||||
"js-yaml": "^4.1.0",
|
||||
@@ -119,16 +119,16 @@
|
||||
"marked-gfm-heading-id": "^4.1.2",
|
||||
"marked-nonbreaking-spaces": "^1.0.1",
|
||||
"marked-smartypants-lite": "^1.0.3",
|
||||
"marked-subsuper-text": "^1.0.3",
|
||||
"marked-subsuper-text": "^1.0.4",
|
||||
"markedLegacy": "npm:marked@^0.3.19",
|
||||
"moment": "^2.30.1",
|
||||
"mongoose": "^8.16.3",
|
||||
"nanoid": "5.1.5",
|
||||
"mongoose": "^8.19.1",
|
||||
"nanoid": "5.1.6",
|
||||
"nconf": "^0.13.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-frame-component": "^4.1.3",
|
||||
"react-router": "^7.6.3",
|
||||
"react-router": "^7.9.4",
|
||||
"romans": "^3.1.0",
|
||||
"sanitize-filename": "1.6.3",
|
||||
"superagent": "^10.2.1",
|
||||
@@ -138,15 +138,15 @@
|
||||
"devDependencies": {
|
||||
"@stylistic/stylelint-plugin": "^4.0.0",
|
||||
"babel-plugin-transform-import-meta": "^2.3.3",
|
||||
"eslint": "^9.35.0",
|
||||
"eslint": "^9.37.0",
|
||||
"eslint-plugin-jest": "^29.0.1",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"globals": "^16.3.0",
|
||||
"jest": "^30.1.3",
|
||||
"globals": "^16.4.0",
|
||||
"jest": "^30.2.0",
|
||||
"jest-expect-message": "^1.1.3",
|
||||
"jsdom-global": "^3.0.2",
|
||||
"postcss-less": "^6.0.0",
|
||||
"stylelint": "^16.24.0",
|
||||
"stylelint": "^16.25.0",
|
||||
"stylelint-config-recess-order": "^7.3.0",
|
||||
"stylelint-config-recommended": "^17.0.0",
|
||||
"supertest": "^7.1.4"
|
||||
|
||||
@@ -35,6 +35,7 @@ import contentNegotiation from './middleware/content-negotiation.js';
|
||||
import bodyParser from 'body-parser';
|
||||
import cookieParser from 'cookie-parser';
|
||||
import forceSSL from './forcessl.mw.js';
|
||||
import dbCheck from './middleware/dbCheck.js';
|
||||
|
||||
|
||||
const sanitizeBrew = (brew, accessType)=>{
|
||||
@@ -274,7 +275,7 @@ app.get('/metadata/:id', asyncHandler(getBrew('share')), (req, res)=>{
|
||||
app.get('/css/:id', asyncHandler(getBrew('share')), (req, res)=>{getCSS(req, res);});
|
||||
|
||||
//User Page
|
||||
app.get('/user/:username', async (req, res, next)=>{
|
||||
app.get('/user/:username', dbCheck, async (req, res, next)=>{
|
||||
const ownAccount = req.account && (req.account.username == req.params.username);
|
||||
|
||||
req.ogMeta = { ...defaultMetaTags,
|
||||
@@ -346,7 +347,7 @@ app.get('/user/:username', async (req, res, next)=>{
|
||||
});
|
||||
|
||||
//Change author name on brews
|
||||
app.put('/api/user/rename', async (req, res)=>{
|
||||
app.put('/api/user/rename', dbCheck, async (req, res)=>{
|
||||
const { username, newUsername } = req.body;
|
||||
const ownAccount = req.account && (req.account.username == newUsername);
|
||||
|
||||
@@ -432,7 +433,7 @@ app.get('/new', asyncHandler(async(req, res, next)=>{
|
||||
}));
|
||||
|
||||
//Share Page
|
||||
app.get('/share/:id', asyncHandler(getBrew('share')), asyncHandler(async (req, res, next)=>{
|
||||
app.get('/share/:id', dbCheck, asyncHandler(getBrew('share')), asyncHandler(async (req, res, next)=>{
|
||||
const { brew } = req;
|
||||
req.ogMeta = { ...defaultMetaTags,
|
||||
title : `${req.brew.title || 'Untitled Brew'} - ${req.brew.authors[0] || 'No author.'}`,
|
||||
@@ -459,7 +460,7 @@ app.get('/share/:id', asyncHandler(getBrew('share')), asyncHandler(async (req, r
|
||||
}));
|
||||
|
||||
//Account Page
|
||||
app.get('/account', asyncHandler(async (req, res, next)=>{
|
||||
app.get('/account', dbCheck, asyncHandler(async (req, res, next)=>{
|
||||
const data = {};
|
||||
data.title = 'Account Information Page';
|
||||
|
||||
@@ -562,8 +563,6 @@ const renderPage = async (req, res)=>{
|
||||
brews : req.brews,
|
||||
googleBrews : req.googleBrews,
|
||||
account : req.account,
|
||||
enable_v3 : config.get('enable_v3'),
|
||||
enable_themes : config.get('enable_themes'),
|
||||
config : configuration,
|
||||
ogMeta : req.ogMeta,
|
||||
userThemes : req.userThemes
|
||||
|
||||
10
server/db.js
10
server/db.js
@@ -22,6 +22,14 @@ const handleConnectionError = (error)=>{
|
||||
}
|
||||
};
|
||||
|
||||
const addListeners = (conn)=>{
|
||||
conn.connection.on('disconnecting', ()=>{console.log('Mongo disconnecting...');});
|
||||
conn.connection.on('disconnected', ()=>{console.log('Mongo disconnected!');});
|
||||
conn.connection.on('connecting', ()=>{console.log('Mongo connecting...');});
|
||||
conn.connection.on('connected', ()=>{console.log('Mongo connected!');});
|
||||
return conn;
|
||||
};
|
||||
|
||||
const disconnect = async ()=>{
|
||||
return await Mongoose.disconnect();
|
||||
};
|
||||
@@ -31,6 +39,7 @@ const connect = async (config)=>{
|
||||
retryWrites : false,
|
||||
autoIndex : (config.get('local_environments').includes(config.get('node_env')))
|
||||
})
|
||||
.then(addListeners(Mongoose))
|
||||
.catch((error)=>handleConnectionError(error));
|
||||
};
|
||||
|
||||
@@ -38,3 +47,4 @@ export default {
|
||||
connect,
|
||||
disconnect
|
||||
};
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import { md5 } from 'hash-wasm';
|
||||
import { splitTextStyleAndMetadata,
|
||||
brewSnippetsToJSON, debugTextMismatch } from '../shared/helpers.js';
|
||||
import checkClientVersion from './middleware/check-client-version.js';
|
||||
import dbCheck from './middleware/dbCheck.js';
|
||||
|
||||
|
||||
const router = express.Router();
|
||||
@@ -480,6 +481,7 @@ const api = {
|
||||
await HomebrewModel.deleteOne({ editId: id });
|
||||
return next();
|
||||
}
|
||||
throw(err);
|
||||
}
|
||||
|
||||
let brew = req.brew;
|
||||
@@ -530,6 +532,8 @@ const api = {
|
||||
}
|
||||
};
|
||||
|
||||
router.use(dbCheck);
|
||||
|
||||
router.post('/api', checkClientVersion, asyncHandler(api.newBrew));
|
||||
router.put('/api/:id', checkClientVersion, asyncHandler(api.getBrew('edit', false)), asyncHandler(api.updateBrew));
|
||||
router.put('/api/update/:id', checkClientVersion, asyncHandler(api.getBrew('edit', false)), asyncHandler(api.updateBrew));
|
||||
|
||||
15
server/middleware/dbCheck.js
Normal file
15
server/middleware/dbCheck.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import mongoose from 'mongoose';
|
||||
import config from '../config.js';
|
||||
|
||||
export default (req, res, next)=>{
|
||||
// Bypass DB checks during testing
|
||||
if(config.get('node_env') == 'test') return next();
|
||||
|
||||
if(mongoose.connection.readyState == 1) return next();
|
||||
throw {
|
||||
HBErrorCode : '13',
|
||||
name : 'Database Connection Error',
|
||||
message : 'Unable to connect to database',
|
||||
status : mongoose.connection.readyState
|
||||
};
|
||||
};
|
||||
28
server/middleware/dbCheck.spec.js
Normal file
28
server/middleware/dbCheck.spec.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import mongoose from 'mongoose';
|
||||
import dbCheck from './dbCheck.js';
|
||||
import config from '../config.js';
|
||||
|
||||
describe('dbCheck middleware', ()=>{
|
||||
const next = jest.fn();
|
||||
|
||||
afterEach(()=>jest.clearAllMocks());
|
||||
|
||||
it('should skip check in test mode', ()=>{
|
||||
config.get = jest.fn(()=>'test');
|
||||
expect(()=>dbCheck({}, {}, next)).not.toThrow();
|
||||
expect(next).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should call next if readyState == 1', ()=>{
|
||||
config.get = jest.fn(()=>'production');
|
||||
mongoose.connection.readyState = 1;
|
||||
dbCheck({}, {}, next);
|
||||
expect(next).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should throw if readyState != 1', ()=>{
|
||||
config.get = jest.fn(()=>'production');
|
||||
mongoose.connection.readyState = 99;
|
||||
expect(()=>dbCheck({}, {}, next)).toThrow(/Unable to connect/);
|
||||
});
|
||||
});
|
||||
@@ -38,6 +38,11 @@
|
||||
animation-duration : 0.4s;
|
||||
}
|
||||
|
||||
.CodeMirror-search-field {
|
||||
width:25em !important;
|
||||
outline:1px inset #00000055 !important;
|
||||
}
|
||||
|
||||
//.cm-tab {
|
||||
// background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAQAAACOs/baAAAARUlEQVR4nGJgIAG8JkXxUAcCtDWemcGR1lY4MvgzCEKY7jSBjgxBDAG09UEQzAe0AMwMHrSOAwEGRtpaMIwAAAAA//8DAG4ID9EKs6YqAAAAAElFTkSuQmCC) no-repeat right;
|
||||
//}
|
||||
|
||||
@@ -185,7 +185,7 @@ const mustacheSpans = {
|
||||
start(src) { return src.match(/{{[^{]/)?.index; }, // Hint to Marked.js to stop and check for a match
|
||||
tokenizer(src, tokens) {
|
||||
const completeSpan = /^{{[^\n]*}}/; // Regex for the complete token
|
||||
const inlineRegex = /{{(?=((?:[:=](?:"['\w,\-+*/()#%=?. ]*"|[\w\-+*/()#%.]*)|[^"=':{}\s]*)*))\1 *|}}/g;
|
||||
const inlineRegex = /{{(?=((?:[:=](?:"['\w,\-+*/()#%=?.&:!@$^;:\[\]_= ]*"|[\w\-+*/()#%.]*)|[^"=':{}\s]*)*))\1 *|}}/g;
|
||||
const match = completeSpan.exec(src);
|
||||
if(match) {
|
||||
//Find closing delimiter
|
||||
@@ -242,7 +242,7 @@ const mustacheDivs = {
|
||||
start(src) { return src.match(/\n *{{[^{]/m)?.index; }, // Hint to Marked.js to stop and check for a match
|
||||
tokenizer(src, tokens) {
|
||||
const completeBlock = /^ *{{[^\n}]* *\n.*\n *}}/s; // Regex for the complete token
|
||||
const blockRegex = /^ *{{(?=((?:[:=](?:"['\w,\-+*/()#%=?. ]*"|[\w\-+*/()#%.]*)|[^"=':{}\s]*)*))\1 *$|^ *}}$/gm;
|
||||
const blockRegex = /^ *{{(?=((?:[:=](?:"['\w,\-+*/()#%=?.&:!@$^;:\[\]_= ]*"|[\w\-()#%.]*)|[^"=':{}\s]*)*))\1 *$|^ *}}$/gm;
|
||||
const match = completeBlock.exec(src);
|
||||
if(match) {
|
||||
//Find closing delimiter
|
||||
@@ -297,7 +297,7 @@ const mustacheInjectInline = {
|
||||
level : 'inline',
|
||||
start(src) { return src.match(/ *{[^{\n]/)?.index; }, // Hint to Marked.js to stop and check for a match
|
||||
tokenizer(src, tokens) {
|
||||
const inlineRegex = /^ *{(?=((?:[:=](?:"['\w,\-+*/()#%=?. ]*"|[\w\-+*/()#%.]*)|[^"=':{}\s]*)*))\1}/g;
|
||||
const inlineRegex = /^ *{(?=((?:[:=](?:"['\w,\-+*/()#%=?.&:!@$^;:\[\]_= ]*"|[\w\-()#%.]*)|[^"=':{}\s]*)*))\1}/g;
|
||||
const match = inlineRegex.exec(src);
|
||||
if(match) {
|
||||
const lastToken = tokens[tokens.length - 1];
|
||||
@@ -343,7 +343,7 @@ const mustacheInjectBlock = {
|
||||
level : 'block',
|
||||
start(src) { return src.match(/\n *{[^{\n]/m)?.index; }, // Hint to Marked.js to stop and check for a match
|
||||
tokenizer(src, tokens) {
|
||||
const inlineRegex = /^ *{(?=((?:[:=](?:"['\w,\-+*/()#%=?. ]*"|[\w\-+*/()#%.]*)|[^"=':{}\s]*)*))\1}/ym;
|
||||
const inlineRegex = /^ *{(?=((?:[:=](?:"['\w,\-+*/()#%=?.&:!@$^;:\[\]_= ]*"|[\w\-+*/()#%.]*)|[^"=':{}\s]*)*))\1}/ym;
|
||||
const match = inlineRegex.exec(src);
|
||||
if(match) {
|
||||
const lastToken = tokens[tokens.length - 1];
|
||||
|
||||
@@ -418,6 +418,7 @@
|
||||
color : var(--HB_Color_Footnotes);
|
||||
}
|
||||
.footnote {
|
||||
text-transform: uppercase;
|
||||
position : absolute;
|
||||
right : 80px;
|
||||
bottom : 32px;
|
||||
|
||||
@@ -14,6 +14,7 @@ const diceFont = {
|
||||
'df_d10_7' : 'df d10-7',
|
||||
'df_d10_8' : 'df d10-8',
|
||||
'df_d10_9' : 'df d10-9',
|
||||
'df_d10_0' : 'df d10-0',
|
||||
'df_d12' : 'df d12',
|
||||
'df_d12_1' : 'df d12-1',
|
||||
'df_d12_10' : 'df d12-10',
|
||||
@@ -90,7 +91,108 @@ const diceFont = {
|
||||
'df_solid_small_dot_d6_3' : 'df solid-small-dot-d6-3',
|
||||
'df_solid_small_dot_d6_4' : 'df solid-small-dot-d6-4',
|
||||
'df_solid_small_dot_d6_5' : 'df solid-small-dot-d6-5',
|
||||
'df_solid_small_dot_d6_6' : 'df solid-small-dot-d6-6'
|
||||
'df_solid_small_dot_d6_6' : 'df solid-small-dot-d6-6',
|
||||
'df_d10_00' : 'df d10-00',
|
||||
'df_d10_01' : 'df d10-01',
|
||||
'df_d10_02' : 'df d10-02',
|
||||
'df_d10_03' : 'df d10-03',
|
||||
'df_d10_04' : 'df d10-04',
|
||||
'df_d10_05' : 'df d10-05',
|
||||
'df_d10_06' : 'df d10-06',
|
||||
'df_d10_07' : 'df d10-07',
|
||||
'df_d10_08' : 'df d10-08',
|
||||
'df_d10_09' : 'df d10-09',
|
||||
'df_d10_10' : 'df d10-10',
|
||||
'df_d10_11' : 'df d10-11',
|
||||
'df_d10_12' : 'df d10-12',
|
||||
'df_d10_13' : 'df d10-13',
|
||||
'df_d10_14' : 'df d10-14',
|
||||
'df_d10_15' : 'df d10-15',
|
||||
'df_d10_16' : 'df d10-16',
|
||||
'df_d10_17' : 'df d10-17',
|
||||
'df_d10_18' : 'df d10-18',
|
||||
'df_d10_19' : 'df d10-19',
|
||||
'df_d10_20' : 'df d10-20',
|
||||
'df_d10_21' : 'df d10-21',
|
||||
'df_d10_22' : 'df d10-22',
|
||||
'df_d10_23' : 'df d10-23',
|
||||
'df_d10_24' : 'df d10-24',
|
||||
'df_d10_25' : 'df d10-25',
|
||||
'df_d10_26' : 'df d10-26',
|
||||
'df_d10_27' : 'df d10-27',
|
||||
'df_d10_28' : 'df d10-28',
|
||||
'df_d10_29' : 'df d10-29',
|
||||
'df_d10_30' : 'df d10-30',
|
||||
'df_d10_31' : 'df d10-31',
|
||||
'df_d10_32' : 'df d10-32',
|
||||
'df_d10_33' : 'df d10-33',
|
||||
'df_d10_34' : 'df d10-34',
|
||||
'df_d10_35' : 'df d10-35',
|
||||
'df_d10_36' : 'df d10-36',
|
||||
'df_d10_37' : 'df d10-37',
|
||||
'df_d10_38' : 'df d10-38',
|
||||
'df_d10_39' : 'df d10-39',
|
||||
'df_d10_40' : 'df d10-40',
|
||||
'df_d10_41' : 'df d10-41',
|
||||
'df_d10_42' : 'df d10-42',
|
||||
'df_d10_43' : 'df d10-43',
|
||||
'df_d10_44' : 'df d10-44',
|
||||
'df_d10_45' : 'df d10-45',
|
||||
'df_d10_46' : 'df d10-46',
|
||||
'df_d10_47' : 'df d10-47',
|
||||
'df_d10_48' : 'df d10-48',
|
||||
'df_d10_49' : 'df d10-49',
|
||||
'df_d10_50' : 'df d10-50',
|
||||
'df_d10_51' : 'df d10-51',
|
||||
'df_d10_52' : 'df d10-52',
|
||||
'df_d10_53' : 'df d10-53',
|
||||
'df_d10_54' : 'df d10-54',
|
||||
'df_d10_55' : 'df d10-55',
|
||||
'df_d10_56' : 'df d10-56',
|
||||
'df_d10_57' : 'df d10-57',
|
||||
'df_d10_58' : 'df d10-58',
|
||||
'df_d10_59' : 'df d10-59',
|
||||
'df_d10_60' : 'df d10-60',
|
||||
'df_d10_61' : 'df d10-61',
|
||||
'df_d10_62' : 'df d10-62',
|
||||
'df_d10_63' : 'df d10-63',
|
||||
'df_d10_64' : 'df d10-64',
|
||||
'df_d10_65' : 'df d10-65',
|
||||
'df_d10_66' : 'df d10-66',
|
||||
'df_d10_67' : 'df d10-67',
|
||||
'df_d10_68' : 'df d10-68',
|
||||
'df_d10_69' : 'df d10-69',
|
||||
'df_d10_70' : 'df d10-70',
|
||||
'df_d10_71' : 'df d10-71',
|
||||
'df_d10_72' : 'df d10-72',
|
||||
'df_d10_73' : 'df d10-73',
|
||||
'df_d10_74' : 'df d10-74',
|
||||
'df_d10_75' : 'df d10-75',
|
||||
'df_d10_76' : 'df d10-76',
|
||||
'df_d10_77' : 'df d10-77',
|
||||
'df_d10_78' : 'df d10-78',
|
||||
'df_d10_79' : 'df d10-79',
|
||||
'df_d10_80' : 'df d10-80',
|
||||
'df_d10_81' : 'df d10-81',
|
||||
'df_d10_82' : 'df d10-82',
|
||||
'df_d10_83' : 'df d10-83',
|
||||
'df_d10_84' : 'df d10-84',
|
||||
'df_d10_85' : 'df d10-85',
|
||||
'df_d10_86' : 'df d10-86',
|
||||
'df_d10_87' : 'df d10-87',
|
||||
'df_d10_88' : 'df d10-88',
|
||||
'df_d10_89' : 'df d10-89',
|
||||
'df_d10_90' : 'df d10-90',
|
||||
'df_d10_91' : 'df d10-91',
|
||||
'df_d10_92' : 'df d10-92',
|
||||
'df_d10_93' : 'df d10-93',
|
||||
'df_d10_94' : 'df d10-94',
|
||||
'df_d10_95' : 'df d10-95',
|
||||
'df_d10_96' : 'df d10-96',
|
||||
'df_d10_97' : 'df d10-97',
|
||||
'df_d10_98' : 'df d10-98',
|
||||
'df_d10_99' : 'df d10-99',
|
||||
'df_d10_100' : 'df d10-100'
|
||||
};
|
||||
|
||||
export default diceFont;
|
||||
@@ -6,6 +6,14 @@
|
||||
src : url('../../../fonts/iconFonts/diceFont.woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family : 'DiceFontD100';
|
||||
src : url('../../../fonts/iconFonts/diceFontD100.woff2') format('woff2');
|
||||
font-weight : normal;
|
||||
font-style : normal;
|
||||
font-display : block;
|
||||
}
|
||||
|
||||
.df {
|
||||
display : inline;
|
||||
font-family : 'DiceFont';
|
||||
@@ -26,17 +34,6 @@
|
||||
&.F-plus::before { content : '\f192'; }
|
||||
&.F-zero::before { content : '\f193'; }
|
||||
&.d10::before { content : '\f194'; }
|
||||
&.d10-0::before { content : '\f100'; }
|
||||
&.d10-1::before { content : '\f101'; }
|
||||
&.d10-10::before { content : '\f102'; }
|
||||
&.d10-2::before { content : '\f103'; }
|
||||
&.d10-3::before { content : '\f104'; }
|
||||
&.d10-4::before { content : '\f105'; }
|
||||
&.d10-5::before { content : '\f106'; }
|
||||
&.d10-6::before { content : '\f107'; }
|
||||
&.d10-7::before { content : '\f108'; }
|
||||
&.d10-8::before { content : '\f109'; }
|
||||
&.d10-9::before { content : '\f10a'; }
|
||||
&.d12::before { content : '\f195'; }
|
||||
&.d12-1::before { content : '\f10b'; }
|
||||
&.d12-10::before { content : '\f10c'; }
|
||||
@@ -114,4 +111,568 @@
|
||||
&.solid-small-dot-d6-4::before { content : '\f18c'; }
|
||||
&.solid-small-dot-d6-5::before { content : '\f18d'; }
|
||||
&.solid-small-dot-d6-6::before { content : '\f18e'; }
|
||||
|
||||
// Replacement d10
|
||||
|
||||
&.d10-0::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e900';
|
||||
}
|
||||
|
||||
&.d10-1::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e901';
|
||||
}
|
||||
|
||||
&.d10-2::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e902';
|
||||
}
|
||||
|
||||
&.d10-3::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e903';
|
||||
}
|
||||
|
||||
&.d10-4::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e904';
|
||||
}
|
||||
|
||||
&.d10-5::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e905';
|
||||
}
|
||||
|
||||
&.d10-6::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e906';
|
||||
}
|
||||
|
||||
&.d10-7::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e907';
|
||||
}
|
||||
|
||||
&.d10-8::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e908';
|
||||
}
|
||||
|
||||
&.d10-9::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e909';
|
||||
}
|
||||
|
||||
&.d10-10::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e90a';
|
||||
}
|
||||
|
||||
// d100
|
||||
|
||||
&.d10-00::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e90b';
|
||||
}
|
||||
|
||||
&.d10-01::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e90c';
|
||||
}
|
||||
|
||||
&.d10-02::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e90d';
|
||||
}
|
||||
|
||||
&.d10-03::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e90e';
|
||||
}
|
||||
|
||||
&.d10-04::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e90f';
|
||||
}
|
||||
|
||||
&.d10-05::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e910';
|
||||
}
|
||||
|
||||
&.d10-06::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e911';
|
||||
}
|
||||
|
||||
&.d10-07::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e912';
|
||||
}
|
||||
|
||||
&.d10-08::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e913';
|
||||
}
|
||||
|
||||
&.d10-09::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e914';
|
||||
}
|
||||
|
||||
&.d10-10::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e915';
|
||||
}
|
||||
|
||||
&.d10-11::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e916';
|
||||
}
|
||||
|
||||
&.d10-12::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e917';
|
||||
}
|
||||
|
||||
&.d10-13::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e918';
|
||||
}
|
||||
|
||||
&.d10-14::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e919';
|
||||
}
|
||||
|
||||
&.d10-15::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e91a';
|
||||
}
|
||||
|
||||
&.d10-16::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e91b';
|
||||
}
|
||||
|
||||
&.d10-17::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e91c';
|
||||
}
|
||||
|
||||
&.d10-18::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e91d';
|
||||
}
|
||||
|
||||
&.d10-19::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e91e';
|
||||
}
|
||||
|
||||
&.d10-20::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e91f';
|
||||
}
|
||||
|
||||
&.d10-21::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e920';
|
||||
}
|
||||
|
||||
&.d10-22::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e921';
|
||||
}
|
||||
|
||||
&.d10-23::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e922';
|
||||
}
|
||||
|
||||
&.d10-24::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e923';
|
||||
}
|
||||
|
||||
&.d10-25::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e924';
|
||||
}
|
||||
|
||||
&.d10-26::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e925';
|
||||
}
|
||||
|
||||
&.d10-27::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e926';
|
||||
}
|
||||
|
||||
&.d10-28::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e927';
|
||||
}
|
||||
|
||||
&.d10-29::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e928';
|
||||
}
|
||||
|
||||
&.d10-30::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e929';
|
||||
}
|
||||
|
||||
&.d10-31::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e92a';
|
||||
}
|
||||
|
||||
&.d10-32::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e92b';
|
||||
}
|
||||
|
||||
&.d10-33::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e92c';
|
||||
}
|
||||
|
||||
&.d10-34::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e92d';
|
||||
}
|
||||
|
||||
&.d10-35::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e92e';
|
||||
}
|
||||
|
||||
&.d10-36::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e92f';
|
||||
}
|
||||
|
||||
&.d10-37::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e930';
|
||||
}
|
||||
|
||||
&.d10-38::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e931';
|
||||
}
|
||||
|
||||
&.d10-39::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e932';
|
||||
}
|
||||
|
||||
&.d10-40::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e933';
|
||||
}
|
||||
|
||||
&.d10-41::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e934';
|
||||
}
|
||||
|
||||
&.d10-42::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e935';
|
||||
}
|
||||
|
||||
&.d10-43::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e936';
|
||||
}
|
||||
|
||||
&.d10-44::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e937';
|
||||
}
|
||||
|
||||
&.d10-45::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e938';
|
||||
}
|
||||
|
||||
&.d10-46::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e939';
|
||||
}
|
||||
|
||||
&.d10-47::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e93a';
|
||||
}
|
||||
|
||||
&.d10-48::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e93b';
|
||||
}
|
||||
|
||||
&.d10-49::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e93c';
|
||||
}
|
||||
|
||||
&.d10-50::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e93d';
|
||||
}
|
||||
|
||||
&.d10-51::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e93e';
|
||||
}
|
||||
|
||||
&.d10-52::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e93f';
|
||||
}
|
||||
|
||||
&.d10-53::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e940';
|
||||
}
|
||||
|
||||
&.d10-54::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e941';
|
||||
}
|
||||
|
||||
&.d10-55::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e942';
|
||||
}
|
||||
|
||||
&.d10-56::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e943';
|
||||
}
|
||||
|
||||
&.d10-57::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e944';
|
||||
}
|
||||
|
||||
&.d10-58::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e945';
|
||||
}
|
||||
|
||||
&.d10-59::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e946';
|
||||
}
|
||||
|
||||
&.d10-60::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e947';
|
||||
}
|
||||
|
||||
&.d10-61::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e948';
|
||||
}
|
||||
|
||||
&.d10-62::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e949';
|
||||
}
|
||||
|
||||
&.d10-63::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e94a';
|
||||
}
|
||||
|
||||
&.d10-64::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e94b';
|
||||
}
|
||||
|
||||
&.d10-65::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e94c';
|
||||
}
|
||||
|
||||
&.d10-66::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e94d';
|
||||
}
|
||||
|
||||
&.d10-67::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e94e';
|
||||
}
|
||||
|
||||
&.d10-68::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e94f';
|
||||
}
|
||||
|
||||
&.d10-69::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e950';
|
||||
}
|
||||
|
||||
&.d10-70::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e951';
|
||||
}
|
||||
|
||||
&.d10-71::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e952';
|
||||
}
|
||||
|
||||
&.d10-72::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e953';
|
||||
}
|
||||
|
||||
&.d10-73::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e954';
|
||||
}
|
||||
|
||||
&.d10-74::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e955';
|
||||
}
|
||||
|
||||
&.d10-75::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e956';
|
||||
}
|
||||
|
||||
&.d10-76::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e957';
|
||||
}
|
||||
|
||||
&.d10-77::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e958';
|
||||
}
|
||||
|
||||
&.d10-78::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e959';
|
||||
}
|
||||
|
||||
&.d10-79::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e95a';
|
||||
}
|
||||
|
||||
&.d10-80::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e95b';
|
||||
}
|
||||
|
||||
&.d10-81::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e95c';
|
||||
}
|
||||
|
||||
&.d10-82::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e95d';
|
||||
}
|
||||
|
||||
&.d10-83::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e95e';
|
||||
}
|
||||
|
||||
&.d10-84::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e95f';
|
||||
}
|
||||
|
||||
&.d10-85::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e960';
|
||||
}
|
||||
|
||||
&.d10-86::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e961';
|
||||
}
|
||||
|
||||
&.d10-87::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e962';
|
||||
}
|
||||
|
||||
&.d10-88::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e963';
|
||||
}
|
||||
|
||||
&.d10-89::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e964';
|
||||
}
|
||||
|
||||
&.d10-90::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e965';
|
||||
}
|
||||
|
||||
&.d10-91::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e966';
|
||||
}
|
||||
|
||||
&.d10-92::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e967';
|
||||
}
|
||||
|
||||
&.d10-93::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e968';
|
||||
}
|
||||
|
||||
&.d10-94::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e969';
|
||||
}
|
||||
|
||||
&.d10-95::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e96a';
|
||||
}
|
||||
|
||||
&.d10-96::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e96b';
|
||||
}
|
||||
|
||||
&.d10-97::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e96c';
|
||||
}
|
||||
|
||||
&.d10-98::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e96d';
|
||||
}
|
||||
|
||||
&.d10-99::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e96e';
|
||||
}
|
||||
|
||||
&.d10-100::before {
|
||||
font-family : 'DiceFontD100';
|
||||
content : '\e96f';
|
||||
}
|
||||
}
|
||||
BIN
themes/fonts/iconFonts/diceFontD100.woff2
Normal file
BIN
themes/fonts/iconFonts/diceFontD100.woff2
Normal file
Binary file not shown.
Reference in New Issue
Block a user