0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-25 20:33:13 +00:00

Compare commits

..

52 Commits

Author SHA1 Message Date
Trevor Buckner
2065ff80ff Merge pull request #1008 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.11.0
Bump @babel/preset-env from 7.9.6 to 7.11.0
2020-08-28 15:52:52 -04:00
Trevor Buckner
b24bba87d9 Merge pull request #1007 from naturalcrit/dependabot/npm_and_yarn/elliptic-6.5.3
[Security] Bump elliptic from 6.5.2 to 6.5.3
2020-08-28 15:52:32 -04:00
dependabot-preview[bot]
5583fc76f3 Bump @babel/preset-env from 7.9.6 to 7.11.0
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.9.6 to 7.11.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.11.0/packages/babel-preset-env)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-08-28 19:48:02 +00:00
Trevor Buckner
e810445ac9 Merge pull request #1025 from naturalcrit/updateDependencies
Update dependencies
2020-08-28 15:45:49 -04:00
Trevor Buckner
5afbb4ee4e Update changelog.md 2020-08-28 15:44:43 -04:00
Trevor Buckner
6ae4cd143c update several dependencies 2020-08-28 15:17:59 -04:00
dependabot-preview[bot]
978329fdc9 [Security] Bump elliptic from 6.5.2 to 6.5.3
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. **This update includes a security fix.**
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-07-29 21:27:26 +00:00
Trevor Buckner
f754ecd6c3 Fix invisible paragraphs at top of new columns
Code was old Firefox fix that doesn't seem to do anything anymore anyway.
2020-07-19 02:32:58 -04:00
Trevor Buckner
62a827ce49 Update more dependencies 2020-05-20 10:14:05 -04:00
Trevor Buckner
e971da2b59 Merge pull request #943 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.20.0
Bump eslint-plugin-react from 7.19.0 to 7.20.0
2020-05-19 01:54:55 -04:00
Trevor Buckner
2d092cb290 Forgot to update styles for BrewItems 2020-05-19 01:45:53 -04:00
dependabot-preview[bot]
5b66ecb06f Bump eslint-plugin-react from 7.19.0 to 7.20.0
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.19.0 to 7.20.0.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.19.0...v7.20.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-19 05:38:33 +00:00
Trevor Buckner
22a9799674 Update vitreum (#946)
- Updates Vitreum to v6.0.1 + some custom fixes.
  - Stylesheets must be imported with `require('./sheet.less');` but can also can now share stylesheets between jsx components.
  - Should eliminate a lot of security concerns with older nested dependencies.
  - Changed a lot of files to make this work
- Also removes dependency on PicoRouter in favor of React-Router
2020-05-19 01:36:31 -04:00
Trevor Buckner
7c813be13a Revert Marked Update
Too many edge cases still broken. Bah.
2020-05-10 21:11:03 -04:00
Trevor Buckner
e94148b2f0 Merge pull request #938 from naturalcrit/update-Marked-renderer
Update marked renderer
2020-05-09 13:57:40 -04:00
Trevor Buckner
ec4f6e4327 Redundant marked version 2020-05-09 13:38:25 -04:00
Trevor Buckner
fcbd117784 Merge branch 'master' into update-Marked-renderer 2020-05-09 13:33:33 -04:00
Trevor Buckner
dab716a9e0 Lint 2020-05-09 13:16:39 -04:00
Trevor Buckner
9265e25c73 Update popup to notify update
Also point to latest FAQ page on Reddit
2020-05-08 15:32:39 -04:00
Trevor Buckner
4ad63d5bce Change text in RenderWarning popup
Reflect our policy of testing only on Chrome, but remove the specific issue of column-span support as that is now supported by other browsers.
2020-05-08 15:04:38 -04:00
dependabot-preview[bot]
f89c897488 Bump mongoose from 5.9.9 to 5.9.12
Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.9.9 to 5.9.12.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md)
- [Commits](https://github.com/Automattic/mongoose/compare/5.9.9...5.9.12)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-08 14:30:56 -04:00
dependabot-preview[bot]
521ff5e7e3 Bump codemirror from 5.52.2 to 5.53.2
Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.52.2 to 5.53.2.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codemirror/CodeMirror/compare/5.52.2...5.53.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-08 14:27:30 -04:00
dependabot-preview[bot]
89d8cb3b0a Bump moment from 2.24.0 to 2.25.3
Bumps [moment](https://github.com/moment/moment) from 2.24.0 to 2.25.3.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-08 14:27:19 -04:00
Trevor Buckner
a0e92b54d0 Fix multiline IMG tags breaking 2020-05-08 13:15:35 -04:00
Trevor Buckner
62f549f038 Fix Markdown rendering right after Divs 2020-05-06 16:30:35 -04:00
Trevor Buckner
e8f3b0c8d0 Fix Tables with uneven columns 2020-05-02 15:03:18 -04:00
Trevor Buckner
587ce78f4e Update robots.txt
This was blocking Google from updating the `noindex` tag.
2020-04-21 22:46:42 -04:00
Trevor Buckner
7ca1dd3c68 Update Marked.js to 1.0.0 2020-04-20 22:43:46 -04:00
Trevor Buckner
58543f0b4d Merge branch 'master' into update-Marked-renderer 2020-04-20 21:40:04 -04:00
Trevor Buckner
e88253f364 Added robots.txt, nofollow in metatags
Also noindex on /print/ pages
2020-04-20 13:46:18 -04:00
Trevor Buckner
bdf37d8fe7 Add robots noindex to edit and share pages 2020-04-20 12:15:27 -04:00
Trevor Buckner
22908207a3 Google verification for testing Robots.txt 2020-04-20 12:03:28 -04:00
Timothy Cyrus
7239b89108 Update metadataEditor.jsx 2020-04-16 20:24:01 -04:00
Timothy Cyrus
0ea80bd758 Update client/homebrew/pages/userPage/brewItem/brewItem.jsx
Co-Authored-By: Trevor Buckner <calculuschild@gmail.com>
2020-04-16 20:24:01 -04:00
Timothy Cyrus
f6d623ace3 Update brewItem.jsx 2020-04-16 20:24:01 -04:00
Timothy Cyrus
63ad8b3411 Update editPage.jsx 2020-04-16 20:24:01 -04:00
Timothy Cyrus
50cc757a5c Update metadataEditor.jsx 2020-04-16 20:24:01 -04:00
Trevor Buckner
70430f84e1 Small tweaks and linting 2020-04-14 11:15:05 -04:00
Timothy Cyrus
80db261c88 API Code Cleanup + Alt Endpoints
Added 2 new API Endpoints as alternatives to existing ones:
- PUT /api/:id (same as PUT /api/update/:id)
- DELETE /api/:id (same as GET /api/remove/:id)
2020-04-14 11:15:05 -04:00
Trevor Buckner
5631ef7be7 Fix HTML right before markdown
Allow raw HTML tags to end without a blank line if markdown is right after
2020-04-14 10:26:42 -04:00
dependabot-preview[bot]
2745a4d6c1 Bump react-dom from 16.13.0 to 16.13.1
Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 16.13.0 to 16.13.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.13.1/packages/react-dom)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-14 10:15:37 -04:00
dependabot-preview[bot]
33190b5c89 Bump mongoose from 5.9.7 to 5.9.9
Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.9.7 to 5.9.9.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md)
- [Commits](https://github.com/Automattic/mongoose/compare/5.9.7...5.9.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-14 10:14:57 -04:00
Brandon Fryslie
354a5832e4 Adjust Dockerfile to improve caching 2020-04-03 16:23:13 -04:00
Brandon Fryslie
f57c0f0886 Add basic instructions for running the application via Docker 2020-04-03 16:23:13 -04:00
Brandon Fryslie
954a393fce Do not force SSL when using Docker 2020-04-03 16:23:13 -04:00
dependabot-preview[bot]
01dbac78ce Bump mongoose from 5.9.2 to 5.9.7
Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.9.2 to 5.9.7.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md)
- [Commits](https://github.com/Automattic/mongoose/compare/5.9.2...5.9.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-03 16:22:43 -04:00
dependabot-preview[bot]
594ea8ab59 Bump react from 16.13.0 to 16.13.1
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 16.13.0 to 16.13.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.13.1/packages/react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-03 16:21:08 -04:00
dependabot-preview[bot]
033493a31b Bump cookie-parser from 1.4.4 to 1.4.5
Bumps [cookie-parser](https://github.com/expressjs/cookie-parser) from 1.4.4 to 1.4.5.
- [Release notes](https://github.com/expressjs/cookie-parser/releases)
- [Changelog](https://github.com/expressjs/cookie-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/cookie-parser/compare/1.4.4...1.4.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-03 16:20:36 -04:00
dependabot-preview[bot]
e79b099633 Bump codemirror from 5.52.0 to 5.52.2
Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.52.0 to 5.52.2.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codemirror/CodeMirror/compare/5.52.0...5.52.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-03 16:18:10 -04:00
Trevor Buckner
5bc948ab0a All fixes seem to be working? 2020-03-25 12:09:50 -04:00
Trevor Buckner
28c5d7d84a Update .gitignore 2020-03-24 10:01:28 -04:00
Trevor Buckner
b9cfc2e6af Fixed need for spaces to render html in a DIV
Marked update does not naturally detect the end of blocked elements like DIVs. The fix is to handle cases where only one half of the Div is detected separately.
2020-02-04 14:10:36 -05:00
48 changed files with 4676 additions and 5426 deletions

View File

@@ -6,7 +6,7 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:8.9
- image: circleci/node:12.16.3
- image: circleci/mongo:3.4-jessie
working_directory: ~/repo
@@ -30,4 +30,3 @@ jobs:
# run tests!
- run: npm run circleci

View File

@@ -1,5 +1,5 @@
module.exports = {
root: true,
root : true,
parserOptions : {
ecmaVersion : 9,
sourceType : 'module',
@@ -9,6 +9,7 @@ module.exports = {
},
env : {
browser : true,
node : true
},
plugins : ['react'],
rules : {
@@ -47,7 +48,7 @@ module.exports = {
'no-var' : 'warn',
'prefer-const' : 'warn',
'prefer-template' : 'warn',
'quotes' : ['warn', 'single', { 'allowTemplateLiterals': true } ],
'quotes' : ['warn', 'single', { 'allowTemplateLiterals': true }],
'semi' : ['warn', 'always'],
/** Whitespace **/
@@ -66,7 +67,7 @@ module.exports = {
multiLine : { beforeColon: true, afterColon: true, align: 'colon' },
singleLine : { beforeColon: false, afterColon: true }
}],
'linebreak-style' : ['warn', 'unix'],
'linebreak-style' : 'off',
'no-trailing-spaces' : 'warn',
'no-whitespace-before-property' : 'warn',
'object-curly-spacing' : ['warn', 'always'],
@@ -74,4 +75,4 @@ module.exports = {
'space-in-parens' : ['warn', 'never'],
'template-curly-spacing' : ['warn', 'never'],
}
};
};

1
.gitignore vendored
View File

@@ -9,3 +9,4 @@ config/local.*
todo.md
startDB.bat
startMViewer.bat

View File

@@ -1,14 +1,19 @@
FROM node:8
ENV NODE_ENV=docker
# Create app directory
WORKDIR /usr/src/app
# Bundle app source
# Copy package.json into the image, then run yarn install
# This improves caching so we don't have to download the dependencies every time the code changes
COPY package.json ./
# --ignore-scripts tells yarn not to run postbuild. We run it explicitly later
RUN yarn install --ignore-scripts
# Bundle app source and build application
COPY . .
ENV NODE_ENV=docker
RUN yarn
RUN yarn build
EXPOSE 8000
CMD [ "yarn", "start" ]
CMD [ "yarn", "start" ]

12
README.DOCKER.md Normal file
View File

@@ -0,0 +1,12 @@
# Running Homebrewery via Docker
The repo includes a Dockerfile and a docker-compose.yml file.
To run the application via docker-compose.yml:
`docker-compose up -d`
To stop the application:
`docker-compose down`
To stop the application and remove all data:
`docker-compose down -v`

View File

@@ -29,6 +29,10 @@ Fourth, you will need to install the program and run it using the two commands:
You should now be able to go to [http://localhost:8000](http://localhost:8000) in your browser and use the Homebrewery offline.
### Running the application via Docker
Please see the docs here: [README.DOCKER.md](./README.DOCKER.md)
### Standalone PHB Stylesheet
If you just want the stylesheet that is generated to make pages look like they are from the Player's Handbook, you will find it in the [phb.standalone.css](./phb.standalone.css) file.

View File

@@ -1,5 +1,15 @@
# changelog
### Friday, 28/08/2020 - v2.9.2
- Many dependency updates
- Finally fixed this changelog page to not run off the edge :P
### Sunday, 19/07/2020 - v2.9.1
- Fixed paragraphs appearing blank on new columns
### Wednesday, 20/05/2020 - v2.9.0
- Major refactoring of site backend to work with updated dependencies for security (should be invisible to users)
### Wednesday, 11/03/2020 - v2.8.2
- Fixed delete button removing everyone's copy for brews with multiple authors
- Compressed homebrew text in database
@@ -33,21 +43,17 @@
### Saturday, 18/02/2017 - v2.7.2
- Adding ability to delete a brew from the user page, incase the user creates a brew that makes the edit page unrender-able. (re:309)
## BIG NEWS
With the next major release of Homebrewery, v3.0.0, this tool *will no longer support raw HTML input for brew code*. Most issues and errors users are having are because of this feature and it's become too taxing to help and fix these issues.
All brews made previous to the release of v3.0.0 will still render normally.
```
```
### Thursday, 19/01/2017 - v2.7.0
- Fixed saving multiple authors and multiple systems on brew metadata (thanks u/PalaNolho re:282)
- Adding in line highlight for new pages
- Added in a simple brew lookup for admin
### Saturday, 14/01/2017 - v2.7.0
- Added a new Render Warning overlay. It detects situations where the brew may not be rendering correctly (wrong browser, browser is zoomed in...) and let's the user know
### Sunday, 25/12/2016 - v2.7.0
- Switching over to using Vitreum v4
- Removed gulp, all tasks are run through npm scripts
@@ -60,8 +66,6 @@ All brews made previous to the release of v3.0.0 will still render normally.
- Removed a lot of unused files in shared
- vitreum v4 now lets me use codemirror as a pure node dependacy
### Saturday, 03/12/2016 - v2.6.0
- Added report back to the edit page
- Changed metaeditor icon
@@ -73,18 +77,17 @@ All brews made previous to the release of v3.0.0 will still render normally.
- Added a table of contents snippet (thanks u/tullisar)
- Added a multicolumn snippet
### Thursday, 01/12/2016
- Added in a snippet for a split table
- Added an account nav item to new page
### Sunday, 27/11/2016 - v2.5.1
- Fixed the column rendering on the new user page. Really should have tested that better
- Added a hover tooltip to fully read the brew description
- Made the brew items take up only 25% allowing you to view more per row.
\page
### Wednesday, 23/11/2016 - v2.5.0
- Metadata can now be added to brews
- Added a metadata editor onto the edit and new pages
@@ -95,7 +98,6 @@ All brews made previous to the release of v3.0.0 will still render normally.
- Added a new user page to see others published brews, as well as all of your own brews.
- Added a new nav item for accessing your profile and logging in
### Monday, 14/11/2016
- Updated snippet bar style
- You can now print from a new page without saving
@@ -120,7 +122,6 @@ All brews made previous to the release of v3.0.0 will still render normally.
- Fixed the noteblock overlapping into titles (thanks u/dsompura!)
- Fixed a bad search route in the admin panel (thanks u/SnappyTom!)
### Friday, 29/07/2016 - v2.2.7
- Adding in descriptive note blocks. (Thanks calculuschild!)
@@ -141,12 +142,9 @@ All brews made previous to the release of v3.0.0 will still render normally.
- Added in a new auto-incremeting page number snippet (thakns u/Ryrok!)
- Lists in monster stat blocks should be fixed now
### Saturday, 04/06/2016 - v2.2.0
- MIgrating The Homebrewery over to hombrewery.naturalcrit.com. It know runs on it's own server, with it's own repo separate from the other tools I'm working on. Makes updating and deploying much easier.
\page
### Sunday, 29/05/2016 - v2.1.0
- Finally added a syntax for doing spell lists. A bit in-depth about why this took so long. Essentially I'm running out of syntax to use in stardard Markdown. There are too many unique elements in the PHB-style to be mapped. I solved this earlier by stacking certain elements together (eg. an `<hr>` before a `blockquote` turns it into moster state block), but those are getting unweildly. I would like to simply wrap these in `div`s with classes, but unfortunately Markdown stops processing when within HTML blocks. To get around this I wrote my own override to the Markdown parser and lexer to process Markdown within a simple div class wrapper. This should open the door for more unique syntaxes in the future. Big step!
- Override Ctrl+P (and cmd+P) to launch to the print page. Many people try to just print either the editing or share page to get a PDF. While this dones;t make much sense, I do get a ton of issues about it. So now if you try to do this, it'll just bring you imediately to the print page. Everybody wins!
@@ -158,6 +156,8 @@ All brews made previous to the release of v3.0.0 will still render normally.
- Updated the issue template for (hopefully) better reporting
- Added suggestion to use chrome while PDF printing
\page
### Wednesday, 25/05/2016 -v2.0.5
- The class table generators have the proper ability score improvement progression.
@@ -171,8 +171,6 @@ All brews made previous to the release of v3.0.0 will still render normally.
- Bumped up the allowed entity size for extra-large brew (Thanks for reporting it dickboner93)
- Added a little error box when a save fails with a custom link to reporting the issue on github.
\page
### Saturday, 14/05/2016 - v2.0.0 (finally!)
I've been working on v2 for a *very* long time. I want to thank you guys for being paitent.
@@ -212,8 +210,6 @@ Massive changelog incoming:
- Source now opens to it's own route `/source/:sharedId` instead of just a window. Now easier to share, and won't be blocked by some browsers.
- Print page now auto-opens print dialog. If you want to share your print page link, just remove the `?dialog=true` parameter and it won't open the dialog.
\page
### Wednesday, 20/04/2016
@@ -281,4 +277,3 @@ Massive changelog incoming:
* Added `phb.standalone.css` plus a build system for creating it
* Added page numbers and footer text
* Page accent now flips each page

View File

@@ -1,3 +1,4 @@
require('./admin.less');
const React = require('react');
const createClass = require('create-react-class');

View File

@@ -1,3 +1,4 @@
require('./brewCleanup.less');
const React = require('react');
const createClass = require('create-react-class');
const cx = require('classnames');
@@ -71,4 +72,4 @@ const BrewCleanup = createClass({
}
});
module.exports = BrewCleanup;
module.exports = BrewCleanup;

View File

@@ -1,3 +1,4 @@
require('./brewCompress.less');
const React = require('react');
const createClass = require('create-react-class');
const cx = require('classnames');
@@ -88,4 +89,4 @@ const BrewCompress = createClass({
}
});
module.exports = BrewCompress;
module.exports = BrewCompress;

View File

@@ -1,3 +1,4 @@
require('./brewLookup.less');
const React = require('react');
const createClass = require('create-react-class');
const cx = require('classnames');

View File

@@ -1,3 +1,4 @@
require('./stats.less');
const React = require('react');
const createClass = require('create-react-class');
const cx = require('classnames');
@@ -42,4 +43,4 @@ const Stats = createClass({
}
});
module.exports = Stats;
module.exports = Stats;

View File

@@ -1,3 +1,4 @@
require('./brewRenderer.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');

View File

@@ -1,3 +1,4 @@
require('./errorBar.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');

View File

@@ -1,4 +1,4 @@
require('./notificationPopup.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');

View File

@@ -1,3 +1,4 @@
require('./editor.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
@@ -138,9 +139,3 @@ const Editor = createClass({
});
module.exports = Editor;

View File

@@ -1,3 +1,4 @@
require('./metadataEditor.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
@@ -50,7 +51,7 @@ const MetadataEditor = createClass({
if(!confirm('Are you REALLY sure? You will lose editor access to this document.')) return;
}
request.get(`/api/remove/${this.props.metadata.editId}`)
request.delete(`/api/${this.props.metadata.editId}`)
.send()
.end(function(err, res){
window.location.href = '/';

View File

@@ -1,3 +1,4 @@
require('./snippetbar.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
@@ -92,4 +93,4 @@ const SnippetGroup = createClass({
</div>;
},
});
});

View File

@@ -1,19 +1,19 @@
require('./homebrew.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames');
const CreateRouter = require('pico-router').createRouter;
const { StaticRouter:Router, Switch, Route } = require('react-router-dom');
const queryString = require('query-string');
const HomePage = require('./pages/homePage/homePage.jsx');
const EditPage = require('./pages/editPage/editPage.jsx');
const UserPage = require('./pages/userPage/userPage.jsx');
const SharePage = require('./pages/sharePage/sharePage.jsx');
const NewPage = require('./pages/newPage/newPage.jsx');
const ErrorPage = require('./pages/errorPage/errorPage.jsx');
//const ErrorPage = require('./pages/errorPage/errorPage.jsx');
const PrintPage = require('./pages/printPage/printPage.jsx');
let Router;
const Homebrew = createClass({
getDefaultProps : function() {
return {
@@ -36,55 +36,36 @@ const Homebrew = createClass({
global.account = this.props.account;
global.version = this.props.version;
Router = CreateRouter({
'/edit/:id' : (args)=>{
if(!this.props.brew.editId){
return <ErrorPage errorId={args.id}/>;
}
return <EditPage
id={args.id}
brew={this.props.brew} />;
},
'/share/:id' : (args)=>{
if(!this.props.brew.shareId){
return <ErrorPage errorId={args.id}/>;
}
return <SharePage
id={args.id}
brew={this.props.brew} />;
},
'/user/:username' : (args)=>{
return <UserPage
username={args.username}
brews={this.props.brews}
/>;
},
'/print/:id' : (args, query)=>{
return <PrintPage brew={this.props.brew} query={query}/>;
},
'/print' : (args, query)=>{
return <PrintPage query={query}/>;
},
'/new' : (args)=>{
return <NewPage />;
},
'/changelog' : (args)=>{
return <SharePage
brew={{ title: 'Changelog', text: this.props.changelog }} />;
},
'*' : <HomePage
welcomeText={this.props.welcomeText} />,
});
},
render : function(){
return <div className='homebrew'>
<Router defaultUrl={this.props.url}/>
</div>;
render : function (){
return (
<Router location={this.props.url}>
<div className='homebrew'>
<Switch>
<Route path='/edit/:id' component={(routeProps)=><EditPage id={routeProps.match.params.id} brew={this.props.brew} />}/>
<Route path='/share/:id' component={(routeProps)=><SharePage id={routeProps.match.params.id} brew={this.props.brew} />}/>
<Route path='/user/:username' component={(routeProps)=><UserPage username={routeProps.match.params.username} brews={this.props.brews} />}/>
<Route path='/print/:id' component={(routeProps)=><PrintPage brew={this.props.brew} query={queryString.parse(routeProps.location.search)} /> } />
<Route path='/print' exact component={(routeProps)=><PrintPage query={queryString.parse(routeProps.location.search)} /> } />
<Route path='/new' exact component={NewPage}/>
<Route path='/changelog' exact component={()=><SharePage brew={{ title: 'Changelog', text: this.props.changelog }} />}/>
<Route path='/' component={()=><HomePage welcomeText={this.props.welcomeText}/>}/>
</Switch>
</div>
</Router>
);
}
});
module.exports = Homebrew;
//TODO: Nicer Error page instead of just "cant get that"
// '/share/:id' : (args)=>{
// if(!this.props.brew.shareId){
// return <ErrorPage errorId={args.id}/>;
// }
//
// return <SharePage
// id={args.id}
// brew={this.props.brew} />;
// },

View File

@@ -1,4 +1,3 @@
@import 'naturalcrit/styles/core.less';
.homebrew{
height : 100%;

View File

@@ -1,3 +1,4 @@
require('./navbar.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');

View File

@@ -1,8 +1,10 @@
require('./editPage.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames');
const request = require('superagent');
const { Meta } = require('vitreum/headtags');
const Nav = require('naturalcrit/nav/nav.jsx');
const Navbar = require('../../navbar/navbar.jsx');
@@ -134,7 +136,7 @@ const EditPage = createClass({
}));
request
.put(`/api/update/${this.props.brew.editId}`)
.put(`/api/${this.props.brew.editId}`)
.send(this.state.brew)
.end((err, res)=>{
if(err){
@@ -202,6 +204,7 @@ const EditPage = createClass({
render : function(){
return <div className='editPage page'>
<Meta name='robots' content='noindex, nofollow' />
{this.renderNavbar()}
<div className='content'>

View File

@@ -1,3 +1,4 @@
require('./errorPage.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');

View File

@@ -1,8 +1,10 @@
require('./homePage.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames');
const request = require('superagent');
const { Meta } = require('vitreum/headtags');
const Nav = require('naturalcrit/nav/nav.jsx');
const Navbar = require('../../navbar/navbar.jsx');
@@ -72,6 +74,7 @@ const HomePage = createClass({
render : function(){
return <div className='homePage page'>
<Meta name='google-site-verification' content='NwnAQSSJZzAT7N-p5MY6ydQ7Njm67dtbu73ZSyE5Fy4' />
{this.renderNavbar()}
<div className='content'>

View File

@@ -1,3 +1,4 @@
require('./newPage.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');

View File

@@ -1,7 +1,9 @@
require('./printPage.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames');
const { Meta } = require('vitreum/headtags');
const Markdown = require('naturalcrit/markdown.js');
const PrintPage = createClass({
@@ -42,6 +44,7 @@ const PrintPage = createClass({
render : function(){
return <div>
<Meta name='robots' content='noindex, nofollow' />
{this.renderPages()}
</div>;
}

View File

@@ -1,7 +1,9 @@
require('./sharePage.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames');
const { Meta } = require('vitreum/headtags');
const Nav = require('naturalcrit/nav/nav.jsx');
const Navbar = require('../../navbar/navbar.jsx');
@@ -45,6 +47,7 @@ const SharePage = createClass({
render : function(){
return <div className='sharePage page'>
<Meta name='robots' content='noindex, nofollow' />
<Navbar>
<Nav.section>
<Nav.item className='brewTitle'>{this.props.brew.title}</Nav.item>

View File

@@ -1,3 +1,4 @@
require('./brewItem.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
@@ -26,7 +27,7 @@ const BrewItem = createClass({
if(!confirm('Are you REALLY sure? You will lose editor access to this document.')) return;
}
request.get(`/api/remove/${this.props.brew.editId}`)
request.delete(`/api/${this.props.brew.editId}`)
.send()
.end(function(err, res){
location.reload();

View File

@@ -1,3 +1,4 @@
require('./userPage.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');

View File

@@ -1,4 +1,3 @@
@import (less) 'shared/naturalcrit/styles/reset.less';
@import (less) './client/homebrew/phbStyle/phb.fonts.css';
@import (less) './client/homebrew/phbStyle/phb.assets.less';
@@ -340,7 +339,6 @@ body {
-webkit-column-break-inside : avoid;
page-break-inside : avoid;
break-inside : avoid;
overflow: hidden; /* Firefox fix */
}
//Better spacing for spell blocks
h4+p+hr+ul{

View File

@@ -1,21 +1,19 @@
module.exports = function(vitreum){
module.exports = async (name, props={})=>{
return `
<!DOCTYPE html>
<html>
<head>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700" rel="stylesheet" type="text/css" />
<link href=${`/${name}/bundle.css`} rel='stylesheet'></link>
<link rel="icon" href="/assets/homebrew/favicon.ico" type="image/x-icon" />
<title>The Homebrewery - NaturalCrit</title>
${vitreum.head}
</head>
<body>
<main id="reactRoot">${vitreum.body}</main>
<main id="reactRoot">${require(`../build/${name}/ssr.js`)(props)}</main>
</body>
${vitreum.js}
<script src=${`/${name}/bundle.js`}></script>
<script>start_app(${JSON.stringify(props)})</script>
</html>
`;
};

9585
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,9 @@
"name": "homebrewery",
"description": "Create authentic looking D&D homebrews using only markdown",
"version": "2.8.2",
"engines": {
"node": "12.16.x"
},
"repository": {
"type": "git",
"url": "git://github.com/naturalcrit/homebrewery.git"
@@ -9,7 +12,8 @@
"scripts": {
"dev": "node scripts/dev.js",
"quick": "node scripts/quick.js",
"build": "node scripts/build.js",
"build": "node scripts/buildHomebrew.js",
"buildall": "node scripts/buildHomebrew.js && node scripts/buildAdmin.js",
"lint": "eslint --fix **/*.{js,jsx}",
"lint:dry": "eslint **/*.{js,jsx}",
"circleci": "npm test && eslint **/*.{js,jsx} --max-warnings=0",
@@ -18,7 +22,7 @@
"test:dev": "pico-check -v -w",
"phb": "node scripts/phb.js",
"prod": "set NODE_ENV=production && npm run build",
"postinstall": "npm run build",
"postinstall": "npm run buildall",
"start": "node server.js"
},
"author": "stolksdorf",
@@ -36,30 +40,35 @@
]
},
"dependencies": {
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"@babel/core": "^7.11.4",
"@babel/preset-env": "^7.11.0",
"@babel/preset-react": "^7.10.4",
"body-parser": "^1.19.0",
"classnames": "^2.2.6",
"codemirror": "^5.52.0",
"cookie-parser": "^1.4.4",
"codemirror": "^5.57.0",
"cookie-parser": "^1.4.5",
"create-react-class": "^15.6.3",
"express": "^4.17.1",
"fs-extra": "9.0.1",
"jwt-simple": "^0.5.6",
"lodash": "^4.17.15",
"less": "^3.12.2",
"lodash": "^4.17.20",
"marked": "^0.3.19",
"moment": "^2.24.0",
"mongoose": "^5.9.2",
"moment": "^2.27.0",
"mongoose": "^5.10.0",
"nconf": "^0.10.0",
"pico-router": "^2.1.0",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"prop-types": "15.7.2",
"query-string": "6.13.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-router-dom": "5.2.0",
"shortid": "^2.2.15",
"superagent": "^5.2.2",
"vitreum": "^4.10.1"
"superagent": "^6.0.0",
"vitreum": "github:calculuschild/vitreum#21a8e1c9421f1d3a3b474c12f480feb2fbd28c5b"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint-plugin-react": "^7.19.0",
"eslint": "^7.7.0",
"eslint-plugin-react": "^7.20.6",
"pico-check": "^1.3.2"
}
}

2
robots.txt Normal file
View File

@@ -0,0 +1,2 @@
# Notes
User-agent: *

View File

@@ -1,20 +0,0 @@
const label = 'build';
console.time(label);
const clean = require('vitreum/steps/clean.js');
const jsx = require('vitreum/steps/jsx.js');
const lib = require('vitreum/steps/libs.js');
const less = require('vitreum/steps/less.js');
const asset = require('vitreum/steps/assets.js');
const Proj = require('./project.json');
clean()
.then(lib(Proj.libs))
.then(()=>jsx('homebrew', './client/homebrew/homebrew.jsx', { libs: Proj.libs, shared: ['./shared'] }))
.then((deps)=>less('homebrew', { shared: ['./shared'] }, deps))
.then(()=>jsx('admin', './client/admin/admin.jsx', { libs: Proj.libs, shared: ['./shared'] }))
.then((deps)=>less('admin', { shared: ['./shared'] }, deps))
.then(()=>asset(Proj.assets, ['./shared', './client']))
.then(console.timeEnd.bind(console, label))
.catch(console.error);

31
scripts/buildAdmin.js Normal file
View File

@@ -0,0 +1,31 @@
const fs = require('fs-extra');
const Proj = require('./project.json');
const { pack } = require('vitreum');
const isDev = !!process.argv.find((arg)=>arg=='--dev');
const lessTransform = require('vitreum/transforms/less.js');
const assetTransform = require('vitreum/transforms/asset.js');
//const Meta = require('vitreum/headtags');
const transforms = {
'.less' : lessTransform,
'*' : assetTransform('./build')
};
const build = async ({ bundle, render, ssr })=>{
await fs.outputFile('./build/admin/bundle.css', await lessTransform.generate({ paths: './shared' }));
await fs.outputFile('./build/admin/bundle.js', bundle);
await fs.outputFile('./build/admin/ssr.js', ssr);
await fs.outputFile('./build/admin/render.js', render);
};
fs.emptyDirSync('./build/admin');
pack('./client/admin/admin.jsx', {
paths : ['./shared'],
libs : Proj.libs,
dev : isDev && build,
transforms
})
.then(build)
.catch(console.error);

31
scripts/buildHomebrew.js Normal file
View File

@@ -0,0 +1,31 @@
const fs = require('fs-extra');
const Proj = require('./project.json');
const { pack } = require('vitreum');
const isDev = !!process.argv.find((arg)=>arg=='--dev');
const lessTransform = require('vitreum/transforms/less.js');
const assetTransform = require('vitreum/transforms/asset.js');
//const Meta = require('vitreum/headtags');
const transforms = {
'.less' : lessTransform,
'*' : assetTransform('./build')
};
const build = async ({ bundle, render, ssr })=>{
await fs.outputFile('./build/homebrew/bundle.css', await lessTransform.generate({ paths: './shared' }));
await fs.outputFile('./build/homebrew/bundle.js', bundle);
await fs.outputFile('./build/homebrew/ssr.js', ssr);
await fs.outputFile('./build/homebrew/render.js', render);
};
fs.emptyDirSync('./build/homebrew');
pack('./client/homebrew/homebrew.jsx', {
paths : ['./shared'],
libs : Proj.libs,
dev : isDev && build,
transforms
})
.then(build)
.catch(console.error);

View File

@@ -13,7 +13,6 @@
"codemirror/mode/javascript/javascript.js",
"moment",
"superagent",
"marked",
"pico-router"
"marked"
]
}
}

View File

@@ -44,9 +44,14 @@ const HomebrewModel = require('./server/homebrew.model.js').model;
const welcomeText = require('fs').readFileSync('./client/homebrew/pages/homePage/welcome_msg.md', 'utf8');
const changelogText = require('fs').readFileSync('./changelog.md', 'utf8');
String.prototype.replaceAll = function(s, r){return this.split(s).join(r);};
//Robots.txt
app.get('/robots.txt', (req, res)=>{
return res.sendFile(`${__dirname}/robots.txt`);
});
//Source page
String.prototype.replaceAll = function(s, r){return this.split(s).join(r);};
app.get('/source/:id', (req, res)=>{
HomebrewModel.get({ shareId: req.params.id })
.then((brew)=>{
@@ -59,7 +64,7 @@ app.get('/source/:id', (req, res)=>{
});
});
//User Page
app.get('/user/:username', (req, res, next)=>{
const fullAccess = req.account && (req.account.username == req.params.username);
HomebrewModel.getByUser(req.params.username, fullAccess)
@@ -72,7 +77,7 @@ app.get('/user/:username', (req, res, next)=>{
});
});
//Edit Page
app.get('/edit/:id', (req, res, next)=>{
HomebrewModel.get({ editId: req.params.id })
.then((brew)=>{
@@ -115,22 +120,21 @@ app.get('/print/:id', (req, res, next)=>{
});
//Render Page
const render = require('vitreum/steps/render');
//Render the page
//const render = require('.build/render');
const templateFn = require('./client/template.js');
app.use((req, res)=>{
render('homebrew', templateFn, {
const props = {
version : require('./package.json').version,
url : req.originalUrl,
welcomeText : welcomeText,
changelog : changelogText,
brew : req.brew,
brews : req.brews,
account : req.account
})
.then((page)=>{
return res.send(page);
})
account : req.account,
};
templateFn('homebrew', props)
.then((page)=>res.send(page))
.catch((err)=>{
console.log(err);
return res.sendStatus(500);

View File

@@ -1,7 +1,7 @@
const HomebrewModel = require('./homebrew.model.js').model;
const router = require('express').Router();
const Moment = require('moment');
const render = require('vitreum/steps/render');
//const render = require('vitreum/steps/render');
const templateFn = require('../client/template.js');
const zlib = require('zlib');
@@ -100,7 +100,7 @@ router.get('/admin/stats', mw.adminOnly, (req, res)=>{
});
router.get('/admin', mw.adminOnly, (req, res)=>{
render('admin', templateFn, {
templateFn('admin', {
url : req.originalUrl
})
.then((page)=>res.send(page))

View File

@@ -1,5 +1,5 @@
module.exports = (req, res, next)=>{
if(process.env.NODE_ENV === 'local') return next();
if(process.env.NODE_ENV === 'local' || process.env.NODE_ENV === 'docker') return next();
if(req.header('x-forwarded-proto') !== 'https') {
return res.redirect(302, `https://${req.get('Host')}${req.url}`);
}

View File

@@ -3,7 +3,7 @@ const HomebrewModel = require('./homebrew.model.js').model;
const router = require('express').Router();
const zlib = require('zlib');
// const getTopBrews = (cb)=>{
// const getTopBrews = (cb) => {
// HomebrewModel.find().sort({ views: -1 }).limit(5).exec(function(err, brews) {
// cb(brews);
// });
@@ -11,53 +11,53 @@ const zlib = require('zlib');
const getGoodBrewTitle = (text)=>{
const titlePos = text.indexOf('# ');
if(titlePos !== -1){
if(titlePos !== -1) {
const ending = text.indexOf('\n', titlePos);
return text.substring(titlePos + 2, ending);
} else {
return _.find(text.split('\n'), (line)=>{
return line;
});
return _.find(text.split('\n'), (line)=>line);
}
};
router.post('/api', (req, res)=>{
let authors = [];
if(req.account) authors = [req.account.username];
const newBrew = (req, res)=>{
const authors = (req.account) ? [req.account.username] : [];
const newHomebrew = new HomebrewModel(_.merge({},
req.body,
{ authors: authors }
));
if(!newHomebrew.title){
if(!newHomebrew.title) {
newHomebrew.title = getGoodBrewTitle(newHomebrew.text);
}
newHomebrew.textBin = zlib.deflateRawSync(newHomebrew.text); // Compress brew text to binary before saving
newHomebrew.text = undefined; // Delete the non-binary text field since it's not needed anymore
// Compress brew text to binary before saving
newHomebrew.textBin = zlib.deflateRawSync(newHomebrew.text);
// Delete the non-binary text field since it's not needed anymore
newHomebrew.text = undefined;
newHomebrew.save((err, obj)=>{
if(err){
if(err) {
console.error(err, err.toString(), err.stack);
return res.status(500).send(`Error while creating new brew, ${err.toString()}`);
}
return res.json(obj);
});
});
};
router.put('/api/update/:id', (req, res)=>{
const updateBrew = (req, res)=>{
HomebrewModel.get({ editId: req.params.id })
.then((brew)=>{
brew = _.merge(brew, req.body);
brew.textBin = zlib.deflateRawSync(req.body.text); // Compress brew text to binary before saving
brew.text = undefined; // Delete the non-binary text field since it's not needed anymore
// Compress brew text to binary before saving
brew.textBin = zlib.deflateRawSync(req.body.text);
// Delete the non-binary text field since it's not needed anymore
brew.text = undefined;
brew.updatedAt = new Date();
if(req.account) brew.authors = _.uniq(_.concat(brew.authors, req.account.username));
if(req.account) {
brew.authors = _.uniq(_.concat(brew.authors, req.account.username));
}
brew.markModified('authors');
brew.markModified('systems');
@@ -68,62 +68,63 @@ router.put('/api/update/:id', (req, res)=>{
});
})
.catch((err)=>{
console.log(err);
console.error(err);
return res.status(500).send('Error while saving');
});
});
};
router.get('/api/remove/:id', (req, res)=>{
const deleteBrew = (req, res)=>{
HomebrewModel.find({ editId: req.params.id }, (err, objs)=>{
if(!objs.length || err) return res.status(404).send('Can not find homebrew with that id');
if(!objs.length || err) {
return res.status(404).send('Can not find homebrew with that id');
}
const brew = objs[0];
// Remove current user as author
if(req.account){
if(req.account) {
// Remove current user as author
brew.authors = _.pull(brew.authors, req.account.username);
brew.markModified('authors');
}
// Delete brew if there are no authors left
if(!brew.authors.length)
if(brew.authors.length === 0) {
// Delete brew if there are no authors left
brew.remove((err)=>{
if(err) return res.status(500).send('Error while removing');
return res.status(200).send();
});
// Otherwise, save the brew with updated author list
else
} else {
// Otherwise, save the brew with updated author list
brew.save((err, savedBrew)=>{
if(err) throw err;
return res.status(200).send(savedBrew);
});
}
});
});
};
router.post('/api', newBrew);
router.put('/api/:id', updateBrew);
router.put('/api/update/:id', updateBrew);
router.delete('/api/:id', deleteBrew);
router.get('/api/remove/:id', deleteBrew);
module.exports = router;
/*
module.exports = function(app){
module.exports = function(app) {
app;
app.get('/api/search', mw.adminOnly, function(req, res){
app.get('/api/search', mw.adminOnly, function(req, res) {
var page = req.query.page || 0;
var count = req.query.count || 20;
var query = {};
if(req.query && req.query.id){
if (req.query && req.query.id) {
query = {
"$or" : [{
"$or": [{
editId : req.query.id
},{
}, {
shareId : req.query.id
}]
};
@@ -134,21 +135,17 @@ module.exports = function(app){
}, {
skip: page*count,
limit: count*1
}, function(err, objs){
if(err) console.log(err);
}, function(err, objs) {
if (err) console.error(err);
return res.json({
page : page,
count : count,
total : homebrewTotal,
brews : objs
});
});
})
return app;
}
*/

View File

@@ -1,4 +1,4 @@
require('./renderWarnings.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
@@ -25,10 +25,10 @@ const RenderWarnings = createClass({
if(!isChrome){
return <li key='chrome'>
<em>Built for Chrome </em> <br />
Other browsers do not support &nbsp;
<a target='_blank' href='https://developer.mozilla.org/en-US/docs/Web/CSS/column-span#Browser_compatibility'>
key features
</a> this site uses.
Other browsers have not been tested for compatiblilty. If you
experience issues with your document not rendering or printing
properly, please try using the latest version of Chrome before
submitting a bug report.
</li>;
}
},

View File

@@ -1,3 +1,4 @@
require('./codeEditor.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');

View File

@@ -1,3 +1,4 @@
require('./nav.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
@@ -70,4 +71,4 @@ const Nav = {
};
module.exports = Nav;
module.exports = Nav;

View File

@@ -1,3 +1,4 @@
//@import (less) 'naturalcrit/styles/style.fonts.css';
nav{
background-color : #333;
.navContent{
@@ -77,4 +78,4 @@ nav{
.navSection:last-child .navItem{
border-left : 1px solid #666;
}
}
}

View File

@@ -1,3 +1,4 @@
require('./splitPane.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');

View File

@@ -5,12 +5,12 @@
@import 'naturalcrit/styles/colors.less';
@import 'naturalcrit/styles/tooltip.less';
@font-face {
font-family : CodeLight;
src : url('/assets/naturalcrit/styles/CODE Light.otf');
font-family : 'CodeLight';
src : data-uri('naturalcrit/styles/CODE Light.otf') format('opentype');
}
@font-face {
font-family : CodeBold;
src : url('/assets/naturalcrit/styles/CODE Bold.otf');
font-family : 'CodeBold';
src : data-uri('naturalcrit/styles/CODE Bold.otf') format('opentype');
}
html,body, #reactRoot{
height : 100vh;
@@ -47,4 +47,4 @@ button{
&:disabled{
background-color : @silver !important;
}
}
}