0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-23 16:33:05 +00:00

Compare commits

..

915 Commits

Author SHA1 Message Date
Trevor Buckner
e3b2d33a5e v3.12.0 2024-03-18 17:24:39 -04:00
Trevor Buckner
e4b7d0be64 Merge pull request #3356 from naturalcrit/Fix-Dicefont
Fix dicefont
2024-03-18 16:55:32 -04:00
Trevor Buckner
7e48696fb5 lint 2024-03-18 16:55:08 -04:00
Trevor Buckner
b727c56e56 Fix Dicefont 2024-03-18 16:52:43 -04:00
Trevor Buckner
bf267436b0 Merge pull request #3348 from 5e-Cleric/fonts-fix
Font fix, df to icon fonts, remove duplication
2024-03-14 17:07:30 -04:00
Trevor Buckner
2af44665e1 Merge branch 'master' into fonts-fix 2024-03-14 16:59:21 -04:00
Trevor Buckner
e412a379e3 Merge pull request #3129 from dbolacksn/Extended_DD
Add Multi-line Dictionary Definition (<dd>) rows.
2024-03-14 00:05:30 -04:00
Trevor Buckner
f37da19649 lint 2024-03-14 00:03:28 -04:00
Trevor Buckner
d7756230fb More tests. Split into two extensions
Split into two extensions as single-line and multiline are different syntaxes. Simplified a lot of logic and probably cleaner as their own NPM packages (eventually).
2024-03-14 00:02:18 -04:00
David Bolack
d6aa0138f0 Merge branch 'Extended_DD' of github.com:dbolacksn/homebrewery-broken into Extended_DD 2024-03-09 19:42:34 -06:00
David Bolack
f3b17f4615 Fix bad merge 2024-03-09 19:40:54 -06:00
David Bolack
04e6f2ea58 Merge branch 'master' into Extended_DD 2024-03-09 19:37:57 -06:00
David Bolack
ed6718eef1 Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-03-09 19:37:31 -06:00
Trevor Buckner
e36a638ae5 Add more tests 2024-03-09 16:41:05 -05:00
Víctor Losada Hernández
d1c2e74ed6 Merge branch 'master' into fonts-fix 2024-03-08 19:56:15 +01:00
Trevor Buckner
005fb705fa Merge pull request #3349 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.22.3
Bump react-router-dom from 6.22.2 to 6.22.3
2024-03-08 10:46:35 -05:00
Trevor Buckner
f6c0b0d6fc Simplification of CSS 2024-03-07 23:46:10 -05:00
dependabot[bot]
08a3d7367b Bump react-router-dom from 6.22.2 to 6.22.3
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.22.2 to 6.22.3.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.22.3/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-08 03:15:21 +00:00
David Bolack
cd537f98c7 Merge branch 'master' into Extended_DD 2024-03-06 23:41:42 -06:00
David Bolack
8ab91c3eb2 Merge branch 'master' of github.com:dbolacksn/homebrewery-broken 2024-03-06 23:39:12 -06:00
David Bolack
8c773ced9c Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-03-06 23:38:44 -06:00
Víctor Losada Hernández
4cc2acc9e6 quickfix 2024-03-06 23:12:12 +01:00
Víctor Losada Hernández
f903e97562 back to original links 2024-03-06 23:03:44 +01:00
Víctor Losada Hernández
b57e42be6f Merge branch 'master' of https://github.com/naturalcrit/homebrewery into fonts-fix 2024-03-06 22:38:00 +01:00
Víctor Losada Hernández
9f95947d16 initial commit 2024-03-06 22:34:44 +01:00
Trevor Buckner
d129fc14c1 Merge pull request #3291 from 5e-Cleric/nav-fixes
Small navigation fixes
2024-03-06 15:39:45 -05:00
Trevor Buckner
58422569c9 Extra classes were needed for .recent and .save
.save has special styling for the "on" button.

.recent has special styling for the dividers between Edited and Viewed
2024-03-06 15:32:38 -05:00
Víctor Losada Hernández
f172d02920 Merge branch 'nav-fixes' of https://github.com/5e-Cleric/homebrewery into nav-fixes 2024-03-06 19:43:46 +01:00
Víctor Losada Hernández
dbe60e3ff1 dropdown classes fix 2024-03-06 19:43:44 +01:00
Trevor Buckner
8e6f0a7dbb Merge branch 'master' into nav-fixes 2024-03-06 13:24:32 -05:00
Víctor Losada Hernández
b2b276c3a3 classname to new dropdown 2024-03-06 19:21:11 +01:00
Víctor Losada Hernández
7483b4afc6 quickfix 2024-03-06 19:16:48 +01:00
Víctor Losada Hernández
c7a2e84927 no wrapping text 2024-03-06 19:13:35 +01:00
Víctor Losada Hernández
3482330629 adjust to work with overflow 2024-03-06 19:05:58 +01:00
Trevor Buckner
a74b556188 Merge pull request #3278 from 5e-Cleric/type-fix-for-stylesheet-import-in-html
Add type attribute to all stylesheet import link tags
2024-03-06 12:57:03 -05:00
Víctor Losada Hernández
1721b9087a Merge branch 'master' of https://github.com/naturalcrit/homebrewery into nav-fixes 2024-03-06 18:55:02 +01:00
Trevor Buckner
c871548877 Merge branch 'master' into type-fix-for-stylesheet-import-in-html 2024-03-06 12:53:04 -05:00
Trevor Buckner
190ecddc2a Merge pull request #3345 from RKuerten/fixContentsSnippet
Updated Table of Contents snippet
2024-03-06 12:45:38 -05:00
Trevor Buckner
0a24ac9f25 Merge pull request #3289 from 5e-Cleric/newFromLocal
New Brew from Local file
2024-03-06 12:44:01 -05:00
Trevor Buckner
d8d580c277 Merge branch 'master' into newFromLocal 2024-03-06 12:43:34 -05:00
Trevor Buckner
be08887e50 Merge pull request #3286 from 5e-Cleric/PHB-vs-Blank-theme-management
Phb vs Blank theme management
2024-03-06 12:33:26 -05:00
Trevor Buckner
5043313aca Merge branch 'master' into PHB-vs-Blank-theme-management 2024-03-06 12:32:20 -05:00
Trevor Buckner
83d2a604e1 Clean up some spacing 2024-03-06 12:28:43 -05:00
Víctor Losada Hernández
02509ebc3a Merge branch 'newFromLocal' of https://github.com/5e-Cleric/homebrewery into newFromLocal 2024-03-06 18:12:23 +01:00
Víctor Losada Hernández
e494899f8b icons 2024-03-06 18:12:21 +01:00
Víctor Losada Hernández
9f483bba6f Merge branch 'master' into newFromLocal 2024-03-06 18:09:57 +01:00
Víctor Losada Hernández
f93af38fa6 split-style-and-metadata moved to helpers.js 2024-03-06 18:09:26 +01:00
Rodrigo Kuerten
6eecd9cee4 Updated Table of Contents snippet 2024-03-06 13:46:13 -03:00
Trevor Buckner
7e847cc139 Merge pull request #3332 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.24.0
Bump @babel/plugin-transform-runtime from 7.23.9 to 7.24.0
2024-03-06 11:25:06 -05:00
dependabot[bot]
99daaf5537 Bump @babel/plugin-transform-runtime from 7.23.9 to 7.24.0
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.23.9 to 7.24.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.24.0/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-06 16:05:23 +00:00
Trevor Buckner
24421ca4e7 Merge pull request #3331 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.24.0
Bump @babel/preset-env from 7.23.9 to 7.24.0
2024-03-06 11:03:34 -05:00
Víctor Losada Hernández
25945fc0df getting rid of state as per req 2024-03-06 14:06:57 +01:00
Víctor Losada Hernández
b50353c8c4 rename nav buttons per req 2024-03-06 14:02:09 +01:00
dbolacksn
4f4b43f49d Merge branch 'naturalcrit:master' into master 2024-03-05 13:56:23 -06:00
dependabot[bot]
cfdc3e6870 Bump @babel/preset-env from 7.23.9 to 7.24.0
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.9 to 7.24.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.24.0/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 17:40:24 +00:00
Trevor Buckner
f71c3da568 Merge pull request #3333 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.24.0
Bump @babel/core from 7.23.9 to 7.24.0
2024-03-05 12:39:36 -05:00
dependabot[bot]
e472465ce7 Bump @babel/core from 7.23.9 to 7.24.0
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.9 to 7.24.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.24.0/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 17:36:12 +00:00
Trevor Buckner
776b6da79f Merge pull request #3337 from naturalcrit/dependabot/npm_and_yarn/express-4.18.3
Bump express from 4.18.2 to 4.18.3
2024-03-05 12:35:10 -05:00
dependabot[bot]
1e4a00ce56 Bump express from 4.18.2 to 4.18.3
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.18.3.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.18.3)

---
updated-dependencies:
- dependency-name: express
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 17:23:13 +00:00
Trevor Buckner
ed6bca04f5 Merge pull request #3334 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.22.2
Bump react-router-dom from 6.22.1 to 6.22.2
2024-03-05 12:22:25 -05:00
dependabot[bot]
dbfc1e7d28 Bump react-router-dom from 6.22.1 to 6.22.2
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.22.1 to 6.22.2.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.22.2/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 17:19:12 +00:00
Trevor Buckner
cc9ead20b3 Merge pull request #3342 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.34.0
Bump eslint-plugin-react from 7.33.2 to 7.34.0
2024-03-05 12:18:26 -05:00
Trevor Buckner
79c89bb621 Merge branch 'master' into dependabot/npm_and_yarn/eslint-plugin-react-7.34.0 2024-03-05 12:14:59 -05:00
dependabot[bot]
cf1617f2a3 Bump eslint-plugin-react from 7.33.2 to 7.34.0
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.2 to 7.34.0.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.33.2...v7.34.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 17:10:23 +00:00
Trevor Buckner
7ecca16fd0 Merge pull request #3343 from naturalcrit/dependabot/npm_and_yarn/mongoose-8.2.1
Bump mongoose from 8.2.0 to 8.2.1
2024-03-05 12:09:42 -05:00
Víctor Losada Hernández
1e1505c63f towards a more traditional approach 2024-03-05 08:27:56 +01:00
Víctor Losada Hernández
1bddb38fcc Merge branch 'master' of https://github.com/naturalcrit/homebrewery into newFromLocal 2024-03-05 08:07:34 +01:00
dependabot[bot]
3314471d73 Bump mongoose from 8.2.0 to 8.2.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.2.0 to 8.2.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.2.0...8.2.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 03:47:01 +00:00
David Bolack
15f95ddd44 Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-03-04 16:33:15 -06:00
Trevor Buckner
4dd8ad77bb Merge pull request #3288 from 5e-Cleric/FA-upgrade
FA to 6.5.1
2024-03-04 16:58:53 -05:00
Trevor Buckner
9f5a4fb44c Merge branch 'master' into FA-upgrade 2024-03-04 16:57:59 -05:00
David Bolack
7f16da110f Merge branch 'master' into Extended_DD 2024-03-04 11:01:49 -06:00
David Bolack
3734c9e71d Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-03-04 09:21:09 -06:00
Víctor Losada Hernández
6b93b1c1e7 Merge pull request #3292 from Gazook89/Combine-Nav-Styling
Looks good! thanks @Gazook89 !
2024-03-01 19:44:27 +01:00
Trevor Buckner
3d7780958a Merge branch 'Combine-Nav-Styling' of https://github.com/Gazook89/homebrewery into pr/3292 2024-03-01 01:31:06 -05:00
Trevor Buckner
59e87697ff linting 2024-03-01 01:27:46 -05:00
Trevor Buckner
20c088b6de Merge branch 'master' into Combine-Nav-Styling 2024-03-01 01:26:17 -05:00
Trevor Buckner
50f069e688 Fix some nesting of styles
The values from nav.less were mistakenly nested inside each other which was adding too much specificity.
2024-03-01 01:24:50 -05:00
Trevor Buckner
148c243d9f Merge pull request #3323 from dbolack-ab/fix_subsuper_Highlighting
Fix syntax highlighting on sub and superscript
2024-02-29 18:28:03 -05:00
Trevor Buckner
16e4f66b99 Merge branch 'master' into fix_subsuper_Highlighting 2024-02-29 18:27:35 -05:00
Trevor Buckner
774b555a61 Rework to fix 5eCleric's tests 2024-02-29 17:17:38 -05:00
Víctor Losada Hernández
0310eee685 increase minimum width 2024-02-27 22:18:04 +01:00
Víctor Losada Hernández
c4499fcc26 min-width for elements 2024-02-27 22:12:40 +01:00
Víctor Losada Hernández
1d317788fe fix undefined class 2024-02-27 22:12:32 +01:00
Víctor Losada Hernández
b5301ff978 requested changes 2024-02-27 21:53:44 +01:00
Víctor Losada Hernández
a027e16636 Merge branch 'pr/3292' into nav-fixes 2024-02-27 21:42:44 +01:00
Víctor Losada Hernández
673a22a571 Merge branch 'master' into nav-fixes 2024-02-27 21:32:03 +01:00
Trevor Buckner
3778b4c719 Merge pull request #3328 from naturalcrit/dependabot/npm_and_yarn/eslint-8.57.0
Bump eslint from 8.56.0 to 8.57.0
2024-02-27 10:39:12 -05:00
Trevor Buckner
3e258332c1 Merge pull request #3330 from RKuerten/removeBGattach
Remove background-attachment property from .monster.frame
2024-02-27 10:38:53 -05:00
Rodrigo Kuerten
713865fb40 Remove background-attachment property 2024-02-27 10:21:53 -03:00
G.Ambatte
bc29cddcec Merge pull request #3165 from G-Ambatte/experimentalTagFiltering-#3164
Add tag filtering
2024-02-27 08:49:33 +13:00
G.Ambatte
f9d8344dba Remove unnecessary function 2024-02-26 21:16:37 +13:00
dependabot[bot]
9d38c937b4 Bump eslint from 8.56.0 to 8.57.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.56.0 to 8.57.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.56.0...v8.57.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-26 03:43:17 +00:00
G.Ambatte
622579bb7d Merge branch 'master' into experimentalTagFiltering-#3164 2024-02-26 13:12:37 +13:00
G.Ambatte
26263c0bf8 Remove unused function parameter type 2024-02-26 13:01:13 +13:00
David Bolack
05f88dfd00 Extended Definition List cleanup
Remove redundant inlineBlock extension
Add missing trim on multiline definitions
Fix editor regex for colon terminated terms.
2024-02-25 09:19:31 -06:00
David Bolack
d1d28acebb Merge branch 'master' into Extended_DD 2024-02-25 09:15:27 -06:00
David Bolack
84d5b26530 Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-02-25 08:34:37 -06:00
Víctor Losada Hernández
16c37d8d76 Merge branch 'master' into Combine-Nav-Styling 2024-02-25 13:12:21 +01:00
Víctor Losada Hernández
a608df9cd9 Merge pull request #3325 from RKuerten/new-theme
This looks good, merging now, thanks @RKuerten !
2024-02-25 01:03:58 +01:00
Rodrigo Kuerten
254b0852ca Cleaned up css, added missing variables 2024-02-24 20:57:26 -03:00
Víctor Losada Hernández
8e41755d2a Merge branch 'master' into Combine-Nav-Styling 2024-02-25 00:06:29 +01:00
Rodrigo Kuerten
36eb250d7a Merge branch 'master' into new-theme 2024-02-24 20:00:44 -03:00
G.Ambatte
a2b97abb2e Remove missed console.log debugging lines 2024-02-25 11:47:34 +13:00
Víctor Losada Hernández
0331f5cf5b Merge branch 'master' into experimentalTagFiltering-#3164 2024-02-24 23:30:14 +01:00
Víctor Losada Hernández
54159513e4 Merge pull request #3197 from G-Ambatte/addDiceFont
Add DiceFont support to Homebrewery
2024-02-24 23:26:33 +01:00
Víctor Losada Hernández
99a766d990 Merge branch 'master' into addDiceFont 2024-02-24 23:24:49 +01:00
Rodrigo Kuerten
1ec0cb14ef Merge branch 'master' into new-theme 2024-02-24 14:42:33 -03:00
Víctor Losada Hernández
387f03db25 Merge branch 'master' into Combine-Nav-Styling 2024-02-24 13:29:08 +01:00
Víctor Losada Hernández
0c20a65999 Merge pull request #3324 from dbolack-ab/Readme_column
Add a column break before the Tables header on page 2
2024-02-24 13:04:42 +01:00
Rodrigo Kuerten
da8836ba99 Added new theme 2024-02-23 22:07:28 -03:00
David Bolack
bf874c55af Add a column break before the Tables header on page 2
Small formatting fix.
2024-02-23 14:46:13 -06:00
Víctor Losada Hernández
43a76933ab Merge branch 'master' into experimentalTagFiltering-#3164 2024-02-23 20:23:15 +01:00
Víctor Losada Hernández
ce9013fed2 Merge branch 'master' into addDiceFont 2024-02-23 20:22:45 +01:00
Víctor Losada Hernández
e4632ea340 Merge branch 'master' into Combine-Nav-Styling 2024-02-23 20:20:50 +01:00
Víctor Losada Hernández
f21eaab997 Merge branch 'master' into type-fix-for-stylesheet-import-in-html 2024-02-23 20:19:58 +01:00
Víctor Losada Hernández
f48b9c46fe Merge branch 'master' into PHB-vs-Blank-theme-management 2024-02-23 20:19:49 +01:00
Víctor Losada Hernández
7d08731094 Merge branch 'master' into newFromLocal 2024-02-23 20:19:33 +01:00
Víctor Losada Hernández
bd97d78195 Merge branch 'master' into nav-fixes 2024-02-23 20:19:18 +01:00
Víctor Losada Hernández
b1a3fcf33c Merge branch 'master' into FA-upgrade 2024-02-23 20:18:50 +01:00
David Bolack
7d755fe2a3 Fix syntax highlighting on sub and superscript
I did not test this very robustly, it seems.
2024-02-23 11:35:57 -06:00
Trevor Buckner
ba1430c377 Merge pull request #3320 from naturalcrit/dependabot/npm_and_yarn/mongoose-8.2.0
Bump mongoose from 8.1.3 to 8.2.0
2024-02-22 23:08:17 -05:00
dependabot[bot]
7698abe70f Bump mongoose from 8.1.3 to 8.2.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.1.3 to 8.2.0.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.1.3...8.2.0)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-23 03:02:05 +00:00
Víctor Losada Hernández
fd58503a77 Merge pull request #3297 from RKuerten/fixMonsterBg
Changed background-attachment: fixed on the monster frame
2024-02-22 16:43:10 +01:00
Rodrigo Kuerten
8aa7a26183 Merge branch 'master' into fixMonsterBg 2024-02-22 12:02:14 -03:00
G.Ambatte
ad5ad05b7b Simplify syntax 2024-02-22 20:02:09 +13:00
G.Ambatte
c0827d6db0 Merge branch 'master' into addDiceFont 2024-02-22 19:55:25 +13:00
G.Ambatte
43209186ee Remove obsolete styling from tags-container 2024-02-22 19:27:17 +13:00
G.Ambatte
46a0a66fb6 Use currentColor once instead of multiple border-color declarations 2024-02-22 19:20:42 +13:00
G.Ambatte
9e6f7a496e Merge branch 'master' into experimentalTagFiltering-#3164 2024-02-22 19:16:38 +13:00
Trevor Buckner
94d9e1b08e Merge pull request #3316 from G-Ambatte/fixSantizeScriptTags-#3315
Fix sanitizeScriptTags when content is null
2024-02-22 00:20:35 -05:00
G.Ambatte
087ce4bb90 Merge branch 'master' into experimentalTagFiltering-#3164 2024-02-22 17:37:37 +13:00
G.Ambatte
2c02d4174f Fix sanitizeScriptTags when content is null 2024-02-22 17:06:02 +13:00
Trevor Buckner
4feeaee7e7 Merge pull request #3307 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-jest-27.9.0
Bump eslint-plugin-jest from 27.6.3 to 27.9.0
2024-02-21 22:02:52 -05:00
Trevor Buckner
5f5185c619 Merge branch 'master' into dependabot/npm_and_yarn/eslint-plugin-jest-27.9.0 2024-02-21 21:53:14 -05:00
Trevor Buckner
3e76307303 Merge pull request #3296 from 5e-Cleric/lang-fix-on-print
Fix lang on print
2024-02-21 21:52:59 -05:00
Trevor Buckner
fe3a5f4def Merge branch 'master' into lang-fix-on-print 2024-02-21 21:52:03 -05:00
Trevor Buckner
5d752f3355 Merge branch 'master' into dependabot/npm_and_yarn/eslint-plugin-jest-27.9.0 2024-02-21 21:49:43 -05:00
Trevor Buckner
8f400236a7 Merge pull request #3314 from naturalcrit/ForceVarMathTo$
Variable math requires `$` prefix
2024-02-21 21:42:36 -05:00
Trevor Buckner
8779ee3325 Variable math requires $ prefix 2024-02-21 21:42:03 -05:00
dependabot[bot]
e268858945 Bump eslint-plugin-jest from 27.6.3 to 27.9.0
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.6.3 to 27.9.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.6.3...v27.9.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-21 22:31:38 +00:00
Trevor Buckner
0e48f325f2 Merge pull request #3311 from naturalcrit/v3.11.0
Up to v3.11.0
2024-02-21 17:30:44 -05:00
Trevor Buckner
7e38271ac6 Up to v3.11.0 2024-02-21 17:30:15 -05:00
Rodrigo Kuerten
ff75afa91f Merge branch 'master' into fixMonsterBg 2024-02-21 08:46:47 -03:00
Trevor Buckner
4866eacd5d Merge pull request #3306 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.22.1
Bump react-router-dom from 6.22.0 to 6.22.1
2024-02-20 23:51:32 -05:00
Trevor Buckner
1386020bbb Merge pull request #3273 from 5e-Cleric/brew-author-comma-fix
brew fix commas
2024-02-20 23:25:23 -05:00
Trevor Buckner
6b7af58e6c Change span to Fragment; linting 2024-02-20 23:24:43 -05:00
dependabot[bot]
0f1d07d90f Bump react-router-dom from 6.22.0 to 6.22.1
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.22.0 to 6.22.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/react-router-dom@6.22.1/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.22.1/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-21 04:08:37 +00:00
Trevor Buckner
d5230757b1 Merge pull request #3305 from naturalcrit/dependabot/npm_and_yarn/mongoose-8.1.3
Bump mongoose from 8.1.1 to 8.1.3
2024-02-20 23:07:27 -05:00
Trevor Buckner
06825468b4 Merge pull request #3299 from 5e-Cleric/update-popup
popup update 3.11
2024-02-20 23:07:05 -05:00
Trevor Buckner
faab60f271 Merge branch 'master' into update-popup 2024-02-20 23:06:33 -05:00
dependabot[bot]
4bed2349a9 Bump mongoose from 8.1.1 to 8.1.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.1.1 to 8.1.3.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.1.1...8.1.3)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-21 04:05:02 +00:00
Trevor Buckner
53f1e53fcb Merge pull request #3199 from naturalcrit/GlobalReflinks
Yet another Brew Variables PR
2024-02-20 23:03:53 -05:00
Trevor Buckner
df447d3d4d typo 2024-02-20 23:01:49 -05:00
Trevor Buckner
e3bf913a80 lint 2024-02-20 23:00:57 -05:00
Trevor Buckner
7bb1f16946 Always render currently-edited page first, so variables update across pages properly 2024-02-20 22:56:37 -05:00
Trevor Buckner
6870fd6d76 Add tests for cross-page behavior and fix related bugs 2024-02-20 22:31:33 -05:00
Trevor Buckner
9ad1d1f196 remove unused 'parseVarse' variable 2024-02-20 17:05:26 -05:00
Trevor Buckner
969cff61bf Add one more test that was failing 2024-02-20 17:03:17 -05:00
Trevor Buckner
736f729457 Rename variables 2024-02-20 16:46:49 -05:00
Trevor Buckner
0050e1e294 Added another test for a broken case and fixed; Cleaned up more 2024-02-20 15:37:54 -05:00
Trevor Buckner
f2d1b61a7a Remove unused variables 2024-02-20 00:04:29 -05:00
Trevor Buckner
1d1fa99b4b Pass all tests 2024-02-19 23:57:19 -05:00
Víctor Losada Hernández
f42cab6e40 suggested changes 2024-02-17 11:51:42 +01:00
Trevor Buckner
bc21abd509 Fix matches inside of code blocks 2024-02-14 11:38:47 -05:00
Trevor Buckner
72744718cc Adding some tests 2024-02-13 22:44:57 -05:00
Trevor Buckner
e85a62a05c Disable default def behavior. 2024-02-13 09:35:55 -05:00
Víctor Losada Hernández
5a68acc0f5 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into update-popup 2024-02-13 14:31:45 +01:00
Víctor Losada Hernández
f51fca74e6 initial commit 2024-02-13 14:27:32 +01:00
Víctor Losada Hernández
fe5a76c0df fix link href 2024-02-13 10:52:53 +01:00
Trevor Buckner
3bda834ad3 remove console.log 2024-02-13 00:53:34 -05:00
Trevor Buckner
29f0a8e635 Fix code blocks and nested parens. 2024-02-13 00:23:58 -05:00
Trevor Buckner
c035404555 Add exponents via '^' 2024-02-12 11:58:56 -05:00
Trevor Buckner
74ddc71962 Add 'floor()' and 'ceil()' math functions. 2024-02-12 11:57:37 -05:00
Trevor Buckner
1491a1b4ff Fix Math assignments 2024-02-12 11:54:28 -05:00
Rodrigo Kuerten
6890bab668 Fixed background being fixed on the monster frame 2024-02-12 10:37:52 -03:00
Víctor Losada Hernández
209c237b73 en-US to en 2024-02-12 08:54:00 +01:00
Víctor Losada Hernández
086468d65b initial commit 2024-02-12 08:12:53 +01:00
Gazook89
323d84974c Combine nav and navbar styles
- moves all the nav.less styling to navbar.less in the `client` directory
- deletes nav.less
- changes the nav.jsx import of styles to navbar.less
- stylelint navbar.less
- added a couple comments about easy future changes.
2024-02-10 22:29:16 -06:00
Víctor Losada Hernández
6365fb9b56 Merge branch 'master' into nav-fixes 2024-02-10 13:05:13 +01:00
Víctor Losada Hernández
19bb9705b6 initial commit 2024-02-09 13:33:41 +01:00
Víctor Losada Hernández
705d170b6e alert if wrong file, redirect if good 2024-02-09 10:22:55 +01:00
Trevor Buckner
ab54188ba4 Fix small typo 2024-02-09 02:15:53 -05:00
Trevor Buckner
e0b6b95295 Merge pull request #3290 from naturalcrit/PreprocessVars
Simplify and clean Vars - Done in preprocessing step now
2024-02-09 02:04:02 -05:00
Trevor Buckner
c7cfade86f Support () and round in math 2024-02-09 01:59:59 -05:00
Trevor Buckner
e4fa59aae8 Merge branch 'master' into PreprocessVars 2024-02-08 23:13:19 -05:00
Trevor Buckner
35227268cf Move to preprocessor step 2024-02-08 23:12:06 -05:00
David Bolack
67b11d62ea Small DD appending mode fix 2024-02-08 19:35:43 -06:00
David Bolack
2b81c26cff Working, but ugly 2024-02-08 19:23:33 -06:00
Víctor Losada Hernández
32b5bebbc4 full functionality 2024-02-09 00:18:39 +01:00
Trevor Buckner
c27f5d9efa Merge pull request #3287 from naturalcrit/dependabot/npm_and_yarn/stylelint-config-recess-order-4.6.0
Bump stylelint-config-recess-order from 4.5.0 to 4.6.0
2024-02-08 10:53:40 -05:00
Víctor Losada Hernández
26a41e6262 FA to 6.5.1 2024-02-08 11:33:11 +01:00
dependabot[bot]
87c9e587a1 Bump stylelint-config-recess-order from 4.5.0 to 4.6.0
Bumps [stylelint-config-recess-order](https://github.com/stormwarning/stylelint-config-recess-order) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/stormwarning/stylelint-config-recess-order/releases)
- [Changelog](https://github.com/stormwarning/stylelint-config-recess-order/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stormwarning/stylelint-config-recess-order/compare/v4.5.0...v4.6.0)

---
updated-dependencies:
- dependency-name: stylelint-config-recess-order
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-08 03:54:50 +00:00
David Bolack
f3148ed53c Fix Syntax Highlighting
Update changelog to match PR target shifts.
2024-02-07 20:23:19 -06:00
David Bolack
ea320e0cc4 Merge branch 'master' into Extended_DD 2024-02-07 20:11:57 -06:00
Víctor Losada Hernández
7f8b87bb85 watermark now visible 2024-02-07 22:52:44 +01:00
Víctor Losada Hernández
5e97121e5a pageNumber to blank 2024-02-07 22:48:32 +01:00
Víctor Losada Hernández
c9fc976c72 counter left 2024-02-07 22:43:43 +01:00
Víctor Losada Hernández
9e8570c19b page counter rename 2024-02-07 22:42:55 +01:00
Trevor Buckner
ed2d539995 Merge pull request #3282 from naturalcrit/dependabot/npm_and_yarn/googleapis/drive-8.7.0
Bump @googleapis/drive from 8.6.0 to 8.7.0
2024-02-07 07:45:44 -05:00
David Bolack
13fbcd0eb1 Improve Regex to permit DTs with a final : 2024-02-06 23:29:59 -06:00
David Bolack
43b9f3d901 Merge branch 'master' into Extended_DD 2024-02-06 22:25:26 -06:00
David Bolack
3ee9fe1c3f Update tests.
Prune no lionger valid cases.
2024-02-06 22:13:44 -06:00
dependabot[bot]
65cc8567a1 Bump @googleapis/drive from 8.6.0 to 8.7.0
Bumps [@googleapis/drive](https://github.com/googleapis/google-api-nodejs-client) from 8.6.0 to 8.7.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/release-please-config.json)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/drive-v8.6.0...drive-v8.7.0)

---
updated-dependencies:
- dependency-name: "@googleapis/drive"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 04:12:33 +00:00
Trevor Buckner
dd82f54549 Merge pull request #3283 from naturalcrit/dependabot/npm_and_yarn/marked-gfm-heading-id-3.1.3
Bump marked-gfm-heading-id from 3.1.2 to 3.1.3
2024-02-06 23:11:44 -05:00
dependabot[bot]
a014056440 Bump marked-gfm-heading-id from 3.1.2 to 3.1.3
Bumps [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/markedjs/marked-gfm-heading-id/releases)
- [Changelog](https://github.com/markedjs/marked-gfm-heading-id/blob/main/release.config.cjs)
- [Commits](https://github.com/markedjs/marked-gfm-heading-id/compare/v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: marked-gfm-heading-id
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 03:58:59 +00:00
Trevor Buckner
c176c38f30 Merge pull request #3280 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.22.0
Bump react-router-dom from 6.21.3 to 6.22.0
2024-02-06 22:58:10 -05:00
dependabot[bot]
4c87aed628 Bump react-router-dom from 6.21.3 to 6.22.0
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.21.3 to 6.22.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.22.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 03:51:27 +00:00
Trevor Buckner
09f2f96dff Merge pull request #3285 from naturalcrit/dependabot/npm_and_yarn/stylelint-config-recess-order-4.5.0
Bump stylelint-config-recess-order from 4.4.0 to 4.5.0
2024-02-06 22:50:26 -05:00
David Bolack
703e207970 I think I have all the desired modes in place.
I feel like this is ugly code and maybe there are prettier ways to do
it, but it functions as I *believe* is currently desired.
2024-02-06 21:47:15 -06:00
dependabot[bot]
f075b19a68 Bump stylelint-config-recess-order from 4.4.0 to 4.5.0
Bumps [stylelint-config-recess-order](https://github.com/stormwarning/stylelint-config-recess-order) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/stormwarning/stylelint-config-recess-order/releases)
- [Changelog](https://github.com/stormwarning/stylelint-config-recess-order/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stormwarning/stylelint-config-recess-order/compare/v4.4.0...v4.5.0)

---
updated-dependencies:
- dependency-name: stylelint-config-recess-order
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 03:42:21 +00:00
David Bolack
283c2b5ae1 Empty Tag multiline input 2024-02-05 21:18:36 -06:00
Víctor Losada Hernández
f1c3507a9f initial commit 2024-01-31 15:45:27 +01:00
David Bolack
29dc1e0747 Merge branch 'master' into Extended_DD 2024-01-30 18:40:58 -06:00
David Bolack
265e9976b9 Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-01-30 18:40:42 -06:00
Trevor Buckner
7177548c0e Merge pull request #3276 from naturalcrit/dependabot/npm_and_yarn/marked-11.2.0
Bump marked from 11.1.1 to 11.2.0
2024-01-30 14:29:00 -05:00
David Bolack
e1ad05eb3a Solve regression with monster template.
Was not handling "weak" Definition list endings well ( places were it
was \n<something> instead of \n\n.
2024-01-29 23:42:13 -06:00
David Bolack
e4324f316d Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-01-29 20:03:03 -06:00
Trevor Buckner
46140e92fd Merge branch 'master' into pr/3129 2024-01-29 20:56:48 -05:00
dependabot[bot]
3bc2df0ac5 Bump marked from 11.1.1 to 11.2.0
Bumps [marked](https://github.com/markedjs/marked) from 11.1.1 to 11.2.0.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v11.1.1...v11.2.0)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-29 03:26:17 +00:00
Víctor Losada Hernández
77abab8395 initial commit 2024-01-27 16:58:28 +01:00
Trevor Buckner
37c72d5125 Merge pull request #3267 from dbolacksn/clone_tags
Clone a brew's tags when cloning a brew.
2024-01-26 15:00:50 -05:00
Trevor Buckner
602a476b59 Merge branch 'master' into pr/3267 2024-01-26 14:58:42 -05:00
Trevor Buckner
965397733d Merge pull request #3268 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.23.9
Bump @babel/core from 7.23.7 to 7.23.9
2024-01-26 14:57:12 -05:00
Trevor Buckner
f10868db0b Merge branch 'master' into dependabot/npm_and_yarn/babel/core-7.23.9 2024-01-26 14:30:38 -05:00
Trevor Buckner
d7a95d3cff Merge pull request #3269 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.23.9
Bump @babel/preset-env from 7.23.8 to 7.23.9
2024-01-26 14:30:22 -05:00
dependabot[bot]
6eeed49022 Bump @babel/core from 7.23.7 to 7.23.9
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.7 to 7.23.9.
- [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.23.9/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 16:48:01 +00:00
dependabot[bot]
be96c3a56f Bump @babel/preset-env from 7.23.8 to 7.23.9
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.8 to 7.23.9.
- [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.23.9/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 16:46:59 +00:00
Trevor Buckner
57a31f3b71 Merge pull request #3270 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.23.9
Bump @babel/plugin-transform-runtime from 7.23.7 to 7.23.9
2024-01-26 11:46:10 -05:00
David Bolack
7c5955c96f Merge branch 'master' into clone_tags 2024-01-26 10:40:00 -06:00
David Bolack
8ab273363c Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-01-26 09:52:42 -06:00
dependabot[bot]
538650bf92 Bump @babel/plugin-transform-runtime from 7.23.7 to 7.23.9
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.23.7 to 7.23.9.
- [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.23.9/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-26 03:22:04 +00:00
David Bolack
54921a998a Clone tags along with the rest of the brew 2024-01-25 19:51:03 -06:00
Trevor Buckner
da11089fff Merge pull request #3265 from 5e-Cleric/brewItem-update
Easy enough. Thanks @5e-Cleric ! 🎉
2024-01-25 16:36:46 -05:00
Trevor Buckner
0243d138ff Merge branch 'master' into pr/3265 2024-01-25 16:30:43 -05:00
Trevor Buckner
4c8a5baee5 Merge pull request #3264 from 5e-Cleric/admin-fix
Thanks @5e-Cleric !  💯 🔥
2024-01-25 16:29:37 -05:00
Trevor Buckner
e5acbfed3a Linting and small tweaks 2024-01-25 16:27:10 -05:00
David Bolack
0163e22567 Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-01-25 13:58:04 -06:00
Trevor Buckner
b503b8fc9b Merge branch 'master' into pr/3264 2024-01-25 14:35:23 -05:00
Trevor Buckner
3243e4d56c Merge pull request #3266 from naturalcrit/dependabot/npm_and_yarn/mongoose-8.1.1
Bump mongoose from 8.1.0 to 8.1.1
2024-01-25 14:33:46 -05:00
David Bolack
fbc164a9b8 Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-01-25 13:10:08 -06:00
dependabot[bot]
78cf95fbb1 Bump mongoose from 8.1.0 to 8.1.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.1.0 to 8.1.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.1.0...8.1.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-25 03:48:29 +00:00
Víctor Losada Hernández
d2306b70a9 quick fix based on review, textBin 2024-01-24 23:24:51 +01:00
Víctor Losada Hernández
43180c314f Merge branch 'master' into brewItem-update 2024-01-24 23:11:18 +01:00
Víctor Losada Hernández
f47c2dcb56 style fix 2024-01-24 23:07:53 +01:00
Víctor Losada Hernández
a4ea1612c1 tag count in title, and authors to links 2024-01-24 23:05:50 +01:00
Víctor Losada Hernández
8b6517eb8d more callback errors, and cloning queries 2024-01-24 22:49:14 +01:00
Víctor Losada Hernández
067a7cd507 admin fixes, the rest( i think) 2024-01-24 22:20:01 +01:00
Víctor Losada Hernández
0243b5f491 inital commit 2024-01-23 08:09:17 +01:00
Trevor Buckner
31c7fd12b9 Merge pull request #3241 from naturalcrit/dependabot/npm_and_yarn/marked-11.1.1
Bump marked from 5.1.1 to 11.1.1
2024-01-22 19:29:55 -05:00
Trevor Buckner
7b8aaa408d Merge branch 'master' into dependabot/npm_and_yarn/marked-11.1.1 2024-01-22 18:03:57 -05:00
Trevor Buckner
1c65ee150b relocate renderer.link 2024-01-22 17:56:40 -05:00
Trevor Buckner
b0cfeaa782 Allow Babel to transpile Marked
Marked now only supports ES6. Needs to be transpiled by us to support older browsers.
2024-01-22 17:45:00 -05:00
Trevor Buckner
84de560083 Initial commit 2024-01-22 16:00:21 -05:00
Víctor Losada Hernández
2b1b0acefc Merge branch 'master' into experimentalTagFiltering-#3164 2024-01-20 14:50:41 +01:00
David Bolack
8fc6047127 Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-01-19 19:01:39 -06:00
Louis David Bolack
7782e200af Merge branch 'master' into Extended_DD 2024-01-19 18:49:24 -06:00
Víctor Losada Hernández
62e679571e Merge pull request #3259 from 5e-Cleric/new-page-in-new-tab
New page in new tab
2024-01-19 18:31:43 +01:00
Víctor Losada Hernández
f32c52a460 Merge branch 'master' into new-page-in-new-tab 2024-01-19 18:25:57 +01:00
Víctor Losada Hernández
edbe8cdace initial commit 2024-01-19 18:17:03 +01:00
Trevor Buckner
9e4344de83 Merge branch 'master' into GlobalReflinks 2024-01-19 00:13:02 -05:00
Trevor Buckner
760269a6e1 Fix math and inline defs getting lowercased 2024-01-19 00:11:52 -05:00
dependabot[bot]
e53e00713d Bump marked from 5.1.1 to 11.1.1
Bumps [marked](https://github.com/markedjs/marked) from 5.1.1 to 11.1.1.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v5.1.1...v11.1.1)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 04:59:48 +00:00
David Bolack
faba9f1616 Merge branch 'master' into Extended_DD 2024-01-18 22:59:22 -06:00
David Bolack
6beee49ebc Merge branch 'master' of github.com:naturalcrit/homebrewery 2024-01-18 22:58:58 -06:00
Trevor Buckner
eaf3c7978d Merge pull request #3256 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.21.3
Bump react-router-dom from 6.21.2 to 6.21.3
2024-01-18 23:58:23 -05:00
dependabot[bot]
d36e052478 Bump react-router-dom from 6.21.2 to 6.21.3
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.21.2 to 6.21.3.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.21.3/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 03:08:19 +00:00
Trevor Buckner
099ea08bd4 Merge pull request #3255 from naturalcrit/MoreSpecificSaveErrorPopups
Add error popups for "Out of Google Drive Storage" and "Not logged in to edit"
2024-01-18 17:25:04 -05:00
Trevor Buckner
b0ea34cc3f Add custom error messages. 2024-01-18 17:20:31 -05:00
Trevor Buckner
a241813b8d Merge pull request #3118 from G-Ambatte/separateApiErrors-#2975
Identify API errors and send error response
2024-01-18 15:36:10 -05:00
Trevor Buckner
de27437148 Merge branch 'master' into separateApiErrors-#2975 2024-01-18 15:32:16 -05:00
Víctor Losada Hernández
79e8dfec18 Merge branch 'master' into GlobalReflinks 2024-01-18 16:55:21 +01:00
David Bolack
0c010a0a87 Revert "WIP"
This reverts commit 67a4391dcb.
2024-01-18 09:51:17 -06:00
David Bolack
0c6c9fce4d Revert "Simple Underline token."
This reverts commit 04187cf769.
2024-01-18 09:51:14 -06:00
David Bolack
ac9fc720f7 Revert "A better regex for underlining."
This reverts commit a88b256b6c.
2024-01-18 09:51:11 -06:00
David Bolack
8b31966c2b Revert "Remove stray console.logs."
This reverts commit 1861c7db69.
2024-01-18 09:51:07 -06:00
Víctor Losada Hernández
76d966f17d Merge pull request #3248 from 5e-Cleric/small-phb-fixes
Fix italicized parentheses in class feature
2024-01-18 13:38:50 +01:00
Víctor Losada Hernández
d0d8b268d4 Merge branch 'master' into small-phb-fixes 2024-01-18 13:22:49 +01:00
David Bolack
8bd8f0fc37 Merge remote-tracking branch 'origin/master' 2024-01-17 17:20:23 -06:00
Trevor Buckner
a2acf3be0e Merge pull request #3244 from Gazook89/theme-selector-styling
Theme Selector Z-index issue
2024-01-17 17:21:32 -05:00
Trevor Buckner
844a3c19ec Merge branch 'master' into theme-selector-styling 2024-01-17 17:21:21 -05:00
Trevor Buckner
877c2e365f Merge pull request #3245 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-jest-27.6.3
Bump eslint-plugin-jest from 27.6.2 to 27.6.3
2024-01-17 17:20:24 -05:00
Trevor Buckner
81c7950ad1 Merge branch 'master' into dependabot/npm_and_yarn/eslint-plugin-jest-27.6.3 2024-01-17 14:28:43 -05:00
Trevor Buckner
7b8e3da90a Merge pull request #3250 from naturalcrit/dependabot/npm_and_yarn/mongoose-8.1.0
Bump mongoose from 8.0.4 to 8.1.0
2024-01-17 14:28:26 -05:00
Trevor Buckner
eef3d7738e Merge branch 'master' into separateApiErrors-#2975 2024-01-17 14:11:13 -05:00
dependabot[bot]
b8ca837c02 Bump eslint-plugin-jest from 27.6.2 to 27.6.3
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.6.2 to 27.6.3.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.6.2...v27.6.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-17 19:10:57 +00:00
dependabot[bot]
1fc3573087 Bump mongoose from 8.0.4 to 8.1.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.0.4 to 8.1.0.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.0.4...8.1.0)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-17 19:10:35 +00:00
Trevor Buckner
5ab89b2583 Merge pull request #3251 from naturalcrit/dependabot/npm_and_yarn/googleapis/drive-8.6.0
Bump @googleapis/drive from 8.5.0 to 8.6.0
2024-01-17 14:09:42 -05:00
dependabot[bot]
539cd1d2b9 Bump @googleapis/drive from 8.5.0 to 8.6.0
Bumps [@googleapis/drive](https://github.com/googleapis/google-api-nodejs-client) from 8.5.0 to 8.6.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/release-please-config.json)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/drive-v8.5.0...drive-v8.6.0)

---
updated-dependencies:
- dependency-name: "@googleapis/drive"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-17 03:45:33 +00:00
G.Ambatte
c930ae87f4 Merge branch 'master' into addDiceFont 2024-01-17 07:06:15 +13:00
Víctor Losada Hernández
4424a331d5 first commit 2024-01-16 18:38:38 +01:00
David Bolack
c747c5577e Add PANdoc style lists ( using :: not : )
Includes new tests and fixes broken old tests
2024-01-16 02:01:55 -06:00
David Bolack
ce8cbba441 Merge branch 'master' into Extended_DD 2024-01-16 00:29:29 -06:00
David Bolack
c0cabbb563 Move Credits snippet to Blank 2024-01-15 21:35:19 -06:00
G.Ambatte
e56ff93db1 Add underline on hover to link in credit 2024-01-15 21:34:24 -06:00
G.Ambatte
033776168e Change the text to include URL link 2024-01-15 21:34:23 -06:00
G.Ambatte
d0ccc4a15a Capitalize C in NaturalCrit.com 2024-01-15 21:34:19 -06:00
G.Ambatte
2f383d59b6 Add HB Credit snippet 2024-01-15 21:34:18 -06:00
G.Ambatte
c9c5176f1b Add Credits styling to 5ePHB theme 2024-01-15 21:34:17 -06:00
G.Ambatte
fe0cfcb2b6 New file was unnecessary 2024-01-15 21:34:16 -06:00
G.Ambatte
0470d13ae0 Add optimized NC logo 2024-01-15 21:34:15 -06:00
Trevor Buckner
c4defb7b3f Merge pull request #3246 from naturalcrit/dependabot/npm_and_yarn/supertest-6.3.4
Bump supertest from 6.3.3 to 6.3.4
2024-01-15 21:13:35 -05:00
dependabot[bot]
c1e17bb6aa Bump supertest from 6.3.3 to 6.3.4
Bumps [supertest](https://github.com/ladjs/supertest) from 6.3.3 to 6.3.4.
- [Release notes](https://github.com/ladjs/supertest/releases)
- [Commits](https://github.com/ladjs/supertest/compare/v6.3.3...v6.3.4)

---
updated-dependencies:
- dependency-name: supertest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 03:52:38 +00:00
David Bolack
d09dc11f5f The remainder of the tests 2024-01-14 13:38:01 -06:00
David Bolack
4c2211c428 Updated rendering to follow input line breaks
Updated and additional tests.
2024-01-14 13:30:52 -06:00
David Bolack
d076d6c719 Update tests for previous changes. 2024-01-13 18:58:59 -06:00
Gazook89
d648bacd26 Merge branch 'master' into theme-selector-styling 2024-01-13 15:28:51 -06:00
Gazook89
1ca5ba1086 Merge branch 'theme-selector-styling' of https://github.com/Gazook89/homebrewery into theme-selector-styling 2024-01-13 15:19:40 -06:00
Gazook89
7c28f60e0a fix z-index layering issue 2024-01-13 15:19:38 -06:00
David Bolack
20b76bdead Fix issue when pattern matches a DD without DT
```
Test
::One
```

WOuld previously break the browser.
2024-01-13 11:55:43 -06:00
Trevor Buckner
2fd2ccfe14 Tweak Font snippets to have ABC 2024-01-12 11:59:16 -05:00
Trevor Buckner
69308cfd8b Merge pull request #3242 from naturalcrit/stylelint-Snippetbar.less
Lint snippetbar.less
2024-01-12 11:58:39 -05:00
Trevor Buckner
ccc1895304 Lint snippetbar.less 2024-01-12 11:57:34 -05:00
Trevor Buckner
05a0d80c1b Merge pull request #3203 from 5e-Cleric/font-snippets
fonts as snippets
2024-01-12 11:48:26 -05:00
Trevor Buckner
2ea65de0c0 Merge branch 'master' into pr/3203 2024-01-12 11:45:55 -05:00
Trevor Buckner
742798ad79 Fixing merge issues 2024-01-12 11:41:08 -05:00
Trevor Buckner
f088fc49f3 Start fixing merge conflicts 2024-01-12 11:37:34 -05:00
Trevor Buckner
b837ac5d6b Merge pull request #3240 from naturalcrit/dependabot/npm_and_yarn/marked-smartypants-lite-1.0.2
Bump marked-smartypants-lite from 1.0.1 to 1.0.2
2024-01-11 23:03:26 -05:00
Trevor Buckner
64af24f0f4 Merge pull request #3239 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.21.2
Bump react-router-dom from 6.21.1 to 6.21.2
2024-01-11 23:03:13 -05:00
dependabot[bot]
5abb1db512 Bump marked-smartypants-lite from 1.0.1 to 1.0.2
Bumps [marked-smartypants-lite](https://github.com/calculuschild/marked-smartypants-lite) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/calculuschild/marked-smartypants-lite/releases)
- [Changelog](https://github.com/calculuschild/marked-smartypants-lite/blob/main/release.config.cjs)
- [Commits](https://github.com/calculuschild/marked-smartypants-lite/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: marked-smartypants-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 03:41:27 +00:00
dependabot[bot]
f1133b9c33 Bump react-router-dom from 6.21.1 to 6.21.2
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.21.1 to 6.21.2.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.21.2/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-12 03:40:45 +00:00
Víctor Losada Hernández
c73d02c550 Requested changes 2024-01-11 22:19:04 +01:00
Trevor Buckner
f1d26cc0c0 Merge pull request #3237 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-jest-27.6.2
Bump eslint-plugin-jest from 27.6.1 to 27.6.2
2024-01-11 12:14:00 -05:00
dependabot[bot]
077d699f0b Bump eslint-plugin-jest from 27.6.1 to 27.6.2
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.6.1 to 27.6.2.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.6.1...v27.6.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-11 03:01:28 +00:00
Trevor Buckner
2ed8614642 Merge pull request #3195 from naturalcrit/dependabot/npm_and_yarn/eslint-8.56.0
Bump eslint from 8.55.0 to 8.56.0
2024-01-10 15:10:12 -05:00
Trevor Buckner
9834fcb97f Merge pull request #3200 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.21.1
Bump react-router-dom from 6.21.0 to 6.21.1
2024-01-10 15:09:58 -05:00
Trevor Buckner
347393520d Merge pull request #3172 from 5e-Cleric/Elderberry-icon-font
Eldeberry Inn Icon font to HB
2024-01-10 14:59:57 -05:00
Víctor Losada Hernández
e65e12ff6e translate removal 2024-01-10 20:24:43 +01:00
Trevor Buckner
4dfe1a0914 Merge pull request #3202 from Gazook89/theme-selector-styling
Improve Theme selector styling
2024-01-10 14:12:01 -05:00
Trevor Buckner
1a1acec2f3 Merge branch 'master' into theme-selector-styling 2024-01-10 14:11:40 -05:00
Víctor Losada Hernández
e6276a0c7b new version of the font 2024-01-10 20:04:30 +01:00
Trevor Buckner
84a0c43745 Merge pull request #3221 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.23.7
Bump @babel/plugin-transform-runtime from 7.23.6 to 7.23.7
2024-01-10 11:33:35 -05:00
Trevor Buckner
baed640a3d Merge pull request #3233 from naturalcrit/FixPageDeletion
Fix Page Deletion issue
2024-01-10 11:32:17 -05:00
G.Ambatte
9621a69b7d Merge branch 'master' into addDiceFont 2024-01-10 21:31:16 +13:00
Trevor Buckner
7d6851572f Merge pull request #3193 from G-Ambatte/fixMustacheBlocks
MustacheDivs do not account for prefixed spaces when generating text
2024-01-09 22:36:49 -05:00
Trevor Buckner
3e2ec7cd36 Merge pull request #3235 from naturalcrit/dependabot/npm_and_yarn/mongoose-8.0.4
Bump mongoose from 8.0.3 to 8.0.4
2024-01-09 22:34:24 -05:00
Trevor Buckner
0ac88bd84a Fix $[var]:() - Must have at least one char inside ( ) 2024-01-09 22:29:30 -05:00
dependabot[bot]
db3f9a45ad Bump mongoose from 8.0.3 to 8.0.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.0.3 to 8.0.4.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.0.3...8.0.4)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 03:28:03 +00:00
Trevor Buckner
8fc2737670 Merge pull request #3215 from 5e-Cleric/Darkbrewery-color-fix
Color simplification and Darkbrewery snippet color fix
2024-01-09 22:21:33 -05:00
dependabot[bot]
0c2e4ce20b Bump @babel/plugin-transform-runtime from 7.23.6 to 7.23.7
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.23.6 to 7.23.7.
- [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.23.7/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-10 03:21:14 +00:00
Trevor Buckner
62948b2838 Merge pull request #3213 from naturalcrit/dependabot/npm_and_yarn/moment-2.30.1
Bump moment from 2.29.4 to 2.30.1
2024-01-09 22:20:38 -05:00
Trevor Buckner
3dfb3a9738 Merge pull request #3230 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.23.8
Bump @babel/preset-env from 7.23.7 to 7.23.8
2024-01-09 22:20:00 -05:00
Trevor Buckner
42c1bece65 Also edit currently selected page 2024-01-09 22:19:09 -05:00
Trevor Buckner
448c12cc91 Truncate extra pages when page count is edited. 2024-01-09 17:10:03 -05:00
Trevor Buckner
56c82f8793 Merge pull request #3204 from 5e-Cleric/fix-page-size-override
quick fix page size override
2024-01-09 16:52:09 -05:00
Víctor Losada Hernández
84b0407f74 contain page size quick fix 2024-01-09 20:36:34 +01:00
Trevor Buckner
90977521df Merge branch 'master' into GlobalReflinks 2024-01-09 13:53:09 -05:00
Trevor Buckner
09a52bc7cb Merge pull request #3232 from naturalcrit/CleanupVarsCode
Added hoisting, math, fixed several bugs
2024-01-09 13:51:03 -05:00
Trevor Buckner
6ef80eed7f All features working...? 2024-01-09 13:28:35 -05:00
dependabot[bot]
ad1795258b Bump @babel/preset-env from 7.23.7 to 7.23.8
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.7 to 7.23.8.
- [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.23.8/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-09 03:03:20 +00:00
David Bolack
993ae295af Update editor pattern match for DLs 2024-01-07 15:40:05 -06:00
dependabot[bot]
78c26ab1a3 Bump eslint from 8.55.0 to 8.56.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.55.0 to 8.56.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.55.0...v8.56.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-06 04:17:52 +00:00
Trevor Buckner
eb669e6eca Merge pull request #3223 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.23.7
Bump @babel/preset-env from 7.23.6 to 7.23.7
2024-01-05 23:16:42 -05:00
Trevor Buckner
17355012fb Merge pull request #3225 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-jest-27.6.1
Bump eslint-plugin-jest from 27.6.0 to 27.6.1
2024-01-05 23:16:37 -05:00
Trevor Buckner
eae593ce90 Merge pull request #3228 from naturalcrit/dependabot/npm_and_yarn/googleapis/drive-8.5.0
Bump @googleapis/drive from 8.4.0 to 8.5.0
2024-01-05 23:16:31 -05:00
Trevor Buckner
7a8a6480de Merge pull request #3220 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.23.7
Bump @babel/core from 7.23.6 to 7.23.7
2024-01-05 23:16:24 -05:00
dependabot[bot]
d0dd61a25c Bump @googleapis/drive from 8.4.0 to 8.5.0
Bumps [@googleapis/drive](https://github.com/googleapis/google-api-nodejs-client) from 8.4.0 to 8.5.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/release-please-config.json)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/drive-v8.4.0...drive-v8.5.0)

---
updated-dependencies:
- dependency-name: "@googleapis/drive"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-05 03:39:39 +00:00
dependabot[bot]
dbf0559f95 Bump eslint-plugin-jest from 27.6.0 to 27.6.1
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.6.0 to 27.6.1.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.6.0...v27.6.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-02 03:57:38 +00:00
dependabot[bot]
8e88b881fc Bump @babel/preset-env from 7.23.6 to 7.23.7
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.6 to 7.23.7.
- [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.23.7/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 03:21:35 +00:00
dependabot[bot]
c722e0af39 Bump @babel/core from 7.23.6 to 7.23.7
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.6 to 7.23.7.
- [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.23.7/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 03:20:46 +00:00
Víctor Losada Hernández
6dcdc1b685 font to icon 2023-12-29 12:13:13 +01:00
Víctor Losada Hernández
76d17baf7e divider color to currentColor keyword 2023-12-28 17:31:06 +01:00
Víctor Losada Hernández
c97e2be9d5 color simplification and darkbrewery snippet color fix 2023-12-28 17:27:22 +01:00
Víctor Losada Hernández
229acbfcd1 title as snippet.name 2023-12-28 12:25:07 +01:00
dependabot[bot]
2cb216ed7b Bump moment from 2.29.4 to 2.30.1
Bumps [moment](https://github.com/moment/moment) from 2.29.4 to 2.30.1.
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.4...2.30.1)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-28 03:49:49 +00:00
Gazook89
8674bc9da2 change gray to #999 2023-12-23 20:49:59 -06:00
Víctor Losada Hernández
199e049871 fix column-gap in listpage 2023-12-23 23:49:44 +01:00
Víctor Losada Hernández
31f18ef3d5 add blank theme to listpage 2023-12-23 23:49:30 +01:00
Víctor Losada Hernández
9db55c4dff fix piage size override 2023-12-23 20:43:39 +01:00
Víctor Losada Hernández
e2ac6c9b6b fonts as snippets 2023-12-23 12:40:56 +01:00
Gazook89
407c35d9f7 switch to gray 'active' color 2023-12-22 23:40:29 -06:00
Gazook89
8575d72f6e add e.target check to prevent dismissal of select menu 2023-12-22 23:36:46 -06:00
Gazook89
7b8e398891 improve simple styling on theme selector. nest inside toggle. 2023-12-22 22:58:13 -06:00
Louis David Bolack
dfd5b228c2 Merge branch 'master' into Extended_DD 2023-12-21 22:08:30 -06:00
dependabot[bot]
89c5c3f255 Bump react-router-dom from 6.21.0 to 6.21.1
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.21.0 to 6.21.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.21.1/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-22 03:05:24 +00:00
Trevor Buckner
4dd58aaad3 Ugly ugly initial commit 2023-12-21 17:13:13 -05:00
David Bolack
96d973528c Updated and reworked to handle more definition*
Updated to allow multiple definition terms and definitions per term

<Term>::<definition>
<Term>::<definition1>::<definition2>
::<definition3>

```
**Example** ::
::V3 uses HTML *definition lists* to create "lists" with hanging indents.
::Three
I'm a term::Four

**<u>Hello</u>**::I\'m a different
::List
:
```
2023-12-20 22:57:37 -06:00
Trevor Buckner
3a4de13551 split renderer into steps 2023-12-19 15:57:32 -05:00
Víctor Losada Hernández
a65c24bebf font-size and position fix for uniformity with FA 2023-12-19 21:50:10 +01:00
G.Ambatte
7dfc857217 Add DiceFont license file 2023-12-19 17:48:23 +13:00
G.Ambatte
d5980cba89 Initial DiceFont commit 2023-12-19 17:44:43 +13:00
G.Ambatte
9ed32527a6 Account for prefixed spaces when generating text 2023-12-17 15:47:17 +13:00
Víctor Losada Hernández
62982f86a1 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into Elderberry-icon-font 2023-12-16 16:55:23 +01:00
Trevor Buckner
985a9843f2 Merge pull request #3191 from 5e-Cleric/Navigator-node-error-fix
Navigator Node Error Fix
2023-12-16 10:55:10 -05:00
Víctor Losada Hernández
3bbcb1b6fb Merge branch 'master' of https://github.com/5e-Cleric/homebrewery into Navigator-node-error-fix 2023-12-16 16:53:18 +01:00
Víctor Losada Hernández
9da203d204 Merge branch 'master' of https://github.com/naturalcrit/homebrewery 2023-12-16 16:52:09 +01:00
Víctor Losada Hernández
212b3f7e05 full fix 2023-12-16 16:49:13 +01:00
Víctor Losada Hernández
7a06fe386d navigator to window 2023-12-14 23:44:45 +01:00
Víctor Losada Hernández
4580217410 Merge branch 'Elderberry-icon-font' of https://github.com/5e-Cleric/homebrewery into Elderberry-icon-font 2023-12-14 23:38:40 +01:00
Víctor Losada Hernández
e82ba8cb7a Merge branch 'master' of https://github.com/naturalcrit/homebrewery into Elderberry-icon-font 2023-12-14 23:38:15 +01:00
Trevor Buckner
636f10cb41 stylelint 2023-12-14 16:57:26 -05:00
Trevor Buckner
d6eaa812b1 Merge pull request #3066 from 5e-Cleric/single-quote-inline-style
Single Quote in in-line styles
2023-12-14 16:47:18 -05:00
Trevor Buckner
507f170720 Merge branch 'master' into pr/3066 2023-12-14 16:45:57 -05:00
Trevor Buckner
faaf4207b4 Merge pull request #3187 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.21.0
Bump react-router-dom from 6.20.1 to 6.21.0
2023-12-14 16:24:49 -05:00
Trevor Buckner
688377ce0b Fix failing Markdown tests 2023-12-14 16:24:23 -05:00
Trevor Buckner
8cf57dbc72 Merge branch 'master' into pr/3066 2023-12-14 15:01:28 -05:00
Trevor Buckner
12012a2a5b Merge pull request #3131 from dbolack-ab/Issue_1488
Add arbitrary tag attribute assignment in mustaches
2023-12-14 14:53:50 -05:00
Trevor Buckner
9b59f47536 Simplify Attributes parsing logic 2023-12-14 13:58:38 -05:00
Trevor Buckner
90b4e47861 Fix ' ' removed from processStyleTags regex
Removes the case of "empty properties" that needed `.trim()`
2023-12-14 13:47:36 -05:00
Trevor Buckner
ef00231c5b Move tests to the correct section 2023-12-14 13:46:44 -05:00
Trevor Buckner
c39653bc69 Merge branch 'master' into pr/3131 2023-12-14 12:24:48 -05:00
Trevor Buckner
83faa86063 Merge pull request #3189 from naturalcrit/FixMarkdownTests
Make a lot of Markdown tests pass
2023-12-14 12:22:11 -05:00
Trevor Buckner
af20d0b1c2 Make a lot of Markdown tests pass 2023-12-14 12:20:50 -05:00
David Bolack
1861c7db69 Remove stray console.logs. 2023-12-13 21:59:02 -06:00
David Bolack
a88b256b6c A better regex for underlining. 2023-12-13 21:47:55 -06:00
dependabot[bot]
40542e9bec Bump react-router-dom from 6.20.1 to 6.21.0
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.20.1 to 6.21.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.21.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-14 03:46:17 +00:00
David Bolack
04187cf769 Simple Underline token.
Overrides __
2023-12-13 17:37:05 -06:00
David Bolack
67a4391dcb WIP 2023-12-13 15:57:00 -06:00
Trevor Buckner
3784e0f583 Merge branch 'master' into pr/3131 2023-12-13 16:55:19 -05:00
Trevor Buckner
df33713f82 Merge branch 'master' into pr/3066 2023-12-13 16:46:35 -05:00
Trevor Buckner
c4ba6381f2 Merge pull request #3180 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.23.6
Bump @babel/core from 7.23.5 to 7.23.6
2023-12-13 16:39:57 -05:00
Trevor Buckner
547daf6499 Merge pull request #3179 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.23.6
Bump @babel/preset-env from 7.23.5 to 7.23.6
2023-12-13 16:39:49 -05:00
dependabot[bot]
649e225359 Bump @babel/preset-env from 7.23.5 to 7.23.6
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.5 to 7.23.6.
- [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.23.6/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 20:51:54 +00:00
dependabot[bot]
35bf26feae Bump @babel/core from 7.23.5 to 7.23.6
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.5 to 7.23.6.
- [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.23.6/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-13 20:51:34 +00:00
Trevor Buckner
481bab9463 Merge pull request #3181 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.23.6
Bump @babel/plugin-transform-runtime from 7.23.4 to 7.23.6
2023-12-13 15:50:23 -05:00
dependabot[bot]
a0e2997a40 Bump @babel/plugin-transform-runtime from 7.23.4 to 7.23.6
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.23.4 to 7.23.6.
- [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.23.6/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-12 03:35:53 +00:00
Trevor Buckner
74c4f4fe52 Merge pull request #3078 from 5e-Cleric/clear-invalid-or-unused-css
Clear invalid CSS from 5ePHB/style.less
2023-12-11 16:39:57 -05:00
Trevor Buckner
7c9513f377 Lint 2023-12-11 16:29:16 -05:00
Víctor Losada Hernández
c10be139c9 redundant font-weight removed 2023-12-11 22:09:08 +01:00
Víctor Losada Hernández
ee4921f02c uncaught styles 2023-12-11 22:08:03 +01:00
Trevor Buckner
f5f6137a4d Lint 2023-12-11 15:48:58 -05:00
Trevor Buckner
0775f9ee1b Restore padding to code blocks 2023-12-11 15:45:39 -05:00
Trevor Buckner
75ed555de1 Merge branch 'master' into pr/3078 2023-12-11 15:13:39 -05:00
Trevor Buckner
e7d0741139 Merge pull request #3178 from naturalcrit/lintBlankTheme
Lint Blank style.less to match PHB format
2023-12-11 15:13:07 -05:00
Trevor Buckner
c69de1036f Lint Blank style.less to match PHB format 2023-12-11 15:12:40 -05:00
Trevor Buckner
7d115c970a Merge pull request #3176 from naturalcrit/dependabot/npm_and_yarn/marked-extended-tables-1.0.8
Bump marked-extended-tables from 1.0.7 to 1.0.8
2023-12-11 14:12:30 -05:00
Trevor Buckner
852aa8d289 Merge pull request #3174 from naturalcrit/dependabot/npm_and_yarn/mongoose-8.0.3
Bump mongoose from 8.0.2 to 8.0.3
2023-12-11 14:12:22 -05:00
dependabot[bot]
ae974b270d Bump marked-extended-tables from 1.0.7 to 1.0.8
Bumps [marked-extended-tables](https://github.com/calculuschild/marked-extended-tables) from 1.0.7 to 1.0.8.
- [Release notes](https://github.com/calculuschild/marked-extended-tables/releases)
- [Changelog](https://github.com/calculuschild/marked-extended-tables/blob/main/release.config.cjs)
- [Commits](https://github.com/calculuschild/marked-extended-tables/compare/v1.0.7...v1.0.8)

---
updated-dependencies:
- dependency-name: marked-extended-tables
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 03:42:57 +00:00
G.Ambatte
0a1c04d003 Merge branch 'master' into experimentalTagFiltering-#3164 2023-12-09 22:33:21 +13:00
dependabot[bot]
ef10b71e56 Bump mongoose from 8.0.2 to 8.0.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.0.2 to 8.0.3.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.0.2...8.0.3)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-08 03:44:10 +00:00
Trevor Buckner
5bfd0dd537 Merge pull request #3074 from G-Ambatte/addCreditsSnippet-#283
Add basic Homebrewery credits snippet
2023-12-07 22:33:41 -05:00
Trevor Buckner
05e56221f4 Small tweaks 2023-12-07 22:32:33 -05:00
Víctor Losada Hernández
5c5230e64e Merge branch 'master' of https://github.com/naturalcrit/homebrewery into clear-invalid-or-unused-css 2023-12-07 21:32:40 +01:00
David Bolack
769f636db2 Small fix and test updates
Discovered that classes ( and possibly other splits could end up with an
empty/null member that still gets joined so I added a trim to the end of
all the joins in processStyleTags.

Added tests that SHOULD test for bloc-level and inline-span moustaches
with added attributes ( a=b )
2023-12-06 17:48:51 -06:00
David Bolack
eeba037244 Merge branch 'master' into Extended_DD 2023-12-06 17:10:18 -06:00
David Bolack
688eca05e1 Update Regex pattern to be consistant. 2023-12-06 16:59:53 -06:00
David Bolack
4c48992331 Merge branch 'master' into Issue_1488 2023-12-06 16:56:43 -06:00
David Bolack
fcb9a8cdc5 Update Editor highlighting to handle attribut assignments 2023-12-06 16:54:28 -06:00
G.Ambatte
78d4d6fb7c Tweak icon styling 2023-12-06 14:33:55 +13:00
G.Ambatte
407efd0f8b Merge branch 'master' into addCreditsSnippet-#283 2023-12-06 14:02:31 +13:00
Víctor Losada Hernández
d39ae139d7 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into single-quote-inline-style 2023-12-06 00:26:53 +01:00
Víctor Losada Hernández
467b728c47 text-re-fix 2023-12-06 00:24:44 +01:00
Víctor Losada Hernández
b02036fb7a Initial commit 2023-12-05 23:16:27 +01:00
G.Ambatte
d8524c3a84 Merge branch 'master' into experimentalTagFiltering-#3164 2023-12-06 08:48:46 +13:00
Sean Robertson
75809a5f42 Remove forced uppercase 2023-12-06 08:28:51 +13:00
Trevor Buckner
e99aad15c1 Merge pull request #3116 from G-Ambatte/fixFFPrinting-#3115
Fix Firefox printing
2023-12-05 11:49:50 -05:00
Trevor Buckner
c57b011215 Merge branch 'master' into fixFFPrinting-#3115 2023-12-05 11:40:32 -05:00
Trevor Buckner
5942bfece1 Merge pull request #3133 from dbolack-ab/Issue_2171
Add subscript and subscript markdown tokens
2023-12-04 22:23:28 -05:00
Trevor Buckner
2dc874daba Adjust hotkeys to match other changes 2023-12-04 22:21:58 -05:00
Trevor Buckner
38fa428fde Change to 1 and 2 ^'s . Slight cleanup 2023-12-04 22:11:05 -05:00
Trevor Buckner
6bf51cd94a Allow both sub and super highlighting on same line 2023-12-04 21:56:08 -05:00
Trevor Buckner
ddef21cd7e Give editor highlighting sub/superscript alignment 2023-12-04 21:54:44 -05:00
Trevor Buckner
bf30cadb68 Add default page size to brewRenderer.less
Add default brew page size to brewRenderer.less, so all pages have a fallback size when switching between themes and renderers. Avoids losing the scroll position on a page caused by out-of-view pages losing their size, especially on long brews where recalculating page layout can take a half second.
2023-12-04 21:13:26 -05:00
G.Ambatte
2f13b89510 Styling tweak 2023-12-05 12:41:27 +13:00
Trevor Buckner
abe3a7e7c7 Merge pull request #3154 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.23.4
Bump @babel/plugin-transform-runtime from 7.23.3 to 7.23.4
2023-12-04 17:10:16 -05:00
dependabot[bot]
4ec5f73aed Bump @babel/plugin-transform-runtime from 7.23.3 to 7.23.4
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.23.3 to 7.23.4.
- [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.23.4/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-04 22:09:59 +00:00
Trevor Buckner
a5313deb78 Merge pull request #3157 from naturalcrit/dependabot/npm_and_yarn/fs-extra-11.2.0
Bump fs-extra from 11.1.1 to 11.2.0
2023-12-04 17:09:53 -05:00
Trevor Buckner
5dd486866f Merge pull request #3151 from naturalcrit/dependabot/npm_and_yarn/stylelint-config-recess-order-4.4.0
Bump stylelint-config-recess-order from 4.3.0 to 4.4.0
2023-12-04 17:09:43 -05:00
Trevor Buckner
ada642e56e Merge pull request #3158 from naturalcrit/dependabot/npm_and_yarn/mongoose-8.0.2
Bump mongoose from 8.0.0 to 8.0.2
2023-12-04 17:09:02 -05:00
Trevor Buckner
881fcc9cba Merge pull request #3161 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.23.5
Bump @babel/core from 7.23.3 to 7.23.5
2023-12-04 17:08:44 -05:00
Trevor Buckner
a809e920fc Merge pull request #3160 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.23.5
Bump @babel/preset-env from 7.23.3 to 7.23.5
2023-12-04 17:08:38 -05:00
Trevor Buckner
36f3eb4da1 Merge pull request #3162 from naturalcrit/dependabot/npm_and_yarn/marked-gfm-heading-id-3.1.2
Bump marked-gfm-heading-id from 3.1.1 to 3.1.2
2023-12-04 17:08:31 -05:00
Trevor Buckner
57772065e0 Merge pull request #3170 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.20.1
Bump react-router-dom from 6.18.0 to 6.20.1
2023-12-04 17:08:23 -05:00
Trevor Buckner
f10be94190 Merge pull request #3169 from naturalcrit/dependabot/npm_and_yarn/eslint-8.55.0
Bump eslint from 8.53.0 to 8.55.0
2023-12-04 17:08:15 -05:00
Trevor Buckner
055ee38cb7 Merge pull request #3163 from naturalcrit/BrewRendererToFunctionalComponent
Convert BrewRenderer to function, PPR always on
2023-12-04 17:08:04 -05:00
Trevor Buckner
202b275966 Tweak legacy style so V3 pages offscreen keep size 2023-12-04 17:07:20 -05:00
G.Ambatte
34be05ac51 Add X icon to tag window 2023-12-05 10:00:25 +13:00
Trevor Buckner
39e33da2d1 Cleanup 2023-12-04 14:46:51 -05:00
G.Ambatte
d262f586fc Add basic selected tags display to List Page 2023-12-04 21:45:59 +13:00
dependabot[bot]
71f1aed227 Bump react-router-dom from 6.18.0 to 6.20.1
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.18.0 to 6.20.1.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.20.1/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-04 03:09:30 +00:00
dependabot[bot]
159d5a35b2 Bump eslint from 8.53.0 to 8.55.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.53.0 to 8.55.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.53.0...v8.55.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-04 03:09:15 +00:00
G.Ambatte
efecfac68a Simplify tag styling 2023-12-04 08:10:32 +13:00
G.Ambatte
2c997458b2 Simplify filter tag test 2023-12-04 07:54:19 +13:00
G.Ambatte
7e98f79416 Make alphabetical tag sorting case insensitive 2023-12-04 07:53:49 +13:00
G.Ambatte
cfecc001aa Add brew tag sorting 2023-12-03 19:14:20 +13:00
G.Ambatte
ab8716d071 Add icons before special tags 2023-12-03 18:40:20 +13:00
G.Ambatte
9e12ab71f8 Switch to better brew.tags array check 2023-12-03 17:46:55 +13:00
G.Ambatte
995d1c63d8 Make tag removal from URL case insensitive 2023-12-03 17:17:03 +13:00
G.Ambatte
875e1023fc Add styling for different tag types 2023-12-03 17:09:33 +13:00
G.Ambatte
6c4dad675f Switch to case-insensitive tag comparison 2023-12-03 16:34:12 +13:00
G.Ambatte
632882d370 Use the whole tag in the tag filter 2023-12-03 16:02:36 +13:00
G.Ambatte
041c7ed48f Shift to AND operation for multiple tags 2023-12-03 12:48:20 +13:00
G.Ambatte
6dcc6d36b7 Add separate tag filter 2023-12-03 12:23:39 +13:00
G.Ambatte
0762b82c40 Initial functionality of basic tag filtering 2023-12-03 09:46:02 +13:00
G.Ambatte
c6821819c7 Initial functionality pass on BrewItem 2023-12-03 09:36:17 +13:00
G.Ambatte
5a79795e4f Indicate tags are clickable by cursor 2023-12-03 09:33:00 +13:00
Trevor Buckner
3073b3e35d Convert BrewRenderer to function, PPR always on 2023-11-30 23:52:42 -05:00
dependabot[bot]
0491516662 Bump marked-gfm-heading-id from 3.1.1 to 3.1.2
Bumps [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/markedjs/marked-gfm-heading-id/releases)
- [Changelog](https://github.com/markedjs/marked-gfm-heading-id/blob/main/release.config.cjs)
- [Commits](https://github.com/markedjs/marked-gfm-heading-id/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: marked-gfm-heading-id
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 03:26:01 +00:00
dependabot[bot]
b55616170b Bump @babel/core from 7.23.3 to 7.23.5
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.3 to 7.23.5.
- [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.23.5/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-30 03:48:32 +00:00
dependabot[bot]
e080c46509 Bump @babel/preset-env from 7.23.3 to 7.23.5
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.3 to 7.23.5.
- [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.23.5/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-30 03:47:55 +00:00
dependabot[bot]
171d1c7c46 Bump mongoose from 8.0.0 to 8.0.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 8.0.0 to 8.0.2.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/8.0.0...8.0.2)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-29 03:23:54 +00:00
dependabot[bot]
d1503c8d6f Bump fs-extra from 11.1.1 to 11.2.0
Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 11.1.1 to 11.2.0.
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/11.1.1...11.2.0)

---
updated-dependencies:
- dependency-name: fs-extra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-28 03:04:54 +00:00
Trevor Buckner
be72b029bf Merge pull request #3156 from naturalcrit/renderAllPages
Render all pages
2023-11-26 17:29:49 -05:00
Trevor Buckner
93a7b11017 Simplify "BrewPage" into Functional Component 2023-11-25 23:23:39 -05:00
Trevor Buckner
045fbbe158 lint 2023-11-24 01:36:04 -05:00
Trevor Buckner
ede731e3a5 Add "BrewPage" component which updates only when needed 2023-11-24 01:35:06 -05:00
David Bolack
d6e63604ac Add tests 2023-11-22 13:29:37 -06:00
David Bolack
0624f8a0b9 Add basic tests for Dictionary lists. 2023-11-22 13:13:58 -06:00
dependabot[bot]
960c03bfa6 Bump stylelint-config-recess-order from 4.3.0 to 4.4.0
Bumps [stylelint-config-recess-order](https://github.com/stormwarning/stylelint-config-recess-order) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/stormwarning/stylelint-config-recess-order/releases)
- [Changelog](https://github.com/stormwarning/stylelint-config-recess-order/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stormwarning/stylelint-config-recess-order/compare/v4.3.0...v4.4.0)

---
updated-dependencies:
- dependency-name: stylelint-config-recess-order
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 03:36:02 +00:00
Trevor Buckner
cda98e02e0 Merge pull request #3079 from 5e-Cleric/fix-indent-in-monster-blocks
fix indent in monster blocks
2023-11-15 14:34:44 -05:00
Trevor Buckner
9ac070512d linting 2023-11-15 14:34:30 -05:00
Trevor Buckner
a1e9c82c06 Linting 2023-11-15 14:32:15 -05:00
Trevor Buckner
b116e0a622 Merge pull request #3147 from naturalcrit/dependabot/npm_and_yarn/marked-gfm-heading-id-3.1.1
Bump marked-gfm-heading-id from 3.1.0 to 3.1.1
2023-11-15 11:49:56 -05:00
dependabot[bot]
ef2bbfea5e Bump marked-gfm-heading-id from 3.1.0 to 3.1.1
Bumps [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/markedjs/marked-gfm-heading-id/releases)
- [Changelog](https://github.com/markedjs/marked-gfm-heading-id/blob/main/release.config.cjs)
- [Commits](https://github.com/markedjs/marked-gfm-heading-id/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: marked-gfm-heading-id
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 03:28:56 +00:00
David Bolack
c858c705d2 Complete mustache div updates for attr 2023-11-11 22:23:43 -06:00
G.Ambatte
fb91761c31 Merge branch 'naturalcrit:master' into separateApiErrors-#2975 2023-11-12 13:45:40 +13:00
Víctor Losada Hernández
93d38eb184 Merge branch 'fix-indent-in-monster-blocks' of https://github.com/5e-Cleric/homebrewery into fix-indent-in-monster-blocks 2023-11-12 00:28:45 +01:00
Víctor Losada Hernández
d31dae728f i don't know why i didn't do this last time 2023-11-12 00:28:43 +01:00
David Bolack
c068aca9ff Small tweaks to processStyle.
This changes the output on arbitrary outputs to always wrap the value in
quotes instead of only doing so on whitespaced values.
2023-11-11 15:47:27 -06:00
David Bolack
fcdaef2445 Merge branch 'master' into Issue_1488 2023-11-11 15:08:11 -06:00
David Bolack
c78dcbfe05 Remove Line-break
Remove the linbreak between the </dt> and the first <dd>
2023-11-10 23:19:55 -06:00
Louis David Bolack
8d94e5fbe0 Update shared/naturalcrit/markdown.js
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2023-11-10 23:10:01 -06:00
Louis David Bolack
c6d8bbae16 Update shared/naturalcrit/markdown.js
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2023-11-10 23:09:49 -06:00
Trevor Buckner
0a54c7b04e Merge pull request #3141 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.23.3
Bump @babel/preset-env from 7.23.2 to 7.23.3
2023-11-10 22:55:50 -05:00
Trevor Buckner
2fd54ee87e Merge pull request #3138 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.23.3
Bump @babel/core from 7.23.2 to 7.23.3
2023-11-10 22:55:31 -05:00
dependabot[bot]
1f5f160964 Bump @babel/core from 7.23.2 to 7.23.3
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.2 to 7.23.3.
- [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.23.3/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-10 16:01:36 +00:00
dependabot[bot]
8d04f09aab Bump @babel/preset-env from 7.23.2 to 7.23.3
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.23.2 to 7.23.3.
- [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.23.3/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-10 16:01:28 +00:00
Trevor Buckner
be1f905b48 Merge pull request #3140 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.23.3
Bump @babel/plugin-transform-runtime from 7.23.2 to 7.23.3
2023-11-10 10:59:22 -05:00
Trevor Buckner
dbbd8cb26d Merge pull request #3139 from naturalcrit/dependabot/npm_and_yarn/babel/preset-react-7.23.3
Bump @babel/preset-react from 7.22.15 to 7.23.3
2023-11-10 10:59:13 -05:00
David Bolack
827fdd3cff REmove a console message. 2023-11-10 00:43:45 -06:00
David Bolack
7b85995b4a Updated attribute assignment.
Wraps with quotes ( a="b and c" )

Still does not work on Mustache Divs. UNsure where the failure is at the
moment. Even regressed "a:b and c" pattern on those.
2023-11-10 00:28:25 -06:00
David Bolack
37593573ce Merge branch 'master' into Issue_1488 2023-11-09 21:52:44 -06:00
David Bolack
a6ecec4172 Merge remote-tracking branch 'origin/Extended_DD' into Extended_DD 2023-11-09 21:51:23 -06:00
David Bolack
b561f69dd0 Merge branch 'master' into Extended_DD 2023-11-09 21:40:24 -06:00
dependabot[bot]
0bdadaf946 Bump @babel/plugin-transform-runtime from 7.23.2 to 7.23.3
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.23.2 to 7.23.3.
- [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.23.3/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-10 03:34:19 +00:00
dependabot[bot]
7b1a815e78 Bump @babel/preset-react from 7.22.15 to 7.23.3
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.22.15 to 7.23.3.
- [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.23.3/packages/babel-preset-react)

---
updated-dependencies:
- dependency-name: "@babel/preset-react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-10 03:33:55 +00:00
David Bolack
7b9a23670d Update Regex based on PR siuggestions.
This should match more economically and in line with marked
recomendations as well as not allow whitespace ( \s ) at the beginning
or end of a sub or superscript mark. Additionally, a failure in having
mixed sub and supers on the same line was corrected.
2023-11-09 21:31:08 -06:00
Louis David Bolack
a762626c53 Merge branch 'naturalcrit:master' into Issue_2171 2023-11-09 21:25:47 -06:00
Trevor Buckner
1c5c21d89b Merge branch 'master' into Extended_DD 2023-11-09 18:52:58 -05:00
Trevor Buckner
da2c647fa6 Merge pull request #3123 from naturalcrit/dependabot/npm_and_yarn/mongoose-8.0.0
Bump mongoose from 7.6.4 to 8.0.0
2023-11-09 16:45:10 -05:00
dependabot[bot]
cb61badfc5 Bump mongoose from 7.6.4 to 8.0.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.6.4 to 8.0.0.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.6.4...8.0.0)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-09 21:44:04 +00:00
Trevor Buckner
d2f909384e Merge pull request #3124 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.18.0
Bump react-router-dom from 6.17.0 to 6.18.0
2023-11-09 16:43:02 -05:00
Trevor Buckner
cebc7be81d Merge pull request #3130 from MurdoMaclachlan/master
Fix minor grammatical error in FAQ
2023-11-09 16:36:51 -05:00
Trevor Buckner
83c604cb74 Merge pull request #3073 from Gazook89/Fold-Buttons-in-Editor
Add foldAll and unfoldAll buttons to Snippet Bar
2023-11-09 16:36:20 -05:00
Trevor Buckner
ad455f652c Remove extra comma 2023-11-09 10:03:14 -05:00
Trevor Buckner
3f19b2975c Add tooltips 2023-11-08 17:48:32 -05:00
Trevor Buckner
cacfc788fb Change Expand Icon for consistency with collapse icon 2023-11-08 17:38:42 -05:00
Trevor Buckner
8f99712a28 Merge branch 'master' into Fold-Buttons-in-Editor 2023-11-08 17:07:04 -05:00
Trevor Buckner
367c2bd111 Merge branch 'master' into fix-indent-in-monster-blocks 2023-11-08 17:05:23 -05:00
Trevor Buckner
1c45cb1b7f Merge branch 'master' into Issue_2171 2023-11-08 17:03:16 -05:00
dependabot[bot]
19fbd832f1 Bump react-router-dom from 6.17.0 to 6.18.0
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.17.0 to 6.18.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.18.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-08 21:39:16 +00:00
Trevor Buckner
7ce0ac577a Merge pull request #3134 from naturalcrit/AwaitBuildCompleteBeforeStartServer
Fix issues starting server first time in Dev environment
2023-11-08 16:38:08 -05:00
Trevor Buckner
3ce4d6d1f8 Merge pull request #3136 from naturalcrit/DownNodeToV20_FixHerokuCrashes
Downgrade Node to v20 to fix Heroku
2023-11-08 16:37:30 -05:00
Trevor Buckner
18aca07e84 Downgrade Node to v20 to fix Heroku
Heroku is crashing on deployments that use Node 21. Not sure why.
2023-11-08 16:01:09 -05:00
Trevor Buckner
4bda071742 Should fix issues starting server first time
Using `node scripts/buildHomebrew.js --dev` can sometimes start up the server before the build is complete, so `ssr.js` is not quite ready and the app crashes. This puts the server startup inside the async block to it must await everything else being complete.
2023-11-08 12:18:51 -05:00
Víctor Losada Hernández
35bde09aa7 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into fix-indent-in-monster-blocks 2023-11-08 13:17:37 +01:00
David Bolack
d43ea46e40 Add subscript and subscript markdown tokens
Uses ^^ for superscript and ^^^ subscript as wrappers in the same
pattern as italics and bold ( * and **, respectively)

Adds editor hot-keys and sytax highlighting. (CTRL-6/CTRL-7)

Exact values may not be ideal. Short of the suggestted overloading of ~,
I didn't see a better option for the delimiter.
2023-11-08 00:54:43 -06:00
David Bolack
f1ca6eeee2 Near complete 2023-11-08 00:49:39 -06:00
David Bolack
d390d518a3 Initial commit, subscripts and superscripts 2023-11-07 22:42:53 -06:00
David Bolack
d1152dcbb5 Add Change log 2023-11-07 21:04:03 -06:00
David Bolack
837306c9a7 Add tests for arbitrary attributes.
Also shifted around the adding of spaces for the attributes.
2023-11-07 19:07:58 -06:00
David Bolack
e6428a3b18 Update Editor highlighting for Definition Lists
Fixes syntax highlighting to account for multiple definitions on a
definition list.
2023-11-07 18:07:11 -06:00
David Bolack
c58c8777f1 Add arbitrary tag attr assign. in moustaches
This adds the ability to include attribute values for any element that
can be altered by a moustache.

Form:

```
{attribute=value}

example:

![homebrew mug](https://i.imgur.com/hMna6G0.png) {position:absolute,bottom:20px,left:130px,width:220px,a=b and c,g=h}
```

In order to permit spaces, the pattern matches for moustache code had to
remove the space character as a delimiter. I believe I have adequate
compensated.

This should solve #1488
2023-11-07 17:43:24 -06:00
Murdo B. Maclachlan
caadb7b4ce Fix minor grammatical error in FAQ
Just a minor grammatical fix, "its" being the correct possessive as opposed to "it's" being a contraction of "it is".
2023-11-07 18:49:16 +00:00
David Bolack
ce1ba8289c Add Multi-line Dictionary Definition (<dd>) rows.
Expands the existing syntax to allow/expect the option of multiple
definitions by adding any number of ``` :: Definition``` to an a DT/DD
set.
2023-11-06 22:30:26 -06:00
Trevor Buckner
ce946bda98 Merge pull request #3035 from G-Ambatte/addDarkbreweryTheme
Add DarkBrewery theme
2023-11-06 17:18:41 -05:00
Trevor Buckner
07b1254309 Merge pull request #3127 from naturalcrit/dependabot/npm_and_yarn/eslint-8.53.0
Bump eslint from 8.52.0 to 8.53.0
2023-11-06 16:39:37 -05:00
dependabot[bot]
4c7715286e Bump eslint from 8.52.0 to 8.53.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.52.0 to 8.53.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.52.0...v8.53.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 03:32:37 +00:00
Trevor Buckner
980c544bba Merge pull request #3122 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.6.4
Bump mongoose from 7.6.3 to 7.6.4
2023-10-31 15:43:52 -04:00
Trevor Buckner
7c0b9ea3f6 Merge pull request #3069 from Gazook89/Stat-Block-H3-CSS-Tweak
Tweak monster H3 sizing and spacing per recommendation
2023-10-31 12:13:40 -04:00
Trevor Buckner
e6d8784633 Remove redundant properties 2023-10-31 12:12:56 -04:00
dependabot[bot]
4720aced6c Bump mongoose from 7.6.3 to 7.6.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.6.3 to 7.6.4.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/7.6.4/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.6.3...7.6.4)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-31 03:59:26 +00:00
Trevor Buckner
cf5e61cf09 Merge branch 'master' into Stat-Block-H3-CSS-Tweak 2023-10-30 22:18:04 -04:00
Trevor Buckner
9d43588f44 Merge pull request #3121 from naturalcrit/cleanV3PHB-Stylelint
Fix styleLint warnings on V3 PHB
2023-10-30 22:17:04 -04:00
Trevor Buckner
ce005da20f Fix styleLint warnings on V3 PHB
Duplicate `dl` entries and wrong quotes.
2023-10-30 22:16:46 -04:00
Trevor Buckner
17531151ad Merge branch 'master' into Stat-Block-H3-CSS-Tweak 2023-10-30 22:02:50 -04:00
Trevor Buckner
863f624772 Merge pull request #3117 from naturalcrit/dependabot/npm_and_yarn/browserify-sign-4.2.2
Bump browserify-sign from 4.2.1 to 4.2.2
2023-10-30 22:02:12 -04:00
Trevor Buckner
6a5f4efd26 Merge pull request #3112 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-jest-27.6.0
Bump eslint-plugin-jest from 27.4.2 to 27.6.0
2023-10-30 22:02:04 -04:00
Trevor Buckner
6200b416ab Merge pull request #3108 from naturalcrit/dependabot/npm_and_yarn/nconf-0.12.1
Bump nconf from 0.12.0 to 0.12.1
2023-10-30 22:01:55 -04:00
Trevor Buckner
dc1931a5e3 Merge pull request #3105 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.6.3
Bump mongoose from 7.6.1 to 7.6.3
2023-10-30 22:01:48 -04:00
Trevor Buckner
26bddc1a79 Merge pull request #3106 from naturalcrit/dependabot/npm_and_yarn/stylelint-15.11.0
Bump stylelint from 15.10.3 to 15.11.0
2023-10-30 22:01:41 -04:00
dependabot[bot]
74ebd44d7c Bump eslint-plugin-jest from 27.4.2 to 27.6.0
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.4.2 to 27.6.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.4.2...v27.6.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-31 02:01:02 +00:00
Trevor Buckner
989af1bbd0 Merge pull request #3109 from naturalcrit/dependabot/npm_and_yarn/eslint-8.52.0
Bump eslint from 8.51.0 to 8.52.0
2023-10-30 22:00:04 -04:00
Trevor Buckner
3359e489f5 Merge pull request #3104 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.17.0
Bump react-router-dom from 6.16.0 to 6.17.0
2023-10-30 21:59:57 -04:00
Trevor Buckner
f431ac2e40 Merge pull request #3099 from G-Ambatte/addShareLinkToNotAnAuthor
Add Share link to Unauthorized Edit Access error message
2023-10-30 21:59:31 -04:00
G.Ambatte
511c38dd1e Remove unnecessary nullish coalescing operators 2023-10-29 14:16:41 +13:00
G.Ambatte
85b0976082 Move API call error handling 2023-10-29 11:52:02 +13:00
G.Ambatte
7052337669 Remove API error message from log 2023-10-29 11:43:24 +13:00
G.Ambatte
e07d1d1ddb Add originalUrl to error object 2023-10-29 11:27:03 +13:00
G.Ambatte
c5ebd0352d Identify API errors and send error response 2023-10-29 11:04:07 +13:00
dependabot[bot]
a8fbcf0ad1 Bump browserify-sign from 4.2.1 to 4.2.2
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](https://github.com/crypto-browserify/browserify-sign/compare/v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: browserify-sign
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-27 13:30:24 +00:00
G.Ambatte
92f33136ce Remove page-break-before and -after from Blank 2023-10-27 23:58:56 +13:00
G.Ambatte
9260283914 Remove page-break-before and -after from 5ePHB 2023-10-27 23:58:39 +13:00
dependabot[bot]
a08263dd7c Bump eslint from 8.51.0 to 8.52.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.51.0 to 8.52.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.51.0...v8.52.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 03:39:23 +00:00
dependabot[bot]
7eae170f6c Bump nconf from 0.12.0 to 0.12.1
Bumps [nconf](https://github.com/flatiron/nconf) from 0.12.0 to 0.12.1.
- [Release notes](https://github.com/flatiron/nconf/releases)
- [Changelog](https://github.com/indexzero/nconf/blob/v0.12.1/CHANGELOG.md)
- [Commits](https://github.com/flatiron/nconf/compare/v0.12.0...v0.12.1)

---
updated-dependencies:
- dependency-name: nconf
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-23 03:39:02 +00:00
G.Ambatte
b5cb8ce834 Mark HB navigation changes 2023-10-19 18:20:50 +13:00
G.Ambatte
d497c0094b Fix comments 2023-10-19 17:51:02 +13:00
G.Ambatte
71141aa6f6 Merge branch 'master' into addDarkbreweryTheme 2023-10-19 16:37:36 +13:00
G.Ambatte
36e607eb3b Merge branch 'master' into addCreditsSnippet-#283 2023-10-19 16:37:27 +13:00
dependabot[bot]
d67f206900 Bump stylelint from 15.10.3 to 15.11.0
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.10.3 to 15.11.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.10.3...15.11.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 03:22:03 +00:00
dependabot[bot]
6bf9ddd585 Bump mongoose from 7.6.1 to 7.6.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.6.1 to 7.6.3.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.6.1...7.6.3)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-18 03:21:44 +00:00
dependabot[bot]
1607a1ac10 Bump react-router-dom from 6.16.0 to 6.17.0
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.16.0 to 6.17.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.17.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-17 03:07:32 +00:00
G.Ambatte
392a3db3c2 Add Share link to Unauthorized Edit access message 2023-10-14 20:01:21 +13:00
G.Ambatte
0845234f2f Add brew's shareId to error info 2023-10-14 19:59:51 +13:00
Trevor Buckner
f58a7d65b5 Merge pull request #3068 from Gazook89/Prevent-View-Increase-By-Author
Check for author in author list before increasing views.
2023-10-13 23:45:47 -04:00
Trevor Buckner
3ac0ac7568 Fix crash when not logged in
If not logged in, brew.authors doesn't exist, so visiting the share page crashes.
2023-10-13 23:44:34 -04:00
Trevor Buckner
1c71ff0945 Merge branch 'master' into pr/3068 2023-10-13 23:27:37 -04:00
G.Ambatte
3ccfef0763 Merge branch 'master' into addCreditsSnippet-#283 2023-10-14 11:42:50 +13:00
G.Ambatte
a6ec8370be Merge branch 'master' into addDarkbreweryTheme 2023-10-14 11:42:09 +13:00
Trevor Buckner
7b059f029d Merge pull request #3098 from naturalcrit/v3.10.0
Up to v3.10.0
2023-10-13 16:33:55 -04:00
Trevor Buckner
917b63722c typo 2023-10-13 16:32:02 -04:00
Trevor Buckner
c1cbbe0047 Up to v3.10.0 2023-10-13 16:31:08 -04:00
Trevor Buckner
963d76add9 Merge pull request #3093 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.23.2
Bump @babel/preset-env from 7.22.20 to 7.23.2
2023-10-12 15:42:09 -04:00
Trevor Buckner
e055734d03 Merge pull request #3094 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.23.2
Bump @babel/core from 7.23.0 to 7.23.2
2023-10-12 15:41:59 -04:00
dependabot[bot]
7c16805680 Bump @babel/core from 7.23.0 to 7.23.2
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.0 to 7.23.2.
- [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/@babel/core@7.23.2/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 19:35:37 +00:00
dependabot[bot]
be52e0ecd9 Bump @babel/preset-env from 7.22.20 to 7.23.2
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.22.20 to 7.23.2.
- [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.23.2/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 19:34:55 +00:00
Trevor Buckner
175673cdf9 Merge pull request #3088 from naturalcrit/dependabot/npm_and_yarn/eslint-8.51.0
Bump eslint from 8.50.0 to 8.51.0
2023-10-12 15:34:15 -04:00
Trevor Buckner
a279c75826 Merge pull request #3091 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.6.1
Bump mongoose from 7.5.4 to 7.6.1
2023-10-12 15:34:05 -04:00
Trevor Buckner
8be95e7d04 Merge pull request #3095 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.23.2
Bump @babel/plugin-transform-runtime from 7.22.15 to 7.23.2
2023-10-12 15:33:51 -04:00
Trevor Buckner
8e0c1d78dc Merge pull request #3096 from naturalcrit/dependabot/npm_and_yarn/googleapis/drive-8.4.0
Bump @googleapis/drive from 8.3.1 to 8.4.0
2023-10-12 15:33:42 -04:00
dependabot[bot]
5da73f8ff8 Bump @googleapis/drive from 8.3.1 to 8.4.0
Bumps [@googleapis/drive](https://github.com/googleapis/google-api-nodejs-client) from 8.3.1 to 8.4.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/release-please-config.json)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/drive-v8.3.1...drive-v8.4.0)

---
updated-dependencies:
- dependency-name: "@googleapis/drive"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 03:19:54 +00:00
dependabot[bot]
e20fc680e9 Bump @babel/plugin-transform-runtime from 7.22.15 to 7.23.2
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.22.15 to 7.23.2.
- [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.23.2/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-12 03:19:36 +00:00
dependabot[bot]
e821ddac93 Bump mongoose from 7.5.4 to 7.6.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.5.4 to 7.6.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.5.4...7.6.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-10 03:14:54 +00:00
dependabot[bot]
fab2c2cead Bump eslint from 8.50.0 to 8.51.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.50.0 to 8.51.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.50.0...v8.51.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-09 03:23:43 +00:00
Trevor Buckner
bd0e142999 Merge pull request #3084 from naturalcrit/UpdateCircleCiNodeVersion
Up Node Version on CircleCi to pass tests
2023-10-06 15:02:49 -04:00
Trevor Buckner
673649abc4 typo 2023-10-06 15:00:50 -04:00
Trevor Buckner
b95a2189a5 Up Node Version on CircleCi to pass tests 2023-10-06 14:59:19 -04:00
Trevor Buckner
f45547d899 Merge pull request #3083 from naturalcrit/dependabot/npm_and_yarn/marked-smartypants-lite-1.0.1
Bump marked-smartypants-lite from 1.0.0 to 1.0.1
2023-10-06 01:16:04 -04:00
dependabot[bot]
f2c970fb79 Bump marked-smartypants-lite from 1.0.0 to 1.0.1
Bumps [marked-smartypants-lite](https://github.com/calculuschild/marked-smartypants-lite) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/calculuschild/marked-smartypants-lite/releases)
- [Changelog](https://github.com/calculuschild/marked-smartypants-lite/blob/main/release.config.cjs)
- [Commits](https://github.com/calculuschild/marked-smartypants-lite/commits/v1.0.1)

---
updated-dependencies:
- dependency-name: marked-smartypants-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-06 03:16:34 +00:00
Trevor Buckner
6e6a6dd1e3 Merge pull request #3067 from Gazook89/Definition-List-Highlighting
Add syntax highlighting for definition lists
2023-10-05 22:43:58 -04:00
Trevor Buckner
b2fc020d81 Merge pull request #3063 from naturalcrit/dependabot/npm_and_yarn/marked-extended-tables-1.0.7
Bump marked-extended-tables from 1.0.6 to 1.0.7
2023-10-05 15:29:57 -04:00
Trevor Buckner
3bfa3bac3a Merge pull request #3082 from naturalcrit/dependabot/npm_and_yarn/postcss-8.4.31
Bump postcss from 8.4.28 to 8.4.31
2023-10-05 15:29:48 -04:00
dependabot[bot]
00134c6c3d Bump postcss from 8.4.28 to 8.4.31
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.28 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.28...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 19:25:47 +00:00
Trevor Buckner
6a393a1437 Merge pull request #3064 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.23.0
Bump @babel/core from 7.22.20 to 7.23.0
2023-10-05 15:25:19 -04:00
Trevor Buckner
115be2813d Merge pull request #3076 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-jest-27.4.2
Bump eslint-plugin-jest from 27.4.0 to 27.4.2
2023-10-05 15:25:11 -04:00
Trevor Buckner
e4a46c84ec Merge pull request #3080 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.5.4
Bump mongoose from 7.5.2 to 7.5.4
2023-10-05 15:24:57 -04:00
dependabot[bot]
b994bf269a Bump mongoose from 7.5.2 to 7.5.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.5.2 to 7.5.4.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.5.2...7.5.4)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-05 03:40:18 +00:00
Víctor Losada Hernández
2de7ec3585 Initial Commit 2023-10-03 17:08:46 +02:00
Víctor Losada Hernández
efbfbf3568 Merge branch 'master' of https://github.com/naturalcrit/homebrewery 2023-10-03 08:07:54 +02:00
Víctor Losada Hernández
12ca82e6e6 Initial commit 2023-10-03 08:00:20 +02:00
dependabot[bot]
e7ce8d73bb Bump eslint-plugin-jest from 27.4.0 to 27.4.2
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.4.0 to 27.4.2.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.4.0...v27.4.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-02 03:52:27 +00:00
G.Ambatte
a420f202d8 Fix a:hover in LESS styling 2023-10-01 21:10:08 +13:00
G.Ambatte
3628ca837a Shift to LESS nested styling 2023-10-01 21:09:32 +13:00
G.Ambatte
cc3a42402a Move Credits snippet to Blank 2023-10-01 20:11:05 +13:00
G.Ambatte
1e9b71080b Add underline on hover to link in credit 2023-10-01 19:58:57 +13:00
G.Ambatte
90917bb84c Change the text to include URL link 2023-10-01 19:52:17 +13:00
G.Ambatte
7f6e90fee3 Capitalize C in NaturalCrit.com 2023-10-01 15:29:46 +13:00
G.Ambatte
b8d8c1bebb Add HB Credit snippet 2023-10-01 14:15:58 +13:00
G.Ambatte
7ee0e914e6 Add Credits styling to 5ePHB theme 2023-10-01 14:13:01 +13:00
G.Ambatte
08dbd5638d New file was unnecessary 2023-10-01 14:11:07 +13:00
G.Ambatte
b7d7f4f2a0 Add optimized NC logo 2023-10-01 13:03:37 +13:00
Gazook89
3cf6691e67 remove width constraint on editors in snippet bar. 2023-09-29 09:31:20 -05:00
Gazook89
8077a91ff7 add foldAll and unfoldAll buttons to snippet bar. 2023-09-29 09:31:20 -05:00
Gazook89
09670b8535 Stylelint the v3 PHB theme. 2023-09-28 00:04:21 -05:00
Gazook89
36f8f39486 Tweak monster H3 sizing and spacing per recommendation 2023-09-28 00:02:57 -05:00
Gazook89
1556cf361a Check for author in author list before increasing views. 2023-09-27 23:46:38 -05:00
Gazook89
c6ef051232 Stylelint the editor.less file. 2023-09-27 22:56:20 -05:00
Gazook89
2c130d1943 add styling for definition lists in the editor. 2023-09-27 22:46:51 -05:00
Gazook89
f1e6a9a41e add syntax highlighting for definition lists 2023-09-27 22:46:51 -05:00
Víctor Losada Hernández
b557144f63 extra tests 2023-09-27 20:11:00 +02:00
Víctor Losada Hernández
738fc62b8f initial commit 2023-09-27 18:20:56 +02:00
dependabot[bot]
34edd436e7 Bump @babel/core from 7.22.20 to 7.23.0
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.20 to 7.23.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.23.0/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-26 03:37:54 +00:00
dependabot[bot]
0b13e90dd8 Bump marked-extended-tables from 1.0.6 to 1.0.7
Bumps [marked-extended-tables](https://github.com/calculuschild/marked-extended-tables) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/calculuschild/marked-extended-tables/releases)
- [Changelog](https://github.com/calculuschild/marked-extended-tables/blob/main/release.config.cjs)
- [Commits](https://github.com/calculuschild/marked-extended-tables/commits)

---
updated-dependencies:
- dependency-name: marked-extended-tables
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-26 03:37:38 +00:00
Trevor Buckner
52dcc3b53c Merge pull request #3057 from naturalcrit/CSSLint-V3PHB
CSS Lint on V3 5ePHB theme page
2023-09-25 16:18:28 -04:00
Trevor Buckner
6803db268f Merge pull request #3062 from naturalcrit/dependabot/npm_and_yarn/eslint-8.50.0
Bump eslint from 8.49.0 to 8.50.0
2023-09-25 16:04:25 -04:00
Trevor Buckner
99c45b6cc3 Merge pull request #3061 from naturalcrit/dependabot/npm_and_yarn/marked-gfm-heading-id-3.1.0
Bump marked-gfm-heading-id from 3.0.8 to 3.1.0
2023-09-25 16:04:18 -04:00
dependabot[bot]
4cf8e620ee Bump eslint from 8.49.0 to 8.50.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.49.0 to 8.50.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.49.0...v8.50.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 03:11:42 +00:00
dependabot[bot]
fb4c33545c Bump marked-gfm-heading-id from 3.0.8 to 3.1.0
Bumps [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) from 3.0.8 to 3.1.0.
- [Release notes](https://github.com/markedjs/marked-gfm-heading-id/releases)
- [Changelog](https://github.com/markedjs/marked-gfm-heading-id/blob/main/release.config.cjs)
- [Commits](https://github.com/markedjs/marked-gfm-heading-id/compare/v3.0.8...v3.1.0)

---
updated-dependencies:
- dependency-name: marked-gfm-heading-id
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 03:11:21 +00:00
Trevor Buckner
68475a6aa0 Merge pull request #3016 from naturalcrit/dependabot/npm_and_yarn/googleapis/drive-8.3.1
Bump @googleapis/drive from 5.1.0 to 8.3.1
2023-09-19 16:39:46 -04:00
Trevor Buckner
e5140bd5b4 Merge pull request #2990 from naturalcrit/dependabot/npm_and_yarn/superagent-8.1.2
Bump superagent from 6.1.0 to 8.1.2
2023-09-19 16:39:09 -04:00
Trevor Buckner
e3c05c83ba Merge branch 'master' into CSSLint-V3PHB 2023-09-19 15:36:46 -04:00
Trevor Buckner
b374f06718 Merge pull request #3058 from naturalcrit/Node20
Update Node to v20
2023-09-19 15:36:23 -04:00
Trevor Buckner
ea8c93d39d Move npm position 2023-09-19 14:43:14 -04:00
Trevor Buckner
6dd8ccff90 Raise Node version 2023-09-19 14:10:28 -04:00
Trevor Buckner
ca90a22c64 Run CSSLint 2023-09-19 12:40:39 -04:00
Trevor Buckner
abc4851375 Merge pull request #2796 from 5e-Cleric/DMG-theme-update
Update in the DMG theme
2023-09-18 16:28:38 -04:00
Trevor Buckner
a155c10d46 Merge branch 'master' into pr/2796 2023-09-18 16:28:20 -04:00
Trevor Buckner
5247f5c87b Update style.less 2023-09-18 16:26:38 -04:00
dependabot[bot]
e41c1ef0bd Bump @googleapis/drive from 5.1.0 to 8.3.1
Bumps [@googleapis/drive](https://github.com/googleapis/google-api-nodejs-client) from 5.1.0 to 8.3.1.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/release-please-config.json)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/5.1.0...drive-v8.3.1)

---
updated-dependencies:
- dependency-name: "@googleapis/drive"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 19:18:17 +00:00
Trevor Buckner
4d6b428f93 Merge pull request #3054 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.22.20
Bump @babel/preset-env from 7.22.15 to 7.22.20
2023-09-18 15:17:22 -04:00
Trevor Buckner
6928bd9fb4 Merge pull request #3051 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.22.20
Bump @babel/core from 7.22.17 to 7.22.20
2023-09-18 15:17:14 -04:00
Trevor Buckner
f2855aca85 Merge pull request #3052 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-jest-27.4.0
Bump eslint-plugin-jest from 27.2.3 to 27.4.0
2023-09-18 15:16:49 -04:00
Trevor Buckner
aeef595ea9 Merge pull request #3055 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.5.2
Bump mongoose from 7.5.1 to 7.5.2
2023-09-18 15:16:39 -04:00
dependabot[bot]
1a24709da0 Bump mongoose from 7.5.1 to 7.5.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.5.1 to 7.5.2.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.5.1...7.5.2)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 03:54:17 +00:00
dependabot[bot]
8c11f47c1f Bump @babel/preset-env from 7.22.15 to 7.22.20
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.22.15 to 7.22.20.
- [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.22.20/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 03:54:04 +00:00
dependabot[bot]
486fbf32b2 Bump eslint-plugin-jest from 27.2.3 to 27.4.0
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.2.3 to 27.4.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.2.3...v27.4.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 03:53:32 +00:00
dependabot[bot]
8ac3cdcf9d Bump @babel/core from 7.22.17 to 7.22.20
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.17 to 7.22.20.
- [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.22.20/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-18 03:53:17 +00:00
dependabot[bot]
f0fc0bcb6d Bump superagent from 6.1.0 to 8.1.2
Bumps [superagent](https://github.com/ladjs/superagent) from 6.1.0 to 8.1.2.
- [Release notes](https://github.com/ladjs/superagent/releases)
- [Changelog](https://github.com/ladjs/superagent/blob/master/HISTORY.md)
- [Commits](https://github.com/ladjs/superagent/compare/v6.1.0...v8.1.2)

---
updated-dependencies:
- dependency-name: superagent
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-14 21:16:32 +00:00
Trevor Buckner
63a5e9f817 Merge pull request #3048 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.16.0
Bump react-router-dom from 6.15.0 to 6.16.0
2023-09-14 17:15:48 -04:00
Trevor Buckner
5456f4f197 Merge pull request #2791 from 5e-Cleric/FAQ-update
Update FAQ and Landpage
2023-09-14 17:15:39 -04:00
Trevor Buckner
d75ea8943b rewrite Editing and Sharing to better fit 2023-09-14 17:15:05 -04:00
Trevor Buckner
07ae1539aa Merge pull request #2797 from 5e-Cleric/quote-snippet
Quote Snippet
2023-09-14 16:46:06 -04:00
Trevor Buckner
2125b8a026 Small tweaks 2023-09-14 16:44:59 -04:00
dependabot[bot]
b3522bddf1 Bump react-router-dom from 6.15.0 to 6.16.0
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.15.0 to 6.16.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.16.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-14 03:53:35 +00:00
Víctor Losada Hernández
9dc19d996d reviewed fixes 2023-09-13 23:40:33 +02:00
G.Ambatte
216de73c93 Fix from 5E-Cleric 2023-09-14 08:19:25 +12:00
G.Ambatte
a306030635 Merge branch 'master' into addDarkbreweryTheme 2023-09-14 08:14:05 +12:00
Trevor Buckner
3e9bea3761 Merge pull request #3043 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.5.1
Bump mongoose from 7.5.0 to 7.5.1
2023-09-13 09:36:06 -04:00
Trevor Buckner
73e909c4c8 Merge pull request #3045 from naturalcrit/dependabot/npm_and_yarn/jest-29.7.0
Bump jest from 29.6.4 to 29.7.0
2023-09-13 09:35:59 -04:00
dependabot[bot]
53fa6af5f9 Bump jest from 29.6.4 to 29.7.0
Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) from 29.6.4 to 29.7.0.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.7.0/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-13 03:33:13 +00:00
dependabot[bot]
4d2edf81a9 Bump mongoose from 7.5.0 to 7.5.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.5.0 to 7.5.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.5.0...7.5.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-12 03:46:23 +00:00
Trevor Buckner
b10b33830a Merge pull request #3038 from naturalcrit/dependabot/npm_and_yarn/marked-gfm-heading-id-3.0.8
Bump marked-gfm-heading-id from 3.0.7 to 3.0.8
2023-09-11 18:59:39 -04:00
Trevor Buckner
393ac69581 Merge pull request #3040 from naturalcrit/dependabot/npm_and_yarn/eslint-8.49.0
Bump eslint from 8.48.0 to 8.49.0
2023-09-11 18:59:31 -04:00
Trevor Buckner
1098f6da70 Merge pull request #3039 from naturalcrit/dependabot/npm_and_yarn/npm-10.1.0
Bump npm from 10.0.0 to 10.1.0
2023-09-11 18:59:26 -04:00
Trevor Buckner
a29fed3c89 Merge pull request #3041 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.22.17
Bump @babel/core from 7.22.15 to 7.22.17
2023-09-11 18:59:19 -04:00
dependabot[bot]
7af3a629f9 Bump @babel/core from 7.22.15 to 7.22.17
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.15 to 7.22.17.
- [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.22.17/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 03:32:05 +00:00
dependabot[bot]
b0a9765819 Bump eslint from 8.48.0 to 8.49.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.48.0 to 8.49.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.48.0...v8.49.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 03:31:50 +00:00
dependabot[bot]
86d18ea0d9 Bump npm from 10.0.0 to 10.1.0
Bumps [npm](https://github.com/npm/cli) from 10.0.0 to 10.1.0.
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/libnpmhook-v10.0.0...v10.1.0)

---
updated-dependencies:
- dependency-name: npm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 03:31:19 +00:00
dependabot[bot]
bfe278c81c Bump marked-gfm-heading-id from 3.0.7 to 3.0.8
Bumps [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) from 3.0.7 to 3.0.8.
- [Release notes](https://github.com/markedjs/marked-gfm-heading-id/releases)
- [Changelog](https://github.com/markedjs/marked-gfm-heading-id/blob/main/release.config.cjs)
- [Commits](https://github.com/markedjs/marked-gfm-heading-id/compare/v3.0.7...v3.0.8)

---
updated-dependencies:
- dependency-name: marked-gfm-heading-id
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-11 03:30:59 +00:00
G.Ambatte
7870c763df Linter fix 2023-09-09 13:42:35 +12:00
G.Ambatte
7f1758364b Add darkbrewery to editorThemes.json 2023-09-09 13:42:25 +12:00
Sean Robertson
46a6ed4fcc Modify build script to include custom theme dir 2023-09-08 15:21:51 +12:00
Sean Robertson
7efd23039e Add DarkBrewery CSS file 2023-09-08 15:20:06 +12:00
Víctor Losada Hernández
9e5103a0c7 Merge branch 'master' of https://github.com/naturalcrit/homebrewery into FAQ-update 2023-09-07 23:14:53 +02:00
Trevor Buckner
7281b6e43c Merge pull request #2768 from G-Ambatte/addEditorThemes-#362
Add editor themes
2023-09-07 10:39:33 -04:00
G.Ambatte
3f6eb7371f Increase ESLint lines for SnippetBar.jsx 2023-09-07 18:28:08 +12:00
G.Ambatte
2b0bbfc2db Merge branch 'master' into addEditorThemes-#362 2023-09-07 18:22:17 +12:00
G.Ambatte
e909bc8f35 Load editorThemes in SnippetBar.jsx 2023-09-07 17:33:36 +12:00
G.Ambatte
e16110da6a Add custom styling for light background themes 2023-09-07 17:05:52 +12:00
G.Ambatte
fcd15e6d9c Merge branch 'addEditorThemes-#362' of https://github.com/G-Ambatte/homebrewery into addEditorThemes-#362 2023-09-07 16:55:49 +12:00
G.Ambatte
3f828c8649 Make Default first option in built themes JSON 2023-09-07 16:55:39 +12:00
Trevor Buckner
bb66cffa13 Merge pull request #3021 from naturalcrit/dependabot/npm_and_yarn/npm-10.0.0
Bump npm from 9.8.1 to 10.0.0
2023-09-06 14:44:26 -04:00
Trevor Buckner
da5a5631ad Merge pull request #2889 from G-Ambatte/trimBrewTitlesOnUserPage-#2775
Remove whitespace from brew titles on UserPage
2023-09-06 11:37:59 -04:00
Sean Robertson
3e43b058a5 Move userpage brew data clean up to app.js 2023-09-06 11:52:28 +12:00
G.Ambatte
a30c2fa1f7 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-09-06 10:58:10 +12:00
G.Ambatte
cb203c29c9 Merge branch 'master' into addEditorThemes-#362 2023-09-06 08:24:22 +12:00
Trevor Buckner
e50d7b8882 Merge pull request #3013 from G-Ambatte/changeColumnFlow-#2982
Change column flow to auto
2023-09-05 16:15:14 -04:00
G.Ambatte
74d6aa7c8a Merge branch 'master' into addEditorThemes-#362 2023-09-06 07:44:24 +12:00
G.Ambatte
e86686807b Merge branch 'master' into changeColumnFlow-#2982 2023-09-06 07:43:50 +12:00
Trevor Buckner
f4356025de Merge pull request #3024 from G-Ambatte/fixVersionError-#2641
Shift manual save to use debounced save function
2023-09-05 14:52:42 -04:00
dependabot[bot]
73b141d08c Bump npm from 9.8.1 to 10.0.0
Bumps [npm](https://github.com/npm/cli) from 9.8.1 to 10.0.0.
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v9.8.1...libnpmhook-v10.0.0)

---
updated-dependencies:
- dependency-name: npm
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 18:34:36 +00:00
Trevor Buckner
9196ffc480 Merge pull request #3011 from naturalcrit/dependabot/npm_and_yarn/jest-29.6.4
Bump jest from 29.6.2 to 29.6.4
2023-09-05 14:33:12 -04:00
Trevor Buckner
4e18bb047e Merge pull request #3029 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.22.15
Bump @babel/plugin-transform-runtime from 7.22.10 to 7.22.15
2023-09-05 14:33:04 -04:00
Trevor Buckner
e4b4e34216 Merge pull request #3027 from naturalcrit/dependabot/npm_and_yarn/babel/preset-react-7.22.15
Bump @babel/preset-react from 7.22.5 to 7.22.15
2023-09-05 14:30:24 -04:00
Trevor Buckner
d38c1b9ab2 Merge pull request #3014 from naturalcrit/dependabot/npm_and_yarn/eslint-8.48.0
Bump eslint from 8.47.0 to 8.48.0
2023-09-05 14:30:16 -04:00
dependabot[bot]
deaaafd9d2 Bump @babel/plugin-transform-runtime from 7.22.10 to 7.22.15
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.22.10 to 7.22.15.
- [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.22.15/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 18:27:40 +00:00
dependabot[bot]
9b33bf9855 Bump @babel/preset-react from 7.22.5 to 7.22.15
Bumps [@babel/preset-react](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-react) from 7.22.5 to 7.22.15.
- [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.22.15/packages/babel-preset-react)

---
updated-dependencies:
- dependency-name: "@babel/preset-react"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 18:27:25 +00:00
Trevor Buckner
e5346d3a6e Merge pull request #3018 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.5.0
Bump mongoose from 7.4.3 to 7.5.0
2023-09-05 14:27:03 -04:00
Trevor Buckner
d9ca20e17d Merge pull request #3026 from naturalcrit/dependabot/npm_and_yarn/marked-gfm-heading-id-3.0.7
Bump marked-gfm-heading-id from 3.0.6 to 3.0.7
2023-09-05 14:26:28 -04:00
Trevor Buckner
a5cb3f085f Merge pull request #3028 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.22.15
Bump @babel/core from 7.22.10 to 7.22.15
2023-09-05 14:26:14 -04:00
Trevor Buckner
6d28948387 Merge pull request #3030 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.22.15
Bump @babel/preset-env from 7.22.10 to 7.22.15
2023-09-05 14:26:07 -04:00
dependabot[bot]
65c75b3282 Bump @babel/preset-env from 7.22.10 to 7.22.15
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.22.10 to 7.22.15.
- [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.22.15/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 03:35:27 +00:00
dependabot[bot]
a0f22e31b7 Bump @babel/core from 7.22.10 to 7.22.15
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.10 to 7.22.15.
- [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.22.15/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 03:34:18 +00:00
dependabot[bot]
c750eebc11 Bump marked-gfm-heading-id from 3.0.6 to 3.0.7
Bumps [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) from 3.0.6 to 3.0.7.
- [Release notes](https://github.com/markedjs/marked-gfm-heading-id/releases)
- [Changelog](https://github.com/markedjs/marked-gfm-heading-id/blob/main/release.config.cjs)
- [Commits](https://github.com/markedjs/marked-gfm-heading-id/compare/v3.0.6...v3.0.7)

---
updated-dependencies:
- dependency-name: marked-gfm-heading-id
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-04 03:21:55 +00:00
G.Ambatte
93a93f1907 Shift manual save to use debounced save function 2023-09-04 13:29:37 +12:00
dependabot[bot]
29428b81f6 Bump mongoose from 7.4.3 to 7.5.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.4.3 to 7.5.0.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.4.3...7.5.0)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-30 03:22:53 +00:00
dependabot[bot]
a542953cec Bump eslint from 8.47.0 to 8.48.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.47.0 to 8.48.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.47.0...v8.48.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 03:11:48 +00:00
G.Ambatte
183ca51753 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-08-28 07:50:44 +12:00
G.Ambatte
220816a172 Merge branch 'master' into addEditorThemes-#362 2023-08-28 07:50:33 +12:00
G.Ambatte
840b075c8e Merge branch 'master' into changeColumnFlow-#2982 2023-08-28 07:48:00 +12:00
Trevor Buckner
3ba15a068a Merge pull request #3009 from G-Ambatte/fixFreeBSDInstallScript-#3005
Fix FreeBSD Install Script
2023-08-25 00:30:57 -04:00
G.Ambatte
b99de1c6e1 Change column-fill to auto 2023-08-25 16:16:11 +12:00
dependabot[bot]
73a48501e0 Bump jest from 29.6.2 to 29.6.4
Bumps [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) from 29.6.2 to 29.6.4.
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v29.6.4/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-25 03:45:43 +00:00
G.Ambatte
599d39b69d Correct service file location in repository 2023-08-25 11:56:48 +12:00
G.Ambatte
ed18ba3108 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-08-24 14:12:15 +12:00
G.Ambatte
6d93291d5b Merge branch 'master' into addEditorThemes-#362 2023-08-24 14:09:59 +12:00
Trevor Buckner
3fef61cbf8 Merge pull request #2991 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.33.2
Bump eslint-plugin-react from 7.33.1 to 7.33.2
2023-08-21 12:10:05 -04:00
Trevor Buckner
c5d9c3bdc0 Merge pull request #3002 from naturalcrit/dependabot/npm_and_yarn/stylelint-15.10.3
Bump stylelint from 15.10.2 to 15.10.3
2023-08-21 12:09:48 -04:00
Trevor Buckner
6c7af2d968 Merge pull request #3003 from G-Ambatte/bugfix-#2998
Move save location logic out of ShareID check
2023-08-21 12:09:19 -04:00
Trevor Buckner
6130d69906 Rearranged to avoid obscuring the state
`output` variable added an unneeded layer to dig through to understand what is being saved to `setState()`
2023-08-21 12:08:54 -04:00
G.Ambatte
8c975747c4 Move save location logic out of ShareID check 2023-08-21 19:33:51 +12:00
Trevor Buckner
ef6dab24a2 Merge pull request #2997 from G-Ambatte/bugfix-#2996
Move e.preventDefault to after isDragging check
2023-08-20 23:44:25 -04:00
Trevor Buckner
1f09fff94b Merge pull request #3000 from G-Ambatte/bugfix-#2999
Fix crash to white screen on New page
2023-08-20 23:42:24 -04:00
dependabot[bot]
7bcd898c81 Bump stylelint from 15.10.2 to 15.10.3
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.10.2 to 15.10.3.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.10.2...15.10.3)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 03:00:59 +00:00
G.Ambatte
186809008c Correct check for case of user not being logged in 2023-08-21 14:56:44 +12:00
G.Ambatte
b6e11ba607 Move e.preventDefault to after isDragging check 2023-08-19 15:01:16 +12:00
Trevor Buckner
355b8ac78f Merge pull request #2994 from G-Ambatte/bugfix-#2993
Fix save location logic
2023-08-18 07:20:01 -04:00
G.Ambatte
a2c20a0f7a Fix save location logic 2023-08-18 20:35:26 +12:00
Trevor Buckner
117e399c1d Merge pull request #2979 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.15.0
Bump react-router-dom from 6.14.2 to 6.15.0
2023-08-17 16:45:15 -04:00
Trevor Buckner
a3ac524308 Merge pull request #2978 from G-Ambatte/update-v3.9.2
Update v3.9.2
2023-08-17 16:12:07 -04:00
Trevor Buckner
1e9ba31644 Add date 2023-08-17 16:11:40 -04:00
dependabot[bot]
751728d134 Bump eslint-plugin-react from 7.33.1 to 7.33.2
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.1 to 7.33.2.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.33.1...v7.33.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-17 03:26:38 +00:00
Trevor Buckner
8e05cdbb43 Merge pull request #2985 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.4.3
Bump mongoose from 7.4.2 to 7.4.3
2023-08-15 10:48:53 -04:00
Trevor Buckner
a5483c549b Merge pull request #2986 from naturalcrit/dependabot/npm_and_yarn/eslint-8.47.0
Bump eslint from 8.46.0 to 8.47.0
2023-08-15 10:48:46 -04:00
dependabot[bot]
746f3d35f8 Bump eslint from 8.46.0 to 8.47.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.46.0 to 8.47.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.46.0...v8.47.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 03:47:18 +00:00
dependabot[bot]
94c902bf38 Bump mongoose from 7.4.2 to 7.4.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.4.2 to 7.4.3.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.4.2...7.4.3)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 03:47:06 +00:00
Trevor Buckner
0da1c43dc3 Merge pull request #2983 from G-Ambatte/fixColumnFlow
Fix Markdown render parameter
2023-08-12 01:19:16 -04:00
G.Ambatte
32417e92ff Fix Markdown render parameter 2023-08-12 14:27:34 +12:00
dependabot[bot]
540dee89dd Bump react-router-dom from 6.14.2 to 6.15.0
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.14.2 to 6.15.0.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.15.0/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-11 03:32:08 +00:00
G.Ambatte
1854080771 Merge branch 'master' into update-v3.9.2 2023-08-11 12:52:38 +12:00
Sean Robertson
45207b8114 Up version to 3.9.2 2023-08-11 12:42:20 +12:00
Sean Robertson
2b3c2c9fac Update change log with merged PR info 2023-08-11 12:42:04 +12:00
Trevor Buckner
0b953fcbf3 Merge pull request #2944 from G-Ambatte/experimentalSaveLocation
Add save location setting to local storage
2023-08-10 20:30:13 -04:00
G.Ambatte
0a3453d228 Merge branch 'master' into addEditorThemes-#362 2023-08-11 12:09:02 +12:00
G.Ambatte
6b49e720ca Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-08-11 12:08:40 +12:00
Sean Robertson
7feaa51de0 Rename renderButton visibility control parameter 2023-08-11 11:56:45 +12:00
G.Ambatte
1729b13574 Merge branch 'master' into experimentalSaveLocation 2023-08-11 11:53:26 +12:00
G.Ambatte
73832fabcc Update client/homebrew/pages/accountPage/accountPage.jsx
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2023-08-11 11:15:27 +12:00
Trevor Buckner
bac537244c Merge pull request #2969 from G-Ambatte/addGoogleFileLink
Add Google file link to UserPage BrewItem
2023-08-10 17:19:18 -04:00
G.Ambatte
54f8bb4b08 Merge branch 'master' into addGoogleFileLink 2023-08-10 16:47:07 +12:00
G.Ambatte
38f6929c1d Reverse StorageIcons logic 2023-08-10 16:46:45 +12:00
Trevor Buckner
64ce9ecfa6 Merge pull request #2973 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.22.10
Bump @babel/preset-env from 7.22.9 to 7.22.10
2023-08-09 13:57:56 -04:00
Trevor Buckner
858990c4bd Merge pull request #2971 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.22.10
Bump @babel/core from 7.22.9 to 7.22.10
2023-08-09 13:57:48 -04:00
dependabot[bot]
785011cba4 Bump @babel/core from 7.22.9 to 7.22.10
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.9 to 7.22.10.
- [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.22.10/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-09 15:27:35 +00:00
dependabot[bot]
50d3b503d9 Bump @babel/preset-env from 7.22.9 to 7.22.10
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.22.9 to 7.22.10.
- [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.22.10/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-09 15:27:22 +00:00
Trevor Buckner
2f8e2545c6 Merge pull request #2968 from naturalcrit/dependabot/npm_and_yarn/marked-gfm-heading-id-3.0.6
Bump marked-gfm-heading-id from 3.0.4 to 3.0.6
2023-08-09 11:26:16 -04:00
Trevor Buckner
d8574e7045 Merge pull request #2972 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.22.10
Bump @babel/plugin-transform-runtime from 7.22.9 to 7.22.10
2023-08-09 11:25:59 -04:00
Víctor Losada Hernández
b3497e14f1 remove italics 2023-08-08 19:15:19 +02:00
Víctor Losada Hernández
d6e0047d4e Merge branch 'master' of https://github.com/naturalcrit/homebrewery into quote-snippet 2023-08-08 19:12:34 +02:00
Víctor Losada Hernández
8ebd5ccff9 syntax change 2023-08-08 19:11:54 +02:00
dependabot[bot]
4a927daff3 Bump @babel/plugin-transform-runtime from 7.22.9 to 7.22.10
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.22.9 to 7.22.10.
- [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.22.10/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 03:02:35 +00:00
G.Ambatte
d28e85209e Add HB icon for Mongo brews 2023-08-07 22:03:49 +12:00
G.Ambatte
cca882869d Add file link to Google icon on User Page 2023-08-07 22:03:17 +12:00
dependabot[bot]
9ae55c87a9 Bump marked-gfm-heading-id from 3.0.4 to 3.0.6
Bumps [marked-gfm-heading-id](https://github.com/markedjs/marked-gfm-heading-id) from 3.0.4 to 3.0.6.
- [Release notes](https://github.com/markedjs/marked-gfm-heading-id/releases)
- [Changelog](https://github.com/markedjs/marked-gfm-heading-id/blob/main/release.config.cjs)
- [Commits](https://github.com/markedjs/marked-gfm-heading-id/compare/v3.0.4...v3.0.6)

---
updated-dependencies:
- dependency-name: marked-gfm-heading-id
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 03:02:48 +00:00
G.Ambatte
99ad96a584 Merge branch 'master' into addEditorThemes-#362 2023-08-05 14:22:31 +12:00
G.Ambatte
f8b42031fb Merge branch 'master' into experimentalSaveLocation 2023-08-05 14:22:05 +12:00
G.Ambatte
850b52d924 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-08-05 14:22:01 +12:00
Trevor Buckner
b2e7b28b65 Merge pull request #2945 from 5e-Cleric/TOC-generate-fix
exclude covers from TOC generation
2023-08-04 19:16:58 -04:00
Trevor Buckner
3efa7dd0be Merge pull request #2961 from Gazook89/Mobile-tweaks
Simple adjustments for mobile viewing
2023-08-04 16:42:08 -04:00
Trevor Buckner
677e27bb66 Merge pull request #2966 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.4.2
Bump mongoose from 7.4.1 to 7.4.2
2023-08-04 01:51:12 -04:00
Trevor Buckner
da71bd7a10 Merge pull request #2965 from G-Ambatte/reworkClassTables-#2964
Update class table generators
2023-08-04 01:41:02 -04:00
Trevor Buckner
0869f6b29b Just... put the whole table in. 2023-08-04 01:19:33 -04:00
Trevor Buckner
0da5de494e simplify third caster gen 2023-08-04 00:23:23 -04:00
Trevor Buckner
bc9dc8dee9 Clean up half caster gen. 2023-08-04 00:04:17 -04:00
Trevor Buckner
e3e250255e Simplify full caster gen 2023-08-03 23:39:17 -04:00
dependabot[bot]
787a23bdf8 Bump mongoose from 7.4.1 to 7.4.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.4.1 to 7.4.2.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.4.1...7.4.2)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 03:36:35 +00:00
Trevor Buckner
7aca0f2f10 Use dedent-tabs 2023-08-03 19:23:40 -04:00
Trevor Buckner
999f9c8f25 Rename passed in "classes" to "snippetClasses" for clarity 2023-08-03 17:22:30 -04:00
Trevor Buckner
ee4b2d549b Make CSS class order consistent on snippets 2023-08-03 17:20:38 -04:00
Trevor Buckner
3eb7ce2775 Clean up indentation 2023-08-03 17:16:26 -04:00
Trevor Buckner
4d4371f48c Compact features array 2023-08-03 17:15:14 -04:00
G.Ambatte
47666cc26d Merge branch 'master' into addEditorThemes-#362 2023-08-03 18:29:19 +12:00
G.Ambatte
e8352d996e Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-08-03 18:29:13 +12:00
G.Ambatte
e6f792900c Merge branch 'master' into experimentalSaveLocation 2023-08-03 18:28:39 +12:00
G.Ambatte
0ddeafd260 Merge branch 'master' into reworkClassTables-#2964 2023-08-02 21:40:22 +12:00
G.Ambatte
4cf54d6ae8 Update class table generators 2023-08-02 21:23:11 +12:00
Gazook89
8d3329069a remove logs 2023-08-01 14:16:31 -05:00
Gazook89
2e13eed2ef revert moving pointerMove & pointerUp, now on splitPane 2023-08-01 13:53:38 -05:00
Gazook89
310faa449d set editor font size to 16px on touchscreens
iOS requires minimum 16px font to prevent auto-zooming into input fields.
2023-08-01 13:29:57 -05:00
Trevor Buckner
8527a976a6 Merge pull request #2936 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.22.9
Bump @babel/core from 7.22.8 to 7.22.9
2023-08-01 11:27:53 -04:00
dependabot[bot]
54460c52f6 Bump @babel/core from 7.22.8 to 7.22.9
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.8 to 7.22.9.
- [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.22.9/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 15:26:55 +00:00
Trevor Buckner
e81bd2a0d2 Merge pull request #2960 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.33.1
Bump eslint-plugin-react from 7.33.0 to 7.33.1
2023-08-01 11:25:54 -04:00
Trevor Buckner
6c0daa1e4d Merge pull request #2935 from naturalcrit/dependabot/npm_and_yarn/babel/plugin-transform-runtime-7.22.9
Bump @babel/plugin-transform-runtime from 7.22.7 to 7.22.9
2023-08-01 11:25:47 -04:00
dependabot[bot]
25d03faae2 Bump eslint-plugin-react from 7.33.0 to 7.33.1
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.33.0 to 7.33.1.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.33.0...v7.33.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-01 15:22:58 +00:00
Trevor Buckner
378b2204da Merge pull request #2959 from naturalcrit/dependabot/npm_and_yarn/eslint-8.46.0
Bump eslint from 8.45.0 to 8.46.0
2023-08-01 11:21:38 -04:00
Trevor Buckner
447b0939f2 Merge pull request #2957 from naturalcrit/dependabot/npm_and_yarn/jest-29.6.2
Bump jest from 29.6.1 to 29.6.2
2023-08-01 11:21:26 -04:00
Gazook89
0bde336226 move all pointer events to divider, not splitPane 2023-07-31 22:20:27 -05:00
Gazook89
73e44b8d7a add touch-action css property to splitPane 2023-07-31 15:06:09 -05:00
dependabot[bot]
53fbaf87c2 Bump eslint from 8.45.0 to 8.46.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.45.0 to 8.46.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.45.0...v8.46.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 03:14:21 +00:00
Gazook89
a8db7353b0 preventDefaults on pointerEvents to prevent some default behavior. 2023-07-30 20:49:16 -05:00
Gazook89
bda8037cd6 change onMouse events to onPointer events for mobile use. 2023-07-30 20:12:16 -05:00
Gazook89
1f173814ec Add viewport meta tag for mobile view. 2023-07-30 19:40:39 -05:00
Gazook89
deb0e2f85b add meta viewport tag in header 2023-07-30 15:00:42 -05:00
dependabot[bot]
5425ae5d15 Bump jest from 29.6.1 to 29.6.2
Bumps [jest](https://github.com/facebook/jest/tree/HEAD/packages/jest) from 29.6.1 to 29.6.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.6.2/packages/jest)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-28 03:15:48 +00:00
G.Ambatte
f03f2c36de Merge branch 'master' into addEditorThemes-#362 2023-07-27 13:59:05 +12:00
G.Ambatte
a1e663bc32 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-07-27 13:58:01 +12:00
Trevor Buckner
16c842e08f Merge pull request #2939 from naturalcrit/dependabot/npm_and_yarn/eslint-8.45.0
Bump eslint from 8.44.0 to 8.45.0
2023-07-25 19:05:00 -04:00
Trevor Buckner
1c0edce6f6 Merge pull request #2941 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.14.2
Bump react-router-dom from 6.14.1 to 6.14.2
2023-07-25 19:04:47 -04:00
Trevor Buckner
8ec6e66c92 Merge pull request #2947 from naturalcrit/dependabot/npm_and_yarn/npm-9.8.1
Bump npm from 9.8.0 to 9.8.1
2023-07-25 19:04:37 -04:00
Trevor Buckner
330cdb35f4 Merge pull request #2948 from naturalcrit/dependabot/npm_and_yarn/stylelint-15.10.2
Bump stylelint from 15.10.1 to 15.10.2
2023-07-25 19:04:29 -04:00
Trevor Buckner
f93fbab754 Merge pull request #2950 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.33.0
Bump eslint-plugin-react from 7.32.2 to 7.33.0
2023-07-25 19:04:21 -04:00
Trevor Buckner
b9498e49fc Merge pull request #2952 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.4.1
Bump mongoose from 7.3.4 to 7.4.1
2023-07-25 19:04:09 -04:00
dependabot[bot]
4a434bb161 Bump mongoose from 7.3.4 to 7.4.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.3.4 to 7.4.1.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.3.4...7.4.1)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-25 03:49:00 +00:00
dependabot[bot]
a339cb036f Bump eslint-plugin-react from 7.32.2 to 7.33.0
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.32.2 to 7.33.0.
- [Release notes](https://github.com/jsx-eslint/eslint-plugin-react/releases)
- [Changelog](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jsx-eslint/eslint-plugin-react/compare/v7.32.2...v7.33.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-react
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-21 03:14:09 +00:00
dependabot[bot]
91eef51fb5 Bump stylelint from 15.10.1 to 15.10.2
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.10.1 to 15.10.2.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.10.1...15.10.2)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-20 03:52:49 +00:00
dependabot[bot]
46b050ae7d Bump npm from 9.8.0 to 9.8.1
Bumps [npm](https://github.com/npm/cli) from 9.8.0 to 9.8.1.
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v9.8.0...v9.8.1)

---
updated-dependencies:
- dependency-name: npm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-20 03:52:26 +00:00
Víctor Losada Hernández
b433691596 exclude covers from TOC generation 2023-07-19 21:38:14 +02:00
G.Ambatte
cef7f98176 Use existing makeActive function 2023-07-19 20:43:49 +12:00
G.Ambatte
b869d086ea Add default to New Page 2023-07-19 20:39:33 +12:00
G.Ambatte
64a361e06c Determine default state and set in local storage 2023-07-19 20:36:55 +12:00
G.Ambatte
9e7e646296 Add username to save key 2023-07-19 20:34:10 +12:00
G.Ambatte
7274d788c5 Clean up comments, change to actual G-Drive check 2023-07-19 19:39:07 +12:00
G.Ambatte
7942f1caed Initial functionality pass 2023-07-19 19:36:14 +12:00
G.Ambatte
343e176b83 Merge branch 'master' into addEditorThemes-#362 2023-07-19 17:19:44 +12:00
G.Ambatte
3db5959cfa Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-07-19 17:19:35 +12:00
dependabot[bot]
62f9781c8e Bump react-router-dom from 6.14.1 to 6.14.2
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.14.1 to 6.14.2.
- [Release notes](https://github.com/remix-run/react-router/releases)
- [Changelog](https://github.com/remix-run/react-router/blob/react-router-dom@6.14.2/packages/react-router-dom/CHANGELOG.md)
- [Commits](https://github.com/remix-run/react-router/commits/react-router-dom@6.14.2/packages/react-router-dom)

---
updated-dependencies:
- dependency-name: react-router-dom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 03:05:33 +00:00
dependabot[bot]
9d53002874 Bump eslint from 8.44.0 to 8.45.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.44.0 to 8.45.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.44.0...v8.45.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 03:48:12 +00:00
dependabot[bot]
4e7e6f8105 Bump @babel/plugin-transform-runtime from 7.22.7 to 7.22.9
Bumps [@babel/plugin-transform-runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-runtime) from 7.22.7 to 7.22.9.
- [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.22.9/packages/babel-plugin-transform-runtime)

---
updated-dependencies:
- dependency-name: "@babel/plugin-transform-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-17 03:25:35 +00:00
Trevor Buckner
cea1157eb2 Merge pull request #2934 from naturalcrit/dependabot/npm_and_yarn/mongoose-7.3.4
Bump mongoose from 7.3.2 to 7.3.4
2023-07-16 23:24:37 -04:00
Trevor Buckner
d535328eb8 Merge pull request #2938 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-jest-27.2.3
Bump eslint-plugin-jest from 27.2.2 to 27.2.3
2023-07-16 23:24:24 -04:00
Trevor Buckner
627e9ec7d8 Merge pull request #2937 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.22.9
Bump @babel/preset-env from 7.22.7 to 7.22.9
2023-07-16 23:24:17 -04:00
dependabot[bot]
ab9b5b7487 Bump eslint-plugin-jest from 27.2.2 to 27.2.3
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.2.2 to 27.2.3.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.2.2...v27.2.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-14 03:12:13 +00:00
dependabot[bot]
957a8bf05c Bump @babel/preset-env from 7.22.7 to 7.22.9
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.22.7 to 7.22.9.
- [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.22.9/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 03:43:52 +00:00
dependabot[bot]
509390ae03 Bump mongoose from 7.3.2 to 7.3.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.3.2 to 7.3.4.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/7.3.2...7.3.4)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 03:43:01 +00:00
G.Ambatte
d3a70c3d75 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-07-13 12:20:15 +12:00
G.Ambatte
1806854969 Add onMouseDown handler for Firefox functionality 2023-07-12 20:16:36 +12:00
G.Ambatte
c2570fec6b Merge branch 'master' into addEditorThemes-#362 2023-07-12 19:04:14 +12:00
G.Ambatte
cf3635bccc Merge branch 'master' into addEditorThemes-#362 2023-07-11 07:38:13 +12:00
G.Ambatte
7aa374e529 Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-07-08 19:07:55 +12:00
G.Ambatte
9cb8b46930 Merge branch 'master' into addEditorThemes-#362 2023-07-05 14:24:36 +12:00
G.Ambatte
467b6ff8de Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-07-05 14:24:27 +12:00
G.Ambatte
a41553637a Add trim to brew description 2023-06-29 16:43:30 +12:00
G.Ambatte
636f2f9372 Add title trim before new saves and updates 2023-06-29 16:35:26 +12:00
G.Ambatte
4ded080a58 Trim titles before alphabetical ListPage sorting 2023-06-29 16:30:06 +12:00
G.Ambatte
a5885c8f4f Merge branch 'master' into trimBrewTitlesOnUserPage-#2775 2023-06-29 13:26:48 +12:00
G.Ambatte
4cb2a9ef76 Merge branch 'master' into addEditorThemes-#362 2023-06-29 13:24:56 +12:00
G.Ambatte
661872f332 Merge branch 'master' into addEditorThemes-#362 2023-06-23 09:44:18 +12:00
Víctor Losada Hernández
dbb4476eb4 newline necessary 2023-06-22 23:32:26 +02:00
Víctor Losada Hernández
65f55dfc12 duplicated .page 2023-06-22 23:29:01 +02:00
Víctor Losada Hernández
95322595bf Merge branch 'master' of https://github.com/naturalcrit/homebrewery into FAQ-update 2023-06-22 23:18:44 +02:00
G.Ambatte
8c0ca988ae Trim brew.title on UserPage 2023-06-17 19:50:05 +12:00
G.Ambatte
e1a22ed76c Merge branch 'master' into addEditorThemes-#362 2023-06-14 08:39:18 +12:00
G.Ambatte
7e660aad45 Add styling for columnSplite and pageLine 2023-06-12 20:49:15 +12:00
G.Ambatte
c8df449aac Style custom blocks in editor on dark themes 2023-06-12 19:52:13 +12:00
G.Ambatte
7681be2e9c Merge branch 'master' into addEditorThemes-#362 2023-06-10 14:25:23 +12:00
G.Ambatte
455b364160 Merge branch 'master' into addEditorThemes-#362 2023-05-10 08:40:51 +12:00
G.Ambatte
56dbfc032c Merge branch 'master' into addEditorThemes-#362 2023-05-09 10:19:35 +12:00
Víctor Losada Hernández
38c20430a9 Merge branch 'master' of https://github.com/naturalcrit/homebrewery 2023-05-02 22:39:46 +02:00
Victor Losada Hernandez
86823b43b1 generated quotes, correct small caps 2023-04-23 15:53:35 +02:00
Victor Losada Hernandez
0abfb23ef2 first line difference phb vs dmg 2023-04-23 15:28:43 +02:00
Victor Losada Hernandez
da5d4236b6 initial styling 2023-04-23 15:21:48 +02:00
Victor Losada Hernandez
963236f961 tables within notes & drop caps 2023-04-23 15:11:29 +02:00
Victor Losada Hernandez
2d4a3ec910 landing page update 2023-04-22 15:30:22 +02:00
Victor Losada Hernandez
40afdf18d6 editor width bug q removed 2023-04-15 22:01:00 +02:00
Victor Losada Hernandez
13944d3a76 Log out question removed 2023-04-15 21:41:44 +02:00
G.Ambatte
3c168065ee Merge branch 'master' into addEditorThemes-#362 2023-04-16 07:13:39 +12:00
G.Ambatte
cf42520305 Merge branch 'master' into addEditorThemes-#362 2023-04-12 14:05:19 +12:00
G.Ambatte
d5ac237d40 Merge branch 'master' into addEditorThemes-#362 2023-04-05 12:24:56 +12:00
G.Ambatte
c666d6acb9 Merge branch 'master' into addEditorThemes-#362 2023-04-05 07:45:03 +12:00
G.Ambatte
2869726efd Merge branch 'master' into addEditorThemes-#362 2023-04-04 13:00:04 +12:00
G.Ambatte
ae9a29c28c Merge branch 'master' into addEditorThemes-#362 2023-04-02 17:59:36 +12:00
G.Ambatte
c660f87dff Load from & save to local storage 2023-04-02 17:57:11 +12:00
G.Ambatte
a86c728710 Remove obsolete styling 2023-04-02 16:53:41 +12:00
G.Ambatte
b28e183f95 Remove obsolete dev function 2023-04-02 16:53:30 +12:00
G.Ambatte
dc55880544 Initial theme selector functionality 2023-04-02 16:42:45 +12:00
G.Ambatte
5e9b451e29 Pass current editor theme to SnippetBar as prop 2023-04-02 16:17:50 +12:00
G.Ambatte
977cbeed43 Load available CM themes to global config 2023-04-02 15:17:44 +12:00
G.Ambatte
da6fcb297a Compile list of available themes during build 2023-04-02 15:17:30 +12:00
G.Ambatte
b2546d908a Shift CSS link to CodeEditor render 2023-04-02 13:19:43 +12:00
G.Ambatte
7dd1368c09 Add editorTheme to editor.jsx and downstream 2023-04-02 12:53:26 +12:00
G.Ambatte
51f657d2c5 Add CM Themes to build folder 2023-04-02 12:22:06 +12:00
Victor Losada Hernandez
3d71799469 Merge branch 'master' of https://github.com/naturalcrit/homebrewery 2023-02-07 13:16:06 +01:00
Victor Losada Hernandez
fe402bc211 Merge branch 'master' of https://github.com/naturalcrit/homebrewery 2023-02-04 16:29:34 +01:00
Victor Losada Hernandez
dc7e4cd192 Merge branch 'master' of https://github.com/naturalcrit/homebrewery 2023-01-31 15:53:10 +01:00
Victor Losada Hernandez
7fd7230e15 Merge branch 'master' of https://github.com/naturalcrit/homebrewery 2023-01-30 20:34:15 +01:00
85 changed files with 6953 additions and 7933 deletions

View File

@@ -5,12 +5,12 @@
version: 2.1
orbs:
node: circleci/node@3.0.0
node: circleci/node@5.1.0
jobs:
build:
docker:
- image: cimg/node:16.11.0
- image: cimg/node:20.8.0
- image: mongo:4.4
working_directory: ~/homebrewery
@@ -27,7 +27,7 @@ jobs:
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: sudo npm install -g npm@8.10.0
- run: sudo npm install -g npm@10.2.0
- node/install-packages:
app-dir: ~/homebrewery
cache-path: node_modules
@@ -45,7 +45,7 @@ jobs:
test:
docker:
- image: cimg/node:16.11.0
- image: cimg/node:20.8.0
working_directory: ~/homebrewery
parallelism: 1

View File

@@ -75,11 +75,351 @@ pre {
.page {
padding-bottom: 1.5cm;
}
.varSyntaxTable th:first-of-type {
width:6cm;
}
```
## changelog
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
### Monday 18/3/2024 - v3.12.0
{{taskList
##### 5e-Cleric
* [x] Fix language-specific hyphenation on print page
Fixes issue [#3294](https://github.com/naturalcrit/homebrewery/issues/3294)
* [x] Upgrade Font-Awesome to v6.51
* [x] Allow downloaded files to be uploaded via {{openSans **NEW {{fa,fa-plus-square}} → FROM UPLOAD {{fa,fa-upload}}**}}
##### G-Ambatte
* [x] Fix an edge case crash with empty documents
Fixes issue [#3315](https://github.com/naturalcrit/homebrewery/issues/3315)
* [x] Brews on the user page can be searched by tag; clicking a tag adds it to the filter
Fixes issue [#3164](https://github.com/naturalcrit/homebrewery/issues/3164)
* [x] Add *DiceFont* icons {{df,d20-20}} `{{df,icon-name}}`
##### abquintic
* [x] Fix ^super^ and ^^sub^^ highlighting in the text editor
* [x] Add new syntax for multiline Definition Lists:
```
Term
::Definition 1
::Definition 2
with more text
```
produces:
Term
::Definition 1
::Definition 2
with more text
Fixes issue [#2340](https://github.com/naturalcrit/homebrewery/issues/2340)
##### RKuerten :
* [x] Fix monster stat block backgrounds on print page
Fixes issue [#3275](https://github.com/naturalcrit/homebrewery/issues/3275)
* [x] Added new text editor theme: "Darkvision".
##### calculuschild, G-Ambatte, 5e-Cleric
* [x] Codebase and UI cleanup
}}
\page
### Friday 21/2/2024 - v3.11.0
{{taskList
##### Gazook89
* [x] Brew view count no longer increases when viewed by owner
Fixes issue [#3037](https://github.com/naturalcrit/homebrewery/issues/3037)
* [x] Small tweak to PHB H3 sizing
Fixes issue [#2989](https://github.com/naturalcrit/homebrewery/issues/2989)
* [x] Add **Fold/Unfold All** {{fas,fa-compress-alt}} / {{fas,fa-expand-alt}} buttons to editor bar
Fixes issue [#2965](https://github.com/naturalcrit/homebrewery/issues/2965)
##### G-Ambatte
* [x] Share link added to Editor Access error page
Fixes issue [#3086](https://github.com/naturalcrit/homebrewery/issues/3086)
* [x] Add Darkbrewery theme to Editor theme selector {{fas,fa-palette}}
Fixes issue [#3034](https://github.com/naturalcrit/homebrewery/issues/3034)
* [x] Fix Firefox prints with alternating blank pages
Fixes issue [#3115](https://github.com/naturalcrit/homebrewery/issues/3115)
* [x] Admin page working again
Fixes issue [#2657](https://github.com/naturalcrit/homebrewery/issues/2657)
##### 5e-Cleric
* [x] Fix indenting issue with Monster Blocks and italics in Class Feature
Fixes issues [#527](https://github.com/naturalcrit/homebrewery/issues/527),
[#3247](https://github.com/naturalcrit/homebrewery/issues/3247)
* [x] Allow CSS vars in curly syntax to be formatted as strings using single quotes
`{{--customVar:"'a string'"}}`
Fixes issue [#3066](https://github.com/naturalcrit/homebrewery/issues/3066)
* [x] Add *Elderberry Inn* icons {{ei,action}} `{{ei,icon-name}}`
Fixes issue [#3171](https://github.com/naturalcrit/homebrewery/issues/3171)
* [x] New {{openSans **{{fas,fa-keyboard}} FONTS** }} snippets!
Fixes issue [#3171](https://github.com/naturalcrit/homebrewery/issues/3171)
* [x] New page now opens in a new tab
##### abquintic (new contributor!)
* [x] Add ^super^ `^abc^` and ^^sub^^ `^^abc^^` syntax.
Fixes issue [#2171](https://github.com/naturalcrit/homebrewery/issues/2171)
* [x] Add HTML tag assignment to curly syntax `{{tag=value}}`
Fixes issue [1488](https://github.com/naturalcrit/homebrewery/issues/1488)
* [x] {{openSans **Brew → Clone to New**}} now clones tags
Fixes issue [1488](https://github.com/naturalcrit/homebrewery/issues/1488)
##### calculuschild
* [x] Better error messages for "Out of Google Drive Storage" and "Not logged in to edit"
Fixes issues [2510](https://github.com/naturalcrit/homebrewery/issues/2510),
[2975](https://github.com/naturalcrit/homebrewery/issues/2975)
* [x] Brew Variables
}}
\
{{wide
### Brew Variable Syntax
You may already be familiar with `[link](url)` and `![image](url)` synax. We have expanded this to include a third `$[variable](text)` syntax. All three of these syntaxes now share a common set of features:
{{varSyntaxTable
| syntax | description |
|:-------|-------------|
| `[var]:content` | Assigns a variable (must start on a line by itself, and ends at the next blank line) |
| `[var](content)` | Assigns a variable and outputs it (can be inline) |
| `[var]` | Outputs the variable contents as a link, if formatted as a valid link |
| `![var]` | Outputs as an image, if formatted as a valid image |
| `$[var]` | Outputs as Markdown |
| `$[var1 + var2 - 2 * var3]` | Performs math operations and outputs result if all variables are valid numbers |
}}
}}
{{wide,margin-top:0,margin-bottom:0
### Examples
}}
{{wide,columns:2,margin-top:0,margin-bottom:0
```
[first]: Bob
[last]: Jones
My name is $[first] $[last].
```
\column
[first]: Bob
[last]: Jones
My name is $[first] $[last].
}}
{{wide,columns:2,margin-top:0,margin-bottom:0
```
[myTable]:
| h1 | h2 |
|----|----|
| c1 | c2 |
Here is my table:
$[myTable]
```
\column
[myTable]:
| h1 | h2 |
|----|----|
| c1 | c2 |
Here is my table:
$[myTable]
}}
{{wide,columns:2,margin-top:0,margin-bottom:0
```
There are $[TableNum] tables total.
#### Table $[TableNum](1): Horses
#### Table $[TableNum]($[TableNum + 1]): Cows
```
\column
There are $[TableNum] tables in this document. *(note: final value of `$[TableNum]` gets hoisted up if available)*
#### Table $[TableNum](1): Horses
#### Table $[TableNum]($[TableNum + 1]): Cows
}}
\page
### Friday 13/10/2023 - v3.10.0
{{taskList
##### G-Ambatte
* [x] Fix user preferred save location being ignored
Fixes issue [#2993](https://github.com/naturalcrit/homebrewery/issues/2993)
* [x] Fix crash to white screen when starting new brews while not signed in
Fixes issue [#2999](https://github.com/naturalcrit/homebrewery/issues/2999)
* [x] Fix FreeBSD install script
Fixes issue [#3005](https://github.com/naturalcrit/homebrewery/issues/3005)
* [x] Fix *"This brew has been changed on another device"* triggering when manually saving during auto-save
Fixes issue [#2641](https://github.com/naturalcrit/homebrewery/issues/2641)
* [x] Fix Firefox different column-flow behavior
Fixes issue [#2982](https://github.com/naturalcrit/homebrewery/issues/2982)
* [x] Fix brew titles being mis-sorted on user page
Fixes issue [#2775](https://github.com/naturalcrit/homebrewery/issues/2775)
* [x] Text Editor themes now available via new drop-down
Fixes issue [#362](https://github.com/naturalcrit/homebrewery/issues/362)
##### 5e-Cleric
* [x] New {{openSans **PHB → {{fas,fa-quote-right}} QUOTE** }} snippet for V3!
Fixes issue [#2920](https://github.com/naturalcrit/homebrewery/issues/2920)
* [x] Several updates and fixes to FAQ and Welcome page
Fixes issue [#2729](https://github.com/naturalcrit/homebrewery/issues/2729),
[#2787](https://github.com/naturalcrit/homebrewery/issues/2787)
##### Gazook89
* [x] Add syntax highlighting for Definition Lists <code>:\:</code>
}}
### Thursday 17/08/2023 - v3.9.2
{{taskList
##### Calculuschild
* [x] Fix links to certain old Google Drive files
Fixes issue [#2917](https://github.com/naturalcrit/homebrewery/issues/2917)
##### G-Ambatte
* [x] Menus now open on click, and internally consistent
Fixes issue [#2702](https://github.com/naturalcrit/homebrewery/issues/2702), [#2782](https://github.com/naturalcrit/homebrewery/issues/2782)
* [x] Add smarter footer snippet
Fixes issue [#2289](https://github.com/naturalcrit/homebrewery/issues/2289)
* [x] Add sanitization in Style editor
Fixes issue [#1437](https://github.com/naturalcrit/homebrewery/issues/1437)
* [x] Rework class table snippets to remove unnecessary randomness
Fixes issue [#2964](https://github.com/naturalcrit/homebrewery/issues/2964)
* [x] Add User Page link to Google Drive file for file owners, add icons for additional storage locations
Fixes issue [#2954](https://github.com/naturalcrit/homebrewery/issues/2954)
* [x] Add default save location selection to Account Page
Fixes issue [#2943](https://github.com/naturalcrit/homebrewery/issues/2943)
##### 5e-Cleric
* [x] Exclude cover pages from Table of Content generation (editing on mobile is still not recommended)
Fixes issue [#2920](https://github.com/naturalcrit/homebrewery/issues/2920)
##### Gazook89
* [x] Adjustments to improve mobile viewing
}}
### Wednesday 28/06/2023 - v3.9.1
{{taskList
@@ -124,6 +464,8 @@ Fixes issue [#2790](https://github.com/naturalcrit/homebrewery/issues/2790)
Fixes issue [#2784](https://github.com/naturalcrit/homebrewery/issues/2784)
}}
\page
### Wednesday 12/04/2023 - v3.8.0
{{taskList
@@ -185,8 +527,6 @@ Fixes issues [#2731](https://github.com/naturalcrit/homebrewery/issues/2731)
}}
\page
### Monday 13/03/2023 - v3.7.2
{{taskList
@@ -267,7 +607,11 @@ Fixes issues [#2603](https://github.com/naturalcrit/homebrewery/issues/2603)
* [x] Add message to refresh the browser if the user is missing an update to the Homebrewery
Fixes issues [#2583](https://github.com/naturalcrit/homebrewery/issues/2583)
}}
\page
{{taskList
##### G-Ambatte
* [x] Auto-compile Themes CSS on development server
@@ -277,7 +621,6 @@ Fixes issues [#2583](https://github.com/naturalcrit/homebrewery/issues/2583)
* [x] Fix cloned brews inheriting the parent view count
}}
\page
### Friday 23/12/2022 - v3.5.0
{{taskList
@@ -1234,7 +1577,7 @@ myStyle {color: black}
### 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!
- The onboarding flow has also been confusing a few users (Homepage -> new -> save -> edit page). If you edit the Homepage text now, a Call to Action to save your work will pop-up.
- The onboarding flow has also been confusing a few users (Homepage new save edit page). If you edit the Homepage text now, a Call to Action to save your work will pop-up.
- Added a 'Recently Edited' and 'Recently Viewed' nav item to the edit and share page respectively. Each will remember the last 8 items you edited or viewed and when you viewed it. Makes use of the new title attribute of brews to easy navigatation.
- Paragraphs now indent properly after lists (thanks u/slitjen!)
@@ -1361,4 +1704,4 @@ 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
* Page accent now flips each page

View File

@@ -1,9 +1,8 @@
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
require('./brewRenderer.less');
const React = require('react');
const createClass = require('create-react-class');
const { useState, useRef, useEffect } = React;
const _ = require('lodash');
const cx = require('classnames');
const MarkdownLegacy = require('naturalcrit/markdownLegacy.js');
const Markdown = require('naturalcrit/markdown.js');
@@ -13,244 +12,226 @@ const ErrorBar = require('./errorBar/errorBar.jsx');
const RenderWarnings = require('homebrewery/renderWarnings/renderWarnings.jsx');
const NotificationPopup = require('./notificationPopup/notificationPopup.jsx');
const Frame = require('react-frame-component').default;
const dedent = require('dedent-tabs').default;
const Themes = require('themes/themes.json');
const PAGE_HEIGHT = 1056;
const PPR_THRESHOLD = 50;
const BrewRenderer = createClass({
displayName : 'BrewRenderer',
getDefaultProps : function() {
return {
text : '',
style : '',
renderer : 'legacy',
theme : '5ePHB',
lang : '',
errors : []
};
},
getInitialState : function() {
let pages;
if(this.props.renderer == 'legacy') {
pages = this.props.text.split('\\page');
} else {
pages = this.props.text.split(/^\\page$/gm);
}
const INITIAL_CONTENT = dedent`
<!DOCTYPE html><html><head>
<link href="//use.fontawesome.com/releases/v6.5.1/css/all.css" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700" rel="stylesheet" type="text/css" />
<link href='/homebrew/bundle.css' type="text/css" rel='stylesheet' />
<base target=_blank>
</head><body style='overflow: hidden'><div></div></body></html>`;
return {
viewablePageNumber : 0,
height : 0,
isMounted : false,
//v=====----------------------< Brew Page Component >---------------------=====v//
const BrewPage = (props)=>{
props = {
contents : '',
index : 0,
...props
};
return <div className={props.className} id={`p${props.index + 1}`} >
<div className='columnWrapper' dangerouslySetInnerHTML={{ __html: props.contents }} />
</div>;
};
pages : pages,
usePPR : pages.length >= PPR_THRESHOLD,
visibility : 'hidden',
initialContent : `<!DOCTYPE html><html><head>
<link href="//use.fontawesome.com/releases/v5.15.1/css/all.css" rel="stylesheet" />
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700" rel="stylesheet" type="text/css" />
<link href='/homebrew/bundle.css' rel='stylesheet' />
<base target=_blank>
</head><body style='overflow: hidden'><div></div></body></html>`
};
},
height : 0,
lastRender : <div></div>,
componentWillUnmount : function() {
window.removeEventListener('resize', this.updateSize);
},
//v=====--------------------< Brew Renderer Component >-------------------=====v//
const renderedPages = [];
let rawPages = [];
componentDidUpdate : function(prevProps) {
if(prevProps.text !== this.props.text) {
let pages;
if(this.props.renderer == 'legacy') {
pages = this.props.text.split('\\page');
} else {
pages = this.props.text.split(/^\\page$/gm);
}
this.setState({
pages : pages,
usePPR : pages.length >= PPR_THRESHOLD
});
}
},
const BrewRenderer = (props)=>{
props = {
text : '',
style : '',
renderer : 'legacy',
theme : '5ePHB',
lang : '',
errors : [],
currentEditorPage : 0,
...props
};
updateSize : function() {
this.setState({
height : this.refs.main.parentNode.clientHeight,
});
},
const [state, setState] = useState({
viewablePageNumber : 0,
height : PAGE_HEIGHT,
isMounted : false,
visibility : 'hidden',
});
handleScroll : function(e){
const target = e.target;
this.setState((prevState)=>({
viewablePageNumber : Math.floor(target.scrollTop / target.scrollHeight * prevState.pages.length)
const mainRef = useRef(null);
if(props.renderer == 'legacy') {
rawPages = props.text.split('\\page');
} else {
rawPages = props.text.split(/^\\page$/gm);
}
useEffect(()=>{ // Unmounting steps
return ()=>{window.removeEventListener('resize', updateSize);};
}, []);
const updateSize = ()=>{
setState((prevState)=>({
...prevState,
height : mainRef.current.parentNode.clientHeight,
}));
},
};
shouldRender : function(pageText, index){
if(!this.state.isMounted) return false;
const handleScroll = (e)=>{
const target = e.target;
setState((prevState)=>({
...prevState,
viewablePageNumber : Math.floor(target.scrollTop / target.scrollHeight * rawPages.length)
}));
};
const viewIndex = this.state.viewablePageNumber;
if(index == viewIndex - 3) return true;
if(index == viewIndex - 2) return true;
if(index == viewIndex - 1) return true;
if(index == viewIndex) return true;
if(index == viewIndex + 1) return true;
if(index == viewIndex + 2) return true;
if(index == viewIndex + 3) return true;
const isInView = (index)=>{
if(!state.isMounted)
return false;
//Check for style tages
if(pageText.indexOf('<style>') !== -1) return true;
if(index == props.currentEditorPage) //Already rendered before this step
return false;
if(Math.abs(index - state.viewablePageNumber) <= 3)
return true;
return false;
},
};
sanitizeScriptTags : function(content) {
const sanitizeScriptTags = (content)=>{
return content
.replace(/<script/ig, '&lt;script')
.replace(/<\/script>/ig, '&lt;/script&gt;');
},
?.replace(/<script/ig, '&lt;script')
.replace(/<\/script>/ig, '&lt;/script&gt;')
|| '';
};
renderPageInfo : function(){
return <div className='pageInfo' ref='main'>
const renderPageInfo = ()=>{
return <div className='pageInfo' ref={mainRef}>
<div>
{this.props.renderer}
{props.renderer}
</div>
<div>
{this.state.viewablePageNumber + 1} / {this.state.pages.length}
{state.viewablePageNumber + 1} / {rawPages.length}
</div>
</div>;
},
};
renderPPRmsg : function(){
if(!this.state.usePPR) return;
return <div className='ppr_msg'>
Partial Page Renderer is enabled, because your brew is so large. May affect rendering.
</div>;
},
renderDummyPage : function(index){
const renderDummyPage = (index)=>{
return <div className='phb page' id={`p${index + 1}`} key={index}>
<i className='fas fa-spinner fa-spin' />
</div>;
},
};
renderStyle : function() {
if(!this.props.style) return;
const cleanStyle = this.sanitizeScriptTags(this.props.style);
//return <div style={{ display: 'none' }} dangerouslySetInnerHTML={{ __html: `<style>@layer styleTab {\n${this.sanitizeScriptTags(this.props.style)}\n} </style>` }} />;
const renderStyle = ()=>{
if(!props.style) return;
const cleanStyle = sanitizeScriptTags(props.style);
//return <div style={{ display: 'none' }} dangerouslySetInnerHTML={{ __html: `<style>@layer styleTab {\n${sanitizeScriptTags(props.style)}\n} </style>` }} />;
return <div style={{ display: 'none' }} dangerouslySetInnerHTML={{ __html: `<style> ${cleanStyle} </style>` }} />;
},
};
renderPage : function(pageText, index){
const cleanPageText = this.sanitizeScriptTags(pageText);
if(this.props.renderer == 'legacy')
return <div className='phb page' id={`p${index + 1}`} dangerouslySetInnerHTML={{ __html: MarkdownLegacy.render(cleanPageText) }} key={index} />;
else {
pageText += `\n\n&nbsp;\n\\column\n&nbsp;`; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
return (
<div className='page' id={`p${index + 1}`} key={index} >
<div className='columnWrapper' dangerouslySetInnerHTML={{ __html: Markdown.render(cleanPageText) }} />
</div>
);
const renderPage = (pageText, index)=>{
let cleanPageText = sanitizeScriptTags(pageText);
if(props.renderer == 'legacy') {
const html = MarkdownLegacy.render(cleanPageText);
return <BrewPage className='page phb' index={index} key={index} contents={html} />;
} else {
cleanPageText += `\n\n&nbsp;\n\\column\n&nbsp;`; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
const html = Markdown.render(cleanPageText, index);
return <BrewPage className='page' index={index} key={index} contents={html} />;
}
},
};
renderPages : function(){
if(this.state.usePPR){
return _.map(this.state.pages, (page, index)=>{
if(this.shouldRender(page, index) && typeof window !== 'undefined'){
return this.renderPage(page, index);
} else {
return this.renderDummyPage(index);
}
});
}
if(this.props.errors && this.props.errors.length) return this.lastRender;
this.lastRender = _.map(this.state.pages, (page, index)=>{
if(typeof window !== 'undefined') {
return this.renderPage(page, index);
} else {
return this.renderDummyPage(index);
const renderPages = ()=>{
if(props.errors && props.errors.length)
return renderedPages;
if(rawPages.length != renderedPages.length) // Re-render all pages when page count changes
renderedPages.length = 0;
// Render currently-edited page first so cross-page effects (variables, links) can propagate out first
renderedPages[props.currentEditorPage] = renderPage(rawPages[props.currentEditorPage], props.currentEditorPage);
_.forEach(rawPages, (page, index)=>{
if((isInView(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
}
});
return this.lastRender;
},
return renderedPages;
};
frameDidMount : function(){ //This triggers when iFrame finishes internal "componentDidMount"
const frameDidMount = ()=>{ //This triggers when iFrame finishes internal "componentDidMount"
setTimeout(()=>{ //We still see a flicker where the style isn't applied yet, so wait 100ms before showing iFrame
this.updateSize();
window.addEventListener('resize', this.updateSize);
this.renderPages(); //Make sure page is renderable before showing
this.setState({
updateSize();
window.addEventListener('resize', updateSize);
renderPages(); //Make sure page is renderable before showing
setState((prevState)=>({
...prevState,
isMounted : true,
visibility : 'visible'
});
}));
}, 100);
},
};
emitClick : function(){
// console.log('iFrame clicked');
const emitClick = ()=>{ // Allow clicks inside iFrame to interact with dropdowns, etc. from outside
if(!window || !document) return;
document.dispatchEvent(new MouseEvent('click'));
},
};
render : function(){
//render in iFrame so broken code doesn't crash the site.
//Also render dummy page while iframe is mounting.
const rendererPath = this.props.renderer == 'V3' ? 'V3' : 'Legacy';
const themePath = this.props.theme ?? '5ePHB';
const baseThemePath = Themes[rendererPath][themePath].baseTheme;
return (
<React.Fragment>
{!this.state.isMounted
? <div className='brewRenderer' onScroll={this.handleScroll}>
<div className='pages' ref='pages'>
{this.renderDummyPage(1)}
</div>
const rendererPath = props.renderer == 'V3' ? 'V3' : 'Legacy';
const themePath = props.theme ?? '5ePHB';
const baseThemePath = Themes[rendererPath][themePath].baseTheme;
return (
<>
{/*render dummy page while iFrame is mounting.*/}
{!state.isMounted
? <div className='brewRenderer' onScroll={handleScroll}>
<div className='pages'>
{renderDummyPage(1)}
</div>
: null}
</div>
: null}
<Frame id='BrewRenderer' initialContent={this.state.initialContent}
style={{ width: '100%', height: '100%', visibility: this.state.visibility }}
contentDidMount={this.frameDidMount}
onClick={()=>{this.emitClick();}}
>
<div className={'brewRenderer'}
onScroll={this.handleScroll}
style={{ height: this.state.height }}>
{/*render in iFrame so broken code doesn't crash the site.*/}
<Frame id='BrewRenderer' initialContent={INITIAL_CONTENT}
style={{ width: '100%', height: '100%', visibility: state.visibility }}
contentDidMount={frameDidMount}
onClick={()=>{emitClick();}}
>
<div className={'brewRenderer'}
onScroll={handleScroll}
style={{ height: state.height }}>
<ErrorBar errors={this.props.errors} />
<div className='popups'>
<RenderWarnings />
<NotificationPopup />
</div>
<link href={`/themes/${rendererPath}/Blank/style.css`} rel='stylesheet'/>
{baseThemePath &&
<link href={`/themes/${rendererPath}/${baseThemePath}/style.css`} rel='stylesheet'/>
}
<link href={`/themes/${rendererPath}/${themePath}/style.css`} rel='stylesheet'/>
{/* Apply CSS from Style tab and render pages from Markdown tab */}
{this.state.isMounted
&&
<>
{this.renderStyle()}
<div className='pages' ref='pages' lang={`${this.props.lang || 'en'}`}>
{this.renderPages()}
</div>
</>
}
<ErrorBar errors={props.errors} />
<div className='popups'>
<RenderWarnings />
<NotificationPopup />
</div>
</Frame>
{this.renderPageInfo()}
{this.renderPPRmsg()}
</React.Fragment>
);
}
});
<link href={`/themes/${rendererPath}/Blank/style.css`} type="text/css" rel='stylesheet'/>
{baseThemePath &&
<link href={`/themes/${rendererPath}/${baseThemePath}/style.css`} type="text/css" rel='stylesheet'/>
}
<link href={`/themes/${rendererPath}/${themePath}/style.css`} type="text/css" rel='stylesheet'/>
{/* Apply CSS from Style tab and render pages from Markdown tab */}
{state.isMounted
&&
<>
{renderStyle()}
<div className='pages' lang={`${props.lang || 'en'}`}>
{renderPages()}
</div>
</>
}
</div>
</Frame>
{renderPageInfo()}
</>
);
};
module.exports = BrewRenderer;

View File

@@ -1,46 +1,44 @@
@import (multiple, less) 'shared/naturalcrit/styles/reset.less';
.brewRenderer{
.brewRenderer {
will-change : transform;
overflow-y : scroll;
.pages{
:where(.pages) {
margin : 30px 0px;
&>.page{
& > :where(.page) {
width : 215.9mm;
height : 279.4mm;
margin-right : auto;
margin-bottom : 30px;
margin-left : auto;
box-shadow : 1px 4px 14px #000;
box-shadow : 1px 4px 14px #000000;
}
}
}
.pane{
position : relative;
}
.pageInfo{
.pane { position : relative; }
.pageInfo {
position : absolute;
right : 17px;
bottom : 0;
z-index : 1000;
background-color : #333;
font-size : 10px;
font-weight : 800;
color : white;
background-color : #333333;
div {
display: inline-block;
display : inline-block;
padding : 8px 10px;
&:not(:last-child){
border-right: 1px solid #666;
}
&:not(:last-child) { border-right : 1px solid #666666; }
}
}
.ppr_msg{
.ppr_msg {
position : absolute;
left : 0px;
bottom : 0;
left : 0px;
z-index : 1000;
padding : 8px 10px;
background-color : #333;
font-size : 10px;
font-weight : 800;
color : white;
background-color : #333333;
}

View File

@@ -25,13 +25,10 @@ const NotificationPopup = createClass({
return (
<>
<li key='psa'>
<em>Broken default logo on <b>CoverPage</b> </em> <br />
If you have used the Cover Page snippet and notice the Naturalcrit
logo is showing as a broken image, this is due to some small tweaks
of this BETA feature. To fix the logo in your cover page, rename
the image link <b>"/assets/naturalCritLogoRed.svg"</b>. Remember
that any snippet marked "BETA" may have a similar change in the
future as we encounter any bugs or reworks.
<em>Don't store IMAGES in Google Drive</em><br />
Google Drive is not an image service, and will block images from being used
in brews if they get more views than expected. Google has confirmed they won't fix
this, so we recommend you look for another image hosting service such as imgur, ImgBB or Google Photos.
</li>
<li key='googleDriveFolder'>

View File

@@ -10,6 +10,8 @@ const CodeEditor = require('naturalcrit/codeEditor/codeEditor.jsx');
const SnippetBar = require('./snippetbar/snippetbar.jsx');
const MetadataEditor = require('./metadataEditor/metadataEditor.jsx');
const EDITOR_THEME_KEY = 'HOMEBREWERY-EDITOR-THEME';
const SNIPPETBAR_HEIGHT = 25;
const DEFAULT_STYLE_TEXT = dedent`
/*=======--- Example CSS styling ---=======*/
@@ -34,12 +36,14 @@ const Editor = createClass({
onMetaChange : ()=>{},
reportError : ()=>{},
renderer : 'legacy'
editorTheme : 'default',
renderer : 'legacy'
};
},
getInitialState : function() {
return {
view : 'text' //'text', 'style', 'meta'
editorTheme : this.props.editorTheme,
view : 'text' //'text', 'style', 'meta'
};
},
@@ -51,6 +55,13 @@ const Editor = createClass({
this.updateEditorSize();
this.highlightCustomMarkdown();
window.addEventListener('resize', this.updateEditorSize);
const editorTheme = window.localStorage.getItem(EDITOR_THEME_KEY);
if(editorTheme) {
this.setState({
editorTheme : editorTheme
});
}
},
componentWillUnmount : function() {
@@ -138,9 +149,45 @@ const Editor = createClass({
codeMirror.addLineClass(lineNumber, 'text', 'columnSplit');
}
// definition lists
if(line.includes('::')){
if(/^:*$/.test(line) == true){ return };
const regex = /^([^\n]*?:?\s?)(::[^\n]*)(?:\n|$)/ymd; // the `d` flag, for match indices, throws an ESLint error.
let match;
while ((match = regex.exec(line)) != null){
codeMirror.markText({ line: lineNumber, ch: match.indices[0][0] }, { line: lineNumber, ch: match.indices[0][1] }, { className: 'dl-highlight' });
codeMirror.markText({ line: lineNumber, ch: match.indices[1][0] }, { line: lineNumber, ch: match.indices[1][1] }, { className: 'dt-highlight' });
codeMirror.markText({ line: lineNumber, ch: match.indices[2][0] }, { line: lineNumber, ch: match.indices[2][1] }, { className: 'dd-highlight' });
const ddIndex = match.indices[2][0];
let colons = /::/g;
let colonMatches = colons.exec(match[2]);
if(colonMatches !== null){
codeMirror.markText({ line: lineNumber, ch: colonMatches.index + ddIndex }, { line: lineNumber, ch: colonMatches.index + colonMatches[0].length + ddIndex }, { className: 'dl-colon-highlight'} )
}
}
}
// Subscript & Superscript
if(line.includes('^')) {
let startIndex = line.indexOf('^');
const superRegex = /\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/gy;
const subRegex = /\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/gy;
while (startIndex >= 0) {
superRegex.lastIndex = subRegex.lastIndex = startIndex;
let isSuper = false;
let match = subRegex.exec(line) || superRegex.exec(line);
if (match) {
isSuper = !subRegex.lastIndex;
codeMirror.markText({ line: lineNumber, ch: match.index }, { line: lineNumber, ch: match.index + match[0].length }, { className: isSuper ? 'superscript' : 'subscript' });
}
startIndex = line.indexOf('^', Math.max(startIndex + 1, subRegex.lastIndex, superRegex.lastIndex));
}
}
// Highlight injectors {style}
if(line.includes('{') && line.includes('}')){
const regex = /(?:^|[^{\n])({(?=((?::(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*)*))\2})/gm;
const regex = /(?:^|[^{\n])({(?=((?:[:=](?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':={}\s]*)*))\2})/gm;
let match;
while ((match = regex.exec(line)) != null) {
codeMirror.markText({ line: lineNumber, ch: line.indexOf(match[1]) }, { line: lineNumber, ch: line.indexOf(match[1]) + match[1].length }, { className: 'injection' });
@@ -148,7 +195,7 @@ const Editor = createClass({
}
// Highlight inline spans {{content}}
if(line.includes('{{') && line.includes('}}')){
const regex = /{{(?=((?::(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*)*))\1 *|}}/g;
const regex = /{{(?=((?:[:=](?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':={}\s]*)*))\1 *|}}/g;
let match;
let blockCount = 0;
while ((match = regex.exec(line)) != null) {
@@ -167,7 +214,7 @@ const Editor = createClass({
// Highlight block divs {{\n Content \n}}
let endCh = line.length+1;
const match = line.match(/^ *{{(?=((?::(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*)*))\1 *$|^ *}}$/);
const match = line.match(/^ *{{(?=((?:[:=](?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':={}\s]*)*))\1 *$|^ *}}$/);
if(match)
endCh = match.index+match[0].length;
codeMirror.markText({ line: lineNumber, ch: 0 }, { line: lineNumber, ch: endCh }, { className: 'block' });
@@ -255,6 +302,13 @@ const Editor = createClass({
this.refs.codeEditor?.updateSize();
},
updateEditorTheme : function(newTheme){
window.localStorage.setItem(EDITOR_THEME_KEY, newTheme);
this.setState({
editorTheme : newTheme
});
},
//Called by CodeEditor after document switch, so Snippetbar can refresh UndoHistory
rerenderParent : function (){
this.forceUpdate();
@@ -269,7 +323,8 @@ const Editor = createClass({
view={this.state.view}
value={this.props.brew.text}
onChange={this.props.onTextChange}
rerenderParent={this.rerenderParent}/>
editorTheme={this.state.editorTheme}
rerenderParent={this.rerenderParent} />
</>;
}
if(this.isStyle()){
@@ -281,6 +336,7 @@ const Editor = createClass({
value={this.props.brew.style ?? DEFAULT_STYLE_TEXT}
onChange={this.props.onStyleChange}
enableFolding={false}
editorTheme={this.state.editorTheme}
rerenderParent={this.rerenderParent} />
</>;
}
@@ -310,6 +366,14 @@ const Editor = createClass({
return this.refs.codeEditor?.undo();
},
foldCode : function(){
return this.refs.codeEditor?.foldAllCode();
},
unfoldCode : function(){
return this.refs.codeEditor?.unfoldAllCode();
},
render : function(){
return (
<div className='editor' ref='main'>
@@ -323,7 +387,11 @@ const Editor = createClass({
theme={this.props.brew.theme}
undo={this.undo}
redo={this.redo}
foldCode={this.foldCode}
unfoldCode={this.unfoldCode}
historySize={this.historySize()}
currentEditorTheme={this.state.editorTheme}
updateEditorTheme={this.updateEditorTheme}
cursorPos={this.refs.codeEditor?.getCursorPosition() || {}} />
{this.renderEditor()}

View File

@@ -1,65 +1,95 @@
.editor{
@import 'themes/codeMirror/customEditorStyles.less';
.editor {
position : relative;
width : 100%;
.codeEditor{
.codeEditor {
height : 100%;
.pageLine{
.pageLine {
background : #33333328;
border-top : #339 solid 1px;
border-top : #333399 solid 1px;
}
.editor-page-count{
color : grey;
.editor-page-count {
float : right;
color : grey;
}
.columnSplit{
font-style : italic;
color : grey;
background-color : fade(#299, 15%);
border-bottom : #299 solid 1px;
.columnSplit {
font-style : italic;
color : grey;
background-color : fade(#229999, 15%);
border-bottom : #229999 solid 1px;
}
.block:not(.cm-comment){
color : purple;
.define {
&:not(.term):not(.definition) {
font-weight : bold;
color : #949494;
background : #E5E5E5;
border-radius : 3px;
}
&.term { color : rgb(96, 117, 143); }
&.definition { color : rgb(97, 57, 178); }
}
.block:not(.cm-comment) {
font-weight : bold;
color : purple;
//font-style: italic;
}
.inline-block:not(.cm-comment){
color : red;
.inline-block:not(.cm-comment) {
font-weight : bold;
color : red;
//font-style: italic;
}
.injection:not(.cm-comment){
.injection:not(.cm-comment) {
font-weight : bold;
color : green;
font-weight : bold;
}
.superscript:not(.cm-comment) {
font-weight : bold;
color : goldenrod;
vertical-align : super;
font-size : 0.9em;
}
.subscript:not(.cm-comment) {
font-weight : bold;
color : rgb(123, 123, 15);
vertical-align : sub;
font-size : 0.9em;
}
.dl-highlight {
&.dl-colon-highlight {
font-weight : bold;
color : #949494;
background : #E5E5E5;
border-radius : 3px;
}
&.dt-highlight { color : rgb(96, 117, 143); }
&.dd-highlight { color : rgb(97, 57, 178); }
}
}
.brewJump{
position : absolute;
background-color : @teal;
cursor : pointer;
width : 30px;
height : 30px;
display : flex;
align-items : center;
bottom : 20px;
right : 20px;
z-index : 1000000;
justify-content : center;
.tooltipLeft("Jump to brew page");
.brewJump {
position : absolute;
right : 20px;
bottom : 20px;
z-index : 1000000;
display : flex;
align-items : center;
justify-content : center;
width : 30px;
height : 30px;
cursor : pointer;
background-color : @teal;
.tooltipLeft('Jump to brew page');
}
.editorToolbar{
position: absolute;
top: 5px;
left: 50%;
color: black;
font-size: 13px;
z-index: 9;
span {
padding: 2px 5px;
}
.editorToolbar {
position : absolute;
top : 5px;
left : 50%;
z-index : 9;
font-size : 13px;
color : black;
span { padding : 2px 5px; }
}
}

View File

@@ -2,7 +2,7 @@
.metadataEditor{
position : absolute;
z-index : 10000;
z-index : 5;
box-sizing : border-box;
width : 100%;
padding : 25px;

View File

@@ -1,3 +1,4 @@
/*eslint max-lines: ["warn", {"max": 250, "skipBlankLines": true, "skipComments": true}]*/
require('./snippetbar.less');
const React = require('react');
const createClass = require('create-react-class');
@@ -15,6 +16,8 @@ ThemeSnippets['V3_5eDMG'] = require('themes/V3/5eDMG/snippets.js');
ThemeSnippets['V3_Journal'] = require('themes/V3/Journal/snippets.js');
ThemeSnippets['V3_Blank'] = require('themes/V3/Blank/snippets.js');
const EditorThemes = require('build/homebrew/codeMirror/editorThemes.json');
const execute = function(val, props){
if(_.isFunction(val)) return val(props);
return val;
@@ -24,24 +27,28 @@ const Snippetbar = createClass({
displayName : 'SnippetBar',
getDefaultProps : function() {
return {
brew : {},
view : 'text',
onViewChange : ()=>{},
onInject : ()=>{},
onToggle : ()=>{},
showEditButtons : true,
renderer : 'legacy',
undo : ()=>{},
redo : ()=>{},
historySize : ()=>{},
cursorPos : {}
brew : {},
view : 'text',
onViewChange : ()=>{},
onInject : ()=>{},
onToggle : ()=>{},
showEditButtons : true,
renderer : 'legacy',
undo : ()=>{},
redo : ()=>{},
historySize : ()=>{},
foldCode : ()=>{},
unfoldCode : ()=>{},
updateEditorTheme : ()=>{},
cursorPos : {}
};
},
getInitialState : function() {
return {
renderer : this.props.renderer,
snippets : []
renderer : this.props.renderer,
themeSelector : false,
snippets : []
};
},
@@ -67,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
@@ -95,6 +103,33 @@ const Snippetbar = createClass({
this.props.onInject(injectedText);
},
toggleThemeSelector : function(e){
if(e.target.tagName != 'SELECT'){
this.setState({
themeSelector : !this.state.themeSelector
});
}
},
changeTheme : function(e){
if(e.target.value == this.props.currentEditorTheme) return;
this.props.updateEditorTheme(e.target.value);
this.setState({
showThemeSelector : false,
});
},
renderThemeSelector : function(){
return <div className='themeSelector'>
<select value={this.props.currentEditorTheme} onChange={this.changeTheme} >
{EditorThemes.map((theme, key)=>{
return <option key={key} value={theme}>{theme}</option>;
})}
</select>
</div>;
},
renderSnippetGroups : function(){
const snippets = this.state.snippets.filter((snippetGroup)=>snippetGroup.view === this.props.view);
@@ -114,6 +149,22 @@ const Snippetbar = createClass({
renderEditorButtons : function(){
if(!this.props.showEditButtons) return;
let foldButtons;
if(this.props.view == 'text'){
foldButtons =
<>
<div className={`editorTool foldAll ${this.props.foldCode ? 'active' : ''}`}
onClick={this.props.foldCode} >
<i className='fas fa-compress-alt' />
</div>
<div className={`editorTool unfoldAll ${this.props.unfoldCode ? 'active' : ''}`}
onClick={this.props.unfoldCode} >
<i className='fas fa-expand-alt' />
</div>
</>
}
return <div className='editors'>
<div className={`editorTool undo ${this.props.historySize.undo ? 'active' : ''}`}
onClick={this.props.undo} >
@@ -123,6 +174,14 @@ const Snippetbar = createClass({
onClick={this.props.redo} >
<i className='fas fa-redo' />
</div>
<div className='divider'></div>
{foldButtons}
<div className={`editorTool editorTheme ${this.state.themeSelector ? 'active' : ''}`}
onClick={this.toggleThemeSelector} >
<i className='fas fa-palette' />
{this.state.themeSelector && this.renderThemeSelector()}
</div>
<div className='divider'></div>
<div className={cx('text', { selected: this.props.view === 'text' })}
onClick={()=>this.props.onViewChange('text')}>
@@ -173,7 +232,7 @@ const SnippetGroup = createClass({
return _.map(snippets, (snippet)=>{
return <div className='snippet' key={snippet.name} onClick={(e)=>this.handleSnippetClick(e, snippet)}>
<i className={snippet.icon} />
<span className='name'>{snippet.name}</span>
<span className='name'title={snippet.name}>{snippet.name}</span>
{snippet.experimental && <span className='beta'>beta</span>}
{snippet.subsnippets && <>
<i className='fas fa-caret-right'></i>
@@ -196,5 +255,4 @@ const SnippetGroup = createClass({
</div>
</div>;
},
});

View File

@@ -1,144 +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;
.editors{
color : black;
background-color : #DDDDDD;
.editors {
position : absolute;
display : flex;
top : 0px;
right : 0px;
height : @menuHeight;
width : 125px;
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 : black;
}
&.active { color : inherit; }
}
&.redo{
&.redo {
.tooltipLeft('Redo');
font-size : 0.75em;
color : grey;
&.active{
color : black;
&.active { color : inherit; }
}
&.foldAll {
.tooltipLeft('Fold All');
font-size : 0.75em;
color : inherit;
}
&.unfoldAll {
.tooltipLeft('Unfold All');
font-size : 0.75em;
color : inherit;
}
&.editorTheme {
.tooltipLeft('Editor Themes');
font-size : 0.75em;
color : black;
&.active {
position : relative;
background-color : #999999;
}
}
&.divider {
background: linear-gradient(#000, #000) 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;
top : 25px;
right : 0;
z-index : 10;
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{
border-right : 1px solid black;
&:hover{
&>.dropdown{
visibility : visible;
}
.snippetGroup {
border-right : 1px solid currentColor;
&: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;
}
}
}
}
}
}
}
}

View File

@@ -21,10 +21,11 @@ const ErrorNavItem = createClass({
this.props.parent.setState(state);
};
const error = this.props.error;
const response = error.response;
const status = response.status;
const message = response.body?.message;
const error = this.props.error;
const response = error.response;
const status = response.status;
const HBErrorCode = response.body?.HBErrorCode;
const message = response.body?.message;
let errMsg = '';
try {
errMsg += `${error.toString()}\n\n`;
@@ -40,7 +41,9 @@ const ErrorNavItem = createClass({
{message ?? 'Conflict: please refresh to get latest changes'}
</div>
</Nav.item>;
} else if(status === 412) {
}
if(status === 412) {
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
Oops!
<div className='errorContainer' onClick={clearError}>
@@ -48,6 +51,36 @@ const ErrorNavItem = createClass({
</div>
</Nav.item>;
}
if(HBErrorCode === '04') {
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
Oops!
<div className='errorContainer' onClick={clearError}>
You are no longer signed in as an author of
this brew! Were you signed out from a different
window? Visit our log in page, then try again!
<br></br>
<a target='_blank' rel='noopener noreferrer'
href={`https://www.naturalcrit.com/login?redirect=${window.location.href}`}>
<div className='confirm'>
Sign In
</div>
</a>
<div className='deny'>
Not Now
</div>
</div>
</Nav.item>;
}
if(response.body?.errors?.[0].reason == 'storageQuotaExceeded') {
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
Oops!
<div className='errorContainer' onClick={clearError}>
Can't save because your Google Drive seems to be full!
</div>
</Nav.item>;
}
if(response.req.url.match(/^\/api.*Google.*$/m)){
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
@@ -57,6 +90,7 @@ const ErrorNavItem = createClass({
expired! Visit our log in page to sign out
and sign back in with Google,
then try saving again!
<br></br>
<a target='_blank' rel='noopener noreferrer'
href={`https://www.naturalcrit.com/login?redirect=${window.location.href}`}>
<div className='confirm'>

View File

@@ -1,272 +1,351 @@
@import "naturalcrit/styles/colors.less";
@navbarHeight : 28px;
@keyframes pinkColoring {
0% {color : pink;}
50% {color : pink;}
75% {color : red;}
100% {color : pink;}
}
.homebrew nav {
.homebrewLogo {
.animate(color);
font-family : CodeBold;
font-size : 12px;
color : white;
div {
margin-top : 2px;
margin-bottom : -2px;
}
&:hover {
color : @blue;
}
}
.editTitle.navItem {
padding : 2px 12px;
input {
font-family : "Open Sans", sans-serif;
font-size : 12px;
font-weight : 800;
width : 250px;
margin : 0;
padding : 2px;
text-align : center;
color : white;
border : 1px solid @blue;
outline : none;
background-color : transparent;
}
.charCount {
display : inline-block;
margin-left : 8px;
text-align : right;
vertical-align : bottom;
color : #666;
&.max {
color : @red;
}
}
}
.brewTitle.navItem {
font-size : 12px;
font-weight : 800;
height : 100%;
text-align : center;
text-transform : initial;
color : white;
background-color : transparent;
flex-grow : 1;
}
.save-menu {
.dropdown {
z-index : 1000;
}
.navItem i.fa-power-off {
color : red;
&.active {
color : rgb(0, 182, 52);
filter : drop-shadow(0 0 2px rgba(0, 182, 52, 0.765));
}
}
}
.patreon.navItem {
border-right : 1px solid #666;
border-left : 1px solid #666;
&:hover i {
color : red;
}
i {
.animate(color);
animation-name : pinkColoring;
animation-duration : 2s;
color : pink;
}
}
.recent.navDropdownContainer {
position : relative;
.navDropdown .navItem {
overflow : hidden auto;
max-height : ~"calc(100vh - 28px)";
scrollbar-color : #666 #333;
scrollbar-width : thin;
@import 'naturalcrit/styles/colors.less';
#backgroundColorsHover;
.animate(background-color);
position : relative;
display : block;
overflow : clip;
box-sizing : border-box;
padding : 8px 5px 13px;
text-decoration : none;
color : white;
border-top : 1px solid #888;
background-color : #333;
.clear {
position : absolute;
top : 50%;
right : 0;
display : none;
width : 20px;
height : 100%;
transform : translateY(-50%);
opacity : 70%;
border-radius : 3px;
background-color : #333;
&:hover {
opacity : 100%;
}
i {
font-size : 10px;
width : 100%;
height : 100%;
margin : 0;
text-align : center;
}
}
&:hover {
background-color : @blue;
.clear {
display : grid;
place-content : center;
}
}
.title {
display : inline-block;
overflow : hidden;
width : 100%;
white-space : nowrap;
text-overflow : ellipsis;
}
.time {
font-size : 0.7em;
position : absolute;
right : 2px;
bottom : 2px;
color : #888;
}
&.header {
display : block;
box-sizing : border-box;
padding : 5px 0;
text-align : center;
color : #BBB;
border-top : 1px solid #888;
background-color : #333;
&:nth-of-type(1) {
background-color : darken(@teal, 20%);
}
&:nth-of-type(2) {
background-color : darken(@purple, 30%);
}
}
}
@navbarHeight : 28px;
@keyframes pinkColoring {
0% { color : pink; }
50% { color : pink; }
75% { color : red; }
100% { color : pink; }
}
@keyframes glideDropDown {
0% {
background-color : #333333;
opacity : 0;
transform : translate(0px, -100%);
}
.metadata.navItem {
position : relative;
100% {
background-color : #333333;
opacity : 1;
transform : translate(0px, 0px);
}
}
.homebrew nav {
background-color : #333333;
.navContent {
position : relative;
z-index : 2;
display : flex;
justify-content : space-between;
}
.navSection {
display : flex;
align-items : center;
height : 100%;
padding : 0;
flex-grow : 1;
i {
margin-right : 10px;
&:last-child .navItem { border-left : 1px solid #666666; }
}
// "NaturalCrit" logo
.navLogo {
display : block;
margin-top : 0px;
margin-right : 8px;
margin-left : 8px;
color : white;
text-decoration : none;
&:hover {
.name { color : @orange; }
svg { fill : @orange; }
}
.window {
position : absolute;
z-index : -1;
bottom : 0;
left : 50%;
display : flex;
justify-content : flex-start;
width : 440px;
max-height : ~"calc(100vh - 28px)";
margin : 0 auto;
padding : 0 10px 5px;
transition : transform 0.4s, opacity 0.4s;
border : 3px solid #444;
border-top : unset;
border-radius : 0 0 5px 5px;
background-color : #333;
box-shadow : inset 0 7px 9px -7px #111;
flex-flow : row wrap;
align-content : baseline;
&.active {
transform : translateX(-50%) translateY(100%);
opacity : 1;
svg {
height : 13px;
margin-right : 0.2em;
cursor : pointer;
fill : white;
}
span.name {
font-family : 'CodeLight';
font-size : 15px;
span.crit { font-family : 'CodeBold'; }
small {
font-family : 'Open Sans';
font-size : 0.3em;
font-weight : 800;
text-transform : uppercase;
}
&.inactive {
transform : translateX(-50%) translateY(0%);
opacity : 0;
}
}
.navItem {
#backgroundColorsHover;
.animate(background-color);
padding : 8px 12px;
font-size : 10px;
font-weight : 800;
line-height : 13px;
color : white;
text-decoration : none;
text-transform : uppercase;
cursor : pointer;
background-color : #333333;
i {
float : right;
margin-left : 5px;
font-size : 13px;
}
&.patreon {
border-right : 1px solid #666666;
border-left : 1px solid #666666;
&:hover i { color : red; }
i {
color : pink;
.animate(color);
animation-name : pinkColoring;
animation-duration : 2s;
}
.row {
display : flex;
width : 100%;
flex-flow : row wrap;
h4 {
display : block;
box-sizing : border-box;
min-width : 76px;
padding : 5px 0;
text-align : center;
color : #BBB;
flex-basis : 20%;
flex-grow : 1;
}
&.editTitle { // this is not needed at all currently - you used to be able to edit the title via the navbar.
padding : 2px 12px;
input {
width : 250px;
padding : 2px;
margin : 0;
font-family : 'Open Sans', sans-serif;
font-size : 12px;
font-weight : 800;
color : white;
text-align : center;
background-color : transparent;
border : 1px solid @blue;
outline : none;
}
.charCount {
display : inline-block;
margin-left : 8px;
color : #666666;
text-align : right;
vertical-align : bottom;
&.max { color : @red; }
}
}
&.brewTitle {
flex-grow : 1;
font-size : 12px;
font-weight : 800;
color : white;
text-align : center;
text-transform : initial;
background-color : transparent;
}
// "The Homebrewery" logo
&.homebrewLogo {
.animate(color);
font-family : 'CodeBold';
font-size : 12px;
color : white;
div {
margin-top : 2px;
margin-bottom : -2px;
}
&:hover { color : @blue; }
}
&.metadata {
position : relative;
display : flex;
flex-grow : 1;
align-items : center;
height : 100%;
padding : 0;
i { margin-right : 10px;}
.window {
position : absolute;
bottom : 0;
left : 50%;
z-index : -1;
display : flex;
flex-flow : row wrap;
align-content : baseline;
justify-content : flex-start;
width : 440px;
max-height : ~'calc(100vh - 28px)';
padding : 0 10px 5px;
margin : 0 auto;
background-color : #333333;
border : 3px solid #444444;
border-top : unset;
border-radius : 0 0 5px 5px;
box-shadow : inset 0 7px 9px -7px #111111;
transition : transform 0.4s, opacity 0.4s;
&.active {
opacity : 1;
transform : translateX(-50%) translateY(100%);
}
p {
font-family : "Open Sans", sans-serif;
font-size : 10px;
font-weight : normal;
padding : 5px 0;
text-transform : initial;
flex-basis : 80%;
flex-grow : 1;
.tag {
display : inline-block;
margin : 2px 2px;
padding : 2px;
border : 2px solid grey;
border-radius : 5px;
background-color : #444;
&.inactive {
opacity : 0;
transform : translateX(-50%) translateY(0%);
}
.row {
display : flex;
flex-flow : row wrap;
width : 100%;
h4 {
box-sizing : border-box;
display : block;
flex-basis : 20%;
flex-grow : 1;
min-width : 76px;
padding : 5px 0;
color : #BBBBBB;
text-align : center;
}
a.userPageLink {
text-decoration : none;
color : white;
&:hover {
text-decoration : underline;
p {
flex-basis : 80%;
flex-grow : 1;
padding : 5px 0;
font-family : 'Open Sans', sans-serif;
font-size : 10px;
font-weight : normal;
text-transform : initial;
.tag {
display : inline-block;
padding : 2px;
margin : 2px 2px;
background-color : #444444;
border : 2px solid grey;
border-radius : 5px;
}
a.userPageLink {
color : white;
text-decoration : none;
&:hover { text-decoration : underline; }
}
}
&:nth-of-type(even) { background-color : #555555; }
}
&:nth-of-type(even) {
background-color : #555;
}
}
&.warning {
position : relative;
color : white;
background-color : @orange;
&:hover > .dropdown { visibility : visible; }
.dropdown {
position : absolute;
top : 28px;
left : 0;
z-index : 10000;
box-sizing : border-box;
display : block;
width : 100%;
padding : 13px 5px;
text-align : center;
visibility : hidden;
background-color : #333333;
}
}
&.account {
min-width : 100px;
&.username { text-transform : none;}
}
}
.navDropdownContainer {
position : relative;
.navDropdown {
position: absolute;
top: 28px;
right: 0px;
z-index: 10000;
width: max-content;
min-width:100%;
max-height: calc(100vh - 28px);
overflow: hidden auto;
display: flex;
flex-direction: column;
align-items: flex-end;
.navItem {
position : relative;
display : flex;
justify-content : space-between;
align-items : center;
width : 100%;
border : 1px solid #888888;
border-bottom : 0;
animation-name : glideDropDown;
animation-duration : 0.4s;
}
}
&.recent {
position : relative;
.navDropdown .navItem {
#backgroundColorsHover;
.animate(background-color);
position : relative;
box-sizing : border-box;
display : block;
max-width : 15em;
max-height : ~'calc(100vh - 28px)';
padding : 8px 5px 13px;
overflow : hidden auto;
color : white;
text-decoration : none;
background-color : #333333;
border-top : 1px solid #888888;
scrollbar-color : #666666 #333333;
scrollbar-width : thin;
.clear {
position : absolute;
top : 50%;
right : 0;
display : none;
width : 20px;
height : 100%;
background-color : #333333;
border-radius : 3px;
opacity : 70%;
transform : translateY(-50%);
&:hover { opacity : 100%; }
i {
width : 100%;
height : 100%;
margin : 0;
font-size : 10px;
text-align : center;
}
}
&:hover {
background-color : @blue;
.clear {
display : grid;
place-content : center;
}
}
.title {
display : inline-block;
width : 100%;
overflow : hidden auto;
text-overflow : ellipsis;
white-space : nowrap;
}
.time {
position : absolute;
right : 2px;
bottom : 2px;
font-size : 0.7em;
color : #888888;
}
&.header {
box-sizing : border-box;
display : block;
padding : 5px 0;
color : #BBBBBB;
text-align : center;
background-color : #333333;
border-top : 1px solid #888888;
&:nth-of-type(1) { background-color : darken(@teal, 20%); }
&:nth-of-type(2) { background-color : darken(@purple, 30%); }
}
}
}
}
.warning.navItem {
position : relative;
color : white;
background-color : @orange;
&:hover > .dropdown {
visibility : visible;
}
// this should likely be refactored into .navDropdownContainer
.save-menu {
.dropdown { z-index : 1000; }
.navItem i.fa-power-off {
color : red;
&.active {
color : rgb(0, 182, 52);
filter : drop-shadow(0 0 2px rgba(0, 182, 52, 0.765));
}
.dropdown {
position : absolute;
z-index : 10000;
top : 28px;
left : 0;
display : block;
visibility : hidden;
box-sizing : border-box;
width : 100%;
padding : 13px 5px;
text-align : center;
background-color : #333;
}
}
.account.navItem {
min-width : 100px;
}
.account.username.navItem {
text-transform : none;
}
}

View File

@@ -1,11 +1,64 @@
const React = require('react');
const _ = require('lodash');
const Nav = require('naturalcrit/nav/nav.jsx');
const { splitTextStyleAndMetadata } = require('../../../shared/helpers.js'); // Importing the function from helpers.js
module.exports = function(props){
return <Nav.item
href='/new'
color='purple'
icon='fas fa-plus-square'>
new
</Nav.item>;
const BREWKEY = 'homebrewery-new';
const STYLEKEY = 'homebrewery-new-style';
const METAKEY = 'homebrewery-new-meta';
const NewBrew = () => {
const handleFileChange = (e) => {
const file = e.target.files[0];
if (file) {
const reader = new FileReader();
reader.onload = (e) => {
const fileContent = e.target.result;
const newBrew = {
text: fileContent,
style: ''
};
if(fileContent.startsWith('```metadata')) {
splitTextStyleAndMetadata(newBrew); // Modify newBrew directly
localStorage.setItem(BREWKEY, newBrew.text);
localStorage.setItem(STYLEKEY, newBrew.style);
localStorage.setItem(METAKEY, JSON.stringify(_.pick(newBrew, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang'])));
window.location.href = '/new';
} else {
alert('This file is invalid, please, enter a valid file');
}
};
reader.readAsText(file);
}
};
return (
<Nav.dropdown>
<Nav.item
className='new'
color='purple'
icon='fa-solid fa-plus-square'>
new
</Nav.item>
<Nav.item
className='fromBlank'
href='/new'
newTab={true}
color='purple'
icon='fa-solid fa-file'>
from blank
</Nav.item>
<Nav.item
className='fromFile'
color='purple'
icon='fa-solid fa-upload'
onClick={() => { document.getElementById('uploadTxt').click(); }}>
<input id="uploadTxt" className='newFromLocal' type="file" onChange={handleFileChange} style={{ display: 'none' }} />
from file
</Nav.item>
</Nav.dropdown>
);
};
module.exports = NewBrew;

View File

@@ -16,6 +16,8 @@ const HelpNavItem = require('../../navbar/help.navitem.jsx');
const NaturalCritIcon = require('naturalcrit/svg/naturalcrit.svg.jsx');
let SAVEKEY = '';
const AccountPage = createClass({
displayName : 'AccountPage',
getDefaultProps : function() {
@@ -29,6 +31,27 @@ const AccountPage = createClass({
uiItems : this.props.uiItems
};
},
componentDidMount : function(){
if(!this.state.saveLocation && this.props.uiItems.username) {
SAVEKEY = `HOMEBREWERY-DEFAULT-SAVE-LOCATION-${this.props.uiItems.username}`;
let saveLocation = window.localStorage.getItem(SAVEKEY);
saveLocation = saveLocation ?? (this.state.uiItems.googleId ? 'GOOGLE-DRIVE' : 'HOMEBREWERY');
this.makeActive(saveLocation);
}
},
makeActive : function(newSelection){
if(this.state.saveLocation == newSelection) return;
window.localStorage.setItem(SAVEKEY, newSelection);
this.setState({
saveLocation : newSelection
});
},
renderButton : function(name, key, shouldRender=true){
if(!shouldRender) return;
return <button className={this.state.saveLocation==key ? 'active' : ''} onClick={()=>{this.makeActive(key);}}>{name}</button>;
},
renderNavItems : function() {
return <Navbar>
@@ -61,6 +84,11 @@ const AccountPage = createClass({
</p>
}
</div>
<div className='dataGroup'>
<h4>Default Save Location</h4>
{this.renderButton('Homebrewery', 'HOMEBREWERY')}
{this.renderButton('Google Drive', 'GOOGLE-DRIVE', this.state.uiItems.googleId)}
</div>
</>;
},

View File

@@ -7,6 +7,7 @@ const moment = require('moment');
const request = require('../../../../utils/request-middleware.js');
const googleDriveIcon = require('../../../../googleDrive.svg');
const homebreweryIcon = require('../../../../thumbnail.png');
const dedent = require('dedent-tabs').default;
const BrewItem = createClass({
@@ -19,7 +20,8 @@ const BrewItem = createClass({
authors : [],
stubbed : true
},
reportError : ()=>{}
updateListFilter : ()=>{},
reportError : ()=>{}
};
},
@@ -43,6 +45,10 @@ const BrewItem = createClass({
});
},
updateFilter : function(type, term){
this.props.updateListFilter(type, term);
},
renderDeleteBrewLink : function(){
if(!this.props.brew.editId) return;
@@ -90,11 +96,17 @@ const BrewItem = createClass({
</a>;
},
renderGoogleDriveIcon : function(){
if(!this.props.brew.googleId) return;
renderStorageIcon : function(){
if(this.props.brew.googleId) {
return <span title={this.props.brew.webViewLink ? 'Your Google Drive Storage': 'Another User\'s Google Drive Storage'}>
<a href={this.props.brew.webViewLink} target='_blank'>
<img className='googleDriveIcon' src={googleDriveIcon} alt='googleDriveIcon' />
</a>
</span>;
}
return <span>
<img className='googleDriveIcon' src={googleDriveIcon} alt='googleDriveIcon' />
return <span title='Homebrewery Storage'>
<img className='homebreweryIcon' src={homebreweryIcon} alt='homebreweryIcon' />
</span>;
},
@@ -102,6 +114,9 @@ const BrewItem = createClass({
const brew = this.props.brew;
if(Array.isArray(brew.tags)) { // temporary fix until dud tags are cleaned
brew.tags = brew.tags?.filter((tag)=>tag); //remove tags that are empty strings
brew.tags.sort((a, b)=>{
return a.indexOf(':') - b.indexOf(':') != 0 ? a.indexOf(':') - b.indexOf(':') : a.toLowerCase().localeCompare(b.toLowerCase());
});
}
const dateFormatString = 'YYYY-MM-DD HH:mm:ss';
@@ -118,17 +133,21 @@ const BrewItem = createClass({
<div className='info'>
{brew.tags?.length ? <>
<div className='brewTags' title={`Tags:\n${brew.tags.join('\n')}`}>
<div className='brewTags' title={`${brew.tags.length} tags:\n${brew.tags.join('\n')}`}>
<i className='fas fa-tags'/>
{brew.tags.map((tag, idx)=>{
const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
return <span key={idx} className={matches[1]}>{matches[2]}</span>;
return <span key={idx} className={matches[1]} onClick={()=>{this.updateFilter(tag);}}>{matches[2]}</span>;
})}
</div>
</> : <></>
}
<span title={`Authors:\n${brew.authors?.join('\n')}`}>
<i className='fas fa-user'/> {brew.authors?.join(', ')}
<i className='fas fa-user'/> {brew.authors?.map((author, index)=>(
<>
<a key={index} href={`/user/${author}`}>{author}</a>
{index < brew.authors.length - 1 && ', '}
</>))}
</span>
<br />
<span title={`Last viewed: ${moment(brew.lastViewed).local().format(dateFormatString)}`}>
@@ -144,7 +163,7 @@ const BrewItem = createClass({
Last updated: ${moment(brew.updatedAt).local().format(dateFormatString)}`}>
<i className='fas fa-sync-alt' /> {moment(brew.updatedAt).fromNow()}
</span>
{this.renderGoogleDriveIcon()}
{this.renderStorageIcon()}
</div>
<div className='links'>

View File

@@ -48,6 +48,10 @@
&>span{
margin-right : 12px;
line-height : 1.5em;
a {
color:inherit;
}
}
}
.brewTags span {
@@ -59,6 +63,41 @@
white-space: nowrap;
display: inline-block;
font-weight: bold;
border-color: currentColor;
cursor : pointer;
&:before {
font-family: 'Font Awesome 5 Free';
font-size: 12px;
margin-right: 3px;
}
&.type {
background-color: #0080003b;
color: #008000;
&:before{
content: '\f0ad';
}
}
&.group {
background-color: #5050503b;
color: #000000;
&:before{
content: '\f500';
}
}
&.meta {
background-color: #0000803b;
color: #000080;
&:before{
content: '\f05a';
}
}
&.system {
background-color: #8000003b;
color: #800000;
&:before{
content: '\f518';
}
}
}
&:hover{
.links{
@@ -98,4 +137,11 @@
padding : 0px;
margin : -5px;
}
.homebreweryIcon {
mix-blend-mode : darken;
height : 24px;
position : relative;
top : 5px;
left : -5px;
}
}

View File

@@ -36,6 +36,7 @@ const ListPage = createClass({
return {
filterString : this.props.query?.filter || '',
filterTags : [],
sortType : this.props.query?.sort || null,
sortDir : this.props.query?.dir || null,
query : this.props.query,
@@ -82,14 +83,14 @@ const ListPage = createClass({
if(!brews || !brews.length) return <div className='noBrews'>No Brews.</div>;
return _.map(brews, (brew, idx)=>{
return <BrewItem brew={brew} key={idx} reportError={this.props.reportError}/>;
return <BrewItem brew={brew} key={idx} reportError={this.props.reportError} updateListFilter={ (tag)=>{ this.updateUrl(this.state.filterString, this.state.sortType, this.state.sortDir, tag); }}/>;
});
},
sortBrewOrder : function(brew){
if(!brew.title){brew.title = 'No Title';}
const mapping = {
'alpha' : _.deburr(brew.title.toLowerCase()),
'alpha' : _.deburr(brew.title.trim().toLowerCase()),
'created' : moment(brew.createdAt).format(),
'updated' : moment(brew.updatedAt).format(),
'views' : brew.views,
@@ -136,13 +137,33 @@ const ListPage = createClass({
return;
},
updateUrl : function(filterTerm, sortType, sortDir){
updateUrl : function(filterTerm, sortType, sortDir, filterTag=''){
const url = new URL(window.location.href);
const urlParams = new URLSearchParams(url.search);
urlParams.set('sort', sortType);
urlParams.set('dir', sortDir);
let filterTags = urlParams.getAll('tag');
if(filterTag != '') {
if(filterTags.findIndex((tag)=>{return tag.toLowerCase()==filterTag.toLowerCase();}) == -1){
filterTags.push(filterTag);
} else {
filterTags = filterTags.filter((tag)=>{ return tag.toLowerCase() != filterTag.toLowerCase(); });
}
}
urlParams.delete('tag');
// Add tags to URL in the order they were clicked
filterTags.forEach((tag)=>{ urlParams.append('tag', tag); });
// Sort tags before updating state
filterTags.sort((a, b)=>{
return a.indexOf(':') - b.indexOf(':') != 0 ? a.indexOf(':') - b.indexOf(':') : a.toLowerCase().localeCompare(b.toLowerCase());
});
this.setState({
filterTags
});
if(!filterTerm)
urlParams.delete('filter');
else
@@ -166,6 +187,16 @@ const ListPage = createClass({
</div>;
},
renderTagsOptions : function(){
if(this.state.filterTags?.length == 0) return;
return <div className='tags-container'>
{_.map(this.state.filterTags, (tag, idx)=>{
const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
return <span key={idx} className={matches[1]} onClick={()=>{ this.updateUrl(this.state.filterString, this.state.sortType, this.state.sortDir, tag); }}>{matches[2]}</span>;
})}
</div>;
},
renderSortOptions : function(){
return <div className='sort-container'>
<h6>Sort by :</h6>
@@ -176,9 +207,6 @@ const ListPage = createClass({
{/* {this.renderSortOption('Latest', 'latest')} */}
{this.renderFilterOption()}
</div>;
},
@@ -186,14 +214,28 @@ const ListPage = createClass({
const testString = _.deburr(this.state.filterString).toLowerCase();
brews = _.filter(brews, (brew)=>{
// Filter by user entered text
const brewStrings = _.deburr([
brew.title,
brew.description,
brew.tags].join('\n')
.toLowerCase());
return brewStrings.includes(testString);
const filterTextTest = brewStrings.includes(testString);
// Filter by user selected tags
let filterTagTest = true;
if(this.state.filterTags.length > 0){
filterTagTest = Array.isArray(brew.tags) && this.state.filterTags?.every((tag)=>{
return brew.tags.findIndex((brewTag)=>{
return brewTag.toLowerCase() == tag.toLowerCase();
}) >= 0;
});
}
return filterTextTest && filterTagTest;
});
return _.orderBy(brews, (brew)=>{ return this.sortBrewOrder(brew); }, this.state.sortDir);
},
@@ -220,9 +262,11 @@ const ListPage = createClass({
render : function(){
return <div className='listPage sitePage'>
{/*<style>@layer V3_5ePHB, bundle;</style>*/}
<link href='/themes/V3/5ePHB/style.css' rel='stylesheet'/>
<link href='/themes/V3/Blank/style.css' type="text/css" rel='stylesheet'/>
<link href='/themes/V3/5ePHB/style.css' type="text/css" rel='stylesheet'/>
{this.props.navItems}
{this.renderSortOptions()}
{this.renderTagsOptions()}
<div className='content V3'>
<div className='page'>

View File

@@ -2,17 +2,18 @@
.noColumns(){
column-count : auto;
column-fill : auto;
column-gap : auto;
column-gap : normal;
column-width : auto;
-webkit-column-count : auto;
-moz-column-count : auto;
-webkit-column-width : auto;
-moz-column-width : auto;
-webkit-column-gap : auto;
-moz-column-gap : auto;
-webkit-column-gap : normal;
-moz-column-gap : normal;
height : auto;
min-height : 279.4mm;
margin : 20px auto;
contain : unset;
}
.listPage{
.content{
@@ -52,7 +53,7 @@
}
}
}
.sort-container{
.sort-container {
font-family : 'Open Sans', sans-serif;
position : sticky;
top : 0;
@@ -124,4 +125,66 @@
}
.tags-container {
height : 30px;
background-color : #555;
border-top : 1px solid #666;
border-bottom : 1px solid #666;
color : white;
display : flex;
justify-content : center;
align-items : center;
column-gap : 15px;
row-gap : 5px;
flex-wrap : wrap;
span {
font-family : 'Open Sans', sans-serif;
font-size : 11px;
font-weight : bold;
border : 1px solid;
border-radius : 3px;
padding : 3px;
cursor : pointer;
color: #dfdfdf;
&:before {
font-family: 'Font Awesome 5 Free';
font-size: 12px;
margin-right: 3px;
}
&:after {
content: '\f00d';
font-family: 'Font Awesome 5 Free';
font-size: 12px;
margin-left: 3px;
}
&.type {
background-color: #008000;
border-color: #00a000;
&:before{
content: '\f0ad';
}
}
&.group {
background-color: #505050;
border-color: #000000;
&:before{
content: '\f500';
}
}
&.meta {
background-color: #000080;
border-color: #0000a0;
&:before{
content: '\f05a';
}
}
&.system {
background-color: #800000;
border-color: #a00000;
&:before{
content: '\f518';
}
}
}
}
}

View File

@@ -16,6 +16,23 @@
margin : 5px 0px;
border : 2px solid black;
border-radius : 5px;
button {
background-color : transparent;
border : 1px solid black;
border-radius : 5px;
width : 125px;
color : black;
margin-right : 5px;
&.active {
background-color: #0007;
color: white;
&:before {
content: '\f00c';
font-family: 'FONT AWESOME 5 FREE';
margin-right: 5px;
}
}
}
}
h1, h2, h3, h4 {
width : 100%;

View File

@@ -50,7 +50,8 @@ const EditPage = createClass({
url : '',
autoSave : true,
autoSaveWarning : false,
unsavedTime : new Date()
unsavedTime : new Date(),
currentEditorPage : 0
};
},
savedBrew : null,
@@ -91,7 +92,7 @@ const EditPage = createClass({
if(!(e.ctrlKey || e.metaKey)) return;
const S_KEY = 83;
const P_KEY = 80;
if(e.keyCode == S_KEY) this.save();
if(e.keyCode == S_KEY) this.trySave(true);
if(e.keyCode == P_KEY) window.open(`/print/${this.processShareId()}?dialog=true`, '_blank').focus();
if(e.keyCode == P_KEY || e.keyCode == S_KEY){
e.stopPropagation();
@@ -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() - 1 //Offset index since Marked starts pages at 0
}), ()=>{if(this.state.autoSave) this.trySave();});
},
@@ -137,13 +139,14 @@ const EditPage = createClass({
return !_.isEqual(this.state.brew, this.savedBrew);
},
trySave : function(){
trySave : function(immediate=false){
if(!this.debounceSave) this.debounceSave = _.debounce(this.save, SAVE_TIMEOUT);
if(this.hasChanges()){
this.debounceSave();
} else {
this.debounceSave.cancel();
}
if(immediate) this.debounceSave.flush();
},
handleGoogleClick : function(){
@@ -404,6 +407,7 @@ const EditPage = createClass({
theme={this.state.brew.theme}
errors={this.state.htmlErrors}
lang={this.state.brew.lang}
currentEditorPage={this.state.currentEditorPage}
/>
</SplitPane>
</div>

View File

@@ -22,18 +22,18 @@ const errorIndex = (props)=>{
## We can't find this brew in Google Drive!
This file was saved on Google Drive, but this link doesn't work anymore.
${ props.brew.authors?.length > 0
? `Note that this brew belongs to the Homebrewery account **${ props.brew.authors[0] }**,
${ props.brew.account
? `which is
${props.brew.authors?.length > 0
? `Note that this brew belongs to the Homebrewery account **${props.brew.authors[0]}**,
${props.brew.account
? `which is
${props.brew.authors[0] == props.brew.account
? `your account.`
: `not your account (you are currently signed in as **${props.brew.account}**).`
}`
: 'and you are not currently signed in to any account.'
}`
: ''
}
? `your account.`
: `not your account (you are currently signed in as **${props.brew.account}**).`
}`
: 'and you are not currently signed in to any account.'
}`
: ''
}
The Homebrewery cannot delete files from Google Drive on its own, so there
are three most likely possibilities:
:
@@ -75,7 +75,9 @@ const errorIndex = (props)=>{
**Brew Title:** ${props.brew.brewTitle || 'Unable to show title'}
**Current Authors:** ${props.brew.authors?.map((author)=>{return `${author}`;}).join(', ') || 'Unable to list authors'}`,
**Current Authors:** ${props.brew.authors?.map((author)=>{return `${author}`;}).join(', ') || 'Unable to list authors'}
[Click here to be redirected to the brew's share page.](/share/${props.brew.shareId})`,
// User is not signed in; must be a user on the Authors List
'04' : dedent`

View File

@@ -31,9 +31,10 @@ const HomePage = createClass({
},
getInitialState : function() {
return {
brew : this.props.brew,
welcomeText : this.props.brew.text,
error : undefined
brew : this.props.brew,
welcomeText : this.props.brew.text,
error : undefined,
currentEditorPage : 0
};
},
handleSave : function(){
@@ -53,7 +54,8 @@ const HomePage = createClass({
},
handleTextChange : function(text){
this.setState((prevState)=>({
brew : { ...prevState.brew, text: text }
brew : { ...prevState.brew, text: text },
currentEditorPage : this.refs.editor.getCurrentPage() - 1 //Offset index since Marked starts pages at 0
}));
},
renderNavbar : function(){
@@ -85,7 +87,12 @@ const HomePage = createClass({
renderer={this.state.brew.renderer}
showEditButtons={false}
/>
<BrewRenderer text={this.state.brew.text} style={this.state.brew.style} renderer={this.state.brew.renderer}/>
<BrewRenderer
text={this.state.brew.text}
style={this.state.brew.style}
renderer={this.state.brew.renderer}
currentEditorPage={this.state.currentEditorPage}
/>
</SplitPane>
</div>

View File

@@ -16,9 +16,9 @@ The Homebrewery makes the creation and sharing of authentic looking Fifth-Editio
**Try it!** Simply edit the text on the left and watch it *update live* on the right. Note that not every button is visible on this demo page. Click New {{fas,fa-plus-square}} in the navbar above to start brewing with all the features!
### Editing and Sharing
When you create your own homebrew, you will be given a *edit url* and a *share url*.
When you create a new homebrew document ("brew"), your document will be given a *edit link* and a *share link*.
Any changes you make while on the *edit url* will be automatically saved to the database within a few seconds. Anyone with the edit url will be able to make edits to your homebrew, so be careful about who you share it with.
The *edit link* is where you write your brew. If you edit a brew while logged in, you are added as one of the brew's authors, and no one else can edit that brew until you add them as a new author via the {{fa,fa-info-circle}} **Properties** tab. Brews without any author can still be edited by anyone with the *edit link*, so be careful about who you share it with if you prefer to work without an account.
Anyone with the *share url* will be able to access a read-only version of your homebrew.
@@ -48,57 +48,63 @@ If you want to save ink or have a monochrome printer, add the **PRINT → {{fas,
\column
## New in V3.0.0
We've implemented an extended Markdown-like syntax for block and span elements, plus a few other changes, eliminating the need for HTML tags like `div` and `span` in most cases. No raw HTML tags should be needed in a brew (*but can still be used if you insist*).
## V3 vs Legacy
The Homebrewery has two renderers: Legacy and V3. The V3 renderer is recommended for all users because it is more powerful, more customizable, and continues to receive new feature updates while Legacy does not. However Legacy mode will remain available for older brews and veteran users.
At any time, any individual brew can be changed to your renderer of choice via the {{fa,fa-info-circle}} **Properties** tab on your brew. However, converting between Legacy and V3 may require heavily tweaking the document; while both renderers can use raw HTML, V3 prefers a streamlined curly bracket syntax that avoids the complex HTML structures required by Legacy.
Much of the syntax and styling has changed in V3, so converting a Legacy brew to V3 (or vice-versa) will require tweaking your document. *However*, all brews made prior to the release of v3.0.0 will still render normally, and you may switch between the "Legacy" brew renderer and the newer "V3" renderer via the {{fa,fa-info-circle}} **Properties** button on your brew at any time.
Scroll down to the next page for a brief summary of the changes and new features available in V3!
Scroll down to the next page for a brief summary of the changes and features available in V3!
#### New Things All The Time!
Check out the latest updates in the full changelog [here](/changelog).
### Helping out
Like this tool? Want to buy me a beer? [Head here](https://www.patreon.com/Naturalcrit) to help me keep the servers running.
Like this tool? Head over to our [Patreon](https://www.patreon.com/Naturalcrit) to help us keep the servers running.
This tool will **always** be free, never have ads, and I will never offer any "premium" features or whatever.
This tool will **always** be free, never have ads, and we will never offer any "premium" features or whatever.
### Bugs, Issues, Suggestions?
Take a quick look at our [Frequently Asked Questions page](/faq) to see if your question has a handy answer.
Need help getting started or just the right look for your brew? Head to [r/Homebrewery](https://www.reddit.com/r/homebrewery/submit?selftext=true&title=%5BIssue%5D%20Describe%20Your%20Issue%20Here) and let us know!
Have an idea to make The Homebrewery better? Or did you find something that wasn't quite right? Check out the [GitHub Repo](https://github.com/naturalcrit/homebrewery/) to report technical issues.
- Check the [Frequently Asked Questions](/faq) page first for quick answers.
- Get help or the right look for your brew by posting on [r/Homebrewery](https://www.reddit.com/r/homebrewery/submit?selftext=true&title=%5BIssue%5D%20Describe%20Your%20Issue%20Here) or joining the [Discord Of Many Things](https://discord.gg/by3deKx).
- Report technical issues or provide feedback on the [GitHub Repo](https://github.com/naturalcrit/homebrewery/).
### Legal Junk
The Homebrewery is licensed using the [MIT License](https://github.com/naturalcrit/homebrewery/blob/master/license). Which means you are free to use The Homebrewery codebase any way that you want, except for claiming that you made it yourself.
If you wish to sell or in some way gain profit for what's created on this site, it's your responsibility to ensure you have the proper licenses/rights for any images or resources used.
#### Crediting Me
If you'd like to credit me in your brew, I'd be flattered! Just reference that you made it with The Homebrewery.
#### Crediting Us
If you'd like to credit us in your brew, we'd be flattered! Just reference that you made it with The Homebrewery.
### More Homebrew Resources
<a href='https://discord.gg/by3deKx' target='_blank'><img src='/assets/discordOfManyThings.svg' alt='Discord of Many Things Logo' title='Discord of Many Things Logo' style='width:50px; float: right; padding-left: 10px;'/></a>
If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/wiki/resources). The <a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things'>Discord of Many Things</a> is another great resource to connect with fellow homebrewers for help and feedback.
[![Discord](/assets/discordOfManyThings.svg){width:50px,float:right,padding-left:10px}](https://discord.gg/by3deKx)
If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/wiki/resources). The [Discord Of Many Things](https://discord.gg/by3deKx) is another great resource to connect with fellow homebrewers for help and feedback.
{{position:absolute;top:20px;right:20px;width:auto
<a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things' style='color: black;'><img src='/assets/discord.png' style='height:30px'/></a>
<a href='https://github.com/naturalcrit/homebrewery' target='_blank' title='Github' style='color: black; padding-left: 5px;'><img src='/assets/github.png' style='height:30px'/></a>
<a href='https://patreon.com/NaturalCrit' target='_blank' title='Patreon' style='color: black; padding-left: 5px;'><img src='/assets/patreon.png' style='height:30px'/></a>
<a href='https://www.reddit.com/r/homebrewery/' target='_blank' title='Reddit' style='color: black; padding-left: 5px;'><img src='/assets/reddit.png' style='height:30px'/></a>
[![Discord](/assets/discord.png){height:30px}](https://discord.gg/by3deKx)
[![Github](/assets/github.png){height:30px}](https://github.com/naturalcrit/homebrewery)
[![Patreon](/assets/patreon.png){height:30px}](https://patreon.com/NaturalCrit)
[![Reddit](/assets/reddit.png){height:30px}](https://www.reddit.com/r/homebrewery/)
}}
\page
## Markdown+
The Homebrewery aims to make homebrewing as simple as possible, providing a live editor with Markdown syntax that is more human-readable and faster to write with than raw HTML.
In version 3.0.0, with a goal of adding maximum flexibility without users resorting to complex HTML to accomplish simple tasks, Homebrewery provides an extended verision of Markdown with additional syntax.
**You can enable V3 via the {{fa,fa-info-circle}} Properties button!**
From version 3.0.0, with a goal of adding maximum flexibility without users resorting to complex HTML to accomplish simple tasks, Homebrewery provides an extended verision of Markdown with additional syntax.
### Curly Brackets
The biggest change in V3 is the replacement of `<span></span>` and `<div></div>` with `{{ }}` for a cleaner custom formatting. Inline spans and block elements can be created and given ID's and Classes, as well as css properties, each of which are comma separated with no spaces. Use double quotes if a value requires spaces. Spans and Blocks start the same:
Standard Markdown lacks several equivalences to HTML. Hence, we have introduced `{{ }}` as a replacement for `<span></span>` and `<div></div>` for a cleaner custom formatting. Inline spans and block elements can be created and given ID's and Classes, as well as CSS properties, each of which are comma separated with no spaces. Use double quotes if a value requires spaces. Spans and Blocks start the same:
#### Span
My favorite author is {{pen,#author,color:orange,font-family:"trebuchet ms" Brandon Sanderson}}. The orange text has a class of `pen`, an id of `author`, is colored orange, and given a new font. The first space outside of quotes marks the beginning of the content.
@@ -126,16 +132,18 @@ A blank line can be achieved with a run of one or more `:` alone on a line. More
::
Much nicer than `<br><br><br><br><br>`
### Definition Lists
**Example** :: V3 uses HTML *definition lists* to create "lists" with hanging indents.
### Column Breaks
Column and page breaks with `\column` and `\page`.
\column
### Tables
Tables now allow column & row spanning between cells. This is included in some updated snippets, but a simplified example is given below.
@@ -163,13 +171,13 @@ Using *Curly Injection* you can assign an id, classes, or inline CSS properties
![alt-text](https://s-media-cache-ak0.pinimg.com/736x/4a/81/79/4a8179462cfdf39054a418efd4cb743e.jpg) {width:100px,border:"2px solid",border-radius:10px}
\* *When using Imgur-hosted images, use the "direct link", which can be found when you click into your image in the Imgur interace.*
\* *When using Imgur-hosted images, use the "direct link", which can be found when you click into your image in the Imgur interface.*
## Snippets
Homebrewery comes with a series of *code snippets* found at the top of the editor pane that make it easy to create brews as quickly as possible. Just set your cursor where you want the code to appear in the editor pane, choose a snippet, and make the adjustments you need.
## Style Editor Panel
{{fa,fa-paint-brush}} Technically released prior to v3 but still new to many users, check out the new **Style Editor** located on the right side of the Snippet bar. This editor accepts CSS for styling without requiring `<style>` tags-- anything that would have gone inside style tags before can now be placed here, and snippets that insert CSS styles are now located on that tab.
{{fa,fa-paint-brush}} Usually overlooked or unused by some users, the **Style Editor** tab is located on the right side of the Snippet bar. This editor accepts CSS for styling without requiring `<style>` tags-- anything that would have gone inside style tags before can now be placed here, and snippets that insert CSS styles are now located on that tab.
{{pageNumber 2}}
{{footnote PART 2 | BORING STUFF}}

View File

@@ -20,9 +20,10 @@ const BrewRenderer = require('../../brewRenderer/brewRenderer.jsx');
const { DEFAULT_BREW } = require('../../../../server/brewDefaults.js');
const BREWKEY = 'homebrewery-new';
const BREWKEY = 'homebrewery-new';
const STYLEKEY = 'homebrewery-new-style';
const METAKEY = 'homebrewery-new-meta';
const METAKEY = 'homebrewery-new-meta';
let SAVEKEY;
const NewPage = createClass({
@@ -37,11 +38,12 @@ const NewPage = createClass({
const brew = this.props.brew;
return {
brew : brew,
isSaving : false,
saveGoogle : (global.account && global.account.googleId ? true : false),
error : null,
htmlErrors : Markdown.validate(brew.text)
brew : brew,
isSaving : false,
saveGoogle : (global.account && global.account.googleId ? true : false),
error : null,
htmlErrors : Markdown.validate(brew.text),
currentEditorPage : 0
};
},
@@ -62,12 +64,16 @@ const NewPage = createClass({
brew.renderer = metaStorage?.renderer ?? brew.renderer;
brew.theme = metaStorage?.theme ?? brew.theme;
brew.lang = metaStorage?.lang ?? brew.lang;
this.setState({
brew : brew
});
}
SAVEKEY = `HOMEBREWERY-DEFAULT-SAVE-LOCATION-${global.account?.username || ''}`;
const saveStorage = localStorage.getItem(SAVEKEY) || 'HOMEBREWERY';
this.setState({
brew : brew,
saveGoogle : (saveStorage == 'GOOGLE-DRIVE' && this.state.saveGoogle)
});
localStorage.setItem(BREWKEY, brew.text);
if(brew.style)
localStorage.setItem(STYLEKEY, brew.style);
@@ -99,8 +105,9 @@ const NewPage = createClass({
if(htmlErrors.length) htmlErrors = Markdown.validate(text);
this.setState((prevState)=>({
brew : { ...prevState.brew, text: text },
htmlErrors : htmlErrors
brew : { ...prevState.brew, text: text },
htmlErrors : htmlErrors,
currentEditorPage : this.refs.editor.getCurrentPage() - 1 //Offset index since Marked starts pages at 0
}));
localStorage.setItem(BREWKEY, text);
},
@@ -215,7 +222,15 @@ const NewPage = createClass({
onMetaChange={this.handleMetaChange}
renderer={this.state.brew.renderer}
/>
<BrewRenderer text={this.state.brew.text} style={this.state.brew.style} renderer={this.state.brew.renderer} theme={this.state.brew.theme} lang={this.state.brew.lang} errors={this.state.htmlErrors}/>
<BrewRenderer
text={this.state.brew.text}
style={this.state.brew.style}
renderer={this.state.brew.renderer}
theme={this.state.brew.theme}
errors={this.state.htmlErrors}
lang={this.state.brew.lang}
currentEditorPage={this.state.currentEditorPage}
/>
</SplitPane>
</div>
</div>;

View File

@@ -21,7 +21,8 @@ const PrintPage = createClass({
brew : {
text : '',
style : '',
renderer : 'legacy'
renderer : 'legacy',
lang : ''
}
};
},
@@ -32,7 +33,8 @@ const PrintPage = createClass({
text : this.props.brew.text || '',
style : this.props.brew.style || undefined,
renderer : this.props.brew.renderer || 'legacy',
theme : this.props.brew.theme || '5ePHB'
theme : this.props.brew.theme || '5ePHB',
lang : this.props.brew.lang || 'en'
}
};
},
@@ -49,7 +51,8 @@ const PrintPage = createClass({
text : brewStorage,
style : styleStorage,
renderer : metaStorage?.renderer || 'legacy',
theme : metaStorage?.theme || '5ePHB'
theme : metaStorage?.theme || '5ePHB',
lang : metaStorage?.lang || 'en'
}
};
});
@@ -93,14 +96,14 @@ const PrintPage = createClass({
return <div>
<Meta name='robots' content='noindex, nofollow' />
<link href={`/themes/${rendererPath}/Blank/style.css`} rel='stylesheet'/>
<link href={`/themes/${rendererPath}/Blank/style.css`} type="text/css" rel='stylesheet'/>
{baseThemePath &&
<link href={`/themes/${rendererPath}/${baseThemePath}/style.css`} rel='stylesheet'/>
<link href={`/themes/${rendererPath}/${baseThemePath}/style.css`} type="text/css" rel='stylesheet'/>
}
<link href={`/themes/${rendererPath}/${themePath}/style.css`} rel='stylesheet'/>
<link href={`/themes/${rendererPath}/${themePath}/style.css`} type="text/css" rel='stylesheet'/>
{/* Apply CSS from Style tab */}
{this.renderStyle()}
<div className='pages' ref='pages'>
<div className='pages' ref='pages' lang={this.state.brew.lang}>
{this.renderPages()}
</div>
</div>;

View File

@@ -11,9 +11,10 @@ const template = async function(name, title='', props = {}){
return `<!DOCTYPE html>
<html>
<head>
<link href="//use.fontawesome.com/releases/v5.15.1/css/all.css" rel="stylesheet" />
<meta name="viewport" content="width=device-width, initial-scale=1, height=device-height, interactive-widget=resizes-visual" />
<link href="//use.fontawesome.com/releases/v6.5.1/css/all.css" rel="stylesheet" type="text/css" />
<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 href=${`/${name}/bundle.css`} type="text/css" rel='stylesheet' />
<link rel="icon" href="/assets/favicon.ico" type="image/x-icon" />
${ogMetaTags}
<meta name="twitter:card" content="summary">

29
faq.md
View File

@@ -62,16 +62,13 @@ pre {
```
# FAQ
{{wide Updated Oct. 11, 2021}}
{{wide Updated Apr. 15, 2023}}
### The site is down for me! Anyone else?
You can check the site status here: [Everyone or Just Me](https://downforeveryoneorjustme.com/homebrewery.naturalcrit.com)
### How do I log out?
Go to https://homebrewery.naturalcrit.com/login, and hit the "*logout*" link.
### Why am I getting an error when trying to save, and my account is linked to Google?
@@ -105,7 +102,7 @@ The best way to avoid this is to leave space at the end of a column equal to one
### Why do I need to manually create a new page? Why doesn't text flow between pages?
A Homebrewery document is at it's core an HTML & CSS document, and currently limited by the specs of those technologies. It is currently not possible to flow content from inside one box ("page") to the inside of another box. It seems likely that someday CSS will add this capability, and if/when that happens, Homebrewery will adopt it as soon as possible.
A Homebrewery document is at its core an HTML & CSS document, and currently limited by the specs of those technologies. It is currently not possible to flow content from inside one box ("page") to the inside of another box. It seems likely that someday CSS will add this capability, and if/when that happens, Homebrewery will adopt it as soon as possible.
### Where do I get images?
The Homebrewery does not provide images for use besides some page elements and example images for snippets. You will need to find your own images for use and be sure you are following the appropriate license requirements.
@@ -120,26 +117,6 @@ The fonts used were originally created for use with the English language, though
### Whenever I click on the "Get PDF" button, instead of getting a download, it opens Print Preview in another tab.
Yes, this is by design. In the print preview, select "Save as PDF" as the Destination, and then click "Save". There will be a normal download dialog where you can save your brew as a PDF.
### The preview window is suddenly gone, I can only see the editor side of the Homebrewery (or the other way around).
1. Press `CTRL`+`SHIFT`+`i` (or right-click and select "Inspect") while in the Homebrewery.
2. Expand...
```
- `body`
- `main`
- `div class="homebrew"`
- `div class="editPage page"`
- `div class="content"`
- `div class="splitPane"`
```
There you will find 3 divs: `div class="pane" [...]`, `div class="divider" [...]`, and `div class="pane" [...]`.
The `class="pane"` looks similar to this: `div class="pane" data-reactid="36" style="flex: 0 0 auto; width: 925px;"`.
Change whatever stands behind width: to something smaller than your display width.
### I have white borders on the bottom/sides of the print preview.
The Homebrewery paper size and your print paper size do not match.
@@ -149,4 +126,4 @@ The Homebrewery defaults to creating US Letter page sizes. If you are printing
### Typing `#### Adhesion` in the text editor doesn't show the header at all in the completed page?
Your ad-blocking software is mistakenly assuming your text to be an ad. Whitelist homebrewery.naturalcrit.com in your ad-blocking software.
Your ad-blocking software is mistakenly assuming your text to be an ad. Whitelist homebrewery.naturalcrit.com in your ad-blocking software.

View File

@@ -13,7 +13,7 @@ npm install
npm audit fix
npm run postinstall
cp freebsd/rc.d/homebrewery /usr/local/etc/rc.d/
cp install/freebsd/rc.d/homebrewery /usr/local/etc/rc.d/
chmod +x /usr/local/etc/rc.d/homebrewery
sysrc homebrewery_enable=YES

6626
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,10 @@
{
"name": "homebrewery",
"description": "Create authentic looking D&D homebrews using only markdown",
"version": "3.9.1",
"version": "3.12.0",
"engines": {
"node": ">=18.16.x"
"npm": "^10.2.x",
"node": "^20.8.x"
},
"repository": {
"type": "git",
@@ -25,10 +26,12 @@
"test:coverage": "jest --coverage --silent --runInBand",
"test:dev": "jest --verbose --watch",
"test:basic": "jest tests/markdown/basic.test.js --verbose",
"test:variables": "jest tests/markdown/variables.test.js --verbose",
"test:mustache-syntax": "jest '.*(mustache-syntax).*' --verbose --noStackTrace",
"test:mustache-syntax:inline": "jest '.*(mustache-syntax).*' -t '^Inline:.*' --verbose --noStackTrace",
"test:mustache-syntax:block": "jest '.*(mustache-syntax).*' -t '^Block:.*' --verbose --noStackTrace",
"test:mustache-syntax:injection": "jest '.*(mustache-syntax).*' -t '^Injection:.*' --verbose --noStackTrace",
"test:marked-extensions": "jest tests/markdown/marked-extensions.test.js --verbose --noStackTrace",
"test:route": "jest tests/routes/static-pages.test.js --verbose",
"phb": "node scripts/phb.js",
"prod": "set NODE_ENV=production && npm run build",
@@ -78,54 +81,54 @@
]
},
"dependencies": {
"@babel/core": "^7.22.8",
"@babel/plugin-transform-runtime": "^7.22.7",
"@babel/preset-env": "^7.22.7",
"@babel/preset-react": "^7.22.5",
"@googleapis/drive": "^5.1.0",
"@babel/core": "^7.24.0",
"@babel/plugin-transform-runtime": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@babel/preset-react": "^7.23.3",
"@googleapis/drive": "^8.7.0",
"body-parser": "^1.20.2",
"classnames": "^2.3.2",
"codemirror": "^5.65.6",
"cookie-parser": "^1.4.6",
"create-react-class": "^15.7.0",
"dedent-tabs": "^0.10.3",
"express": "^4.18.2",
"expr-eval": "^2.0.2",
"express": "^4.18.3",
"express-async-handler": "^1.2.0",
"express-static-gzip": "2.1.7",
"fs-extra": "11.1.1",
"fs-extra": "11.2.0",
"js-yaml": "^4.1.0",
"jwt-simple": "^0.5.6",
"less": "^3.13.1",
"lodash": "^4.17.21",
"marked": "5.1.1",
"marked-extended-tables": "^1.0.6",
"marked-gfm-heading-id": "^3.0.4",
"marked-smartypants-lite": "^1.0.0",
"marked": "11.2.0",
"marked-extended-tables": "^1.0.8",
"marked-gfm-heading-id": "^3.1.3",
"marked-smartypants-lite": "^1.0.2",
"markedLegacy": "npm:marked@^0.3.19",
"moment": "^2.29.4",
"mongoose": "^7.3.2",
"moment": "^2.30.1",
"mongoose": "^8.2.1",
"nanoid": "3.3.4",
"nconf": "^0.12.0",
"npm": "^9.8.0",
"nconf": "^0.12.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-frame-component": "^4.1.3",
"react-router-dom": "6.14.1",
"react-router-dom": "6.22.3",
"sanitize-filename": "1.6.3",
"superagent": "^6.1.0",
"superagent": "^8.1.2",
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
},
"devDependencies": {
"eslint": "^8.44.0",
"eslint-plugin-jest": "^27.2.2",
"eslint-plugin-react": "^7.32.2",
"jest": "^29.6.1",
"eslint": "^8.57.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-react": "^7.34.0",
"jest": "^29.7.0",
"jest-expect-message": "^1.1.3",
"postcss-less": "^6.0.0",
"stylelint": "^15.10.1",
"stylelint-config-recess-order": "^4.3.0",
"stylelint": "^15.11.0",
"stylelint-config-recess-order": "^4.6.0",
"stylelint-config-recommended": "^13.0.0",
"stylelint-stylistic": "^0.4.3",
"supertest": "^6.3.3"
"supertest": "^6.3.4"
}
}

View File

@@ -99,6 +99,27 @@ fs.emptyDirSync('./build');
await fs.copy('./themes/assets', './build/assets');
await fs.copy('./client/icons', './build/icons');
//v==---------------------------MOVE CM EDITOR THEMES -----------------------------==v//
const editorThemesBuildDir = './build/homebrew/cm-themes';
await fs.copy('./node_modules/codemirror/theme', editorThemesBuildDir);
await fs.copy('./themes/codeMirror/customThemes', editorThemesBuildDir);
editorThemeFiles = fs.readdirSync(editorThemesBuildDir);
const editorThemeFile = './themes/codeMirror/editorThemes.json';
if(fs.existsSync(editorThemeFile)) fs.rmSync(editorThemeFile);
const stream = fs.createWriteStream(editorThemeFile, { flags: 'a' });
stream.write('[\n"default"');
for (themeFile of editorThemeFiles) {
stream.write(`,\n"${themeFile.slice(0, -4)}"`);
}
stream.write('\n]\n');
stream.end();
await fs.copy('./themes/codeMirror', './build/homebrew/codeMirror');
//v==----------------------------- BUNDLE PACKAGES --------------------------------==v//
const bundles = await pack('./client/homebrew/homebrew.jsx', {
@@ -133,14 +154,14 @@ fs.emptyDirSync('./build');
// build(bundles);
//
})().catch(console.error);
//In development, set up LiveReload (refreshes browser), and Nodemon (restarts server)
if(isDev){
livereload('./build'); // Install the Chrome extension LiveReload to automatically refresh the browser
watchFile('./server.js', { // Restart server when change detected to this file or any nested directory from here
ignore : ['./build', './client', './themes'], // Ignore folders that are not running server code / avoids unneeded restarts
ext : 'js json' // Extensions to watch (only .js/.json by default)
//watch : ['./server', './themes'], // Watch additional folders if needed
});
}
//In development, set up LiveReload (refreshes browser), and Nodemon (restarts server)
if(isDev){
livereload('./build'); // Install the Chrome extension LiveReload to automatically refresh the browser
watchFile('./server.js', { // Restart server when change detected to this file or any nested directory from here
ignore : ['./build', './client', './themes'], // Ignore folders that are not running server code / avoids unneeded restarts
ext : 'js json' // Extensions to watch (only .js/.json by default)
//watch : ['./server', './themes'], // Watch additional folders if needed
});
}
})().catch(console.error);

View File

@@ -26,7 +26,6 @@
"codemirror/addon/edit/trailingspace.js",
"codemirror/addon/selection/active-line.js",
"moment",
"superagent",
"marked"
"superagent"
]
}

View File

@@ -26,85 +26,124 @@ const mw = {
}
};
/* Search for brews that are older than 3 days and that are shorter than a tweet */
const junkBrewQuery = HomebrewModel.find({
'$where' : 'this.text.length < 140',
createdAt : {
$lt : Moment().subtract(30, 'days').toDate()
}
}).limit(100).maxTime(60000);
const junkBrewPipeline = [
{ $match : {
updatedAt : { $lt: Moment().subtract(30, 'days').toDate() },
lastViewed : { $lt: Moment().subtract(30, 'days').toDate() }
}},
{ $project: { textBinSize: { $binarySize: '$textBin' } } },
{ $match: { textBinSize: { $lt: 140 } } },
{ $limit: 100 }
];
/* Search for brews that aren't compressed (missing the compressed text field) */
const uncompressedBrewQuery = HomebrewModel.find({
'text' : { '$exists': true }
}).lean().limit(10000).select('_id');
// Search for up to 100 brews that have not been viewed or updated in 30 days and are shorter than 140 bytes
router.get('/admin/cleanup', mw.adminOnly, (req, res)=>{
junkBrewQuery.exec((err, objs)=>{
if(err) return res.status(500).send(err);
return res.json({ count: objs.length });
});
HomebrewModel.aggregate(junkBrewPipeline).option({ maxTimeMS: 60000 })
.then((objs)=>res.json({ count: objs.length }))
.catch((error)=>{
console.error(error);
res.status(500).json({ error: 'Internal Server Error' });
});
});
/* Removes all empty brews that are older than 3 days and that are shorter than a tweet */
// Delete up to 100 brews that have not been viewed or updated in 30 days and are shorter than 140 bytes
router.post('/admin/cleanup', mw.adminOnly, (req, res)=>{
junkBrewQuery.remove().exec((err, objs)=>{
if(err) return res.status(500).send(err);
return res.json({ count: objs.length });
});
HomebrewModel.aggregate(junkBrewPipeline).option({ maxTimeMS: 60000 })
.then((docs)=>{
const ids = docs.map((doc)=>doc._id);
return HomebrewModel.deleteMany({ _id: { $in: ids } });
}).then((result)=>{
res.json({ count: result.deletedCount });
}).catch((error)=>{
console.error(error);
res.status(500).json({ error: 'Internal Server Error' });
});
});
/* Searches for matching edit or share id, also attempts to partial match */
router.get('/admin/lookup/:id', mw.adminOnly, (req, res, next)=>{
HomebrewModel.findOne({ $or : [
{ editId: { '$regex': req.params.id, '$options': 'i' } },
{ shareId: { '$regex': req.params.id, '$options': 'i' } },
] }).exec((err, brew)=>{
return res.json(brew);
router.get('/admin/lookup/:id', mw.adminOnly, async (req, res, next)=>{
HomebrewModel.findOne({
$or : [
{ editId: { $regex: req.params.id, $options: 'i' } },
{ shareId: { $regex: req.params.id, $options: 'i' } },
]
}).exec()
.then((brew)=>{
if(!brew) // No document found
return res.status(404).json({ error: 'Document not found' });
else
return res.json(brew);
})
.catch((err)=>{
console.error(err);
return res.status(500).json({ error: 'Internal Server Error' });
});
});
/* Find 50 brews that aren't compressed yet */
router.get('/admin/finduncompressed', mw.adminOnly, (req, res)=>{
uncompressedBrewQuery.exec((err, objs)=>{
if(err) return res.status(500).send(err);
objs = objs.map((obj)=>{return obj._id;});
return res.json({ count: objs.length, ids: objs });
});
const query = uncompressedBrewQuery.clone();
query.exec()
.then((objs)=>{
const ids = objs.map((obj)=>obj._id);
res.json({ count: ids.length, ids });
})
.catch((err)=>{
console.error(err);
res.status(500).send(err.message || 'Internal Server Error');
});
});
/* Compresses the "text" field of a brew to binary */
router.put('/admin/compress/:id', (req, res)=>{
HomebrewModel.get({ _id: req.params.id })
HomebrewModel.findOne({ _id: req.params.id })
.then((brew)=>{
brew.textBin = zlib.deflateRawSync(brew.text); // Compress brew text to binary before saving
brew.text = undefined; // Delete the non-binary text field since it's not needed anymore
if(!brew)
return res.status(404).send('Brew not found');
brew.save((err, obj)=>{
if(err) throw err;
return res.status(200).send(obj);
});
if(brew.text) {
brew.textBin = brew.textBin || zlib.deflateRawSync(brew.text); //Don't overwrite textBin if exists
brew.text = undefined;
}
return brew.save();
})
.then((obj)=>res.status(200).send(obj))
.catch((err)=>{
console.log(err);
return res.status(500).send('Error while saving');
console.error(err);
res.status(500).send('Error while saving');
});
});
router.get('/admin/stats', mw.adminOnly, (req, res)=>{
HomebrewModel.count({}, (err, count)=>{
router.get('/admin/stats', mw.adminOnly, async (req, res)=>{
try {
const totalBrewsCount = await HomebrewModel.countDocuments({});
const publishedBrewsCount = await HomebrewModel.countDocuments({ published: true });
return res.json({
totalBrews : count
totalBrews : totalBrewsCount,
totalPublishedBrews : publishedBrewsCount
});
});
} catch (error) {
console.error(error);
return res.status(500).json({ error: 'Internal Server Error' });
}
});
router.get('/admin', mw.adminOnly, (req, res)=>{
templateFn('admin', {
url : req.originalUrl
})
.then((page)=>res.send(page))
.catch((err)=>res.sendStatus(500));
.then((page)=>res.send(page))
.catch((err)=>res.sendStatus(500));
});
module.exports = router;

View File

@@ -17,21 +17,8 @@ const asyncHandler = require('express-async-handler');
const { DEFAULT_BREW } = require('./brewDefaults.js');
const splitTextStyleAndMetadata = (brew)=>{
brew.text = brew.text.replaceAll('\r\n', '\n');
if(brew.text.startsWith('```metadata')) {
const index = brew.text.indexOf('```\n\n');
const metadataSection = brew.text.slice(12, index - 1);
const metadata = yaml.load(metadataSection);
Object.assign(brew, _.pick(metadata, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang']));
brew.text = brew.text.slice(index + 5);
}
if(brew.text.startsWith('```css')) {
const index = brew.text.indexOf('```\n\n');
brew.style = brew.text.slice(7, index - 1);
brew.text = brew.text.slice(index + 5);
}
};
const { splitTextStyleAndMetadata } = require('../shared/helpers.js');
const sanitizeBrew = (brew, accessType)=>{
brew._id = undefined;
@@ -257,6 +244,7 @@ app.get('/user/:username', async (req, res, next)=>{
brew.pageCount = googleBrews[match].pageCount;
brew.renderer = googleBrews[match].renderer;
brew.version = googleBrews[match].version;
brew.webViewLink = googleBrews[match].webViewLink;
googleBrews.splice(match, 1);
}
}
@@ -267,6 +255,9 @@ app.get('/user/:username', async (req, res, next)=>{
}
req.brews = _.map(brews, (brew)=>{
// Clean up brew data
brew.title = brew.title?.trim();
brew.description = brew.description?.trim();
return sanitizeBrew(brew, ownAccount ? 'edit' : 'share');
});
@@ -300,7 +291,8 @@ app.get('/new/:id', asyncHandler(getBrew('share')), (req, res, next)=>{
text : req.brew.text,
style : req.brew.style,
renderer : req.brew.renderer,
theme : req.brew.theme
theme : req.brew.theme,
tags : req.brew.tags
};
req.brew = _.defaults(brew, DEFAULT_BREW);
@@ -323,14 +315,17 @@ app.get('/share/:id', asyncHandler(getBrew('share')), asyncHandler(async (req, r
type : 'article'
};
if(req.params.id.length > 12 && !brew._id) {
const googleId = brew.googleId;
const shareId = brew.shareId;
await GoogleActions.increaseView(googleId, shareId, 'share', brew)
.catch((err)=>{next(err);});
} else {
await HomebrewModel.increaseView({ shareId: brew.shareId });
}
// increase visitor view count, do not include visits by author(s)
if(!brew.authors.includes(req.account?.username)){
if(req.params.id.length > 12 && !brew._id) {
const googleId = brew.googleId;
const shareId = brew.shareId;
await GoogleActions.increaseView(googleId, shareId, 'share', brew)
.catch((err)=>{next(err);});
} else {
await HomebrewModel.increaseView({ shareId: brew.shareId });
}
};
sanitizeBrew(req.brew, 'share');
splitTextStyleAndMetadata(req.brew);
return next();
@@ -465,9 +460,18 @@ const getPureError = (error)=>{
};
app.use(async (err, req, res, next)=>{
const status = err.status || err.code || 500;
err.originalUrl = req.originalUrl;
console.error(err);
if(err.originalUrl?.startsWith('/api/')) {
// console.log('API error');
res.status(err.status || err.response?.status || 500).send(err);
return;
}
// console.log('non-API error');
const status = err.status || err.code || 500;
req.ogMeta = { ...defaultMetaTags,
title : 'Error Page',
description : 'Something went wrong!'

View File

@@ -106,7 +106,7 @@ const GoogleActions = {
const obj = await drive.files.list({
pageSize : 1000,
pageToken : NextPageToken || '',
fields : 'nextPageToken, files(id, name, description, createdTime, modifiedTime, properties)',
fields : 'nextPageToken, files(id, name, description, createdTime, modifiedTime, properties, webViewLink)',
q : 'mimeType != \'application/vnd.google-apps.folder\' and trashed = false'
})
.catch((err)=>{
@@ -139,7 +139,8 @@ const GoogleActions = {
published : file.properties.published ? file.properties.published == 'true' : false,
systems : [],
lang : file.properties.lang,
thumbnail : file.properties.thumbnail
thumbnail : file.properties.thumbnail,
webViewLink : file.webViewLink
};
});
return brews;

View File

@@ -79,7 +79,7 @@ const api = {
if(accessType === 'edit' && (authorsExist && !(isAuthor || isInvited))) {
const accessError = { name: 'Access Error', status: 401 };
if(req.account){
throw { ...accessError, message: 'User is not an Author', HBErrorCode: '03', authors: stub.authors, brewTitle: stub.title };
throw { ...accessError, message: 'User is not an Author', HBErrorCode: '03', authors: stub.authors, brewTitle: stub.title, shareId: stub.shareId };
}
throw { ...accessError, message: 'User is not logged in', HBErrorCode: '04', authors: stub.authors, brewTitle: stub.title };
}
@@ -153,6 +153,9 @@ const api = {
brew.text = api.mergeBrewText(brew);
_.defaults(brew, DEFAULT_BREW);
brew.title = brew.title.trim();
brew.description = brew.description.trim();
},
newGoogleBrew : async (account, brew, res)=>{
const oAuth2Client = GoogleActions.authCheck(account, res);
@@ -217,6 +220,8 @@ const api = {
const { saveToGoogle, removeFromGoogle } = req.query;
let afterSave = async ()=>true;
brew.title = brew.title.trim();
brew.description = brew.description.trim() || '';
brew.text = api.mergeBrewText(brew);
if(brew.googleId && removeFromGoogle) {

22
shared/helpers.js Normal file
View File

@@ -0,0 +1,22 @@
const _ = require('lodash');
const yaml = require('js-yaml');
const splitTextStyleAndMetadata = (brew) => {
brew.text = brew.text.replaceAll('\r\n', '\n');
if (brew.text.startsWith('```metadata')) {
const index = brew.text.indexOf('```\n\n');
const metadataSection = brew.text.slice(12, index - 1);
const metadata = yaml.load(metadataSection);
Object.assign(brew, _.pick(metadata, ['title', 'description', 'tags', 'systems', 'renderer', 'theme', 'lang']));
brew.text = brew.text.slice(index + 5);
}
if (brew.text.startsWith('```css')) {
const index = brew.text.indexOf('```\n\n');
brew.style = brew.text.slice(7, index - 1);
brew.text = brew.text.slice(index + 5);
}
};
module.exports = {
splitTextStyleAndMetadata
};

View File

@@ -1,36 +0,0 @@
let CodeMirror;
if(typeof navigator !== 'undefined'){
CodeMirror = require('codemirror');
//Language Modes
require('codemirror/mode/gfm/gfm.js'); //Github flavoured markdown
require('codemirror/mode/css/css.js');
require('codemirror/mode/javascript/javascript.js');
//Addons
//Code folding
require('codemirror/addon/fold/foldcode.js');
require('codemirror/addon/fold/foldgutter.js');
//Search and replace
require('codemirror/addon/search/search.js');
require('codemirror/addon/search/searchcursor.js');
require('codemirror/addon/search/jump-to-line.js');
require('codemirror/addon/search/match-highlighter.js');
require('codemirror/addon/search/matchesonscrollbar.js');
require('codemirror/addon/dialog/dialog.js');
//Trailing space highlighting
// require('codemirror/addon/edit/trailingspace.js');
//Active line highlighting
// require('codemirror/addon/selection/active-line.js');
//Scroll past last line
require('codemirror/addon/scroll/scrollpastend.js');
//Auto-closing
//XML code folding is a requirement of the auto-closing tag feature and is not enabled
require('codemirror/addon/fold/xml-fold.js');
require('codemirror/addon/edit/closetag.js');
const foldCode = require('./helpers/fold-code');
foldCode.registerHomebreweryHelper(CodeMirror);
}
module.exports = CodeMirror;

View File

@@ -4,15 +4,45 @@ const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames');
const closeTag = require('./helpers/close-tag');
const Hints = require('./helpers/widget-elements/hints/hints.jsx');
const CodeMirror = require('./code-mirror.js');
const closeTag = require('./close-tag');
const themeWidgets = require('../../../themes/V3/5ePHB/widgets');
let CodeMirror;
if(typeof window !== 'undefined'){
CodeMirror = require('codemirror');
//Language Modes
require('codemirror/mode/gfm/gfm.js'); //Github flavoured markdown
require('codemirror/mode/css/css.js');
require('codemirror/mode/javascript/javascript.js');
//Addons
//Code folding
require('codemirror/addon/fold/foldcode.js');
require('codemirror/addon/fold/foldgutter.js');
//Search and replace
require('codemirror/addon/search/search.js');
require('codemirror/addon/search/searchcursor.js');
require('codemirror/addon/search/jump-to-line.js');
require('codemirror/addon/search/match-highlighter.js');
require('codemirror/addon/search/matchesonscrollbar.js');
require('codemirror/addon/dialog/dialog.js');
//Trailing space highlighting
// require('codemirror/addon/edit/trailingspace.js');
//Active line highlighting
// require('codemirror/addon/selection/active-line.js');
//Scroll past last line
require('codemirror/addon/scroll/scrollpastend.js');
//Auto-closing
//XML code folding is a requirement of the auto-closing tag feature and is not enabled
require('codemirror/addon/fold/xml-fold.js');
require('codemirror/addon/edit/closetag.js');
const foldCode = require('./fold-code');
foldCode.registerHomebreweryHelper(CodeMirror);
}
const CodeEditor = createClass({
displayName : 'CodeEditor',
hintsRef : React.createRef(),
getDefaultProps : function() {
return {
language : '',
@@ -20,16 +50,13 @@ const CodeEditor = createClass({
wrap : true,
onChange : ()=>{},
enableFolding : true,
editorTheme : 'default'
};
},
getInitialState : function() {
return {
docs : {},
widgetUtils : {},
widgets : {},
hints : [],
hintsField : undefined,
docs : {}
};
},
@@ -66,8 +93,9 @@ const CodeEditor = createClass({
this.codeMirror.setOption('foldOptions', false);
}
this.state.widgetUtils.updateWidgetGutter();
this.state.widgetUtils.updateAllLineWidgets();
if(prevProps.editorTheme !== this.props.editorTheme){
this.codeMirror.setOption('theme', this.props.editorTheme);
}
},
buildEditor : function() {
@@ -84,6 +112,10 @@ const CodeEditor = createClass({
'Shift-Tab' : this.dedent,
'Ctrl-B' : this.makeBold,
'Cmd-B' : this.makeBold,
'Shift-Ctrl-=' : this.makeSuper,
'Shift-Cmd-=' : this.makeSuper,
'Ctrl-=' : this.makeSub,
'Cmd-=' : this.makeSub,
'Ctrl-I' : this.makeItalic,
'Cmd-I' : this.makeItalic,
'Ctrl-U' : this.makeUnderline,
@@ -132,10 +164,11 @@ const CodeEditor = createClass({
},
foldGutter : true,
foldOptions : this.foldOptions(this.codeMirror),
gutters : ['CodeMirror-linenumbers', 'CodeMirror-foldgutter', 'widget-gutter'],
gutters : ['CodeMirror-linenumbers', 'CodeMirror-foldgutter'],
autoCloseTags : true,
styleActiveLine : true,
showTrailingSpace : false,
theme : this.props.editorTheme
// specialChars : / /,
// specialCharPlaceholder : function(char) {
// const el = document.createElement('span');
@@ -146,69 +179,9 @@ const CodeEditor = createClass({
});
closeTag.autoCloseCurlyBraces(CodeMirror, this.codeMirror);
this.setState({
widgetUtils : require('./helpers/widgets')(themeWidgets, this.codeMirror, (hints, field)=>{
this.setState({
hints,
hintsField : field
});
})
});
// Note: codeMirror passes a copy of itself in this callback. cm === this.codeMirror. Either one works.
this.codeMirror.on('change', (cm)=>{
this.props.onChange(cm.getValue());
this.state.widgetUtils.updateWidgetGutter();
});
this.codeMirror.on('cursorActivity', (cm)=>{
const { line } = cm.getCursor();
for (const key in this.state.widgets) {
if(key != line) {
this.state.widgetUtils.removeLineWidget(key, this.state.widgets[key]);
}
}
this.setState({
hints : [],
hintsField : undefined
});
const { widgets } = this.codeMirror.lineInfo(line);
if(!widgets) {
const widget = this.state.widgetUtils.updateLineWidgets(line);
if(widget) {
this.setState({
widgets : {
[line] : widget
}
});
}
}
});
this.codeMirror.on('change', (cm)=>{this.props.onChange(cm.getValue());});
this.updateSize();
this.codeMirror.on('gutterClick', (cm, n)=>{
// Open line widgets when 'widget-gutter' marker clicked
if(this.codeMirror.lineInfo(n).gutterMarkers?.['widget-gutter']) {
const { widgets } = this.codeMirror.lineInfo(n);
if(!widgets) {
const widget = this.state.widgetUtils.updateLineWidgets(n);
if(widget) {
this.setState({
widgets : { ...this.state.widgets, [n]: widget }
});
}
} else {
for (const widget of widgets) {
this.state.widgetUtils.removeLineWidget(n, widget);
}
this.setState({
hints : [],
hintsField : undefined
});
}
}
});
},
indent : function () {
@@ -250,6 +223,25 @@ const CodeEditor = createClass({
}
},
makeSuper : function() {
const selection = this.codeMirror.getSelection(), t = selection.slice(0, 1) === '^' && selection.slice(-1) === '^';
this.codeMirror.replaceSelection(t ? selection.slice(1, -1) : `^${selection}^`, 'around');
if(selection.length === 0){
const cursor = this.codeMirror.getCursor();
this.codeMirror.setCursor({ line: cursor.line, ch: cursor.ch - 1 });
}
},
makeSub : function() {
const selection = this.codeMirror.getSelection(), t = selection.slice(0, 2) === '^^' && selection.slice(-2) === '^^';
this.codeMirror.replaceSelection(t ? selection.slice(2, -2) : `^^${selection}^^`, 'around');
if(selection.length === 0){
const cursor = this.codeMirror.getCursor();
this.codeMirror.setCursor({ line: cursor.line, ch: cursor.ch - 2 });
}
},
makeNbsp : function() {
this.codeMirror.replaceSelection('&nbsp;', 'end');
},
@@ -440,19 +432,13 @@ const CodeEditor = createClass({
}
};
},
keyDown : function(e) {
if(this.hintsRef.current) {
this.hintsRef.current.keyDown(e);
}
},
//----------------------//
render : function(){
const { hints, hintsField } = this.state;
return <React.Fragment>
<div className='codeEditor' ref='editor' style={this.props.style} onKeyDown={this.keyDown}/>
<Hints ref={this.hintsRef} hints={hints} field={hintsField}/>
</React.Fragment>;
return <>
<link href={`../homebrew/cm-themes/${this.props.editorTheme}.css`} type="text/css" rel='stylesheet' />
<div className='codeEditor' ref='editor' style={this.props.style}/>
</>;
}
});

View File

@@ -2,8 +2,6 @@
@import (less) 'codemirror/addon/fold/foldgutter.css';
@import (less) 'codemirror/addon/search/matchesonscrollbar.css';
@import (less) 'codemirror/addon/dialog/dialog.css';
@import (less) 'codemirror/addon/hint/show-hint.css';
@import 'naturalcrit/styles/colors.less';
@keyframes sourceMoveAnimation {
50% {background-color: red; color: white;}
@@ -11,12 +9,15 @@
}
.codeEditor{
@media screen and (pointer : coarse) {
font-size : 16px;
}
.CodeMirror-foldmarker {
font-family: inherit;
text-shadow: none;
font-weight: 600;
color: grey;
}
}
.sourceMoveFlash .CodeMirror-line{
animation-name: sourceMoveAnimation;
@@ -32,51 +33,4 @@
// background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAQAgMAAABW5NbuAAAACVBMVEVHcEwAAAAAAAAWawmTAAAAA3RSTlMAPBJ6PMxpAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAFUlEQVQI12NgwACcCQysASAEZGAAACMuAX06aCQUAAAAAElFTkSuQmCC) no-repeat right;
// }
//}
.widget-gutter {
width: .7em;
}
.snippet-options-widget {
padding: 2px 0;
>div {
display: flex;
flex-wrap: wrap;
}
* {
margin: 0 2px 2px 2px;
}
input {
max-width: 10vw;
}
}
.widget-field {
border: 2px solid #ddd;
&.default {
background-color: @purple;
border: 2px solid @purple;
color: white;
>input {
background-color: @purple;
color: white;
}
}
&.suggested {
background-color: #ddd;
border: 2px dashed grey;
color: grey;
>input {
background-color: #ddd;
color: black;
}
}
}
}

View File

@@ -1,48 +0,0 @@
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
require('./checkbox.less');
const CodeMirror = require('../../../code-mirror.js');
const Checkbox = createClass({
getDefaultProps : function() {
return {
value : '',
prefix : '',
cm : {},
n : -1,
default : false
};
},
handleChange : function (e) {
const { cm, n, value, prefix } = this.props;
const { text } = cm.lineInfo(n);
const updatedPrefix = `{{${prefix}`;
if(e.target?.checked)
cm.replaceRange(`,${value}`, CodeMirror.Pos(n, updatedPrefix.length), CodeMirror.Pos(n, updatedPrefix.length), '+insert');
else {
const start = text.indexOf(`,${value}`);
if(start > -1)
cm.replaceRange('', CodeMirror.Pos(n, start), CodeMirror.Pos(n, start + value.length + 1), '-delete');
}
},
render : function() {
const { cm, n, value, prefix, def } = this.props;
const { text } = cm.lineInfo(n);
const id = [prefix, value, n].join('-');
let className = 'widget-field widget-checkbox';
if(def) {
className += ' default';
}
return <React.Fragment>
<div className={className}>
<input type='checkbox' id={id} onChange={this.handleChange} checked={_.includes(text, `,${value}`)}/>
<label htmlFor={id}>{_.startCase(value)}</label>
</div>
</React.Fragment>;
}
});
module.exports = Checkbox;

View File

@@ -1,7 +0,0 @@
.widget-checkbox {
display: inline-block;
flex: 0 0 auto;
background-color: #ddd;
border-radius: 10px;
padding: 4px 2px;
}

View File

@@ -1,95 +0,0 @@
require('./color-selector.less');
const React = require('react');
const createClass = require('create-react-class');
const { PATTERNS, STYLE_FN, SNIPPET_TYPE } = require('../constants');
const CodeMirror = require('../../../code-mirror');
const debounce = require('lodash.debounce');
const ColorSelector = createClass({
getDefaultProps : function() {
return {
field : {},
cm : {},
n : undefined,
text : '',
def : false
};
},
getInitialState : function() {
return {
value : ''
};
},
componentDidMount : function() {
const { field, text } = this.props;
const pattern = PATTERNS.field[field.type](field.name);
const [_, __, value] = text.match(pattern) ?? [];
this.setState({
value : value,
});
},
componentDidUpdate({ text }) {
const { field } = this.props;
if(this.props.text !== text) {
const pattern = PATTERNS.field[field.type](field.name);
const [_, __, value] = this.props.text.match(pattern) ?? [];
this.setState({
value,
});
}
},
onChange : function(e) {
const { cm, text, field, n, snippetType } = this.props;
const pattern = PATTERNS.field[field.type](field.name);
const [_, label, current] = text.match(pattern) ?? [null, field.name, ''];
let index = text.indexOf(`${label}:${current}`);
while (index !== -1 && text[index - 1] === '-') {
index = text.indexOf(`${label}:${current}`, index + 1);
}
let value = e.target.value;
if(index === -1) {
if(snippetType === SNIPPET_TYPE.INLINE) {
index = text.indexOf('}');
}
index = index === -1 ? text.length : index;
value = `,${field.name}:${value}`;
} else {
index = index + 1 + field.name.length;
}
cm.replaceRange(value, CodeMirror.Pos(n, index), CodeMirror.Pos(n, index + current.length), '+insert');
this.setState({
value : e.target.value,
});
},
debounce : debounce((self, e)=>self.onChange(e), 300),
onChangeDebounce : function(e) {
this.setState({
value : e.target.value,
});
this.debounce(this, e);
},
render : function() {
const { field, n, text, def } = this.props;
const { value } = this.state;
const style = STYLE_FN(value);
const id = `${field?.name}-${n}`;
const pattern = PATTERNS.field[field.type](field.name);
const [_, label, __] = text.match(pattern) ?? [null, undefined, ''];
let className = 'widget-field color-selector';
if(!label) {
className += ' suggested';
}
if(def) {
className += ' default';
}
return <React.Fragment>
<div className={className}>
<label htmlFor={id}>{field.name}:</label>
<input className='color' type='color' value={value} onChange={this.onChangeDebounce}/>
<input id={id} className='text' type='text' style={style} value={value} onChange={this.onChange}/>
</div>
</React.Fragment>;
}
});
module.exports = ColorSelector;

View File

@@ -1,8 +0,0 @@
.color-selector {
.color {
height: 17px;
width: 13px;
padding: 0;
margin: 0;
}
}

View File

@@ -1,50 +0,0 @@
const _ = require('lodash');
export const UNITS = ['cm', 'mm', 'in', 'px', 'pt', 'pc', 'em', 'ex', 'ch', 'rem', 'vw', 'vh', 'vmin', 'vmax', '%'];
export const HINT_TYPE = {
VALUE : 0,
NUMBER_SUFFIX : 1
};
export const SNIPPET_TYPE = {
BLOCK : 0,
INLINE : 1,
INJECTOR : 2,
};
export const FIELD_TYPE = {
TEXT : 0,
CHECKBOX : 1,
IMAGE_SELECTOR : 2,
COLOR_SELECTOR : 3,
};
const textField = (name)=>new RegExp(`[{,;](${name}):([^};,"\\(]*\\((?!,)[^};"\\)]*\\)|"[^},;"]*"|[^},;]*)`);
export const PATTERNS = {
snippet : {
[SNIPPET_TYPE.BLOCK] : (name)=>new RegExp(`^{{${name}(?:[^a-zA-Z].*)?`),
[SNIPPET_TYPE.INLINE] : (name)=>new RegExp(`{{${name}`),
[SNIPPET_TYPE.INJECTOR] : ()=>new RegExp(`^\\!\\[(?:[a-zA-Z -]+)?\\]\\(.*\\).*{[a-zA-Z0-9:, "'-]+}$`),
},
field : {
[FIELD_TYPE.TEXT] : textField,
[FIELD_TYPE.IMAGE_SELECTOR] : (name)=>new RegExp(`{{(${name})(\\d*)`),
[FIELD_TYPE.COLOR_SELECTOR] : textField
},
collectStyles : new RegExp(`(?:([a-zA-Z-]+):(?!\\/))+`, 'g'),
};
export const NUMBER_PATTERN = new RegExp(`([^-\\d]*)([-\\d]+)(${UNITS.join('|')})?(.*)`);
export const fourDigitNumberFromValue = (value)=>typeof value === 'number' ? (()=>{
const str = String(value);
return _.range(0, 4 - str.length).map(()=>'0').join('') + str;
})() : value;
const DEFAULT_WIDTH = '30px';
export const STYLE_FN = (value, extras = {})=>({
width : `calc(${value?.length ?? 0}ch + ${value?.length ? `${DEFAULT_WIDTH} / 2` : DEFAULT_WIDTH})`,
...extras
});

View File

@@ -1,128 +0,0 @@
const React = require('react');
const createClass = require('create-react-class');
const { NUMBER_PATTERN } = require('../constants');
const Hints = createClass({
hintsRef : React.createRef(),
activeHintRef : React.createRef(),
getDefaultProps : function() {
return {
hints : [],
field : undefined,
};
},
getInitialState : function() {
return {
activeHint : 0
};
},
componentDidUpdate : function({ hints }) {
const hintsLength = this.props.hints.length;
if(hintsLength - 1 < this.state.activeHint && hintsLength !== hints.length) {
this.setState({
activeHint : hintsLength === 0 ? 0 : hintsLength - 1
});
return;
}
if(this.hintsRef.current && this.activeHintRef.current) {
const offset = this.activeHintRef.current.offsetTop;
const scrollTop = this.hintsRef.current.scrollTop;
if(scrollTop + 50 < offset || scrollTop + 50 > offset) {
this.hintsRef.current.scrollTo({
top : offset - 50,
behavior : 'smooth'
});
}
}
},
componentDidMount : function() {},
keyDown : function(e) {
const { code } = e;
const { activeHint } = this.state;
const { hints, field } = this.props;
const match = field?.state?.value?.match(NUMBER_PATTERN);
if(code === 'ArrowDown') {
e.preventDefault();
if(!match || !match?.at(3)) {
this.setState({
activeHint : activeHint === hints.length - 1 ? 0 : activeHint + 1
});
}
} else if(code === 'ArrowUp') {
e.preventDefault();
if(!match || !match?.at(3)) {
this.setState({
activeHint : activeHint === 0 ? hints.length - 1 : activeHint - 1
});
}
} else if(code === 'Enter') {
e.preventDefault();
if(!match || !match?.at(3)) {
field?.hintSelected(hints[activeHint]);
this.setState({
activeHint : 0
});
}
}
},
render : function() {
const { activeHint } = this.state;
const { hints, field } = this.props;
if(!field) return null;
const bounds = field.fieldRef[field.state.id]?.current?.getBoundingClientRect();
if(!bounds) return null;
const hintElements = hints
.filter((h)=>h.hint !== field.state.value)
.map((h, i)=>{
let className = 'CodeMirror-hint';
if(activeHint === i) {
className += ' CodeMirror-hint-active';
return <li key={i}
role={'option'}
className={className}
onMouseDown={(e)=>field.hintSelected(h, e)}
ref={this.activeHintRef}>
{h.hint}
</li>;
}
return <li key={i}
role={'option'}
className={className}
onMouseDown={(e)=>field.hintSelected(h, e)}>
{h.hint}
</li>;
});
let style = {
display : 'none'
};
if(hintElements.length > 0) {
style = {
...style,
display : 'block',
top : `${bounds.top - 5}px`,
left : `${bounds.left}px`
};
}
return <React.Fragment>
<ul role={'listbox'}
id={'hints'}
aria-expanded={true}
className={'CodeMirror-hints default'}
style={style}
ref={this.hintsRef}>
{hintElements}
</ul>
</React.Fragment>;
}
});
module.exports = Hints;

View File

@@ -1,92 +0,0 @@
require('./image-selector.less');
const React = require('react');
const createClass = require('create-react-class');
const { Modal, modalHelpers } = require('../modal/modal.jsx');
const { PATTERNS } = require('../constants.js');
const CodeMirror = require('../../../code-mirror.js');
const _ = require('lodash');
const ImageSelector = createClass({
modalRef : React.createRef(),
getDefaultProps : function () {
return {
field : {},
cm : {},
n : undefined
};
},
getInitialState : function() {
return {
selected : undefined,
};
},
componentDidMount : function() {
modalHelpers.mount(this);
},
componentDidUpdate : function() {
const { name, preview, values } = this.props.field;
const { selected } = this.state;
const images = values.map((v, i)=>{
const className = String(selected) === String(v) ? 'selected' : '';
return <img key={i} className={className} src={preview(v)} alt={`${name} image ${v}`} onClick={()=>this.select(v)}/>;
});
this.state.modalRoot?.render(<Modal ref={this.modalRef} header={_.startCase(name)} save={this.save}>
<div className={'images'}>
{images}
</div>
</Modal>);
},
componentWillUnmount : function() {
modalHelpers.unmount(this);
},
save : function() {
const { cm, field, n } = this.props;
const { text } = cm.lineInfo(n);
const pattern = PATTERNS.field[field.type](field.name);
const [fullmatch, label, current] = text.match(pattern);
if(!fullmatch) {
console.warn('something is wrong... please report this warning with a screenshot');
return;
}
const currentText = `${label}${current ?? ''}`;
const index = 2;
const value = label + this.state.selected;
cm.replaceRange(value, CodeMirror.Pos(n, index), CodeMirror.Pos(n, index + currentText.length), '+insert');
},
select : function(value) {
this.setState({
selected : value
});
},
showModal : function() {
const { cm, field, n } = this.props;
const { text } = cm.lineInfo(n);
const pattern = PATTERNS.field[field.type](field.name);
const [fullmatch, _, current] = text.match(pattern);
if(!fullmatch) {
return;
}
this.setState({
selected : current
});
this.modalRef.current.setVisible(true);
},
render : function () {
return <React.Fragment>
<button onClick={this.showModal}>Select Image</button>
</React.Fragment>;
}
});
module.exports = ImageSelector;

View File

@@ -1,23 +0,0 @@
.images {
display: flex;
flex-direction: row;
flex-wrap: wrap;
max-height: 60vh;
overflow-y: scroll;
img {
flex: 0 0 auto;
max-width: 10vw;
max-height: 20vh;
border-radius: 10px;
&:hover {
background-color: rgba(0, 0, 0, .1);
}
&.selected {
background-color: rgba(0, 0, 0, .175);
}
}
}

View File

@@ -1,11 +0,0 @@
const Text = require('./text/text.jsx');
const Checkbox = require('./checkbox/checkbox.jsx');
const ImageSelector = require('./image-selector/image-selector.jsx');
const ColorSelector = require('./color-selector/color-selector.jsx');
module.exports = {
Text : Text,
Checkbox : Checkbox,
ImageSelector : ImageSelector,
ColorSelector : ColorSelector,
};

View File

@@ -1,75 +0,0 @@
require('./modal.less');
const React = require('react');
const ReactDOMClient = require('react-dom/client');
const createClass = require('create-react-class');
const Modal = createClass({
getDefaultProps : function () {
return {
header : '',
save : ()=>{},
};
},
getInitialState : function() {
return {
visible : false,
};
},
setVisible : function(visible) {
this.setState({
visible
});
},
save : function() {
this.props.save();
this.setVisible(false);
},
render : function () {
const { children, header } = this.props;
const { visible } = this.state;
return <React.Fragment>
{visible ? <div className={'bg-cover'}>
<div className={'modal'}>
<h1>{header}</h1>
<hr/>
{children}
<div className={'action-row'}>
<button id={'save'} onClick={()=>this.save()}>Save</button>
<button id={'cancel'} onClick={()=>this.setVisible(false)}>Cancel</button>
</div>
</div>
</div> : null}
</React.Fragment>;
}
});
module.exports = {
/*
* Requirements:
* - modalRef member variable
* - should be re-rendered via `this.state.modalRoot?.render` in `componentDidUpdate`
*/
Modal,
modalHelpers : {
// should be called in `componentDidMount`
// `self` should be passed as the component instance (`this`)
mount : (self)=>{
const el = document.createElement('div');
const root = ReactDOMClient.createRoot(el);
document.querySelector('body').append(el);
self.setState({
el,
modalRoot : root
});
},
// should be called in `componentWillUnmount`
// `self` should be passed as the component instance (`this`)
unmount : (self)=>{
self.state.el.remove();
}
}
};

View File

@@ -1,58 +0,0 @@
@import 'naturalcrit/styles/colors.less';
.bg-cover {
width: 100vw;
height: 100vh;
position: absolute;
z-index: 10000000;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, .5);
}
.modal {
position: absolute;
top: 10vh;
left: 25vw;
width: 50vw;
min-height: 50vh;
max-height: 80vh;
background-color: #fff;
border-radius: 10px;
box-shadow: 5px 5px 50px black;
display: flex;
flex-direction: column;
justify-content: space-between;
h1 {
margin-top: 5px;
margin-left: 5px;
font-size: 2em;
}
>* {
flex: 0 0 auto;
}
.action-row {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: left;
>* {
flex: 0 0 auto;
margin-left: 5px;
}
}
button {
&#cancel {
background-color: @redLight;
&:hover {
background-color: @red;
}
}
}
}

View File

@@ -1,165 +0,0 @@
require('./text.less');
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const { NUMBER_PATTERN, HINT_TYPE, PATTERNS, STYLE_FN, FIELD_TYPE, SNIPPET_TYPE } = require('../constants');
const CodeMirror = require('../../../code-mirror.js');
const Text = createClass({
fieldRef : {},
getDefaultProps : function() {
return {
field : {},
text : '',
n : 0,
setHints : ()=>{},
onChange : ()=>{},
getStyleHints : ()=>{},
def : false,
snippetType : -1
};
},
getInitialState : function() {
return {
value : '',
id : ''
};
},
componentDidUpdate : function({ text }, { value }) {
if(this.props.text !== text) {
const { field, n } = this.props;
const pattern = PATTERNS.field[field.type](field.name);
const [_, __, value] = this.props.text.match(pattern) ?? [];
this.setState({
value : value,
id : `${field?.name}-${n}`
});
}
if(this.state.value !== value) {
const { field } = this.props;
this.props.setHints(this, field.hints ? this.props.getStyleHints(field, this.state.value) : []);
}
},
componentDidMount : function() {
const { field, text, n } = this.props;
const id = `${field?.name}-${n}`;
const pattern = PATTERNS.field[field.type](field.name);
const [_, __, value] = text.match(pattern) ?? [];
this.setState({
value : value,
id
});
this.fieldRef[id] = React.createRef();
},
componentWillUnmount : function() {
this.fieldRef = undefined;
this.fieldRef = {};
this.fieldRef[this.state.id]?.remove();
},
setFocus : function(e) {
const { type } = e;
const { field } = this.props;
this.props.setHints(this, type === 'focus' && field.hints ? this.props.getStyleHints(field, this.state.value) : []);
},
hintSelected : function(h, e) {
let value;
if(h?.type === HINT_TYPE.VALUE) {
value = h.hint;
} else if(h?.type === HINT_TYPE.NUMBER_SUFFIX) {
const match = this.state.value.match(NUMBER_PATTERN);
let suffix = match?.at(4) ?? '';
for (const char of h.hint) {
if(suffix.at(0) === char) {
suffix = suffix.slice(1);
}
}
value = `${match?.at(1) ?? ''}${match?.at(2) ?? ''}${h.hint}${suffix}`;
}
this.onChange({
target : {
value
}
});
},
keyDown : function(e) {
const { code } = e;
const { field } = this.props;
const { value } = this.state;
const match = value?.match(NUMBER_PATTERN);
if(code === 'ArrowDown') {
if(match && CSS.supports(field.name, value)) {
e.preventDefault();
this.onChange({
target : {
value : `${match.at(1) ?? ''}${Number(match[2]) - field.increment}${match[3] ?? ''}${match.at(4) ?? ''}`
}
});
}
} else if(code === 'ArrowUp') {
if(match && CSS.supports(field.name, value)) {
e.preventDefault();
this.onChange({
target : {
value : `${match.at(1) ?? ''}${Number(match[2]) + field.increment}${match[3] ?? ''}${match.at(4) ?? ''}`
}
});
}
}
},
onChange : function (e){
const { cm, text, field, n, snippetType } = this.props;
const pattern = PATTERNS.field[field.type](field.name);
const [_, label, current] = text.match(pattern) ?? [null, field.name, ''];
let index = text.indexOf(`${label}:${current}`);
let value = e.target.value;
if(index === -1) {
if(snippetType === SNIPPET_TYPE.INLINE) {
index = text.indexOf('}');
}
index = index === -1 ? text.length : index;
value = `,${field.name}:${value}`;
} else {
index = index + 1 + field.name.length;
}
cm.replaceRange(value, CodeMirror.Pos(n, index), CodeMirror.Pos(n, index + current.length), '+insert');
this.setState({
value : e.target.value,
});
},
render : function() {
const { value, id } = this.state;
const { field, text, def } = this.props;
const style = STYLE_FN(value);
const pattern = PATTERNS.field[field.type](field.name);
const [_, label, __] = text.match(pattern) ?? [null, undefined, ''];
let className = 'widget-field';
if(!label) {
className += ' suggested';
}
if(def) {
className += ' default';
}
return <React.Fragment>
<div className={className}>
<label htmlFor={id}>{field.name}:</label>
<input id={id} type='text' value={value}
style={style}
ref={this.fieldRef[id]}
onChange={this.onChange}
onFocus={this.setFocus}
onBlur={this.setFocus}
onKeyDown={this.keyDown}/>
</div>
</React.Fragment>;
}
});
module.exports = Text;

View File

@@ -1,37 +0,0 @@
.widget-field {
display: inline-block;
flex: 0 0 auto;
background-color: #ddd;
border-radius: 10px;
padding: 4px 2px;
>label {
display: inline;
width: 50px;
margin: 0 0;
}
>input {
background-color: #ddd;
border: none;
}
>.hints {
position: relative;
left: 30px;
max-height: 100px;
overflow-y: scroll;
background-color: white;
>.hint {
margin: 0 0;
padding: 2px;
cursor: default;
&:hover,
&.active {
background-color: rgba(0, 0, 0, 0.1);
}
}
}
}

View File

@@ -1,188 +0,0 @@
const React = require('react');
const ReactDOMClient = require('react-dom/client');
const { PATTERNS, FIELD_TYPE, HINT_TYPE, UNITS } = require('./widget-elements/constants');
require('./widget-elements/hints/hints.jsx');
const { Text, Checkbox, ImageSelector, ColorSelector } = require('./widget-elements');
const CodeMirror = require('../code-mirror.js');
// See https://codemirror.net/5/addon/hint/css-hint.js for code reference
const pseudoClasses = { 'active' : 1, 'after' : 1, 'before' : 1, 'checked' : 1, 'default' : 1,
'disabled' : 1, 'empty' : 1, 'enabled' : 1, 'first-child' : 1, 'first-letter' : 1,
'first-line' : 1, 'first-of-type' : 1, 'focus' : 1, 'hover' : 1, 'in-range' : 1,
'indeterminate' : 1, 'invalid' : 1, 'lang' : 1, 'last-child' : 1, 'last-of-type' : 1,
'link' : 1, 'not' : 1, 'nth-child' : 1, 'nth-last-child' : 1, 'nth-last-of-type' : 1,
'nth-of-type' : 1, 'only-of-type' : 1, 'only-child' : 1, 'optional' : 1, 'out-of-range' : 1,
'placeholder' : 1, 'read-only' : 1, 'read-write' : 1, 'required' : 1, 'root' : 1,
'selection' : 1, 'target' : 1, 'valid' : 1, 'visited' : 1
};
const genKey = (...args)=>args.join('-');
module.exports = function(widgets, cm, setHints) {
const roots = {};
const spec = CodeMirror.resolveMode('text/css');
const headless = CodeMirror(()=>{});
const makeTempCSSDoc = (value)=>CodeMirror.Doc(`.selector {\n${value}\n}`, 'text/css');
// See https://codemirror.net/5/addon/hint/css-hint.js for code reference
const getStyleHints = (field, value)=>{
const tempDoc = makeTempCSSDoc(`${field.name}:${value?.replaceAll(`'"`, '') ?? ''}`);
headless.swapDoc(tempDoc);
const pos = CodeMirror.Pos(1, field.name.length + 1 + (value?.length ?? 0), false);
const token = headless.getTokenAt(pos);
const inner = CodeMirror.innerMode(tempDoc.getMode(), token?.state);
if(inner.mode.name !== 'css') return;
if(token.type === 'keyword' && '!important'.indexOf(token.string) === 0)
return { list : ['!important'], from : CodeMirror.Pos(pos.line, token.start),
to : CodeMirror.Pos(pos.line, token.end) };
let start = token.start, end = pos.ch, word = token.string.slice(0, end - start);
if(/[^\w$_-]/.test(word)) {
word = ''; start = end = pos.ch;
}
let result = [];
const add = (keywords)=>{
for (const name in keywords)
if(!word || name.lastIndexOf(word, 0) === 0)
result.push(name);
};
const st = inner.state.state;
if(st === 'pseudo' || token.type === 'variable-3') {
add(pseudoClasses);
} else if(st === 'block' || st === 'maybeprop') {
add(spec.propertyKeywords);
} else if(st === 'prop' || st === 'parens' || st === 'at' || st === 'params') {
add(spec.valueKeywords);
add(spec.colorKeywords);
} else if(st === 'media' || st === 'media_parens') {
add(spec.mediaTypes);
add(spec.mediaFeatures);
}
result = result.map((h)=>({ hint: h, type: HINT_TYPE.VALUE }))
.filter((h)=>CSS.supports(field.name, h.hint) && h.hint.includes(value ?? ''));
const numberSuffix = word.slice(-4).replaceAll(/\d/g, '');
if(token.type === 'number' && !UNITS.includes(numberSuffix)) {
result.push(...UNITS
.filter((u)=>u.includes(numberSuffix) && CSS.supports(field.name, `${value.replaceAll(/\D/g, '') ?? ''}${u}`))
.map((u)=>({ hint: u, type: HINT_TYPE.NUMBER_SUFFIX }))
);
}
return result;
};
const widgetOptions = widgets.map((widget)=>({
name : widget.name,
pattern : PATTERNS.snippet[widget.type](widget.name),
renderWidget : (n, node)=>{
roots[n] = roots[n] ?? {};
const parent = document.createElement('div');
const id = `${widget.name}-${n}`;
parent.id = id;
const textFieldNames = (widget.fields || []).filter((f)=>f.type === FIELD_TYPE.TEXT || f.type === FIELD_TYPE.COLOR_SELECTOR).map((f)=>f.name);
const { text } = cm.lineInfo(n);
const fields = (widget.fields || []).map((field)=>{
const key = genKey(widget.name, n, field.name);
if(field.type === FIELD_TYPE.CHECKBOX) {
return <Checkbox key={key} cm={cm} n={n} prefix={widget.name} value={field.name} def={true}/>;
} else if(field.type === FIELD_TYPE.TEXT) {
return <Text key={key} field={field} cm={cm} n={n} text={text} setHints={(f, h)=>setHints(h, f)} getStyleHints={getStyleHints} def={true} snippetType={widget.type}/>;
} else if(field.type === FIELD_TYPE.IMAGE_SELECTOR) {
return <ImageSelector key={key} field={field} cm={cm} n={n}/>;
} else if(field.type === FIELD_TYPE.COLOR_SELECTOR) {
return <ColorSelector key={key} field={field} cm={cm} n={n} text={text} def={true} snippetType={widget.type}/>;
} else {
return null;
}
}).filter(Boolean);
const styles = [...text.matchAll(PATTERNS.collectStyles)].map(([_, style])=>{
if(textFieldNames.includes(style)) return false;
const field = {
name : style,
type : FIELD_TYPE.TEXT,
increment : 5,
hints : true,
};
const key = genKey(widget.name, n, style);
if(style.includes('color')) {
return <ColorSelector key={key} field={field} cm={cm} n={n} text={text} snippetType={widget.type}/>;
}
return <Text key={key} field={field} cm={cm} n={n} text={text} setHints={(f, h)=>setHints(h, f)} getStyleHints={getStyleHints} snippetType={widget.type}/>;
}).filter(Boolean);
const root = roots[n][id] ?? ReactDOMClient.createRoot(node || parent);
root.render(<React.Fragment>
{fields}
{styles}
</React.Fragment>);
roots[n][id] = root;
return node || parent;
}
}));
const updateLineWidgets = (n)=>{
const { text, widgets } = cm.lineInfo(n);
const widgetOption = widgetOptions.find((option)=>!!text.match(option.pattern));
if(!widgetOption) return;
if(!!widgets) {
for (const widget of widgets) {
widgetOption.renderWidget(n, widget.node);
}
} else {
return cm.addLineWidget(n, widgetOption.renderWidget(n), {
above : false,
coverGutter : false,
noHScroll : true,
className : `snippet-options-widget ${widgetOption.name}-widget ${widgetOption.name}-widget-${n}`
});
}
};
return {
roots,
removeLineWidget : (n, widget)=>{
roots[n][widget.node.id]?.unmount();
delete roots[n][widget.node.id];
widget?.clear();
},
updateLineWidgets,
updateAllLineWidgets : ()=>{
for (let i = 0; i < cm.lineCount(); i++) {
const { widgets } = cm.lineInfo(i);
if(!!widgets) {
updateLineWidgets(i);
}
}
},
updateWidgetGutter : ()=>{
cm.operation(()=>{
for (let i = 0; i < cm.lineCount(); i++) {
const { text, widgets } = cm.lineInfo(i);
if(widgetOptions.some((option)=>text.match(option.pattern))) {
if(widgets) {
continue;
}
const optionsMarker = document.createElement('div');
optionsMarker.style.color = '#822';
optionsMarker.style.cursor = 'pointer';
optionsMarker.innerHTML = '●';
cm.setGutterMarker(i, 'widget-gutter', optionsMarker);
} else {
cm.setGutterMarker(i, 'widget-gutter', null);
}
}
});
}
};
};

View File

@@ -4,7 +4,40 @@ const Marked = require('marked');
const MarkedExtendedTables = require('marked-extended-tables');
const { markedSmartypantsLite: MarkedSmartypantsLite } = require('marked-smartypants-lite');
const { gfmHeadingId: MarkedGFMHeadingId } = require('marked-gfm-heading-id');
const MathParser = require('expr-eval').Parser;
const renderer = new Marked.Renderer();
const tokenizer = new Marked.Tokenizer();
//Limit math features to simple items
const mathParser = new MathParser({
operators : {
// These default to true, but are included to be explicit
add : true,
subtract : true,
multiply : true,
divide : true,
power : true,
round : true,
floor : true,
ceil : true,
sin : false, cos : false, tan : false, asin : false, acos : false,
atan : false, sinh : false, cosh : false, tanh : false, asinh : false,
acosh : false, atanh : false, sqrt : false, cbrt : false, log : false,
log2 : false, ln : false, lg : false, log10 : false, expm1 : false,
log1p : false, abs : false, trunc : false, join : false, sum : false,
'-' : false, '+' : false, exp : false, not : false, length : false,
'!' : false, sign : false, random : false, fac : false, min : false,
max : false, hypot : false, pyt : false, pow : false, atan2 : false,
'if' : false, gamma : false, roundTo : false, map : false, fold : false,
filter : false, indexOf : false,
remainder : false, factorial : false,
comparison : false, concatenate : false,
logical : false, assignment : false,
array : false, fndef : false
}
});
//Processes the markdown within an HTML block if it's just a class-wrapper
renderer.html = function (html) {
@@ -28,13 +61,40 @@ renderer.paragraph = function(text){
return `<p>${text}</p>\n`;
};
//Fix local links in the Preview iFrame to link inside the frame
renderer.link = function (href, title, text) {
let self = false;
if(href[0] == '#') {
self = true;
}
href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);
if(href === null) {
return text;
}
let out = `<a href="${escape(href)}"`;
if(title) {
out += ` title="${title}"`;
}
if(self) {
out += ' target="_self"';
}
out += `>${text}</a>`;
return out;
};
// Disable default reflink behavior, as it steps on our variables extension
tokenizer.def = function () {
return undefined;
};
const mustacheSpans = {
name : 'mustacheSpans',
level : 'inline', // Is this a block-level or inline-level tokenizer?
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
@@ -45,7 +105,7 @@ const mustacheSpans = {
let delim;
while (delim = inlineRegex.exec(match[0])) {
if(!tags) {
tags = ` ${processStyleTags(delim[0].substring(2))}`;
tags = `${processStyleTags(delim[0].substring(2))}`;
endTags = delim[0].length;
}
if(delim[0].startsWith('{{')) {
@@ -84,7 +144,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
@@ -95,8 +155,8 @@ const mustacheDivs = {
let delim;
while (delim = blockRegex.exec(match[0])?.[0].trim()) {
if(!tags) {
tags = ` ${processStyleTags(delim.substring(2))}`;
endTags = delim.length;
tags = `${processStyleTags(delim.substring(2))}`;
endTags = delim.length + src.indexOf(delim);
}
if(delim.startsWith('{{')) {
blockCount++;
@@ -132,14 +192,14 @@ 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];
if(!lastToken || lastToken.type == 'mustacheInjectInline')
return false;
const tags = ` ${processStyleTags(match[1])}`;
const tags = `${processStyleTags(match[1])}`;
lastToken.originalType = lastToken.type;
lastToken.type = 'mustacheInjectInline';
lastToken.tags = tags;
@@ -167,7 +227,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];
@@ -175,7 +235,7 @@ const mustacheInjectBlock = {
return false;
lastToken.originalType = 'mustacheInjectBlock';
lastToken.tags = ` ${processStyleTags(match[1])}`;
lastToken.tags = `${processStyleTags(match[1])}`;
return {
type : 'mustacheInjectBlock', // Should match "name" above
raw : match[0], // Text to consume from the source
@@ -206,10 +266,38 @@ const mustacheInjectBlock = {
}
};
const definitionLists = {
name : 'definitionLists',
const superSubScripts = {
name : 'superSubScript',
level : 'inline',
start(src) { return src.match(/\^/m)?.index; }, // Hint to Marked.js to stop and check for a match
tokenizer(src, tokens) {
const superRegex = /^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^/m;
const subRegex = /^\^\^(?!\s)(?=([^\n\^]*[^\s\^]))\1\^\^/m;
let isSuper = false;
let match = subRegex.exec(src);
if(!match){
match = superRegex.exec(src);
if(match)
isSuper = true;
}
if(match?.length) {
return {
type : 'superSubScript', // Should match "name" above
raw : match[0], // Text to consume from the source
tag : isSuper ? 'sup' : 'sub',
tokens : this.lexer.inlineTokens(match[1])
};
}
},
renderer(token) {
return `<${token.tag}>${this.parser.parseInline(token.tokens)}</${token.tag}>`;
}
};
const definitionListsInline = {
name : 'definitionListsInline',
level : 'block',
start(src) { return src.match(/^.*?::.*/m)?.index; }, // Hint to Marked.js to stop and check for a match
start(src) { return src.match(/^[^\n]*?::[^\n]*/m)?.index; }, // Hint to Marked.js to stop and check for a match
tokenizer(src, tokens) {
const regex = /^([^\n]*?)::([^\n]*)(?:\n|$)/ym;
let match;
@@ -224,7 +312,7 @@ const definitionLists = {
}
if(definitions.length) {
return {
type : 'definitionLists',
type : 'definitionListsInline',
raw : src.slice(0, endIndex),
definitions
};
@@ -233,38 +321,305 @@ const definitionLists = {
renderer(token) {
return `<dl>${token.definitions.reduce((html, def)=>{
return `${html}<dt>${this.parser.parseInline(def.dt)}</dt>`
+ `<dd>${this.parser.parseInline(def.dd)}</dd>\n`;
+ `<dd>${this.parser.parseInline(def.dd)}</dd>`;
}, '')}</dl>`;
}
};
Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionLists] });
Marked.use(mustacheInjectBlock);
Marked.use({ renderer: renderer, mangle: false });
Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartypantsLite());
//Fix local links in the Preview iFrame to link inside the frame
renderer.link = function (href, title, text) {
let self = false;
if(href[0] == '#') {
self = true;
const definitionListsMultiline = {
name : 'definitionListsMultiline',
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 regex = /(\n?\n?(?!::)[^\n]+?(?=\n::))|\n::(.(?:.|\n)*?(?=(?:\n::)|(?:\n\n)|$))/y;
let match;
let endIndex = 0;
const definitions = [];
while (match = regex.exec(src)) {
if(match[1]) {
definitions.push({
dt : this.lexer.inlineTokens(match[1].trim()),
dds : []
});
}
if(match[2]) {
definitions[definitions.length - 1].dds.push(
this.lexer.inlineTokens(match[2].trim().replace(/\s/g, ' '))
);
}
endIndex = regex.lastIndex;
}
if(definitions.length) {
return {
type : 'definitionListsMultiline',
raw : src.slice(0, endIndex),
definitions
};
}
},
renderer(token) {
let returnVal = `<dl>`;
token.definitions.forEach((def)=>{
const dds = def.dds.map((s)=>{
return `\n<dd>${this.parser.parseInline(s).trim()}</dd>`;
}).join('');
returnVal += `<dt>${this.parser.parseInline(def.dt)}</dt>${dds}\n`;
});
returnVal = returnVal.trim();
return `${returnVal}</dl>`;
}
href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);
if(href === null) {
return text;
}
let out = `<a href="${escape(href)}"`;
if(title) {
out += ` title="${title}"`;
}
if(self) {
out += ' target="_self"';
}
out += `>${text}</a>`;
return out;
};
//v=====--------------------< Variable Handling >-------------------=====v// 242 lines
const replaceVar = function(input, hoist=false, allowUnresolved=false) {
const regex = /([!$]?)\[((?!\s*\])(?:\\.|[^\[\]\\])+)\]/g;
const match = regex.exec(input);
const prefix = match[1];
const label = match[2];
//v=====--------------------< HANDLE MATH >-------------------=====v//
const mathRegex = /[a-z]+\(|[+\-*/^()]/g;
const matches = label.split(mathRegex);
const mathVars = matches.filter((match)=>isNaN(match))?.map((s)=>s.trim()); // Capture any variable names
let replacedLabel = label;
if(prefix[0] == '$' && mathVars?.[0] !== label.trim()) {// If there was mathy stuff not captured, let's do math!
mathVars?.forEach((variable)=>{
const foundVar = lookupVar(variable, globalPageNumber, hoist);
if(foundVar && foundVar.resolved && foundVar.content && !isNaN(foundVar.content)) // Only subsitute math values if fully resolved, not empty strings, and numbers
replacedLabel = replacedLabel.replaceAll(variable, foundVar.content);
});
try {
return mathParser.evaluate(replacedLabel);
} catch (error) {
return undefined; // Return undefined if invalid math result
}
}
//^=====--------------------< HANDLE MATH >-------------------=====^//
const foundVar = lookupVar(label, globalPageNumber, hoist);
if(!foundVar || (!foundVar.resolved && !allowUnresolved))
return undefined; // Return undefined if not found, or parially-resolved vars are not allowed
// url or <url> "title" or 'title' or (title)
const linkRegex = /^([^<\s][^\s]*|<.*?>)(?: ("(?:\\"|[^"])*"|'(?:\\'|[^'])*'|\((?:\\\(|\\\)|[^()])*\)))?$/m;
const linkMatch = linkRegex.exec(foundVar.content);
const href = linkMatch ? linkMatch[1] : null; //TODO: TRIM OFF < > IF PRESENT
const title = linkMatch ? linkMatch[2]?.slice(1, -1) : null;
if(!prefix[0] && href) // Link
return `[${label}](${href}${title ? ` "${title}"` : ''})`;
if(prefix[0] == '!' && href) // Image
return `![${label}](${href} ${title ? ` "${title}"` : ''})`;
if(prefix[0] == '$') // Variable
return foundVar.content;
};
const lookupVar = function(label, index, hoist=false) {
while (index >= 0) {
if(globalVarsList[index]?.[label] !== undefined)
return globalVarsList[index][label];
index--;
}
if(hoist) { //If normal lookup failed, attempt hoisting
index = Object.keys(globalVarsList).length; // Move index to start from last page
while (index >= 0) {
if(globalVarsList[index]?.[label] !== undefined)
return globalVarsList[index][label];
index--;
}
}
return undefined;
};
const processVariableQueue = function() {
let resolvedOne = true;
let finalLoop = false;
while (resolvedOne || finalLoop) { // Loop through queue until no more variable calls can be resolved
resolvedOne = false;
for (const item of varsQueue) {
if(item.type == 'text')
continue;
if(item.type == 'varDefBlock') {
const regex = /[!$]?\[((?!\s*\])(?:\\.|[^\[\]\\])+)\]/g;
let match;
let resolved = true;
let tempContent = item.content;
while (match = regex.exec(item.content)) { // regex to find variable calls
const value = replaceVar(match[0], true);
if(value == undefined)
resolved = false;
else
tempContent = tempContent.replaceAll(match[0], value);
}
if(resolved == true || item.content != tempContent) {
resolvedOne = true;
item.content = tempContent;
}
globalVarsList[globalPageNumber][item.varName] = {
content : item.content,
resolved : resolved
};
if(resolved)
item.type = 'resolved';
}
if(item.type == 'varCallBlock' || item.type == 'varCallInline') {
const value = replaceVar(item.content, true, finalLoop); // final loop will just use the best value so far
if(value == undefined)
continue;
resolvedOne = true;
item.content = value;
item.type = 'text';
}
}
varsQueue = varsQueue.filter((item)=>item.type !== 'resolved'); // Remove any fully-resolved variable definitions
if(finalLoop)
break;
if(!resolvedOne)
finalLoop = true;
}
varsQueue = varsQueue.filter((item)=>item.type !== 'varDefBlock');
};
function MarkedVariables() {
return {
hooks : {
preprocess(src) {
const codeBlockSkip = /^(?: {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+|^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})(?:[^\n]*)(?:\n|$)(?:|(?:[\s\S]*?)(?:\n|$))(?: {0,3}\2[~`]* *(?=\n|$))|`[^`]*?`/;
const blockDefRegex = /^[!$]?\[((?!\s*\])(?:\\.|[^\[\]\\])+)\]:(?!\() *((?:\n? *[^\s].*)+)(?=\n+|$)/; //Matches 3, [4]:5
const blockCallRegex = /^[!$]?\[((?!\s*\])(?:\\.|[^\[\]\\])+)\](?=\n|$)/; //Matches 6, [7]
const inlineDefRegex = /([!$]?\[((?!\s*\])(?:\\.|[^\[\]\\])+)\])\(([^\n]+)\)/; //Matches 8, 9[10](11)
const inlineCallRegex = /[!$]?\[((?!\s*\])(?:\\.|[^\[\]\\])+)\](?!\()/; //Matches 12, [13]
// Combine regexes and wrap in parens like so: (regex1)|(regex2)|(regex3)|(regex4)
const combinedRegex = new RegExp([codeBlockSkip, blockDefRegex, blockCallRegex, inlineDefRegex, inlineCallRegex].map((s)=>`(${s.source})`).join('|'), 'gm');
let lastIndex = 0;
let match;
while ((match = combinedRegex.exec(src)) !== null) {
// Format any matches into tokens and store
if(match.index > lastIndex) { // Any non-variable stuff
varsQueue.push(
{ type : 'text',
varName : null,
content : src.slice(lastIndex, match.index)
});
}
if(match[1]) {
varsQueue.push(
{ type : 'text',
varName : null,
content : match[0]
});
}
if(match[3]) { // Block Definition
const label = match[4] ? match[4].trim().replace(/\s+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
const content = match[5] ? match[5].trim().replace(/[ \t]+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
varsQueue.push(
{ type : 'varDefBlock',
varName : label,
content : content
});
}
if(match[6]) { // Block Call
const label = match[7] ? match[7].trim().replace(/\s+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
varsQueue.push(
{ type : 'varCallBlock',
varName : label,
content : match[0]
});
}
if(match[8]) { // Inline Definition
const label = match[10] ? match[10].trim().replace(/\s+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
let content = match[11] ? match[11].trim().replace(/\s+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
// In case of nested (), find the correct matching end )
let level = 0;
let i;
for (i = 0; i < content.length; i++) {
if(content[i] === '\\') {
i++;
} else if(content[i] === '(') {
level++;
} else if(content[i] === ')') {
level--;
if(level < 0)
break;
}
}
if(i > -1) {
combinedRegex.lastIndex = combinedRegex.lastIndex - (content.length - i);
content = content.slice(0, i).trim().replace(/\s+/g, ' ');
}
varsQueue.push(
{ type : 'varDefBlock',
varName : label,
content : content
});
varsQueue.push(
{ type : 'varCallInline',
varName : label,
content : match[9]
});
}
if(match[12]) { // Inline Call
const label = match[13] ? match[13].trim().replace(/\s+/g, ' ') : null; // Trim edge spaces and shorten blocks of whitespace to 1 space
varsQueue.push(
{ type : 'varCallInline',
varName : label,
content : match[0]
});
}
lastIndex = combinedRegex.lastIndex;
}
if(lastIndex < src.length) {
varsQueue.push(
{ type : 'text',
varName : null,
content : src.slice(lastIndex)
});
}
processVariableQueue();
const output = varsQueue.map((item)=>item.content).join('');
varsQueue = []; // Must clear varsQueue because custom HTML renderer uses Marked.parse which will preprocess again without clearing the array
return output;
}
}
};
};
//^=====--------------------< Variable Handling >-------------------=====^//
Marked.use(MarkedVariables());
Marked.use({ extensions: [mustacheSpans, mustacheDivs, mustacheInjectInline, definitionListsInline, definitionListsMultiline, superSubScripts] });
Marked.use(mustacheInjectBlock);
Marked.use({ renderer: renderer, tokenizer: tokenizer, mangle: false });
Marked.use(MarkedExtendedTables(), MarkedGFMHeadingId(), MarkedSmartypantsLite());
const nonWordAndColonTest = /[^\w:]/g;
const cleanUrl = function (sanitize, base, href) {
if(sanitize) {
@@ -326,24 +681,43 @@ const voidTags = new Set([
]);
const processStyleTags = (string)=>{
//split tags up. quotes can only occur right after colons.
//split tags up. quotes can only occur right after : or =.
//TODO: can we simplify to just split on commas?
const tags = string.match(/(?:[^, ":]+|:(?:"[^"]*"|))+/g);
const tags = string.match(/(?:[^, ":=]+|[:=](?:"[^"]*"|))+/g);
if(!tags) return '"';
const id = _.remove(tags, (tag)=>tag.startsWith('#')).map((tag)=>tag.slice(1))[0];
const classes = _.remove(tags, (tag)=>(!tag.includes(':')) && (!tag.includes('=')));
const attributes = _.remove(tags, (tag)=>(tag.includes('='))).map((tag)=>tag.replace(/="?([^"]*)"?/g, '="$1"'));
const styles = tags?.length ? tags.map((tag)=>tag.replace(/:"?([^"]*)"?/g, ':$1;').trim()) : [];
const id = _.remove(tags, (tag)=>tag.startsWith('#')).map((tag)=>tag.slice(1))[0];
const classes = _.remove(tags, (tag)=>!tag.includes(':'));
const styles = tags.map((tag)=>tag.replace(/:"?([^"]*)"?/g, ':$1;'));
return `${classes.join(' ')}" ${id ? `id="${id}"` : ''} ${styles.length ? `style="${styles.join(' ')}"` : ''}`;
return `${classes?.length ? ` ${classes.join(' ')}` : ''}"` +
`${id ? ` id="${id}"` : ''}` +
`${styles?.length ? ` style="${styles.join(' ')}"` : ''}` +
`${attributes?.length ? ` ${attributes.join(' ')}` : ''}`;
};
const globalVarsList = {};
let varsQueue = [];
let globalPageNumber = 0;
module.exports = {
marked : Marked,
render : (rawBrewText)=>{
render : (rawBrewText, pageNumber=1)=>{
globalVarsList[pageNumber] = {}; //Reset global links for current page, to ensure values are parsed in order
varsQueue = []; //Could move into MarkedVariables()
globalPageNumber = pageNumber;
rawBrewText = rawBrewText.replace(/^\\column$/gm, `\n<div class='columnSplit'></div>\n`)
.replace(/^(:+)$/gm, (match)=>`${`<div class='blank'></div>`.repeat(match.length)}\n`);
return Marked.parse(rawBrewText);
const opts = Marked.defaults;
rawBrewText = opts.hooks.preprocess(rawBrewText);
const tokens = Marked.lexer(rawBrewText, opts);
Marked.walkTokens(tokens, opts.walkTokens);
const html = Marked.parser(tokens, opts);
return opts.hooks.postprocess(html);
},
validate : (rawBrewText)=>{

View File

@@ -1,4 +1,4 @@
require('./nav.less');
require('client/homebrew/navbar/navbar.less');
const React = require('react');
const { useState, useRef, useEffect } = React;
const createClass = require('create-react-class');
@@ -104,7 +104,7 @@ const Nav = {
});
return (
<div className={`navDropdownContainer ${props.className}`}
<div className={`navDropdownContainer ${props.className ?? ''}`}
ref={myRef}
onMouseEnter = { props.trigger.includes('hover') ? ()=>handleDropdown(true) : undefined }
onMouseLeave = { props.trigger.includes('hover') ? ()=>handleDropdown(false) : undefined }

View File

@@ -1,97 +0,0 @@
@import '../styles/colors';
@keyframes glideDropDown {
0% {transform : translate(0px, -100%);
opacity : 0;
background-color: #333;}
100% {transform : translate(0px, 0px);
opacity : 1;
background-color: #333;}
}
nav{
background-color : #333;
.navContent{
position : relative;
display : flex;
justify-content : space-between;
z-index : 2;
}
.navSection{
display : flex;
align-items : center;
}
.navLogo{
display : block;
margin-top : 0px;
margin-right : 8px;
margin-left : 8px;
color : white;
text-decoration : none;
&:hover{
.name{ color : @orange; }
svg{ fill : @orange }
}
svg{
height : 13px;
margin-right : 0.2em;
cursor : pointer;
fill : white;
}
span.name{
font-family : 'CodeLight';
font-size : 15px;
span.crit{
font-family : 'CodeBold';
}
small{
font-family : 'Open Sans';
font-size : 0.3em;
font-weight : 800;
text-transform : uppercase;
}
}
}
.navItem{
#backgroundColorsHover;
.animate(background-color);
padding : 8px 12px;
cursor : pointer;
background-color : #333;
font-size : 10px;
font-weight : 800;
color : white;
text-decoration : none;
text-transform : uppercase;
line-height : 13px;
i{
margin-left : 5px;
font-size : 13px;
float : right;
}
}
.navSection:last-child .navItem{
border-left : 1px solid #666;
}
.navDropdownContainer{
position: relative;
.navDropdown {
position : absolute;
top : 28px;
left : 0px;
z-index : 10000;
width : 100%;
overflow : hidden auto;
max-height : calc(100vh - 28px);
.navItem{
animation-name: glideDropDown;
animation-duration: 0.4s;
position : relative;
display : block;
width : 100%;
vertical-align : middle;
padding : 8px 5px;
border : 1px solid #888;
border-bottom : 0;
}
}
}
}

View File

@@ -61,7 +61,8 @@ const SplitPane = createClass({
return result;
},
handleUp : function(){
handleUp : function(e){
e.preventDefault();
if(this.state.isDragging){
this.props.onDragFinish(this.state.currentDividerPos);
window.localStorage.setItem(this.props.storageKey, this.state.currentDividerPos);
@@ -78,6 +79,7 @@ const SplitPane = createClass({
handleMove : function(e){
if(!this.state.isDragging) return;
e.preventDefault();
const newSize = this.limitPosition(e.pageX);
this.setState({
currentDividerPos : newSize,
@@ -122,7 +124,7 @@ const SplitPane = createClass({
renderDivider : function(){
return <>
{this.renderMoveArrows()}
<div className='divider' onMouseDown={this.handleDown} >
<div className='divider' onPointerDown={this.handleDown} >
<div className='dots'>
<i className='fas fa-circle' />
<i className='fas fa-circle' />
@@ -133,7 +135,7 @@ const SplitPane = createClass({
},
render : function(){
return <div className='splitPane' onMouseMove={this.handleMove} onMouseUp={this.handleUp}>
return <div className='splitPane' onPointerMove={this.handleMove} onPointerUp={this.handleUp}>
<Pane
ref='pane1'
width={this.state.currentDividerPos}

View File

@@ -11,6 +11,7 @@
flex : 1;
}
.divider{
touch-action : none;
display : table;
height : 100%;
width : 15px;

View File

@@ -0,0 +1,79 @@
/* eslint-disable max-lines */
const Markdown = require('naturalcrit/markdown.js');
describe('Inline Definition Lists', ()=>{
test('No Term 1 Definition', function() {
const source = ':: My First Definition\n\n';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt></dt><dd>My First Definition</dd></dl>');
});
test('Single Definition Term', function() {
const source = 'My term :: My First Definition\n\n';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt>My term</dt><dd>My First Definition</dd></dl>');
});
test('Multiple Definition Terms', function() {
const source = 'Term 1::Definition of Term 1\nTerm 2::Definition of Term 2\n\n';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt>Term 1</dt><dd>Definition of Term 1</dd><dt>Term 2</dt><dd>Definition of Term 2</dd></dl>');
});
});
describe('Multiline Definition Lists', ()=>{
test('Single Term, Single Definition', function() {
const source = 'Term 1\n::Definition 1\n\n';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt>Term 1</dt>\n<dd>Definition 1</dd></dl>');
});
test('Single Term, Plural Definitions', function() {
const source = 'Term 1\n::Definition 1\n::Definition 2\n\n';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt>Term 1</dt>\n<dd>Definition 1</dd>\n<dd>Definition 2</dd></dl>');
});
test('Multiple Term, Single Definitions', function() {
const source = 'Term 1\n::Definition 1\n\nTerm 2\n::Definition 1\n\n';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt>Term 1</dt>\n<dd>Definition 1</dd>\n<dt>Term 2</dt>\n<dd>Definition 1</dd></dl>');
});
test('Multiple Term, Plural Definitions', function() {
const source = 'Term 1\n::Definition 1\n::Definition 2\n\nTerm 2\n::Definition 1\n::Definition 2\n\n';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt>Term 1</dt>\n<dd>Definition 1</dd>\n<dd>Definition 2</dd>\n<dt>Term 2</dt>\n<dd>Definition 1</dd>\n<dd>Definition 2</dd></dl>');
});
test('Single Term, Single multi-line definition', function() {
const source = 'Term 1\n::Definition 1\nand more and\nmore and more\n\n';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt>Term 1</dt>\n<dd>Definition 1 and more and more and more</dd></dl>');
});
test('Single Term, Plural multi-line definitions', function() {
const source = 'Term 1\n::Definition 1\nand more and more\n::Definition 2\nand more\nand more\n::Definition 3\n\n';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt>Term 1</dt>\n<dd>Definition 1 and more and more</dd>\n<dd>Definition 2 and more and more</dd>\n<dd>Definition 3</dd></dl>');
});
test('Multiple Term, Single multi-line definition', function() {
const source = 'Term 1\n::Definition 1\nand more and more\n\nTerm 2\n::Definition 1\n::Definition 2\n\n';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt>Term 1</dt>\n<dd>Definition 1 and more and more</dd>\n<dt>Term 2</dt>\n<dd>Definition 1</dd>\n<dd>Definition 2</dd></dl>');
});
test('Multiple Term, Single multi-line definition, followed by an inline dl', function() {
const source = 'Term 1\n::Definition 1\nand more and more\n\nTerm 2\n::Definition 1\n::Definition 2\n\n::Inline Definition (no term)';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt>Term 1</dt>\n<dd>Definition 1 and more and more</dd>\n<dt>Term 2</dt>\n<dd>Definition 1</dd>\n<dd>Definition 2</dd></dl><dl><dt></dt><dd>Inline Definition (no term)</dd></dl>');
});
test('Multiple Term, Single multi-line definition, followed by paragraph', function() {
const source = 'Term 1\n::Definition 1\nand more and more\n\nTerm 2\n::Definition 1\n::Definition 2\n\nParagraph';
const rendered = Markdown.render(source).trim();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<dl><dt>Term 1</dt>\n<dd>Definition 1 and more and more</dd>\n<dt>Term 2</dt>\n<dd>Definition 1</dd>\n<dd>Definition 2</dd></dl><p>Paragraph</p>');
});
});

View File

@@ -13,137 +13,134 @@ String.prototype.trimReturns = function(){
// Remove the `.failing()` method once you have fixed the issue.
describe('Inline: When using the Inline syntax {{ }}', ()=>{
it.failing('Renders a mustache span with text only', function() {
it('Renders a mustache span with text only', function() {
const source = '{{ text}}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block">text</span>');
});
it.failing('Renders a mustache span with text only, but with spaces', function() {
it('Renders a mustache span with text only, but with spaces', function() {
const source = '{{ this is a text}}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block">this is a text</span>');
});
it.failing('Renders an empty mustache span', function() {
it('Renders an empty mustache span', function() {
const source = '{{}}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block"></span>');
});
it.failing('Renders a mustache span with just a space', function() {
it('Renders a mustache span with just a space', function() {
const source = '{{ }}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block"></span>');
});
it.failing('Renders a mustache span with a few spaces only', function() {
it('Renders a mustache span with a few spaces only', function() {
const source = '{{ }}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block"></span>');
});
it.failing('Renders a mustache span with text and class', function() {
it('Renders a mustache span with text and class', function() {
const source = '{{my-class text}}';
const rendered = Markdown.render(source);
// FIXME: adds two extra \s before closing `>` in opening tag.
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block my-class">text</span>');
});
it.failing('Renders a mustache span with text and two classes', function() {
it('Renders a mustache span with text and two classes', function() {
const source = '{{my-class,my-class2 text}}';
const rendered = Markdown.render(source);
// FIXME: adds two extra \s before closing `>` in opening tag.
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block my-class my-class2">text</span>');
});
it.failing('Renders a mustache span with text with spaces and class', function() {
it('Renders a mustache span with text with spaces and class', function() {
const source = '{{my-class this is a text}}';
const rendered = Markdown.render(source);
// FIXME: adds two extra \s before closing `>` in opening tag
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block my-class">this is a text</span>');
});
it.failing('Renders a mustache span with text and id', function() {
it('Renders a mustache span with text and id', function() {
const source = '{{#my-span text}}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s before closing `>` in opening tag, and another after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block" id="my-span">text</span>');
});
it.failing('Renders a mustache span with text and two ids', function() {
it('Renders a mustache span with text and two ids', function() {
const source = '{{#my-span,#my-favorite-span text}}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s before closing `>` in opening tag, and another after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block" id="my-span">text</span>');
});
it.failing('Renders a mustache span with text and css property', function() {
it('Renders a mustache span with text and css property', function() {
const source = '{{color:red text}}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block" style="color:red;">text</span>');
});
it.failing('Renders a mustache span with text and two css properties', function() {
it('Renders a mustache span with text and two css properties', function() {
const source = '{{color:red,padding:5px text}}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block" style="color:red; padding:5px;">text</span>');
});
it.failing('Renders a mustache span with text and css property which contains quotes', function() {
it('Renders a mustache span with text and css property which contains quotes', function() {
const source = '{{font-family:"trebuchet ms" text}}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block" style="font-family:trebuchet ms;">text</span>');
});
it.failing('Renders a mustache span with text and two css properties which contains quotes', function() {
it('Renders a mustache span with text and two css properties which contains quotes', function() {
const source = '{{font-family:"trebuchet ms",padding:"5px 10px" text}}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block" style="font-family:trebuchet ms; padding:5px 10px;">text</span>');
});
it.failing('Renders a mustache span with text with quotes and css property which contains quotes', function() {
it('Renders a mustache span with text with quotes and css property which contains double quotes', function() {
const source = '{{font-family:"trebuchet ms" text "with quotes"}}';
const rendered = Markdown.render(source);
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block" style="font-family:trebuchet ms;">text “with quotes”</span>');
});
it('Renders a mustache span with text with quotes and css property which contains double and simple quotes', function() {
const source = `{{--stringVariable:"'string'" text "with quotes"}}`;
const rendered = Markdown.render(source);
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<span class="inline-block" style="--stringVariable:'string';">text “with quotes”</span>`);
});
it('Renders a mustache span with text, id, class and a couple of css properties', function() {
const source = '{{pen,#author,color:orange,font-family:"trebuchet ms" text}}';
const rendered = Markdown.render(source);
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block pen" id="author" style="color:orange; font-family:trebuchet ms;">text</span>');
});
it('Renders a span with added attributes', function() {
const source = 'Text and {{pen,#author,color:orange,font-family:"trebuchet ms",a="b and c",d=e, text}} and more text!';
const rendered = Markdown.render(source);
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>Text and <span class="inline-block pen" id="author" style="color:orange; font-family:trebuchet ms;" a="b and c" d="e">text</span> and more text!</p>\n');
});
});
// BLOCK SYNTAX
describe(`Block: When using the Block syntax {{tags\\ntext\\n}}`, ()=>{
it.failing('Renders a div with text only', function() {
it('Renders a div with text only', function() {
const source = dedent`{{
text
}}`;
const rendered = Markdown.render(source).trimReturns();
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block"><p>text</p></div>`);
});
it.failing('Renders an empty div', function() {
it('Renders an empty div', function() {
const source = dedent`{{
}}`;
const rendered = Markdown.render(source).trimReturns();
// FIXME: adds extra \s after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block"></div>`);
});
@@ -151,52 +148,62 @@ describe(`Block: When using the Block syntax {{tags\\ntext\\n}}`, ()=>{
const source = dedent`{{
}}`;
const rendered = Markdown.render(source).trimReturns();
// this actually renders in HB as '{{ }}'...
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p>{{}}</p>`);
});
it.failing('Renders a div with a single class', function() {
it('Renders a div with a single class', function() {
const source = dedent`{{cat
}}`;
const rendered = Markdown.render(source).trimReturns();
// FIXME: adds two extra \s before closing `>` in opening tag
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block cat"></div>`);
});
it.failing('Renders a div with a single class and text', function() {
it('Renders a div with a single class and text', function() {
const source = dedent`{{cat
Sample text.
}}`;
const rendered = Markdown.render(source).trimReturns();
// FIXME: adds two extra \s before closing `>` in opening tag
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block cat"><p>Sample text.</p></div>`);
});
it.failing('Renders a div with two classes and text', function() {
it('Renders a div with two classes and text', function() {
const source = dedent`{{cat,dog
Sample text.
}}`;
const rendered = Markdown.render(source).trimReturns();
// FIXME: adds two extra \s before closing `>` in opening tag
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block cat dog"><p>Sample text.</p></div>`);
});
it.failing('Renders a div with a style and text', function() {
it('Renders a div with a style and text', function() {
const source = dedent`{{color:red
Sample text.
}}`;
const rendered = Markdown.render(source).trimReturns();
// FIXME: adds two extra \s before closing `>` in opening tag
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block" style="color:red;"><p>Sample text.</p></div>`);
});
it.failing('Renders a div with a class, style and text', function() {
it('Renders a div with a style that has a string variable, and text', function() {
const source = dedent`{{--stringVariable:"'string'"
Sample text.
}}`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block" style="--stringVariable:'string';"><p>Sample text.</p></div>`);
});
it('Renders a div with a style that has a string variable, and text', function() {
const source = dedent`{{--stringVariable:"'string'"
Sample text.
}}`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block" style="--stringVariable:'string';"><p>Sample text.</p></div>`);
});
it('Renders a div with a class, style and text', function() {
const source = dedent`{{cat,color:red
Sample text.
}}`;
const rendered = Markdown.render(source).trimReturns();
// FIXME: adds extra \s after the class attribute
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block cat" style="color:red;"><p>Sample text.</p></div>`);
});
@@ -208,14 +215,27 @@ describe(`Block: When using the Block syntax {{tags\\ntext\\n}}`, ()=>{
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block cat" id="dog" style="color:red;"><p>Sample text.</p></div>`);
});
it.failing('Renders a div with a single ID', function() {
it('Renders a div with a single ID', function() {
const source = dedent`{{#cat,#dog
Sample text.
}}`;
const rendered = Markdown.render(source).trimReturns();
// FIXME: adds extra \s before closing `>` in opening tag, and another after class names
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block" id="cat"><p>Sample text.</p></div>`);
});
it('Renders a div with an ID, class, style and text, and a variable assignment', function() {
const source = dedent`{{color:red,cat,#dog,a="b and c",d="e"
Sample text.
}}`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class=\"block cat\" id=\"dog\" style=\"color:red;\" a=\"b and c\" d=\"e\"><p>Sample text.</p></div>`);
});
it('Renders a div with added attributes', function() {
const source = '{{pen,#author,color:orange,font-family:"trebuchet ms",a="b and c",d=e\nText and text and more text!\n}}\n';
const rendered = Markdown.render(source);
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<div class="block pen" id="author" style="color:orange; font-family:trebuchet ms;" a="b and c" d="e"><p>Text and text and more text!</p>\n</div>');
});
});
// MUSTACHE INJECTION SYNTAX
@@ -235,12 +255,24 @@ describe('Injection: When an injection tag follows an element', ()=>{
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block ClassName">text</span>');
});
it.failing('Renders a span "text" with injected attribute', function() {
const source = '{{ text}}{a="b and c"}';
const rendered = Markdown.render(source);
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span a="b and c" class="inline-block ">text</span>');
});
it.failing('Renders a span "text" with injected style', function() {
const source = '{{ text}}{color:red}';
const rendered = Markdown.render(source);
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<span class="inline-block" style="color:red;">text</span>');
});
it.failing('Renders a span "text" with injected style using a string variable', function() {
const source = `{{ text}}{--stringVariable:"'string'"}`;
const rendered = Markdown.render(source);
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<span class="inline-block" style="--stringVariable:'string';">text</span>`);
});
it.failing('Renders a span "text" with two injected styles', function() {
const source = '{{ text}}{color:red,background:blue}';
const rendered = Markdown.render(source);
@@ -270,6 +302,12 @@ describe('Injection: When an injection tag follows an element', ()=>{
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p><span class="inline-block" style="color:red;">text</span>{background:blue}</p>');
});
it('Renders an image with added attributes', function() {
const source = `![homebrew mug](https://i.imgur.com/hMna6G0.png) {position:absolute,bottom:20px,left:130px,width:220px,a="b and c",d=e}`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p><img class="" style="position:absolute; bottom:20px; left:130px; width:220px;" a="b and c" d="e" src="https://i.imgur.com/hMna6G0.png" alt="homebrew mug"></p>`);
});
});
describe('and that element is a block', ()=>{
@@ -297,7 +335,16 @@ describe('Injection: When an injection tag follows an element', ()=>{
}}
{color:red,background:blue}`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<div class="block" style="color:red; background:blue;"><p>text</p></div>');
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block" style="color:red; background:blue"><p>text</p></div>`);
});
it.failing('renders a div "text" with injected variable string', function() {
const source = dedent`{{
text
}}
{--stringVariable:"'string'"}`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<div class="block" style="--stringVariable:'string'"><p>text</p></div>`);
});
it.failing('renders an h2 header "text" with injected class name', function() {

View File

@@ -0,0 +1,373 @@
/* eslint-disable max-lines */
const dedent = require('dedent-tabs').default;
const Markdown = require('naturalcrit/markdown.js');
// Marked.js adds line returns after closing tags on some default tokens.
// This removes those line returns for comparison sake.
String.prototype.trimReturns = function(){
return this.replace(/\r?\n|\r/g, '').trim();
};
renderAllPages = function(pages){
const outputs = [];
pages.forEach((page, index)=>{
const output = Markdown.render(page, index);
outputs.push(output);
});
return outputs;
};
// Adding `.failing()` method to `describe` or `it` will make failing tests "pass" as long as they continue to fail.
// Remove the `.failing()` method once you have fixed the issue.
describe('Block-level variables', ()=>{
it('Handles variable assignment and recall with simple text', function() {
const source = dedent`
[var]: string
$[var]
`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>string</p>');
});
it('Handles variable assignment and recall with multiline string', function() {
const source = dedent`
[var]: string
across multiple
lines
$[var]`;
const rendered = Markdown.render(source).replace(/\s/g, ' ').trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>string across multiple lines</p>');
});
it('Handles variable assignment and recall with tables', function() {
const source = dedent`
[var]:
##### Title
| H1 | H2 |
|:---|:--:|
| A | B |
| C | D |
$[var]`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(dedent`
<h5 id="title">Title</h5>
<table><thead><tr><th align=left>H1</th>
<th align=center>H2</th>
</tr></thead><tbody><tr><td align=left>A</td>
<td align=center>B</td>
</tr><tr><td align=left>C</td>
<td align=center>D</td>
</tr></tbody></table>`.trimReturns());
});
it('Hoists undefined variables', function() {
const source = dedent`
$[var]
[var]: string`;
const rendered = Markdown.render(source).replace(/\s/g, ' ').trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>string</p>');
});
it('Hoists last instance of variable', function() {
const source = dedent`
$[var]
[var]: string
[var]: new string`;
const rendered = Markdown.render(source).replace(/\s/g, ' ').trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>new string</p>');
});
it('Handles complex hoisting', function() {
const source = dedent`
$[titleAndName]: $[title] $[fullName]
$[title]: Mr.
$[fullName]: $[firstName] $[lastName]
[firstName]: Bob
Welcome, $[titleAndName]!
[lastName]: Jacob
[lastName]: $[lastName]son
`;
const rendered = Markdown.render(source).replace(/\s/g, ' ').trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>Welcome, Mr. Bob Jacobson!</p>');
});
it('Handles variable reassignment', function() {
const source = dedent`
[var]: one
$[var]
[var]: two
$[var]
`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>one</p><p>two</p>'.trimReturns());
});
it('Handles variable reassignment with hoisting', function() {
const source = dedent`
$[var]
[var]: one
$[var]
[var]: two
$[var]
`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>two</p><p>one</p><p>two</p>'.trimReturns());
});
it('Ignores undefined variables that can\'t be hoisted', function() {
const source = dedent`
$[var](My name is $[first] $[last])
$[last]: Jones
`;
const rendered = Markdown.render(source).replace(/\s/g, ' ').trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p>My name is $[first] Jones</p>`.trimReturns());
});
});
describe('Inline-level variables', ()=>{
it('Handles variable assignment and recall with simple text', function() {
const source = dedent`
$[var](string)
$[var]
`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>string</p><p>string</p>');
});
it('Hoists undefined variables when possible', function() {
const source = dedent`
$[var](My name is $[name] Jones)
[name]: Bob`;
const rendered = Markdown.render(source).replace(/\s/g, ' ').trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>My name is Bob Jones</p>');
});
it('Hoists last instance of variable', function() {
const source = dedent`
$[var](My name is $[name] Jones)
$[name](Bob)
[name]: Bill`;
const rendered = Markdown.render(source).replace(/\s/g, ' ').trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`<p>My name is Bill Jones</p> <p>Bob</p>`.trimReturns());
});
it('Only captures nested parens if balanced', function() {
const source = dedent`
$[var1](A variable (with nested parens) inside)
$[var1]
$[var2](A variable ) with unbalanced parens)
$[var2]`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(dedent`
<p>A variable (with nested parens) inside</p>
<p>A variable (with nested parens) inside</p>
<p>A variable with unbalanced parens)</p>
<p>A variable</p>
`.trimReturns());
});
});
describe('Math', ()=>{
it('Handles simple math using numbers only', function() {
const source = dedent`
$[1 + 3 * 5 - (1 / 4)]
`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>15.75</p>');
});
it('Handles round function', function() {
const source = dedent`
$[round(1/4)]`;
const rendered = Markdown.render(source).replace(/\s/g, ' ').trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>0</p>');
});
it('Handles floor function', function() {
const source = dedent`
$[floor(0.6)]`;
const rendered = Markdown.render(source).replace(/\s/g, ' ').trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>0</p>');
});
it('Handles ceil function', function() {
const source = dedent`
$[ceil(0.2)]`;
const rendered = Markdown.render(source).replace(/\s/g, ' ').trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>1</p>');
});
it('Handles nested functions', function() {
const source = dedent`
$[ceil(floor(round(0.6)))]`;
const rendered = Markdown.render(source).replace(/\s/g, ' ').trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>1</p>');
});
it('Handles simple math with variables', function() {
const source = dedent`
$[num1]: 5
$[num2]: 4
Answer is $[answer]($[1 + 3 * num1 - (1 / num2)]).
`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>Answer is 15.75.</p>');
});
it('Handles variable incrementing', function() {
const source = dedent`
$[num1]: 5
Increment num1 to get $[num1]($[num1 + 1]) and again to $[num1]($[num1 + 1]).
`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe('<p>Increment num1 to get 6 and again to 7.</p>');
});
});
describe('Code blocks', ()=>{
it('Ignores all variables in fenced code blocks', function() {
const source = dedent`
\`\`\`
[var]: string
$[var]
$[var](new string)
\`\`\`
`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(dedent`
<pre><code>
[var]: string
$[var]
$[var](new string)
</code></pre>`.trimReturns());
});
it('Ignores all variables in indented code blocks', function() {
const source = dedent`
test
[var]: string
$[var]
$[var](new string)
`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(dedent`
<p>test</p>
<pre><code>
[var]: string
$[var]
$[var](new string)
</code></pre>`.trimReturns());
});
it('Ignores all variables in inline code blocks', function() {
const source = '[var](Hello) `[link](url)`. This `[var] does not work`';
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(dedent`
<p><a href="Hello">var</a> <code>[link](url)</code>. This <code>[var] does not work</code></p>`.trimReturns());
});
});
describe('Normal Links and Images', ()=>{
it('Renders normal images', function() {
const source = `![alt text](url)`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(dedent`
<p><img src="url" alt="alt text"></p>`.trimReturns());
});
it('Renders normal images with a title', function() {
const source = 'An image ![alt text](url "and title")!';
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(dedent`
<p>An image <img src="url" alt="alt text" title="and title">!</p>`.trimReturns());
});
it('Applies curly injectors to images', function() {
const source = `![alt text](url){width:100px}`;
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(dedent`
<p><img class="" style="width:100px;" src="url" alt="alt text"></p>`.trimReturns());
});
it('Renders normal links', function() {
const source = 'A Link to my [website](url)!';
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(dedent`
<p>A Link to my <a href="url">website</a>!</p>`.trimReturns());
});
it('Renders normal links with a title', function() {
const source = 'A Link to my [website](url "and title")!';
const rendered = Markdown.render(source).trimReturns();
expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(dedent`
<p>A Link to my <a href="url" title="and title">website</a>!</p>`.trimReturns());
});
});
describe('Cross-page variables', ()=>{
it('Handles variable assignment and recall across pages', function() {
const source0 = `[var]: string`;
const source1 = `$[var]`;
const rendered = renderAllPages([source0, source1]).join('\n\\page\n').trimReturns();
expect(rendered, `Input:\n${[source0, source1].join('\n\\page\n')}`, { showPrefix: false }).toBe('\\page<p>string</p>');
});
it('Handles hoisting across pages', function() {
const source0 = `$[var]`;
const source1 = `[var]: string`;
renderAllPages([source0, source1]).join('\n\\page\n').trimReturns(); //Requires one full render of document before hoisting is picked up
const rendered = renderAllPages([source0, source1]).join('\n\\page\n').trimReturns();
expect(rendered, `Input:\n${[source0, source1].join('\n\\page\n')}`, { showPrefix: false }).toBe('<p>string</p>\\page');
});
it('Handles reassignment and hoisting across pages', function() {
const source0 = `$[var]\n\n[var]: one\n\n$[var]`;
const source1 = `[var]: two\n\n$[var]`;
renderAllPages([source0, source1]).join('\n\\page\n').trimReturns(); //Requires one full render of document before hoisting is picked up
const rendered = renderAllPages([source0, source1]).join('\n\\page\n').trimReturns();
expect(rendered, `Input:\n${[source0, source1].join('\n\\page\n')}`, { showPrefix: false }).toBe('<p>two</p><p>one</p>\\page<p>two</p>');
});
});

View File

@@ -40,7 +40,7 @@ body {
-webkit-column-gap : 1cm;
-moz-column-gap : 1cm;
}
.phb{
.phb, .page{
.useColumns();
counter-increment : phb-page-numbers;
position : relative;
@@ -59,6 +59,9 @@ body {
page-break-before : always;
page-break-after : always;
contain : size;
}
.phb{
//*****************************
// * BASE
// *****************************/

View File

@@ -10,6 +10,21 @@
background-image : url(/assets/DMG_background.png);
background-size : cover;
/*TABLES WITHIN NOTES*/
.note table tbody tr:nth-child(odd) {
background:#fff;
}
/*DROP CAP*/
h1 + p::first-letter {
background-image: unset;
color:black;
}
.quote p:first-child::first-line {
all: unset;
}
&:after {
background-image : url(/assets/DMG_footerAccent.png);
height: 58px;
@@ -25,4 +40,4 @@
.partCover {
background-image: @partCoverHeaderDMG;
}
}
}

View File

@@ -8,6 +8,7 @@ const ClassFeatureGen = require('./snippets/classfeature.gen.js');
const CoverPageGen = require('./snippets/coverpage.gen.js');
const TableOfContentsGen = require('./snippets/tableOfContents.gen.js');
const indexGen = require('./snippets/index.gen.js');
const QuoteGen = require('./snippets/quote.gen.js');
const dedent = require('dedent-tabs').default;
@@ -123,6 +124,11 @@ module.exports = [
icon : 'fas fa-mask',
gen : ClassFeatureGen,
},
{
name : 'Quote',
icon : 'fas fa-quote-right',
gen : QuoteGen,
},
{
name : 'Note',
icon : 'fas fa-sticky-note',
@@ -220,34 +226,51 @@ module.exports = [
view : 'text',
snippets : [
{
name : 'Class Table',
icon : 'fas fa-table',
gen : ClassTableGen.full('classTable,frame,decoration,wide'),
},
{
name : 'Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.full('classTable,wide'),
},
{
name : '1/2 Class Table',
icon : 'fas fa-list-alt',
gen : ClassTableGen.half('classTable,decoration,frame'),
},
{
name : '1/2 Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.half('classTable'),
},
{
name : '1/3 Class Table',
icon : 'fas fa-border-all',
gen : ClassTableGen.third('classTable,frame'),
},
{
name : '1/3 Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.third('classTable'),
name : 'Class Tables',
icon : 'fas fa-table',
gen : ClassTableGen.full('classTable,frame,decoration,wide'),
subsnippets : [
{
name : 'Martial Class Table',
icon : 'fas fa-table',
gen : ClassTableGen.non('classTable,frame,decoration'),
},
{
name : 'Martial Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.non('classTable'),
},
{
name : 'Full Caster Class Table',
icon : 'fas fa-table',
gen : ClassTableGen.full('classTable,frame,decoration,wide'),
},
{
name : 'Full Caster Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.full('classTable,wide'),
},
{
name : 'Half Caster Class Table',
icon : 'fas fa-list-alt',
gen : ClassTableGen.half('classTable,frame,decoration,wide'),
},
{
name : 'Half Caster Class Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.half('classTable,wide'),
},
{
name : 'Third Caster Spell Table',
icon : 'fas fa-border-all',
gen : ClassTableGen.third('classTable,frame,decoration'),
},
{
name : 'Third Caster Spell Table (unframed)',
icon : 'fas fa-border-none',
gen : ClassTableGen.third('classTable'),
}
]
},
{
name : 'Rune Table',

View File

@@ -42,8 +42,8 @@ module.exports = function(classname){
#### Equipment
You start with the following equipment, in addition to the equipment granted by your background:
- *(a)* a martial weapon and a shield or *(b)* two martial weapons
- *(a)* five javelins or *(b)* any simple melee weapon
- (*a*) a martial weapon and a shield or (*b*) two martial weapons
- (*a*) five javelins or (*b*) any simple melee weapon
- ${_.sample(['10 lint fluffs', '1 button', 'a cherished lost sock'])}
`;
};

View File

@@ -1,132 +1,138 @@
const _ = require('lodash');
const dedent = require('dedent-tabs').default;
const features = [
'Astrological Botany',
'Biochemical Sorcery',
'Civil Divination',
'Consecrated Augury',
'Demonic Anthropology',
'Divinatory Mineralogy',
'Exo Interfacer',
'Genetic Banishing',
'Gunpowder Torturer',
'Gunslinger Corruptor',
'Hermetic Geography',
'Immunological Cultist',
'Malefic Chemist',
'Mathematical Pharmacy',
'Nuclear Biochemistry',
'Orbital Gravedigger',
'Pharmaceutical Outlaw',
'Phased Linguist',
'Plasma Gunslinger',
'Police Necromancer',
'Ritual Astronomy',
'Sixgun Poisoner',
'Seismological Alchemy',
'Spiritual Illusionism',
'Statistical Occultism',
'Spell Analyst',
'Torque Interfacer'
'Astrological Botany', 'Biochemical Sorcery', 'Civil Divination',
'Consecrated Augury', 'Demonic Anthropology', 'Divinatory Mineralogy',
'Exo Interfacer', 'Genetic Banishing', 'Gunpowder Torturer',
'Gunslinger Corruptor', 'Hermetic Geography', 'Immunological Cultist',
'Malefic Chemist', 'Mathematical Pharmacy', 'Nuclear Biochemistry',
'Orbital Gravedigger', 'Pharmaceutical Outlaw', 'Phased Linguist',
'Plasma Gunslinger', 'Police Necromancer', 'Ritual Astronomy',
'Sixgun Poisoner', 'Seismological Alchemy', 'Spiritual Illusionism',
'Statistical Occultism', 'Spell Analyst', 'Torque Interfacer'
].map((f)=>_.padEnd(f, 21)); // Pad to equal length of 21 chars long
const classnames = [
'Ackerman', 'Berserker-Typist', 'Concierge', 'Fishmonger',
'Haberdasher', 'Manicurist', 'Netrunner', 'Weirkeeper'
];
const classnames = ['Ackerman', 'Berserker-Typist', 'Concierge', 'Fishmonger',
'Haberdasher', 'Manicurist', 'Netrunner', 'Weirkeeper'];
const levels = ['1st', '2nd', '3rd', '4th', '5th',
'6th', '7th', '8th', '9th', '10th',
'11th', '12th', '13th', '14th', '15th',
'16th', '17th', '18th', '19th', '20th'];
const profBonus = [2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6];
const maxes = [4, 3, 3, 3, 3, 2, 2, 1, 1];
const drawSlots = function(Slots, rows, padding){
let slots = Number(Slots);
return _.times(rows, function(i){
const max = maxes[i];
if(slots < 1) return _.pad('—', padding);
const res = _.min([max, slots]);
slots -= res;
return _.pad(res.toString(), padding);
}).join(' | ');
};
module.exports = {
full : function(classes){
const classname = _.sample(classnames);
let cantrips = 3;
let spells = 1;
let slots = 2;
return `{{${classes}\n##### The ${classname}\n` +
`| Level | Proficiency | Features | Cantrips | Spells | --- Spell Slots Per Spell Level ---|||||||||\n`+
`| ^| Bonus ^| ^| Known ^| Known ^|1st |2nd |3rd |4th |5th |6th |7th |8th |9th |\n`+
`|:-----:|:-----------:|:-------------|:--------:|:------:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|\n${
_.map(levels, function(levelName, level){
const res = [
_.pad(levelName, 5),
_.pad(`+${profBonus[level]}`, 2),
_.padEnd(_.sample(features), 21),
_.pad(cantrips.toString(), 8),
_.pad(spells.toString(), 6),
drawSlots(slots, 9, 2),
].join(' | ');
cantrips += _.random(0, 1);
spells += _.random(0, 1);
slots += _.random(0, 2);
return `| ${res} |`;
}).join('\n')}\n}}\n\n`;
non : function(snippetClasses){
return dedent`
{{${snippetClasses}
##### The ${_.sample(classnames)}
| Level | Proficiency Bonus | Features | ${_.sample(features)} |
|:-----:|:-----------------:|:---------|:---------------------:|
| 1st | +2 | ${_.sample(features)} | 2 |
| 2nd | +2 | ${_.sample(features)} | 2 |
| 3rd | +2 | ${_.sample(features)} | 3 |
| 4th | +2 | ${_.sample(features)} | 3 |
| 5th | +3 | ${_.sample(features)} | 3 |
| 6th | +3 | ${_.sample(features)} | 4 |
| 7th | +3 | ${_.sample(features)} | 4 |
| 8th | +3 | ${_.sample(features)} | 4 |
| 9th | +4 | ${_.sample(features)} | 4 |
| 10th | +4 | ${_.sample(features)} | 4 |
| 11th | +4 | ${_.sample(features)} | 4 |
| 12th | +4 | ${_.sample(features)} | 5 |
| 13th | +5 | ${_.sample(features)} | 5 |
| 14th | +5 | ${_.sample(features)} | 5 |
| 15th | +5 | ${_.sample(features)} | 5 |
| 16th | +5 | ${_.sample(features)} | 5 |
| 17th | +6 | ${_.sample(features)} | 6 |
| 18th | +6 | ${_.sample(features)} | 6 |
| 19th | +6 | ${_.sample(features)} | 6 |
| 20th | +6 | ${_.sample(features)} | unlimited |
}}\n\n`;
},
half : function(classes){
const classname = _.sample(classnames);
let featureScore = 1;
return `{{${classes}\n##### The ${classname}\n` +
`| Level | Proficiency Bonus | Features | ${_.pad(_.sample(features), 21)} |\n` +
`|:-----:|:-----------------:|:---------|:---------------------:|\n${
_.map(levels, function(levelName, level){
const res = [
_.pad(levelName, 5),
_.pad(`+${profBonus[level]}`, 2),
_.padEnd(_.sample(features), 23),
_.pad(`+${featureScore}`, 21),
].join(' | ');
featureScore += _.random(0, 1);
return `| ${res} |`;
}).join('\n')}\n}}\n\n`;
full : function(snippetClasses){
return dedent`
{{${snippetClasses}
##### The ${_.sample(classnames)}
| Level | Proficiency | Features | Cantrips | --- Spell Slots Per Spell Level ---|||||||||
| ^| Bonus ^| ^| Known ^|1st |2nd |3rd |4th |5th |6th |7th |8th |9th |
|:-----:|:-----------:|:-------------|:--------:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| 1st | +2 | ${_.sample(features)} | 2 | 2 | — | — | — | — | — | — | — | — |
| 2nd | +2 | ${_.sample(features)} | 2 | 3 | — | — | — | — | — | — | — | — |
| 3rd | +2 | ${_.sample(features)} | 2 | 4 | 2 | — | — | — | — | — | — | — |
| 4th | +2 | ${_.sample(features)} | 3 | 4 | 3 | — | — | — | — | — | — | — |
| 5th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 2 | — | — | — | — | — | — |
| 6th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 3 | — | — | — | — | — | — |
| 7th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 1 | — | — | — | — | — |
| 8th | +3 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 2 | — | — | — | — | — |
| 9th | +4 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 2 | 1 | — | — | — | — |
| 10th | +4 | ${_.sample(features)} | 3 | 4 | 3 | 3 | 2 | 1 | — | — | — | — |
| 11th | +4 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | — | — | — |
| 12th | +4 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | — | — | — |
| 13th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | — | — |
| 14th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | — | — |
| 15th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | — |
| 16th | +5 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | — |
| 17th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 2 | 1 | 1 | 1 | 1 | 1 |
| 18th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 3 | 1 | 1 | 1 | 1 | 1 |
| 19th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 3 | 2 | 2 | 1 | 1 | 1 |
| 20th | +6 | ${_.sample(features)} | 4 | 4 | 3 | 3 | 3 | 2 | 2 | 2 | 1 | 1 |
}}\n\n`;
},
third : function(classes){
const classname = _.sample(classnames);
half : function(snippetClasses){
return dedent`
{{${snippetClasses}
##### The ${_.sample(classnames)}
| Level | Proficiency | Features | Spells |--- Spell Slots Per Spell Level ---|||||
| ^| Bonus ^| ^| Known ^| 1st | 2nd | 3rd | 4th | 5th |
|:-----:|:-----------:|:-------------|:------:|:-----:|:-----:|:-----:|:-----:|:-----:|
| 1st | +2 | ${_.sample(features)} | — | — | — | — | — | — |
| 2nd | +2 | ${_.sample(features)} | 2 | 2 | — | — | — | — |
| 3rd | +2 | ${_.sample(features)} | 3 | 3 | — | — | — | — |
| 4th | +2 | ${_.sample(features)} | 3 | 3 | — | — | — | — |
| 5th | +3 | ${_.sample(features)} | 4 | 4 | 2 | — | — | — |
| 6th | +3 | ${_.sample(features)} | 4 | 4 | 2 | — | — | — |
| 7th | +3 | ${_.sample(features)} | 5 | 4 | 3 | — | — | — |
| 8th | +3 | ${_.sample(features)} | 5 | 4 | 3 | — | — | — |
| 9th | +4 | ${_.sample(features)} | 6 | 4 | 3 | 2 | — | — |
| 10th | +4 | ${_.sample(features)} | 6 | 4 | 3 | 2 | — | — |
| 11th | +4 | ${_.sample(features)} | 7 | 4 | 3 | 3 | — | — |
| 12th | +4 | ${_.sample(features)} | 7 | 4 | 3 | 3 | — | — |
| 13th | +5 | ${_.sample(features)} | 8 | 4 | 3 | 3 | 1 | — |
| 14th | +5 | ${_.sample(features)} | 8 | 4 | 3 | 3 | 1 | — |
| 15th | +5 | ${_.sample(features)} | 9 | 4 | 3 | 3 | 2 | — |
| 16th | +5 | ${_.sample(features)} | 9 | 4 | 3 | 3 | 2 | — |
| 17th | +6 | ${_.sample(features)} | 10 | 4 | 3 | 3 | 3 | 1 |
| 18th | +6 | ${_.sample(features)} | 10 | 4 | 3 | 3 | 3 | 1 |
| 19th | +6 | ${_.sample(features)} | 11 | 4 | 3 | 3 | 3 | 2 |
| 20th | +6 | ${_.sample(features)} | 11 | 4 | 3 | 3 | 3 | 2 |
}}\n\n`;
},
let cantrips = 3;
let spells = 1;
let slots = 2;
return `{{${classes}\n##### ${classname} Spellcasting\n` +
`| Class | Cantrips | Spells |--- Spells Slots per Spell Level ---||||\n` +
`| Level ^| Known ^| Known ^| 1st | 2nd | 3rd | 4th |\n` +
`|:------:|:--------:|:-------:|:-------:|:-------:|:-------:|:-------:|\n${
_.map(levels, function(levelName, level){
const res = [
_.pad(levelName, 6),
_.pad(cantrips.toString(), 8),
_.pad(spells.toString(), 7),
drawSlots(slots, 4, 7),
].join(' | ');
cantrips += _.random(0, 1);
spells += _.random(0, 1);
slots += _.random(0, 1);
return `| ${res} |`;
}).join('\n')}\n}}\n\n`;
third : function(snippetClasses){
return dedent`
{{${snippetClasses}
##### ${_.sample(classnames)} Spellcasting
| Level | Cantrips | Spells |--- Spells Slots per Spell Level ---||||
| ^| Known ^| Known ^| 1st | 2nd | 3rd | 4th |
|:-----:|:--------:|:------:|:-------:|:-------:|:-------:|:-------:|
| 3rd | 2 | 3 | 2 | — | — | — |
| 4th | 2 | 4 | 3 | — | — | — |
| 5th | 2 | 4 | 3 | — | — | — |
| 6th | 2 | 4 | 3 | — | — | — |
| 7th | 2 | 5 | 4 | 2 | — | — |
| 8th | 2 | 6 | 4 | 2 | — | — |
| 9th | 2 | 6 | 4 | 2 | — | — |
| 10th | 3 | 7 | 4 | 3 | — | — |
| 11th | 3 | 8 | 4 | 3 | — | — |
| 12th | 3 | 8 | 4 | 3 | — | — |
| 13th | 3 | 9 | 4 | 3 | 2 | — |
| 14th | 3 | 10 | 4 | 3 | 2 | — |
| 15th | 3 | 10 | 4 | 3 | 2 | — |
| 16th | 3 | 11 | 4 | 3 | 3 | — |
| 17th | 3 | 11 | 4 | 3 | 3 | — |
| 18th | 3 | 11 | 4 | 3 | 3 | — |
| 19th | 3 | 12 | 4 | 3 | 3 | 1 |
| 20th | 3 | 13 | 4 | 3 | 3 | 1 |
}}\n\n`;
}
};

View File

@@ -0,0 +1,51 @@
const _ = require("lodash");
const quotes = [
"The sword glinted in the dim light, its edges keen and deadly. As the adventurer reached for it, he couldn't help but feel a surge of excitement mixed with fear. This was no ordinary blade.",
"The dragon's roar shook the ground beneath their feet, and the brave knight stood tall, his sword at the ready. He knew that this would be the battle of his life, but he was determined to emerge victorious.",
"The wizard's laboratory was a sight to behold, filled with bubbling cauldrons, ancient tomes, and strange artifacts from distant lands. As the apprentice gazed around in wonder, she knew that she was about to embark on a journey unlike any other.",
"The tavern was packed with rowdy patrons, their voices raised in song and laughter. The bard took center stage, strumming his lute and launching into a tale of adventure and heroism that had the crowd hanging on his every word.",
"The thief crept through the shadows, his eyes scanning the room for any sign of danger. He knew that one false move could mean the difference between success and failure, and he was determined to come out on top.",
"The elf queen stood atop her castle walls, surveying the kingdom below with a mix of pride and sadness. She knew that the coming war would be brutal, but she was determined to protect her people at all costs.",
"The necromancer's tower loomed in the distance, its dark spires piercing the sky. As the adventurers approached, they could feel the chill of death emanating from within",
"The ranger moved through the forest like a shadow, his senses attuned to every sound and movement around him. He knew that danger lurked behind every tree, but he was ready for whatever came his way.",
"The paladin knelt before the altar, his hands clasped in prayer. He knew that his faith would be tested in the days ahead, but he was ready to face whatever trials lay in store for him.",
"The druid communed with the spirits of nature, his mind merging with the trees, the animals, and the very earth itself. He knew that his power came with a great responsibility, and he was determined to use it for the greater good.",
];
const authors = [
"Unknown",
"James Wyatt",
"Eolande Blackwood",
"Ragnar Ironheart",
"Lyra Nightshade",
"Valtorius Darkstar",
"Isadora Fireheart",
"Theron Shadowbane",
"Lirien Starweaver",
"Drogathar Bonecrusher",
"Kaelen Frostblade",
];
const books = [
"The Blade of Destiny",
"Dragonfire and Steel",
"The Bard's Tale",
"Darkness Rising",
"The Sacred Quest",
"Shadows in the Forest",
"The Starweaver Chronicles",
"Beneath the Bones",
"Moonlit Magic",
"Frost and Fury",
];
module.exports = () => {
return `
{{quote
${_.sample(quotes)}
{{attribution ${_.sample(authors)}, *${_.sample(books)}*}}
}}
\n`;
};

View File

@@ -29,21 +29,23 @@ const getTOC = (pages)=>{
const res = [];
_.each(pages, (page, pageNum)=>{
const lines = page.split('\n');
_.each(lines, (line)=>{
if(_.startsWith(line, '# ')){
const title = line.replace('# ', '');
add1(title, pageNum);
}
if(_.startsWith(line, '## ')){
const title = line.replace('## ', '');
add2(title, pageNum);
}
if(_.startsWith(line, '### ')){
const title = line.replace('### ', '');
add3(title, pageNum);
}
});
if(!page.includes("{{frontCover}}") && !page.includes("{{insideCover}}") && !page.includes("{{partCover}}") && !page.includes("{{backCover}}")) {
const lines = page.split('\n');
_.each(lines, (line)=>{
if(_.startsWith(line, '# ')){
const title = line.replace('# ', '');
add1(title, pageNum);
}
if(_.startsWith(line, '## ')){
const title = line.replace('## ', '');
add2(title, pageNum);
}
if(_.startsWith(line, '### ')){
const title = line.replace('### ', '');
add3(title, pageNum);
}
});
}
});
return res;
};
@@ -76,7 +78,7 @@ module.exports = function(props){
return dedent`
{{toc,wide
# Table Of Contents
# Contents
${markdown}
}}

File diff suppressed because it is too large Load Diff

View File

@@ -1,154 +0,0 @@
const _ = require('lodash');
const { SNIPPET_TYPE, FIELD_TYPE, fourDigitNumberFromValue } = require('../../../shared/naturalcrit/codeEditor/helpers/widget-elements/constants');
module.exports = [{
name : 'monster',
type : SNIPPET_TYPE.BLOCK,
fields : [{
name : 'frame',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'wide',
type : FIELD_TYPE.CHECKBOX
}]
}, {
name : 'classTable',
type : SNIPPET_TYPE.BLOCK,
fields : [{
name : 'frame',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'decoration',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'wide',
type : FIELD_TYPE.CHECKBOX
}]
}, {
name : 'runeTable',
type : SNIPPET_TYPE.BLOCK,
fields : [{
name : 'frame',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'wide',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'font-family',
type : FIELD_TYPE.TEXT
}]
}, {
name : 'index',
type : SNIPPET_TYPE.BLOCK,
fields : [{
name : 'wide',
type : FIELD_TYPE.CHECKBOX
}, {
name : 'columns',
type : FIELD_TYPE.TEXT,
increment : 1
}]
}, {
name : 'image',
type : SNIPPET_TYPE.INJECTOR,
fields : []
}, {
name : 'artist',
type : SNIPPET_TYPE.BLOCK,
fields : [{
name : 'top',
type : FIELD_TYPE.TEXT,
increment : 5,
hints : true
}]
}, {
name : 'watercolor',
type : SNIPPET_TYPE.INLINE,
fields : [{
name : 'watercolor',
type : FIELD_TYPE.IMAGE_SELECTOR,
preview : (value)=>`/assets/watercolor/watercolor${value}.png`,
values : _.range(1, 13)
}, {
name : 'top',
type : FIELD_TYPE.TEXT,
increment : 5,
hints : true
}, {
name : 'left',
type : FIELD_TYPE.TEXT,
increment : 5,
hints : true
}, {
name : 'width',
type : FIELD_TYPE.TEXT,
increment : 5,
hints : true
}, {
name : 'opacity',
type : FIELD_TYPE.TEXT,
increment : 5
}, {
name : 'background-color',
type : FIELD_TYPE.COLOR_SELECTOR,
}]
}, {
name : 'imageMaskCenter',
type : SNIPPET_TYPE.INLINE,
fields : [{
name : 'imageMaskCenter',
type : FIELD_TYPE.IMAGE_SELECTOR,
preview : (value)=>`/assets/waterColorMasks/center/${fourDigitNumberFromValue(value)}.webp`,
values : _.range(1, 17)
}, {
name : '--offsetX',
type : FIELD_TYPE.TEXT,
increment : 5,
}, {
name : '--offsetY',
type : FIELD_TYPE.TEXT,
increment : 5,
}, {
name : '--rotation',
type : FIELD_TYPE.TEXT,
increment : 5,
}]
}, {
name : 'imageMaskEdge',
type : SNIPPET_TYPE.INLINE,
fields : [{
name : 'imageMaskEdge',
type : FIELD_TYPE.IMAGE_SELECTOR,
preview : (value)=>`/assets/waterColorMasks/edge/${fourDigitNumberFromValue(value)}.webp`,
values : _.range(1, 9)
}, {
name : '--offset',
type : FIELD_TYPE.TEXT,
increment : 5,
}, {
name : '--rotation',
type : FIELD_TYPE.TEXT,
increment : 5,
}]
}, {
name : 'imageMaskCorner',
type : SNIPPET_TYPE.INLINE,
fields : [{
name : 'imageMaskCorner',
type : FIELD_TYPE.IMAGE_SELECTOR,
preview : (value)=>`/assets/waterColorMasks/corner/${fourDigitNumberFromValue(value)}.webp`,
values : _.range(1, 38)
}, {
name : '--offsetX',
type : FIELD_TYPE.TEXT,
increment : 5,
}, {
name : '--offsetY',
type : FIELD_TYPE.TEXT,
increment : 5,
}, {
name : '--rotation',
type : FIELD_TYPE.TEXT,
increment : 5,
}]
}];

View File

@@ -111,6 +111,21 @@ module.exports = [
icon : 'fas fa-code',
gen : '<!-- This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). -->'
},
{
name : 'Homebrewery Credit',
icon : 'fas fa-dice-d20',
gen : function(){
return dedent`
{{homebreweryCredits
Made With
{{homebreweryIcon}}
The Homebrewery
[Homebrewery.Naturalcrit.com](https://homebrewery.naturalcrit.com)
}}\n\n`;
},
}
]
},
{
@@ -289,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 *************/

View File

@@ -1,5 +1,6 @@
@import (less) './themes/fonts/5e/fonts.less';
@import (less) './themes/assets/assets.less';
@import (less) './themes/fonts/icon fonts/dicefont.less';
:root {
//Colors
@@ -7,13 +8,9 @@
--HB_Color_WatercolorStain : #000000; // Black
}
@page { margin: 0; }
body {
counter-reset : phb-page-numbers;
}
*{
-webkit-print-color-adjust : exact;
}
@page { margin : 0; }
body { counter-reset : page-numbers; }
* { -webkit-print-color-adjust : exact; }
//*****************************
// * MUSTACHE DIVS/SPANS
@@ -23,9 +20,7 @@ body {
break-inside : avoid;
display : inline-block;
width : 100%;
img {
z-index : 0;
}
img { z-index : 0; }
}
.inline-block {
display : inline-block;
@@ -33,98 +28,81 @@ body {
}
}
.useColumns(@multiplier : 1, @fillMode: balance){
.useColumns(@multiplier : 1, @fillMode: auto) {
column-fill : @fillMode;
column-count : 2;
}
.columnWrapper{
.columnWrapper {
column-gap : inherit;
max-height : 100%;
column-span : all;
columns : inherit;
column-gap : inherit;
column-fill : inherit;
}
.page{
.page {
.useColumns();
height : 279.4mm;
width : 215.9mm;
padding : 1.4cm 1.9cm 1.7cm;
counter-increment : phb-page-numbers;
background-color : var(--HB_Color_Background);
position : relative;
z-index : 15;
box-sizing : border-box;
width : 215.9mm;
height : 279.4mm;
padding : 1.4cm 1.9cm 1.7cm;
overflow : hidden;
counter-increment : page-numbers;
background-color : var(--HB_Color_Background);
text-rendering : optimizeLegibility;
page-break-before : always;
page-break-after : always;
contain : size;
}
//*****************************
// * BASE
//*****************************
// * BASE
// *****************************/
.page{
p{
overflow-wrap : break-word;
.page {
p {
display : block;
overflow-wrap : break-word;
}
strong{
font-weight : bold;
}
em{
font-style : italic;
}
sup{
strong { font-weight : bold; }
em { font-style : italic; }
sup {
font-size : smaller;
line-height : 0;
vertical-align : super;
font-size : smaller;
line-height : 0;
}
sub{
vertical-align : sub;
sub {
font-size : smaller;
line-height : 0;
vertical-align : sub;
}
ul {
padding-left : 1.4em;
list-style-position : outside; //Needed for multiline list items
list-style-type : disc;
padding-left : 1.4em;
}
ol {
padding-left : 1.4em;
list-style-position : outside;
list-style-type : decimal;
padding-left : 1.4em;
}
img{
z-index : -1;
}
img { z-index : -1; }
//*****************************
// * HEADERS
// *****************************/
h1,h2,h3,h4,h5,h6{
h1,h2,h3,h4,h5,h6 {
font-weight : bold;
line-height : 1.2em;
}
h1{
font-size : 2em;
}
h2{
font-size : 1.5em;
}
h3{
font-size : 1.17em;
}
h4{
font-size : 1em;
}
h5{
font-size : 0.83em;
}
h1 { font-size : 2em; }
h2 { font-size : 1.5em; }
h3 { font-size : 1.17em; }
h4 { font-size : 1em; }
h5 { font-size : 0.83em; }
//*****************************
// * TABLE
// *****************************/
table{
table {
width : 100%;
thead{
thead {
display : table-row-group;
font-weight : bold;
}
@@ -136,42 +114,40 @@ body {
//************************************
// * CODE BLOCKS
// ************************************/
code{
font-family : "Courier New", Courier, monospace;
white-space : pre-wrap;
code {
font-family : 'Courier New', "Courier", monospace;
overflow-wrap : break-word;
white-space : pre-wrap;
}
pre code{
width : 100%;
pre code {
display : inline-block;
width : 100%;
}
//*****************************
// * EXTRAS
// *****************************/
.columnSplit {
margin-top : 0;
visibility : hidden;
-webkit-column-break-after : always;
break-after : always;
-moz-column-break-after : always;
margin-top : 0;
& + * {
margin-top : 0;
}
& + * { margin-top : 0; }
}
//Avoid breaking up
blockquote,table{
blockquote,table {
z-index : 15;
-webkit-column-break-inside : avoid;
page-break-inside : avoid;
break-inside : avoid;
}
// Nested lists
ul ul,ol ol,ul ol,ol ul{
ul ul,ol ol,ul ol,ol ul {
margin-bottom : 0px;
margin-left : 1.5em;
}
li{
li {
-webkit-column-break-inside : avoid;
page-break-inside : avoid;
break-inside : avoid;
@@ -179,69 +155,65 @@ body {
/* Watermark */
.watermark {
display : grid !important;
place-items : center;
justify-content : center;
position : absolute;
margin : 0;
top : 0;
left : 0;
z-index : 500;
display : grid !important;
place-items : center;
justify-content : center;
width : 100%;
height : 100%;
margin : 0;
font-size : 120px;
text-transform : uppercase;
mix-blend-mode : overlay;
text-transform : uppercase;
opacity : 30%;
transform : rotate(-45deg);
z-index : 500;
p {
margin-bottom : none;
}
p { margin-bottom : none; }
}
/* Watercolor */
[class*="watercolor"] {
[class*='watercolor'] {
position : absolute;
z-index : -2;
width : 2000px; /* dimensions need to be real big so the user can set */
height : 2000px; /* height or width and the image will maintain aspect ratio */
background-color : var(--HB_Color_WatercolorStain); /* default color */
background-size : cover;
-webkit-mask-image : var(--wc);
-webkit-mask-size : contain;
-webkit-mask-repeat : no-repeat;
mask-image : var(--wc);
mask-size : contain;
mask-repeat : no-repeat;
background-size : cover;
background-color : var(--HB_Color_WatercolorStain); /*default color*/
--wc : @watercolor1; /*default image*/
z-index : -2;
--wc : @watercolor1; /* default image */
}
.watercolor1 { --wc : @watercolor1; }
.watercolor2 { --wc : @watercolor2; }
.watercolor3 { --wc : @watercolor3; }
.watercolor4 { --wc : @watercolor4; }
.watercolor5 { --wc : @watercolor5; }
.watercolor6 { --wc : @watercolor6; }
.watercolor7 { --wc : @watercolor7; }
.watercolor8 { --wc : @watercolor8; }
.watercolor9 { --wc : @watercolor9; }
.watercolor1 { --wc : @watercolor1; }
.watercolor2 { --wc : @watercolor2; }
.watercolor3 { --wc : @watercolor3; }
.watercolor4 { --wc : @watercolor4; }
.watercolor5 { --wc : @watercolor5; }
.watercolor6 { --wc : @watercolor6; }
.watercolor7 { --wc : @watercolor7; }
.watercolor8 { --wc : @watercolor8; }
.watercolor9 { --wc : @watercolor9; }
.watercolor10 { --wc : @watercolor10; }
.watercolor11 { --wc : @watercolor11; }
.watercolor12 { --wc : @watercolor12; }
/* Image Masks */
[class*="imageMask"] {
[class*='imageMask'] {
position : absolute;
height : 200%;
width : 200%;
left : 50%;
bottom : 50%;
--rotation : 0;
--revealer : none;
--checkerboard : none;
--scaleX : 1;
--scaleY : 1;
left : 50%;
z-index : -1;
width : 200%;
height : 200%;
background-image : var(--checkerboard);
background-size : 20px;
transform : translateY(50%) translateX(-50%) rotate(calc(1deg * var(--rotation))) scaleX(var(--scaleX)) scaleY(var(--scaleY));
-webkit-mask-image : var(--wc), var(--revealer);
-webkit-mask-repeat : repeat-x;
-webkit-mask-size : 50%; //Scale only X to fit page width, leave height at aspect ratio, designed to hang off the edge
@@ -250,61 +222,63 @@ body {
mask-repeat : repeat-x;
mask-size : 50%;
mask-position : 50% calc(50% - var(--offset));
background-image : var(--checkerboard);
background-size : 20px;
z-index : -1;
transform : translateY(50%) translateX(-50%) rotate(calc(1deg * var(--rotation))) scaleX(var(--scaleX)) scaleY(var(--scaleY));
--rotation : 0;
--revealer : none;
--checkerboard : none;
--scaleX : 1;
--scaleY : 1;
& > p:has(img) {
position : absolute;
width : 50%;
height : 50%;
bottom : 50%;
left : 50%;
width : 50%;
height : 50%;
transform : translateX(-50%) translateY(50%) rotate(calc(-1deg * var(--rotation))) scaleX(calc(1 / var(--scaleX))) scaleY(calc(1 / var(--scaleY)));
}
& img {
position : absolute;
display : block;
bottom : 0;
display : block;
}
&.bottom {
--rotation : 0;
& img {bottom: 0;}
& img {bottom : 0;}
}
&.top {
--rotation : 180;
& img {top: 0;}
& img {top : 0;}
}
&.left {
--rotation : 90;
& img {left: 0;}
& img {left : 0;}
}
&.right {
--rotation : -90;
& img {right: 0;}
& img {right : 0;}
}
&.revealImage {
--revealer : linear-gradient(0deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,0.2));
--checkerboard : url(/assets/waterColorMasks/missingImage.png); //shows any masked regions not filled by image
--revealer : linear-gradient(0deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.2));
--checkerboard : url("/assets/waterColorMasks/missingImage.png"); //shows any masked regions not filled by image
}
}
.imageMaskEdge {
&1 { --wc : url(/assets/waterColorMasks/edge/0001.webp); }
&2 { --wc : url(/assets/waterColorMasks/edge/0002.webp); }
&3 { --wc : url(/assets/waterColorMasks/edge/0003.webp); }
&4 { --wc : url(/assets/waterColorMasks/edge/0004.webp); }
&5 { --wc : url(/assets/waterColorMasks/edge/0005.webp); }
&6 { --wc : url(/assets/waterColorMasks/edge/0006.webp); }
&7 { --wc : url(/assets/waterColorMasks/edge/0007.webp); }
&8 { --wc : url(/assets/waterColorMasks/edge/0008.webp); }
&1 { --wc : url("/assets/waterColorMasks/edge/0001.webp"); }
&2 { --wc : url("/assets/waterColorMasks/edge/0002.webp"); }
&3 { --wc : url("/assets/waterColorMasks/edge/0003.webp"); }
&4 { --wc : url("/assets/waterColorMasks/edge/0004.webp"); }
&5 { --wc : url("/assets/waterColorMasks/edge/0005.webp"); }
&6 { --wc : url("/assets/waterColorMasks/edge/0006.webp"); }
&7 { --wc : url("/assets/waterColorMasks/edge/0007.webp"); }
&8 { --wc : url("/assets/waterColorMasks/edge/0008.webp"); }
}
[class*="imageMaskCenter"] {
[class*='imageMaskCenter'] {
bottom : calc(var(--offsetY));
left : calc(var(--offsetX));
width : 100%;
height : 100%;
left : calc(var(--offsetX));
bottom : calc(var(--offsetY));
transform : rotate(calc(1deg * var(--rotation))) scaleX(var(--scaleX)) scaleY(var(--scaleY));
-webkit-mask-image : var(--wc), var(--revealer);
-webkit-mask-repeat : no-repeat;
-webkit-mask-size : 100% 100%; //Scale both dimensions to fit page size
@@ -313,48 +287,48 @@ body {
mask-repeat : no-repeat;
mask-size : 100% 100%; //Scale both dimensions to fit page size
mask-position : 50% 50%;
transform : rotate(calc(1deg * var(--rotation))) scaleX(var(--scaleX)) scaleY(var(--scaleY));
& > p:has(img) {
position : absolute;
width : 100%;
height : 100%;
bottom : 0;
left : 0;
width : 100%;
height : 100%;
transform : unset;
transform : scaleX(calc(1 / var(--scaleX))) scaleY(calc(1 / var(--scaleY)))
rotate(calc(-1deg * var(--rotation)))
translateX(calc(-1 * var(--offsetX)))
translateY(calc(1 * var(--offsetY)));
rotate(calc(-1deg * var(--rotation)))
translateX(calc(-1 * var(--offsetX)))
translateY(calc(1 * var(--offsetY)));
}
}
.imageMaskCenter {
&1 { --wc : url(/assets/waterColorMasks/center/0001.webp); }
&2 { --wc : url(/assets/waterColorMasks/center/0002.webp); }
&3 { --wc : url(/assets/waterColorMasks/center/0003.webp); }
&4 { --wc : url(/assets/waterColorMasks/center/0004.webp); }
&5 { --wc : url(/assets/waterColorMasks/center/0005.webp); }
&6 { --wc : url(/assets/waterColorMasks/center/0006.webp); }
&7 { --wc : url(/assets/waterColorMasks/center/0007.webp); }
&8 { --wc : url(/assets/waterColorMasks/center/0008.webp); }
&9 { --wc : url(/assets/waterColorMasks/center/0009.webp); }
&10 { --wc : url(/assets/waterColorMasks/center/0010.webp); }
&11 { --wc : url(/assets/waterColorMasks/center/0011.webp); }
&12 { --wc : url(/assets/waterColorMasks/center/0012.webp); }
&13 { --wc : url(/assets/waterColorMasks/center/0013.webp); }
&14 { --wc : url(/assets/waterColorMasks/center/0014.webp); }
&15 { --wc : url(/assets/waterColorMasks/center/0015.webp); }
&16 { --wc : url(/assets/waterColorMasks/center/0016.webp); }
&special { --wc : url(/assets/waterColorMasks/center/special.webp); }
&1 { --wc : url("/assets/waterColorMasks/center/0001.webp"); }
&2 { --wc : url("/assets/waterColorMasks/center/0002.webp"); }
&3 { --wc : url("/assets/waterColorMasks/center/0003.webp"); }
&4 { --wc : url("/assets/waterColorMasks/center/0004.webp"); }
&5 { --wc : url("/assets/waterColorMasks/center/0005.webp"); }
&6 { --wc : url("/assets/waterColorMasks/center/0006.webp"); }
&7 { --wc : url("/assets/waterColorMasks/center/0007.webp"); }
&8 { --wc : url("/assets/waterColorMasks/center/0008.webp"); }
&9 { --wc : url("/assets/waterColorMasks/center/0009.webp"); }
&10 { --wc : url("/assets/waterColorMasks/center/0010.webp"); }
&11 { --wc : url("/assets/waterColorMasks/center/0011.webp"); }
&12 { --wc : url("/assets/waterColorMasks/center/0012.webp"); }
&13 { --wc : url("/assets/waterColorMasks/center/0013.webp"); }
&14 { --wc : url("/assets/waterColorMasks/center/0014.webp"); }
&15 { --wc : url("/assets/waterColorMasks/center/0015.webp"); }
&16 { --wc : url("/assets/waterColorMasks/center/0016.webp"); }
&special { --wc : url("/assets/waterColorMasks/center/special.webp"); }
}
[class*="imageMaskCorner"] {
height : 200%;
width : 200%;
left : calc(-50% + var(--offsetX));
[class*='imageMaskCorner'] {
bottom : calc(-50% + var(--offsetY));
left : calc(-50% + var(--offsetX));
width : 200%;
height : 200%;
transform : rotate(calc(1deg * var(--rotation))) scaleX(var(--scaleX)) scaleY(var(--scaleY));
-webkit-mask-image : var(--wc), var(--revealer);
-webkit-mask-repeat : no-repeat;
-webkit-mask-size : 100% 100%; //Scale both dimensions to fit page size
@@ -363,56 +337,55 @@ body {
mask-repeat : no-repeat;
mask-size : 100% 100%; //Scale both dimensions to fit page size
mask-position : 50% 50%;
transform : rotate(calc(1deg * var(--rotation))) scaleX(var(--scaleX)) scaleY(var(--scaleY));
& > p:has(img) {
bottom : 25%;
left : 25%;
width : 50%;
height : 50%; //Complex transform below to handle mix of % and cm offsets
left : 25%;
bottom : 25%;
transform : scaleX(calc(1 / var(--scaleX))) scaleY(calc(1 / var(--scaleY)))
rotate(calc(-1deg * var(--rotation)))
translateX(calc(-1 * var(--offsetX)))
translateY(calc(1 * var(--offsetY)));
rotate(calc(-1deg * var(--rotation)))
translateX(calc(-1 * var(--offsetX)))
translateY(calc(1 * var(--offsetY)));
}
}
.imageMaskCorner {
&1 { --wc : url(/assets/waterColorMasks/corner/0001.webp); }
&2 { --wc : url(/assets/waterColorMasks/corner/0002.webp); }
&3 { --wc : url(/assets/waterColorMasks/corner/0003.webp); }
&4 { --wc : url(/assets/waterColorMasks/corner/0004.webp); }
&5 { --wc : url(/assets/waterColorMasks/corner/0005.webp); }
&6 { --wc : url(/assets/waterColorMasks/corner/0006.webp); }
&7 { --wc : url(/assets/waterColorMasks/corner/0007.webp); }
&8 { --wc : url(/assets/waterColorMasks/corner/0008.webp); }
&9 { --wc : url(/assets/waterColorMasks/corner/0009.webp); }
&10 { --wc : url(/assets/waterColorMasks/corner/0010.webp); }
&11 { --wc : url(/assets/waterColorMasks/corner/0011.webp); }
&12 { --wc : url(/assets/waterColorMasks/corner/0012.webp); }
&13 { --wc : url(/assets/waterColorMasks/corner/0013.webp); }
&14 { --wc : url(/assets/waterColorMasks/corner/0014.webp); }
&15 { --wc : url(/assets/waterColorMasks/corner/0015.webp); }
&16 { --wc : url(/assets/waterColorMasks/corner/0016.webp); }
&17 { --wc : url(/assets/waterColorMasks/corner/0017.webp); }
&18 { --wc : url(/assets/waterColorMasks/corner/0018.webp); }
&19 { --wc : url(/assets/waterColorMasks/corner/0019.webp); }
&20 { --wc : url(/assets/waterColorMasks/corner/0020.webp); }
&21 { --wc : url(/assets/waterColorMasks/corner/0021.webp); }
&22 { --wc : url(/assets/waterColorMasks/corner/0022.webp); }
&23 { --wc : url(/assets/waterColorMasks/corner/0023.webp); }
&24 { --wc : url(/assets/waterColorMasks/corner/0024.webp); }
&25 { --wc : url(/assets/waterColorMasks/corner/0025.webp); }
&26 { --wc : url(/assets/waterColorMasks/corner/0026.webp); }
&27 { --wc : url(/assets/waterColorMasks/corner/0027.webp); }
&28 { --wc : url(/assets/waterColorMasks/corner/0028.webp); }
&29 { --wc : url(/assets/waterColorMasks/corner/0029.webp); }
&30 { --wc : url(/assets/waterColorMasks/corner/0030.webp); }
&31 { --wc : url(/assets/waterColorMasks/corner/0031.webp); }
&32 { --wc : url(/assets/waterColorMasks/corner/0032.webp); }
&33 { --wc : url(/assets/waterColorMasks/corner/0033.webp); }
&34 { --wc : url(/assets/waterColorMasks/corner/0034.webp); }
&35 { --wc : url(/assets/waterColorMasks/corner/0035.webp); }
&36 { --wc : url(/assets/waterColorMasks/corner/0036.webp); }
&37 { --wc : url(/assets/waterColorMasks/corner/0037.webp); }
&1 { --wc : url("/assets/waterColorMasks/corner/0001.webp"); }
&2 { --wc : url("/assets/waterColorMasks/corner/0002.webp"); }
&3 { --wc : url("/assets/waterColorMasks/corner/0003.webp"); }
&4 { --wc : url("/assets/waterColorMasks/corner/0004.webp"); }
&5 { --wc : url("/assets/waterColorMasks/corner/0005.webp"); }
&6 { --wc : url("/assets/waterColorMasks/corner/0006.webp"); }
&7 { --wc : url("/assets/waterColorMasks/corner/0007.webp"); }
&8 { --wc : url("/assets/waterColorMasks/corner/0008.webp"); }
&9 { --wc : url("/assets/waterColorMasks/corner/0009.webp"); }
&10 { --wc : url("/assets/waterColorMasks/corner/0010.webp"); }
&11 { --wc : url("/assets/waterColorMasks/corner/0011.webp"); }
&12 { --wc : url("/assets/waterColorMasks/corner/0012.webp"); }
&13 { --wc : url("/assets/waterColorMasks/corner/0013.webp"); }
&14 { --wc : url("/assets/waterColorMasks/corner/0014.webp"); }
&15 { --wc : url("/assets/waterColorMasks/corner/0015.webp"); }
&16 { --wc : url("/assets/waterColorMasks/corner/0016.webp"); }
&17 { --wc : url("/assets/waterColorMasks/corner/0017.webp"); }
&18 { --wc : url("/assets/waterColorMasks/corner/0018.webp"); }
&19 { --wc : url("/assets/waterColorMasks/corner/0019.webp"); }
&20 { --wc : url("/assets/waterColorMasks/corner/0020.webp"); }
&21 { --wc : url("/assets/waterColorMasks/corner/0021.webp"); }
&22 { --wc : url("/assets/waterColorMasks/corner/0022.webp"); }
&23 { --wc : url("/assets/waterColorMasks/corner/0023.webp"); }
&24 { --wc : url("/assets/waterColorMasks/corner/0024.webp"); }
&25 { --wc : url("/assets/waterColorMasks/corner/0025.webp"); }
&26 { --wc : url("/assets/waterColorMasks/corner/0026.webp"); }
&27 { --wc : url("/assets/waterColorMasks/corner/0027.webp"); }
&28 { --wc : url("/assets/waterColorMasks/corner/0028.webp"); }
&29 { --wc : url("/assets/waterColorMasks/corner/0029.webp"); }
&30 { --wc : url("/assets/waterColorMasks/corner/0030.webp"); }
&31 { --wc : url("/assets/waterColorMasks/corner/0031.webp"); }
&32 { --wc : url("/assets/waterColorMasks/corner/0032.webp"); }
&33 { --wc : url("/assets/waterColorMasks/corner/0033.webp"); }
&34 { --wc : url("/assets/waterColorMasks/corner/0034.webp"); }
&35 { --wc : url("/assets/waterColorMasks/corner/0035.webp"); }
&36 { --wc : url("/assets/waterColorMasks/corner/0036.webp"); }
&37 { --wc : url("/assets/waterColorMasks/corner/0037.webp"); }
}
}
@@ -424,16 +397,16 @@ body {
padding-left : 1em;
white-space : pre-line;
}
dt {
display : inline;
margin-right : 0.5ch;
dt {
display : inline;
margin-right : 0.5ch;
margin-left : -1em;
}
dd {
}
dd {
display : inline;
margin-left : 0;
text-indent : 0;
}
}
}
//*****************************
@@ -443,9 +416,7 @@ body {
.blank {
height : 1em;
margin-top : 0;
& + * {
margin-top : 0;
}
& + * { margin-top : 0; }
}
}
@@ -453,12 +424,58 @@ body {
// * WIDE
// *****************************/
.page {
.wide{
.wide {
column-span : all;
display : block;
margin-bottom : 1em;
&+* {
margin-top : 0;
}
& + * { margin-top : 0; }
}
}
//*****************************
//* CREDITS
//*****************************/
.page .homebreweryCredits {
p {
font-family : 'NodestoCapsWide';
font-size : 0.4cm;
line-height : 1em;
text-align : center;
text-indent : 0;
letter-spacing : 0.08em;
}
a {
color : inherit;
text-decoration : none;
&:hover { text-decoration : underline; }
}
.homebreweryIcon {
display : block;
height : 1.5cm;
margin : 0 auto;
background-color : black;
-webkit-mask : url("/assets/naturalCritLogoWhite.svg") center / contain no-repeat;
mask : url("/assets/naturalCritLogoWhite.svg") center / contain no-repeat;
}
.homebreweryIcon.red { background-color : red; }
.homebreweryIcon.gold { background-image : linear-gradient(to top left, brown 22.5%, gold 40%, white 60%, gold 67.5%, brown 82.5%); }
}
//*****************************
//* Page Number
//*****************************/
.page {
.pageNumber {
position : absolute;
right : 30px;
bottom : 30px;
width : 50px;
font-size : 0.9em;
text-align : center;
&.auto::after { content : counter(page-numbers); }
}
&:nth-child(even) {
.pageNumber { left : 30px; }
}
}

View File

@@ -374,17 +374,9 @@
}
.pageNumber{
font-family : FrederickaTheGreat;
position : absolute;
right : 3cm;
bottom : 1.25cm;
width : 50px;
font-size : 0.9em;
color : var(--HB_Color_HeaderText);
text-align : center;
text-indent : 0;
&.auto::after {
content : counter(phb-page-numbers);
}
}
.footnote{
position : absolute;

View File

@@ -0,0 +1,88 @@
.editor .codeEditor .CodeMirror {
// Themes with dark backgrounds
&.cm-s-3024-night,
&.cm-s-abbott,
&.cm-s-abcdef,
&.cm-s-ambiance,
&.cm-s-ayu-dark,
&.cm-s-ayu-mirage,
&.cm-s-base16-dark,
&.cm-s-bespin,
&.cm-s-blackboard,
&.cm-s-cobalt,
&.cm-s-colorforth,
&.cm-s-darcula,
&.cm-s-dracula,
&.cm-s-duotone-dark,
&.cm-s-erlang-dark,
&.cm-s-gruvbox-dark,
&.cm-s-hopscotch,
&.cm-s-icecoder,
&.cm-s-isotope,
&.cm-s-lesser-dark,
&.cm-s-liquibyte,
&.cm-s-lucario,
&.cm-s-material,
&.cm-s-material-darker,
&.cm-s-material-ocean,
&.cm-s-material-palenight,
&.cm-s-mbo,
&.cm-s-midnight,
&.cm-s-monokai,
&.cm-s-moxer,
&.cm-s-night,
&.cm-s-nord,
&.cm-s-oceanic-next,
&.cm-s-panda-syntax,
&.cm-s-paraiso-dark,
&.cm-s-pastel-on-dark,
&.cm-s-railscasts,
&.cm-s-rubyblue,
&.cm-s-seti,
&.cm-s-shadowfox,
&.cm-s-the-matrix,
&.cm-s-tomorrow-night-bright,
&.cm-s-tomorrow-night-eighties,
&.cm-s-twilight,
&.cm-s-vibrant-ink,
&.cm-s-xq-dark,
&.cm-s-yonce,
&.cm-s-zenburn
{
.CodeMirror-code {
.block:not(.cm-comment) {
color: magenta;
}
.columnSplit {
color: black;
background-color: rgba(35,153,153,0.5);
}
.pageLine {
background-color: rgba(255,255,255,0.75);
& ~ pre.CodeMirror-line {
color: black;
}
}
}
}
// Themes with light backgrounds
&.cm-s-default,
&.cm-s-3024-day,
&.cm-s-ambiance-mobile,
&.cm-s-base16-light,
&.cm-s-duotone-light,
&.cm-s-eclipse,
&.cm-s-elegant,
&.cm-s-juejin,
&.cm-s-neat,
&.cm-s-neo,
&.cm-s-paraiso-lightm
&.cm-s-solarized,
&.cm-s-ssms,
&.cm-s-ttcn,
&.cm-s-xq-light,
&.cm-s-yeti {
// Future styling for themes with light backgrounds
--dummyVar: 'currently unused';
}
}

View File

@@ -0,0 +1,129 @@
/* Main BG color and normal text color */
.CodeMirror {
background: #293134;
color: #91A6AA;
}
/* Brew BG */
.brewRenderer {
background-color: #293134;
}
/* Blinking cursor */
.CodeMirror-cursor {
border-left: 1px solid #e0e2e4;
}
/* HB DARK NAV START*/
/* Bars at the top */
.snippetBar {
background-color: #2F393C;
color: white;
}
nav {
background-color: #293134;
}
nav .navItem {
background-color: #293134;
}
/* Fix for Homebrewery custom Snippet icons */
.snippetBar .fac {
filter: invert(1);
}
.snippetBar .snippetGroup .dropdown {
background-color: #2F393C;
}
/* HB DARK NAV END */
/* Line number stuff */
.CodeMirror-gutter-elt {
color: #81969A;
}
.CodeMirror-linenumber {
background-color: #293134;
}
.CodeMirror-gutter {
background-color: #293134;
}
/* column splits */
.editor .codeEditor .columnSplit {
font-style: italic;
color: inherit;
background-color:#1f5763;
border-bottom: #299 solid 1px;
}
/* Colors for headings and such */
/* ###Headings */
.cm-s-default .cm-header {
color: #c51b1b;
-webkit-text-stroke-width: 0.1px;
-webkit-text-stroke-color: #000;
}
/* bold points */
.cm-header, .cm-strong {
font-weight: bold;
color: #309dd2;
}
/* Link headings */
.cm-s-default .cm-link {
color: #dd6300;
}
/* links */
.cm-s-default .cm-string {
color: #aa8261;
}
/*@import*/
.cm-s-default .cm-def {
color:#2986cc;
}
/* Bullets and such */
.cm-s-default .cm-variable-2 {
color: #3cbf30;
}
/* blocks */
.editor .codeEditor .block:not(.cm-comment) {
color: #e3e3e3;
}
/* inline blocks */
.editor .codeEditor .inline-block {
color: #e3e3e3;
}
/* Tags (divs) */
.cm-s-default .cm-tag {
color: #e3ff00;
}
.cm-s-default .cm-attribute {
color: #e3ff00;
}
.cm-s-default .cm-atom {
color:#000;
}
.cm-s-default .cm-qualifier{
color:#ee1919;
}
.cm-s-default .cm-comment{
color:#bbc700;
}
.cm-s-default .cm-keyword {
color:#c302df;
background-color:#b1b1b1;
}
.cm-s-default .cm-property.cm-error {
color:#c50202;
}
.CodeMirror-foldmarker {
color:#f0ff00;
}
/* New page */
.editor .codeEditor .pageLine {
background: #000;
color:#000;
border-bottom: 1px solid #fff;
}
.cm-s-default .cm-builtin {
color:#fff;
}

View File

@@ -0,0 +1,121 @@
.CodeMirror {
background: #0C0C0C;
color: #B9BDB6;
}
/* Brew BG */
.brewRenderer {
background-color: #0C0C0C;
}
.cm-s-darkvision {
/* Blinking cursor and selection */
.CodeMirror-cursor {
border-left: 1px solid #B9BDB6;
}
.CodeMirror-selected {
background: #E0E8FF40;
}
/* Line number stuff */
.CodeMirror-gutter-elt {
color: #81969A;
}
.CodeMirror-linenumber {
background-color: #0C0C0C;
}
.CodeMirror-gutter {
background-color: #0C0C0C;
}
/* column splits */
.editor .codeEditor .columnSplit {
font-style: italic;
color: inherit;
background-color:#1F5763;
border-bottom: #299 solid 1px;
}
/* # headings */
.cm-header {
color: #C51B1B;
-webkit-text-stroke-width: 0.1px;
}
/* bold points */
.cm-strong {
font-weight: bold;
color: #309DD2;
}
/* Link headings */
.cm-link {
color: #DD6300;
}
/* links */
.cm-string {
color: #5CE638;
}
/*@import*/
.cm-def {
color: #2986CC;
}
/* Bullets and such */
.cm-variable-2 {
color: #3CBF30;
}
/* Tags (divs) */
.cm-tag {
color: #E3FF00;
}
.cm-attribute {
color: #E3FF00;
}
.cm-atom {
color: #CF7EA9;
}
.cm-qualifier {
color: #EE1919;
}
.cm-comment {
color: #BBC700;
}
.cm-keyword {
color: #CC66FF;
}
.cm-property {
color: aqua;
}
.cm-error {
color: #C50202;
}
.CodeMirror-foldmarker {
color: #F0FF00;
}
/* New page */
.cm-builtin {
color: #FFF;
}
}
.editor .codeEditor {
/* blocks */
.block:not(.cm-comment) {
color: magenta;
}
/* definition lists */
.define.definition {
color: #FFAA3E;
}
.define.term {
color: #7290d9;
}
.define:not(.term):not(.definition) {
background: #333;
}
/* New page */
.pageLine {
background: #000;
color: #000;
border-bottom: 1px solid #FFF;
}
}

View File

@@ -0,0 +1,70 @@
[
"default",
"3024-day",
"3024-night",
"abbott",
"abcdef",
"ambiance-mobile",
"ambiance",
"ayu-dark",
"ayu-mirage",
"base16-dark",
"base16-light",
"bespin",
"blackboard",
"cobalt",
"colorforth",
"darcula",
"darkbrewery-v301",
"darkvision",
"dracula",
"duotone-dark",
"duotone-light",
"eclipse",
"elegant",
"erlang-dark",
"gruvbox-dark",
"hopscotch",
"icecoder",
"idea",
"isotope",
"juejin",
"lesser-dark",
"liquibyte",
"lucario",
"material-darker",
"material-ocean",
"material-palenight",
"material",
"mbo",
"mdn-like",
"midnight",
"monokai",
"moxer",
"neat",
"neo",
"night",
"nord",
"oceanic-next",
"panda-syntax",
"paraiso-dark",
"paraiso-light",
"pastel-on-dark",
"railscasts",
"rubyblue",
"seti",
"shadowfox",
"solarized",
"ssms",
"the-matrix",
"tomorrow-night-bright",
"tomorrow-night-eighties",
"ttcn",
"twilight",
"vibrant-ink",
"xq-dark",
"xq-light",
"yeti",
"yonce",
"zenburn"
]

Binary file not shown.

View File

@@ -0,0 +1,114 @@
/* Icon Font: dicefont */
@font-face {
font-family : 'DiceFont';
font-style : normal;
font-weight : normal;
src : url('../../../fonts/icon fonts/dicefont.woff2');
}
.df {
display : inline-block;
font-family : 'DiceFont';
font-style : normal;
font-weight : normal;
font-variant : normal;
line-height : 1;
text-decoration : inherit;
text-transform : none;
text-rendering : optimizeLegibility;
-moz-osx-font-smoothing : grayscale;
-webkit-font-smoothing : antialiased;
&.F::before { content : '\f190'; }
&.F-minus::before { content : '\f191'; }
&.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'; }
&.d12-11::before { content : '\f10d'; }
&.d12-12::before { content : '\f10e'; }
&.d12-2::before { content : '\f10f'; }
&.d12-3::before { content : '\f110'; }
&.d12-4::before { content : '\f111'; }
&.d12-5::before { content : '\f112'; }
&.d12-6::before { content : '\f113'; }
&.d12-7::before { content : '\f114'; }
&.d12-8::before { content : '\f115'; }
&.d12-9::before { content : '\f116'; }
&.d2::before { content : '\f196'; }
&.d2-1::before { content : '\f117'; }
&.d2-2::before { content : '\f118'; }
&.d20::before { content : '\f197'; }
&.d20-1::before { content : '\f119'; }
&.d20-10::before { content : '\f11a'; }
&.d20-11::before { content : '\f11b'; }
&.d20-12::before { content : '\f11c'; }
&.d20-13::before { content : '\f11d'; }
&.d20-14::before { content : '\f11e'; }
&.d20-15::before { content : '\f11f'; }
&.d20-16::before { content : '\f120'; }
&.d20-17::before { content : '\f121'; }
&.d20-18::before { content : '\f122'; }
&.d20-19::before { content : '\f123'; }
&.d20-2::before { content : '\f124'; }
&.d20-20::before { content : '\f125'; }
&.d20-3::before { content : '\f126'; }
&.d20-4::before { content : '\f127'; }
&.d20-5::before { content : '\f128'; }
&.d20-6::before { content : '\f129'; }
&.d20-7::before { content : '\f12a'; }
&.d20-8::before { content : '\f12b'; }
&.d20-9::before { content : '\f12c'; }
&.d4::before { content : '\f198'; }
&.d4-1::before { content : '\f12d'; }
&.d4-2::before { content : '\f12e'; }
&.d4-3::before { content : '\f12f'; }
&.d4-4::before { content : '\f130'; }
&.d6::before { content : '\f199'; }
&.d6-1::before { content : '\f131'; }
&.d6-2::before { content : '\f132'; }
&.d6-3::before { content : '\f133'; }
&.d6-4::before { content : '\f134'; }
&.d6-5::before { content : '\f135'; }
&.d6-6::before { content : '\f136'; }
&.d8::before { content : '\f19a'; }
&.d8-1::before { content : '\f137'; }
&.d8-2::before { content : '\f138'; }
&.d8-3::before { content : '\f139'; }
&.d8-4::before { content : '\f13a'; }
&.d8-5::before { content : '\f13b'; }
&.d8-6::before { content : '\f13c'; }
&.d8-7::before { content : '\f13d'; }
&.d8-8::before { content : '\f13e'; }
&.dot-d6::before { content : '\f19b'; }
&.dot-d6-1::before { content : '\f13f'; }
&.dot-d6-2::before { content : '\f140'; }
&.dot-d6-3::before { content : '\f141'; }
&.dot-d6-4::before { content : '\f142'; }
&.dot-d6-5::before { content : '\f143'; }
&.dot-d6-6::before { content : '\f18f'; }
&.small-dot-d6-1::before { content : '\f183'; }
&.small-dot-d6-2::before { content : '\f184'; }
&.small-dot-d6-3::before { content : '\f185'; }
&.small-dot-d6-4::before { content : '\f186'; }
&.small-dot-d6-5::before { content : '\f187'; }
&.small-dot-d6-6::before { content : '\f188'; }
&.solid-small-dot-d6-1::before { content : '\f189'; }
&.solid-small-dot-d6-2::before { content : '\f18a'; }
&.solid-small-dot-d6-3::before { content : '\f18b'; }
&.solid-small-dot-d6-4::before { content : '\f18c'; }
&.solid-small-dot-d6-5::before { content : '\f18d'; }
&.solid-small-dot-d6-6::before { content : '\f18e'; }
}

Binary file not shown.

View File

@@ -0,0 +1,18 @@
# License
DiceFont is open source. You can use it for commercial projects, personal
projects or open source projects.
## Font License
Applies to all desktop and webfont files: [License: SIL OFL 1.1](http://scripts.sil.org/OFL)
## Code License
Applies to all CSS and LESS files: [License: MIT License](http://opensource.org/licenses/mit-license.html)
## Documentation License
Applies to all other files [CC BY 3.0](http://creativecommons.org/licenses/by/3.0/)
Copyright [Franco Ponticelli](https://github.com/fponticelli).

View File

@@ -0,0 +1,224 @@
/* Icon Font: Elderberry Inn */
@font-face {
font-family : 'Elderberry-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 : 'Elderberry-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'; }
}
}