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

Compare commits

..

177 Commits

Author SHA1 Message Date
Trevor Buckner
a5827f66c9 Up version to v3.4.1 2022-12-05 21:36:01 -05:00
Trevor Buckner
f5e1869a9b Merge pull request #2529 from naturalcrit/dependabot/npm_and_yarn/fs-extra-11.1.0
Bump fs-extra from 10.1.0 to 11.1.0
2022-12-02 21:39:08 -05:00
Trevor Buckner
10c8414ab0 Merge pull request #2536 from Gazook89/Prevent-Crash-with-Non-Latin-Characters
Encode Filename in Content-Disposition header
2022-12-02 21:31:46 -05:00
Trevor Buckner
6832e68ada Merge pull request #2528 from Gazook89/GoogleActions-error
Change error message about googleActions on local startup.
2022-12-02 21:29:39 -05:00
Trevor Buckner
24477327aa message tweaks 2022-12-02 21:28:57 -05:00
dependabot[bot]
52b11d9b38 Bump fs-extra from 10.1.0 to 11.1.0
Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 10.1.0 to 11.1.0.
- [Release notes](https://github.com/jprichardson/node-fs-extra/releases)
- [Changelog](https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jprichardson/node-fs-extra/compare/10.1.0...11.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-03 01:58:32 +00:00
Trevor Buckner
c7b239f362 Merge pull request #2539 from naturalcrit/react17
update to react 17
2022-12-02 20:57:17 -05:00
Trevor Buckner
f1b67ad9d6 Update package-lock.json 2022-12-02 20:55:38 -05:00
Trevor Buckner
6279a85d2e Merge branch 'master' into react17 2022-12-02 17:14:45 -05:00
Trevor Buckner
7a4b5cca04 Merge pull request #2538 from naturalcrit/dependabot/npm_and_yarn/decode-uri-component-0.2.2
Bump decode-uri-component from 0.2.0 to 0.2.2
2022-12-02 17:13:55 -05:00
Trevor Buckner
c4eff2478a update dpendencies 2022-12-02 15:31:06 -05:00
Trevor Buckner
15c918b5d4 Merge pull request #2533 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.4.4
Bump react-router-dom from 6.4.3 to 6.4.4
2022-12-02 10:14:23 -05:00
Gazook89
0a5bfe2939 check if keys exist before trying for auth. 2022-12-01 19:51:36 -06:00
dependabot[bot]
05b9bbdf59 Bump decode-uri-component from 0.2.0 to 0.2.2
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-02 01:23:25 +00:00
Trevor Buckner
b88c89d61b Merge pull request #2535 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.7.5
Bump mongoose from 6.7.4 to 6.7.5
2022-12-01 16:46:00 -05:00
Trevor Buckner
743d0fa689 Merge pull request #2527 from Gazook89/OG-Meta-tag-fix
Fix og:image and og:site_name
2022-12-01 12:49:36 -05:00
Gazook89
3b6d3963f1 point to defaultMetatags.image 2022-12-01 11:01:40 -06:00
Gazook89
3a4c2d8f13 change image property to reference default image property
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-12-01 10:58:27 -06:00
Gazook89
7d86a40261 encode filename string to allow non-latin characters 2022-12-01 10:52:30 -06:00
dependabot[bot]
5527aa7990 Bump mongoose from 6.7.4 to 6.7.5
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.7.4 to 6.7.5.
- [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/6.7.4...6.7.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-01 03:02:05 +00:00
dependabot[bot]
f48484520a Bump react-router-dom from 6.4.3 to 6.4.4
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.4.3 to 6.4.4.
- [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.4.4/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>
2022-12-01 03:00:49 +00:00
Trevor Buckner
5957ddd01c Merge pull request #2526 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.7.4
Bump mongoose from 6.7.3 to 6.7.4
2022-11-30 14:21:53 -05:00
Trevor Buckner
994b1584b7 Merge pull request #2524 from naturalcrit/dependabot/npm_and_yarn/babel/core-7.20.5
Bump @babel/core from 7.20.2 to 7.20.5
2022-11-30 14:21:43 -05:00
Gazook89
9647fbcc74 change default image on a few pages, and default description. 2022-11-29 19:12:54 -06:00
Gazook89
ca6f8d085a changing messaging about googleActions 2022-11-29 12:57:27 -06:00
Gazook89
c2637a7576 fix og:image and og:site_name 2022-11-29 11:27:15 -06:00
dependabot[bot]
4fd1cdd7e8 Bump mongoose from 6.7.3 to 6.7.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.7.3 to 6.7.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/6.7.3...6.7.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-29 03:01:22 +00:00
dependabot[bot]
ad20ff514a Bump @babel/core from 7.20.2 to 7.20.5
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.20.2 to 7.20.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.20.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>
2022-11-29 03:00:35 +00:00
Trevor Buckner
5cd50f7138 Merge pull request #2522 from G-Ambatte/fixAccountLoginTime-#2521
[AccountPage] Fix last login time
2022-11-28 17:19:31 -05:00
G.Ambatte
420d703f9d Add updateTokens param to GoogleActions/authCheck 2022-11-29 10:00:23 +13:00
Trevor Buckner
090da33f33 Merge pull request #2519 from naturalcrit/v3.4.0
V3.4.0
2022-11-28 13:43:43 -05:00
Trevor Buckner
134e260d7b Update changelog.md 2022-11-28 13:34:46 -05:00
Trevor Buckner
82c8ca55fc 3.4.0 2022-11-28 12:33:57 -05:00
Trevor Buckner
e92cd3be18 Merge pull request #2517 from G-Ambatte/fixPrintMargins-#2516
Update Style for V3 & Legacy
2022-11-28 11:11:25 -05:00
G.Ambatte
93c2d2d860 Add contain:size to Legacy 2022-11-25 17:53:28 +13:00
G.Ambatte
cd79a38755 Add contain:size to V3 2022-11-25 17:53:17 +13:00
Trevor Buckner
84286b7942 Merge pull request #2515 from naturalcrit/dependabot/npm_and_yarn/mongoose-6.7.3
Bump mongoose from 6.7.2 to 6.7.3
2022-11-23 10:52:13 -05:00
dependabot[bot]
a16ca8c897 Bump mongoose from 6.7.2 to 6.7.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.7.2 to 6.7.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/6.7.2...6.7.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-23 03:01:09 +00:00
Trevor Buckner
fea07429fe Merge pull request #2514 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.31.11
Bump eslint-plugin-react from 7.31.10 to 7.31.11
2022-11-21 12:57:35 -05:00
dependabot[bot]
fa29f2281d Bump eslint-plugin-react from 7.31.10 to 7.31.11
Bumps [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) from 7.31.10 to 7.31.11.
- [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.31.10...v7.31.11)

---
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>
2022-11-21 17:41:10 +00:00
Trevor Buckner
002b88ab83 Merge pull request #2513 from naturalcrit/dependabot/npm_and_yarn/marked-4.2.3
Bump marked from 4.2.2 to 4.2.3
2022-11-21 12:38:37 -05:00
Trevor Buckner
54833f9fc6 Merge pull request #2512 from naturalcrit/dependabot/npm_and_yarn/eslint-8.28.0
Bump eslint from 8.27.0 to 8.28.0
2022-11-21 12:38:26 -05:00
dependabot[bot]
cba9286217 Bump marked from 4.2.2 to 4.2.3
Bumps [marked](https://github.com/markedjs/marked) from 4.2.2 to 4.2.3.
- [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/v4.2.2...v4.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 03:01:20 +00:00
dependabot[bot]
9ebbff49fb Bump eslint from 8.27.0 to 8.28.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.27.0 to 8.28.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.27.0...v8.28.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 03:01:06 +00:00
Trevor Buckner
9ee39a83c1 Merge pull request #2507 from Gazook89/OG-Meta-Tag-default-object
Move common meta tags to default object
2022-11-17 23:01:32 -05:00
Trevor Buckner
c09a4c4374 cleanup 2022-11-17 22:58:46 -05:00
Trevor Buckner
3e44d0ad13 Merge pull request #2488 from Gazook89/Field-Validation-System-2
Field validation system 2
2022-11-17 21:58:54 -05:00
Trevor Buckner
b23a09b1b8 cleanup 2022-11-17 21:58:24 -05:00
Trevor Buckner
421ed8f51d Remove comments 2022-11-17 21:53:46 -05:00
Gazook89
14a057cf55 change account page title to something generic 2022-11-17 11:37:29 -06:00
Trevor Buckner
ee05392d27 Merge pull request #2503 from Gazook89/Add-syntax-highlighting-for-injections
Add syntax highlighting for injections
2022-11-16 15:43:17 -05:00
Trevor Buckner
1cc84da976 Remove end/start bracket tracking for injectors 2022-11-16 15:42:45 -05:00
Gazook89
5cfdd504c1 Move common meta tags to default object 2022-11-16 12:52:59 -06:00
Gazook89
24debfc75c fix regexp to not include inside of curly spans 2022-11-15 11:09:27 -06:00
Gazook89
ffe6272299 Merge branch 'master' into Add-syntax-highlighting-for-injections 2022-11-15 10:36:06 -06:00
Trevor Buckner
64c3d69641 Merge pull request #2506 from Gazook89/FAQ-in-Navbar
Add link to FAQ in "Need Help" menu
2022-11-15 11:26:23 -05:00
Gazook89
67c19b79e3 Add link to FAQ in "Need Help" menu 2022-11-15 10:21:35 -06:00
Trevor Buckner
ea29106101 Merge pull request #2501 from Gazook89/RegExp-Crash-in-Curly-Syntax
Reg exp crash in curly syntax
2022-11-14 18:57:27 -05:00
Trevor Buckner
8016f82040 Tweak capture group order 2022-11-14 18:56:04 -05:00
Trevor Buckner
7c93e5879c Merge pull request #2442 from Gazook89/Delete-Recent-Items
Add Ability to Remove Brews from Recent Items
2022-11-14 10:01:03 -05:00
Trevor Buckner
dc86f89c4f Add title attribute 2022-11-14 09:58:48 -05:00
Trevor Buckner
d03be052aa Merge pull request #2504 from Gazook89/Remove-Checkboxes-from-GH-Forms
Remove Checkboxes from Github Issue Forms
2022-11-14 00:18:41 -05:00
Gazook89
fef79f4fc3 remove checkboxes 2022-11-13 22:09:50 -06:00
Gazook89
cc58721ccd give span tags to injection syntax for styling 2022-11-13 21:02:45 -06:00
Gazook89
5f2115da0e fix mustacheInjectBlock pattern as well (missed it earlier) 2022-11-13 20:32:01 -06:00
Gazook89
1dd1e677e4 adjust span regexp pattern to capture trailing spaces 2022-11-13 20:19:39 -06:00
Gazook89
29b89bdc00 Merge branch 'master' into RegExp-Crash-in-Curly-Syntax 2022-11-13 20:06:05 -06:00
Gazook89
4493d86fd5 fix injection curly syntax 2022-11-13 20:05:52 -06:00
Gazook89
6a600df19a Merge branch 'master' into Field-Validation-System-2 2022-11-13 19:11:21 -06:00
Trevor Buckner
e8c6e36521 Merge pull request #2499 from G-Ambatte/fixMissingMetaTagsCrash-#2498
Fix template.js crash when ogMeta undefined
2022-11-13 15:46:25 -05:00
G.Ambatte
3e3610a204 Move fix to template.js 2022-11-14 08:20:46 +13:00
G.Ambatte
3e626d91f0 Add empty object as ogMeta default 2022-11-14 08:12:27 +13:00
Gazook89
6a0d8d13b0 don't save errs to state 2022-11-13 12:56:17 -06:00
Gazook89
4f762b376f tweak validation rules on Thumbnail & prevent invalid field from block valid fields 2022-11-13 12:45:31 -06:00
Gazook89
bda80c9984 remove comments 2022-11-13 11:43:55 -06:00
Gazook89
7de60e2345 Merge branch 'master' into Delete-Recent-Items 2022-11-13 11:41:19 -06:00
Trevor Buckner
77ad2c8958 Merge pull request #2481 from naturalcrit/dependabot/npm_and_yarn/react-router-dom-6.4.3
Bump react-router-dom from 6.4.2 to 6.4.3
2022-11-12 21:27:52 -05:00
Trevor Buckner
6cca821ba6 Merge pull request #2487 from naturalcrit/dependabot/npm_and_yarn/googleapis-109.0.1
Bump googleapis from 108.0.1 to 109.0.1
2022-11-12 21:27:44 -05:00
Trevor Buckner
96da053717 Merge branch 'master' into pr/2488 2022-11-11 20:33:20 -05:00
dependabot[bot]
3723006f39 Bump react-router-dom from 6.4.2 to 6.4.3
Bumps [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) from 6.4.2 to 6.4.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.4.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>
2022-11-11 03:21:08 +00:00
dependabot[bot]
6cfdc47760 Bump googleapis from 108.0.1 to 109.0.1
Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 108.0.1 to 109.0.1.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/googleapis-v108.0.1...googleapis-v109.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-11 03:21:02 +00:00
Trevor Buckner
00a5600768 Merge pull request #2490 from naturalcrit/dependabot/npm_and_yarn/marked-4.2.2
Bump marked from 4.1.1 to 4.2.2
2022-11-10 22:10:57 -05:00
Trevor Buckner
d8674d09a2 Merge pull request #2453 from Gazook89/Open-Graph-Meta-Changes
Change `<meta>` tags based on Current Page
2022-11-10 22:02:47 -05:00
dependabot[bot]
a46630f774 Bump marked from 4.1.1 to 4.2.2
Bumps [marked](https://github.com/markedjs/marked) from 4.1.1 to 4.2.2.
- [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/v4.1.1...v4.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-11 02:57:54 +00:00
Trevor Buckner
38fb9d467c Merge branch 'master' into pr/2453 2022-11-10 21:56:49 -05:00
Trevor Buckner
fee56ca8e0 Merge pull request #2496 from naturalcrit/fixV3_PreviewTest
Update Jest test  for moved legacy homepage
2022-11-10 21:55:32 -05:00
Trevor Buckner
de60419926 Update config.yml 2022-11-10 21:53:28 -05:00
Trevor Buckner
42a1410cc2 Update config.yml 2022-11-10 21:52:06 -05:00
Trevor Buckner
ddd4f93f01 Merge branch 'fixV3_PreviewTest' of https://github.com/naturalcrit/homebrewery into fixV3_PreviewTest 2022-11-10 21:50:09 -05:00
Trevor Buckner
21de3b31b6 Use lower npm version 2022-11-10 21:49:57 -05:00
Trevor Buckner
aea25119c0 Updated config.yml 2022-11-10 21:46:56 -05:00
Trevor Buckner
aa1100642d update circleCI config 2022-11-10 21:37:45 -05:00
Trevor Buckner
4121cc0e14 Update package-lock.json 2022-11-10 21:23:21 -05:00
Trevor Buckner
3b7b56c789 Update package-lock.json 2022-11-10 21:19:36 -05:00
Trevor Buckner
ebc03aee33 Update Jest test for moved legacy homepage 2022-11-10 21:04:25 -05:00
Gazook89
03c6edf31a change regexp to calculuschild's atomic fix 2022-11-07 10:01:22 -06:00
Gazook89
970d03a5e4 validate thumbnail is URL 2022-11-06 13:17:39 -06:00
Gazook89
ed4c090f21 finish setting OG tags 2022-11-06 12:34:24 -06:00
Gazook89
672d582caf move metaTag objects to app.js 2022-11-05 23:32:30 -05:00
Gazook89
b6c09683be add language field validation (for future pr)
fix an oversight in validations
2022-11-05 20:07:27 -05:00
Gazook89
a13fd48cda prevent crash on input to second field. small css change 2022-11-05 12:19:01 -05:00
Gazook89
aec1147aa5 set :invalid input to light red background 2022-11-05 11:56:48 -05:00
Gazook89
78da48b08d fix issue with async setState using Event.persist() 2022-11-05 11:42:21 -05:00
Gazook89
edce191c29 remove a silly rule 2022-11-05 11:32:35 -05:00
Gazook89
8c52a253dc log errs correctly, setCustomValidity and reportValidity 2022-11-04 20:22:59 -05:00
Gazook89
589ec0251a move validations into it's own file. 2022-11-04 15:32:20 -05:00
Gazook89
ffddc275c1 set removeItem icon to transparent background 2022-11-03 23:38:46 -05:00
Gazook89
4e26bb309c Merge branch 'master' into Open-Graph-Meta-Changes 2022-11-03 22:05:13 -05:00
Gazook89
7696be5d95 first commit 2022-11-03 22:00:45 -05:00
Trevor Buckner
ef80c23034 Merge pull request #2479 from G-Ambatte/excludeGoogleStubsFromAccountPage
[AccountPage] Modify query to exclude Google brew stubs
2022-10-31 22:37:40 -04:00
G.Ambatte
1f7be69624 Modify query to exclude Google brew stubs 2022-10-31 17:43:41 +13:00
Trevor Buckner
6e069dc29d Merge pull request #2161 from G-Ambatte/createUIBasePage
Create UI base page
2022-10-30 11:08:04 -04:00
G.Ambatte
e40bbf56c7 Merge branch 'master' into createUIBasePage 2022-10-30 18:21:45 +13:00
Trevor Buckner
65beb8d65e Merge branch 'master' into pr/2442 2022-10-28 14:07:14 -04:00
Trevor Buckner
ebf4f614c4 Merge pull request #2447 from Gazook89/autosave-default-fix
Fix Autosave Default
2022-10-28 14:05:45 -04:00
Trevor Buckner
26942e276a Merge branch 'master' into pr/2447 2022-10-28 14:04:45 -04:00
Trevor Buckner
0bcce67e39 Small logic simplification 2022-10-28 14:04:28 -04:00
Trevor Buckner
3318ba6277 Merge pull request #2450 from G-Ambatte/fixUserPageStyle-#2449
[UserPage] Fix UserPage groups styling
2022-10-28 14:00:17 -04:00
Trevor Buckner
c5eb7db432 Merge pull request #2448 from naturalcrit/dependabot/npm_and_yarn/dedent-tabs-0.10.2
Bump dedent-tabs from 0.10.1 to 0.10.2
2022-10-28 13:07:26 -04:00
Trevor Buckner
f35345f385 Actually update version number. 2022-10-28 13:03:09 -04:00
Trevor Buckner
a13ac2e0c5 Merge pull request #2469 from jeddai/update-twitter-card
update twitter:card meta tag to have "summary" as the content
2022-10-28 02:31:09 -04:00
Trevor Buckner
27eb95ece8 Simplify split-table margins, .blank should have no margins before or after 2022-10-28 02:10:22 -04:00
Trevor Buckner
7958bb4cda Missed one table style 2022-10-28 00:51:40 -04:00
Trevor Buckner
8fc01ebb12 Merge pull request #2472 from naturalcrit/Version3.3.1
Update changelog.md
2022-10-28 00:11:57 -04:00
Trevor Buckner
13eedc9f82 Merge pull request #2467 from naturalcrit/dependabot/npm_and_yarn/googleapis-108.0.1
Bump googleapis from 108.0.0 to 108.0.1
2022-10-28 00:05:45 -04:00
Trevor Buckner
6f919bc214 Merge pull request #2471 from naturalcrit/MoreThemesFixes
More themes fixes
2022-10-28 00:05:28 -04:00
Trevor Buckner
496328d511 Remove unnecessary spacing rules from Blank Theme 2022-10-27 23:46:47 -04:00
Trevor Buckner
d6af56c51c Move table line-height from TD to Table 2022-10-27 23:34:50 -04:00
Trevor Buckner
079d59695f Return :where(.page) to .page 2022-10-27 23:27:56 -04:00
Charlie Humphreys
ac7b2bce9f update twitter:card meta tag to have "summary" as the content 2022-10-27 21:14:14 -05:00
dependabot[bot]
4664d88aad Bump googleapis from 108.0.0 to 108.0.1
Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 108.0.0 to 108.0.1.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/googleapis-v108.0.0...googleapis-v108.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 03:01:07 +00:00
Gazook89
5c3f7b1b82 small fixes 2022-10-20 11:46:53 -05:00
Gazook89
bdf1bd1e8b add user page 2022-10-20 11:40:10 -05:00
Gazook89
df6d372243 Merge branch 'master' into Open-Graph-Meta-Changes 2022-10-20 11:19:48 -05:00
Gazook89
b237456420 add fn to change meta tags based on page 2022-10-20 11:19:17 -05:00
G.Ambatte
3f0c950e72 Fix UserPage groups styling 2022-10-20 17:26:46 +13:00
dependabot[bot]
2b71ff2dec Bump dedent-tabs from 0.10.1 to 0.10.2
Bumps [dedent-tabs](https://github.com/adrianjost/dedent-tabs) from 0.10.1 to 0.10.2.
- [Release notes](https://github.com/adrianjost/dedent-tabs/releases)
- [Commits](https://github.com/adrianjost/dedent-tabs/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-20 03:01:28 +00:00
Gazook89
1801691f49 fix autosave default 2022-10-19 11:45:47 -05:00
Gazook89
04eebae3ec Merge branch 'master' into Open-Graph-Meta-Changes 2022-10-18 21:19:55 -05:00
Gazook89
23a0a89ead autohide dropdown again 2022-10-18 21:02:44 -05:00
Gazook89
a7a67621a1 added removeItem() function 2022-10-18 21:01:24 -05:00
Gazook89
bebb06a36d Merge branch 'master' into Delete-Recent-Items 2022-10-18 19:22:01 -05:00
G.Ambatte
1d8781da90 Modify how data is passed to UIPage 2022-10-03 20:27:34 +13:00
G.Ambatte
93918bc26c Nudge SVG size 2022-10-02 11:06:57 +13:00
G.Ambatte
7ae939623c Merge branch 'master' into createUIBasePage 2022-09-28 07:06:01 +13:00
Gazook89
bc0ee8138e change title and description 2022-09-26 13:03:40 -05:00
G.Ambatte
91b2911bb0 Change capitalization of page title 2022-09-26 20:17:52 +13:00
G.Ambatte
9848dc54ba Add Nav bar items 2022-09-26 19:07:46 +13:00
G.Ambatte
9a3bd4db4b Merge branch 'master' into createUIBasePage 2022-09-26 19:02:07 +13:00
G.Ambatte
891bde6990 Merge branch 'createUIBasePage' of https://github.com/G-Ambatte/homebrewery into createUIBasePage 2022-09-26 18:44:45 +13:00
G.Ambatte
d9228b8c4b Add Account menu item 2022-09-26 18:43:47 +13:00
G.Ambatte
5a3daf8ffd Merge branch 'master' into createUIBasePage 2022-09-26 16:34:44 +13:00
G.Ambatte
5469ec6683 Format Issued datetime 2022-09-26 13:28:50 +13:00
G.Ambatte
764621f762 Add Homebrewery Icon 2022-09-26 12:12:21 +13:00
G.Ambatte
248687684a Add group styling 2022-09-26 11:31:00 +13:00
G.Ambatte
d7b1f89152 Change data items to a list 2022-09-26 11:30:45 +13:00
G.Ambatte
9a844dae39 Fix class=>className 2022-09-26 00:41:49 +13:00
G.Ambatte
5193271796 Fix Google Drive icon 2022-09-26 00:41:17 +13:00
G.Ambatte
ed5bef27e0 Shift renderUiItems to function 2022-09-26 00:35:12 +13:00
G.Ambatte
be25e90009 Change variable name 2022-09-26 00:34:54 +13:00
G.Ambatte
ab98bf5d6c Fix Routes 2022-09-26 00:05:53 +13:00
G.Ambatte
ffb1c77697 Merge branch 'createUIBasePage' 2022-09-25 23:54:20 +13:00
G.Ambatte
6bddba6762 Merge branch 'master' into createUIBasePage 2022-09-25 23:47:55 +13:00
G.Ambatte
57b0af54df Renamed functions, eliminate unnecessary variable 2022-09-25 23:29:45 +13:00
G.Ambatte
0ac50017c4 Change path to /account 2022-09-25 23:20:45 +13:00
G.Ambatte
9135ca1e43 Fix class => className 2022-09-25 23:20:03 +13:00
Gazook89
45aa8bdfae Add html node and css for Delete button 2022-09-21 20:27:16 -05:00
G.Ambatte
4f154922c0 Update client/homebrew/pages/accountPage/accountPage.jsx
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-05-03 22:30:08 +12:00
G.Ambatte
2b1fe5d3fe Update client/homebrew/pages/accountPage/accountPage.jsx
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-05-03 22:29:53 +12:00
G.Ambatte
03402e4342 Add Google icon
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2022-05-03 22:29:33 +12:00
G.Ambatte
1d85eede43 Account information added 2022-05-03 11:38:24 +12:00
G.Ambatte
61f4456842 Styling updates. 2022-05-01 12:58:10 +12:00
G.Ambatte
c925e04f3c Remove unused require 2022-05-01 12:41:10 +12:00
G.Ambatte
00412a70e9 Remove test UI page, add initial Account page 2022-05-01 12:39:19 +12:00
G.Ambatte
0923c50218 Update UI page styling 2022-05-01 12:38:20 +12:00
G.Ambatte
fe536bc9df Initial pass at UI page and styling 2022-04-30 16:54:11 +12:00
G.Ambatte
e8937a285c Add UI route for testing 2022-04-30 16:53:30 +12:00
30 changed files with 12714 additions and 5902 deletions

View File

@@ -27,7 +27,7 @@ jobs:
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- node/install-npm
- run: sudo npm install -g npm@8.10.0
- node/install-packages:
app-dir: ~/homebrewery
cache-path: node_modules
@@ -55,13 +55,13 @@ jobs:
at: .
# run tests!
- run:
- run:
name: Test - Basic
command: npm run test:basic
- run:
- run:
name: Test - Mustache Spans
command: npm run test:mustache-span
- run:
- run:
name: Test - Routes
command: npm run test:route
@@ -71,4 +71,4 @@ workflows:
- build
- test:
requires:
- build
- build

View File

@@ -12,10 +12,6 @@ body:
description: The best feature requests provide an explanation of the current issue and then an explanation of how it could be improved. Screenshots/images can be pasted right in as well!
validations:
required: true
- type: checkboxes
id: terms
- type: markdown
attributes:
label: "Please confirm:"
options:
- label: I have searched the Issues tracker for any duplicate requests and found none.
required: true
value: "Please be sure to search for any close matches to your request in the GitHub Issues tracker before opening a new request, thanks!"

View File

@@ -4,14 +4,15 @@ body:
- type: markdown
attributes:
value: Please include as much information as possible.
- type: checkboxes
- type: dropdown
id: renderer
attributes:
label: Renderer
description: Which renderer does this issue occur on? If you are unsure, you can check the renderer in the Properties Editor (click the "i" in the Snippet Menu bar above the editor).
options:
- label: Legacy
- label: v3
- v3
- Legacy
- Both
validations:
required: true
- type: dropdown

View File

@@ -1,7 +1,6 @@
```css
h5 {
font-size: .35cm !important;
margin-top: 0.3cm;
}
.page ul ul {
@@ -45,6 +44,60 @@ pre {
## changelog
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
### Monday 05/12/2022 - v3.4.1
{{taskList
##### G-Ambatte
* [x] Fix Account page incorrect last login time
Fixes issues [#2521](https://github.com/naturalcrit/homebrewery/issues/2521)
##### Gazook
* [x] Fix crashing on iOS and Safari browsers
Fixes issues [#2531](https://github.com/naturalcrit/homebrewery/issues/2531)
}}
### Monday 28/11/2022 - v3.4.0
{{taskList
##### G-Ambatte
* [x] Fix for Chrome v108 handling of page size
Fixes issues [#2445](https://github.com/naturalcrit/homebrewery/issues/2445), [#2516](https://github.com/naturalcrit/homebrewery/issues/2516)
* [x] New account page with some user info, at {{openSans **USERNAME {{fa,fa-user}} → ACCOUNT {{fa,fa-user}}**}}
Fixes issues [#2049](https://github.com/naturalcrit/homebrewery/issues/2049), [#2043](https://github.com/naturalcrit/homebrewery/issues/2043)
* [x] Fix "Published/Private Brews" buttons on userpage
Fixes issues [#2449](https://github.com/naturalcrit/homebrewery/issues/2449)
##### Gazook
* [x] Make autosave default on for new users
* [x] Added link to our FAQ at {{openSans **NEED HELP? {{fa,fa-question-circle}} → FAQ {{fa,fa-question-circle}}**}}
* [x] Fix curly blocks freezing with long property lists
Fixes issues [#2393](https://github.com/naturalcrit/homebrewery/issues/2393)
* [x] Items can now be removed from {{openSans **RECENT BREWS** {{fas,fa-history}} }}
Fixes issues [#1918](https://github.com/naturalcrit/homebrewery/issues/1918)
* [x] Curly injector syntax `{blue}` highlighting in editor
Fixes issues [#1670](https://github.com/naturalcrit/homebrewery/issues/1670)
}}
### Thursday 28/10/2022 - v3.3.1
{{taskList
@@ -54,6 +107,10 @@ For a full record of development, visit our [Github Page](https://github.com/nat
Fixes issues [#2468](https://github.com/naturalcrit/homebrewery/issues/2468)
##### Jeddai
* [x] Reduce size of thumbnails on social media links
}}
### Friday 19/10/2022 - v3.3.0
@@ -85,8 +142,12 @@ Fixes issues [#2135](https://github.com/naturalcrit/homebrewery/issues/2135)
* [x] Fix brew settings being lost on first save
Fixes issues [#2427](https://github.com/naturalcrit/homebrewery/issues/2427)
}}
\column
{{taskList
##### Gazook:
* [x] Several updates to bug reporting and error popups

View File

@@ -137,9 +137,17 @@ const Editor = createClass({
codeMirror.addLineClass(lineNumber, 'text', 'columnSplit');
}
// Highlight injectors {style}
if(line.includes('{') && line.includes('}')){
const regex = /(?<!{){(?=((?::(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*)*))\1}/g;
let match;
while ((match = regex.exec(line)) != null) {
codeMirror.markText({ line: lineNumber, ch: match.index }, { line: lineNumber, ch: match.index + match[0].length }, { className: 'injection' });
}
}
// Highlight inline spans {{content}}
if(line.includes('{{') && line.includes('}}')){
const regex = /{{(?::(?:"[\w,\-()#%. ]*"|[\w\,\-()#%.]*)|[^"'{}\s])*\s*|}}/g;
const regex = /{{(?=((?::(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*)*))\1 *|}}/g;
let match;
let blockCount = 0;
while ((match = regex.exec(line)) != null) {
@@ -158,7 +166,7 @@ const Editor = createClass({
// Highlight block divs {{\n Content \n}}
let endCh = line.length+1;
const match = line.match(/^ *{{(?::(?:"[\w,\-()#%. ]*"|[\w\,\-()#%.]*)|[^"'{}\s])* *$|^ *}}$/);
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' });

View File

@@ -29,6 +29,10 @@
font-weight : bold;
//font-style: italic;
}
.injection{
color : green;
font-weight : bold;
}
}
.brewJump{

View File

@@ -9,6 +9,7 @@ const Nav = require('naturalcrit/nav/nav.jsx');
const StringArrayEditor = require('../stringArrayEditor/stringArrayEditor.jsx');
const Themes = require('themes/themes.json');
const validations = require('./validations.js')
const SYSTEMS = ['5e', '4e', '3.5e', 'Pathfinder'];
@@ -22,6 +23,7 @@ const MetadataEditor = createClass({
editId : null,
title : '',
description : '',
thumbnail : '',
tags : [],
published : false,
authors : [],
@@ -51,11 +53,30 @@ const MetadataEditor = createClass({
},
handleFieldChange : function(name, e){
this.props.onChange({
...this.props.metadata,
[name] : e.target.value
});
e.persist();
// load validation rules, and check input value against them
const inputRules = validations[name] ?? [];
const validationErr = inputRules.map((rule)=>rule(e.target.value)).filter(Boolean);
// if no validation rules, save to props
if(validationErr.length === 0){
e.target.setCustomValidity('');
this.props.onChange({
...this.props.metadata,
[name] : e.target.value
});
} else {
// if validation issues, display built-in browser error popup with each error.
console.log(validationErr);
const errMessage = validationErr.map((err)=>{
return `- ${err}`;
}).join('\n');
e.target.setCustomValidity(errMessage);
e.target.reportValidity();
};
},
handleSystem : function(system, e){
if(e.target.checked){
this.props.metadata.systems.push(system);
@@ -64,6 +85,7 @@ const MetadataEditor = createClass({
}
this.props.onChange(this.props.metadata);
},
handleRenderer : function(renderer, e){
if(e.target.checked){
this.props.metadata.renderer = renderer;
@@ -228,21 +250,21 @@ const MetadataEditor = createClass({
<div className='field title'>
<label>title</label>
<input type='text' className='value'
value={this.props.metadata.title}
defaultValue={this.props.metadata.title}
onChange={(e)=>this.handleFieldChange('title', e)} />
</div>
<div className='field-group'>
<div className='field-column'>
<div className='field description'>
<label>description</label>
<textarea value={this.props.metadata.description} className='value'
<textarea defaultValue={this.props.metadata.description} className='value'
onChange={(e)=>this.handleFieldChange('description', e)} />
</div>
<div className='field thumbnail'>
<label>thumbnail</label>
<input type='text'
value={this.props.metadata.thumbnail}
placeholder='my.thumbnail.url'
defaultValue={this.props.metadata.thumbnail}
placeholder='https://my.thumbnail.url'
className='value'
onChange={(e)=>this.handleFieldChange('thumbnail', e)} />
<button className='display' onClick={this.toggleThumbnailDisplay}>

View File

@@ -42,6 +42,12 @@
&>.value{
flex : 1 1 auto;
width : 50px;
&:invalid {
background : #ffb9b9;
}
}
input[type='text'], textarea {
border : 1px solid gray;
}
&.thumbnail{
height : 1.4em;

View File

@@ -0,0 +1,34 @@
module.exports = {
title : [
(value)=>{
return value?.length > 100 ? 'Max title length of 100 characters' : null;
}
],
description : [
(value)=>{
return value?.length > 500 ? 'Max description length of 500 characters.' : null;
}
],
thumbnail : [
(value)=>{
return value?.length > 256 ? 'Max URL length of 256 characters.' : null;
},
(value)=>{
if(value?.length == 0){return null;}
try {
Boolean(new URL(value));
return null;
} catch (e) {
return 'Must be a valid URL';
}
}
],
language : [
(value)=>{
return new RegExp(/[a-z]{2,3}(-.*)?/).test(value || '') === false ? 'Invalid language code.' : null;
}
]
};

View File

@@ -11,6 +11,7 @@ const SharePage = require('./pages/sharePage/sharePage.jsx');
const NewPage = require('./pages/newPage/newPage.jsx');
//const ErrorPage = require('./pages/errorPage/errorPage.jsx');
const PrintPage = require('./pages/printPage/printPage.jsx');
const AccountPage = require('./pages/accountPage/accountPage.jsx');
const WithRoute = (props)=>{
const params = useParams();
@@ -61,24 +62,27 @@ const Homebrew = createClass({
},
render : function (){
return <Router location={this.props.url}>
<div className='homebrew'>
<Routes>
<Route path='/edit/:id' element={<WithRoute el={EditPage} brew={this.props.brew} />} />
<Route path='/share/:id' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/new/:id' element={<WithRoute el={NewPage} brew={this.props.brew} />} />
<Route path='/new' element={<WithRoute el={NewPage}/>} />
<Route path='/user/:username' element={<WithRoute el={UserPage} brews={this.props.brews} />} />
<Route path='/print/:id' element={<WithRoute el={PrintPage} brew={this.props.brew} />} />
<Route path='/print' element={<WithRoute el={PrintPage} />} />
<Route path='/changelog' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/faq' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/legacy' element={<WithRoute el={HomePage} brew={this.props.brew} />} />
<Route path='/' element={<WithRoute el={HomePage} brew={this.props.brew} />} />
<Route path='/*' element={<WithRoute el={HomePage} brew={this.props.brew} />} />
</Routes>
</div>
</Router>;
return (
<Router location={this.props.url}>
<div className='homebrew'>
<Routes>
<Route path='/edit/:id' element={<WithRoute el={EditPage} brew={this.props.brew} />} />
<Route path='/share/:id' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/new/:id' element={<WithRoute el={NewPage} brew={this.props.brew} />} />
<Route path='/new' element={<WithRoute el={NewPage}/>} />
<Route path='/user/:username' element={<WithRoute el={UserPage} brews={this.props.brews} />} />
<Route path='/print/:id' element={<WithRoute el={PrintPage} brew={this.props.brew} />} />
<Route path='/print' element={<WithRoute el={PrintPage} />} />
<Route path='/changelog' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/faq' element={<WithRoute el={SharePage} brew={this.props.brew} />} />
<Route path='/account' element={<WithRoute el={AccountPage} brew={this.props.brew} uiItems={this.props.brew.uiItems} />} />
<Route path='/legacy' element={<WithRoute el={HomePage} brew={this.props.brew} />} />
<Route path='/' element={<WithRoute el={HomePage} brew={this.props.brew} />} />
<Route path='/*' element={<WithRoute el={HomePage} brew={this.props.brew} />} />
</Routes>
</div>
</Router>
);
}
});

View File

@@ -76,6 +76,14 @@ const Account = createClass({
>
brews
</Nav.item>
<Nav.item
className='account'
color='orange'
icon='fas fa-user'
href='/account'
>
account
</Nav.item>
<Nav.item
className='logout'
color='red'

View File

@@ -20,6 +20,12 @@ module.exports = function(props){
rel='noopener noreferrer'>
report issue
</Nav.item>
<Nav.item color='green' icon='fas fa-question-circle'
href='/faq'
newTab={true}
rel='noopener noreferrer'>
FAQ
</Nav.item>
<Nav.item color='blue' icon='fas fa-fw fa-file-import'
href='/migrate'
newTab={true}

View File

@@ -115,8 +115,36 @@
color : white;
text-decoration : none;
border-top : 1px solid #888;
overflow : clip;
.clear{
display : none;
position : absolute;
top : 50%;
transform : translateY(-50%);
right : 0px;
width : 20px;
height : 100%;
background-color : #333;
opacity : 70%;
border-radius : 3px;
&:hover {
opacity : 100%;
}
i {
text-align : center;
font-size : 10px;
margin : 0;
height :100%;
width :100%;
}
}
&:hover{
background-color : @blue;
.clear{
display : grid;
place-content : center;
}
}
.title{
display : inline-block;

View File

@@ -119,6 +119,25 @@ const RecentItems = createClass({
});
},
removeItem : function(url, evt){
evt.preventDefault();
let edited = JSON.parse(localStorage.getItem(EDIT_KEY) || '[]');
let viewed = JSON.parse(localStorage.getItem(VIEW_KEY) || '[]');
edited = edited.filter((item)=>{ return (item.url !== url);});
viewed = viewed.filter((item)=>{ return (item.url !== url);});
localStorage.setItem(EDIT_KEY, JSON.stringify(edited));
localStorage.setItem(VIEW_KEY, JSON.stringify(viewed));
this.setState({
edit : edited,
view : viewed
});
},
renderDropdown : function(){
if(!this.state.showDropdown) return null;
@@ -127,6 +146,7 @@ const RecentItems = createClass({
return <a href={brew.url} className='item' key={`${brew.id}-${i}`} target='_blank' rel='noopener noreferrer' title={brew.title || '[ no title ]'}>
<span className='title'>{brew.title || '[ no title ]'}</span>
<span className='time'>{Moment(brew.ts).fromNow()}</span>
<div className='clear' title='Remove from Recents' onClick={(e)=>{this.removeItem(`${brew.url}`, e);}}><i className='fas fa-times'></i></div>
</a>;
});
};

View File

@@ -0,0 +1,71 @@
const React = require('react');
const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames');
const moment = require('moment');
const UIPage = require('../basePages/uiPage/uiPage.jsx');
const Nav = require('naturalcrit/nav/nav.jsx');
const Navbar = require('../../navbar/navbar.jsx');
const RecentNavItem = require('../../navbar/recent.navitem.jsx').both;
const Account = require('../../navbar/account.navitem.jsx');
const NewBrew = require('../../navbar/newbrew.navitem.jsx');
const HelpNavItem = require('../../navbar/help.navitem.jsx');
const NaturalCritIcon = require('naturalcrit/svg/naturalcrit.svg.jsx');
const AccountPage = createClass({
displayName : 'AccountPage',
getDefaultProps : function() {
return {
brew : {},
uiItems : {}
};
},
getInitialState : function() {
return {
uiItems : this.props.uiItems
};
},
renderNavItems : function() {
return <Navbar>
<Nav.section>
<NewBrew />
<HelpNavItem />
<RecentNavItem />
<Account />
</Nav.section>
</Navbar>;
},
renderUiItems : function() {
// console.log(this.props.uiItems);
return <>
<div className='dataGroup'>
<h1>Account Information <i className='fas fa-user'></i></h1>
<p><strong>Username: </strong> {this.props.uiItems.username || 'No user currently logged in'}</p>
<p><strong>Last Login: </strong> {moment(this.props.uiItems.issued).format('dddd, MMMM Do YYYY, h:mm:ss a ZZ') || '-'}</p>
</div>
<div className='dataGroup'>
<h3>Homebrewery Information <NaturalCritIcon /></h3>
<p><strong>Brews on Homebrewery: </strong> {this.props.uiItems.mongoCount || '-'}</p>
</div>
<div className='dataGroup'>
<h3>Google Information <i className='fab fa-google-drive'></i></h3>
<p><strong>Linked to Google: </strong> {this.props.uiItems.googleId ? 'YES' : 'NO'}</p>
{this.props.uiItems.googleId ? <p><strong>Brews on Google Drive: </strong> {this.props.uiItems.fileCount || '-'}</p> : '' }
</div>
</>;
},
render : function(){
return <UIPage brew={this.props.brew}>
{this.renderUiItems()}
</UIPage>;
}
});
module.exports = AccountPage;

View File

@@ -26,7 +26,29 @@
font-size : 1.3em;
font-style : italic;
}
.brewCollection {
h1:hover{
cursor: pointer;
}
.active::before, .inactive::before {
font-family: 'Font Awesome 5 Free';
font-weight: 900;
font-size: 0.6cm;
padding-right: 0.5em;
}
.active {
color: var(--HB_Color_HeaderText);
}
.active::before {
content: '\f107';
}
.inactive {
color: #707070;
}
.inactive::before {
content: '\f105';
}
}
}
}
.sort-container{

View File

@@ -0,0 +1,38 @@
require('./uiPage.less');
const React = require('react');
const createClass = require('create-react-class');
const Nav = require('naturalcrit/nav/nav.jsx');
const Navbar = require('../../../navbar/navbar.jsx');
const NewBrewItem = require('../../../navbar/newbrew.navitem.jsx');
const HelpNavItem = require('../../../navbar/help.navitem.jsx');
const RecentNavItem = require('../../../navbar/recent.navitem.jsx').both;
const Account = require('../../../navbar/account.navitem.jsx');
const UIPage = createClass({
displayName : 'UIPage',
render : function(){
return <div className='uiPage sitePage'>
<Navbar>
<Nav.section>
<Nav.item className='brewTitle'>{this.props.brew.title}</Nav.item>
</Nav.section>
<Nav.section>
<NewBrewItem />
<HelpNavItem />
<RecentNavItem />
<Account />
</Nav.section>
</Navbar>
<div className='content'>
{this.props.children}
</div>
</div>;
}
});
module.exports = UIPage;

View File

@@ -0,0 +1,47 @@
.uiPage{
.content{
overflow-y : hidden;
width : 90vw;
background-color: #f0f0f0;
font-family: 'Open Sans';
margin-left: auto;
margin-right: auto;
margin-top: 25px;
padding: 2% 4%;
font-size: 0.8em;
line-height: 1.8em;
.dataGroup{
padding: 6px 20px 15px;
border: 2px solid black;
border-radius: 5px;
margin: 5px 0px;
}
h1, h2, h3, h4{
font-weight: 900;
text-transform: uppercase;
margin: 0.5em 30% 0.25em 0;
border-bottom: 2px solid slategrey;
}
h1 {
font-size: 2em;
border-bottom: 2px solid darkslategrey;
margin-bottom: 0.5em;
margin-right: 0;
}
h2 {
font-size: 1.75em;
}
h3 {
font-size: 1.5em;
svg {
width: 19px;
}
}
h4 {
font-size: 1.25em;
}
strong {
font-weight: bold;
}
}
}

View File

@@ -78,7 +78,7 @@ const EditPage = createClass({
this.savedBrew = JSON.parse(JSON.stringify(this.props.brew)); //Deep copy
this.setState({ autoSave: JSON.parse(localStorage.getItem('AUTOSAVE_ON')) }, ()=>{
this.setState({ autoSave: JSON.parse(localStorage.getItem('AUTOSAVE_ON')) ?? true }, ()=>{
if(this.state.autoSave){
this.trySave();
} else {

View File

@@ -1,28 +1,31 @@
module.exports = async(name, title = '', props = {})=>{
const HOMEBREWERY_PUBLIC_URL=props.config.publicUrl;
const template = async function(name, title='', props = {}){
const ogTags = [];
const ogMeta = props.ogMeta ?? {};
Object.entries(ogMeta).forEach(([key, value])=>{
if(!value) return;
const tag = `<meta property="og:${key}" content="${value}">`;
ogTags.push(tag);
});
const ogMetaTags = ogTags.join('\n');
return `
<!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=${`/${name}/bundle.css`} rel='stylesheet' />
<link rel="icon" href="/assets/favicon.ico" type="image/x-icon" />
<meta property="og:title" content="${props.brew?.title || 'Homebrewery - Untitled Brew'}">
<meta property="og:url" content="${HOMEBREWERY_PUBLIC_URL}/${props.brew?.shareId ? `share/${props.brew.shareId}` : ''}">
<meta property="og:image" content="${props.brew?.thumbnail || `${HOMEBREWERY_PUBLIC_URL}/thumbnail.png`}">
<meta property="og:description" content="${props.brew?.description || 'No description.'}">
<meta property="og:site_name" content="The Homebrewery - Make your Homebrew content look legit!">
<meta property="og:type" content="article">
<meta name="twitter:card" content="summary_large_image">
<title>${title.length ? `${title} - The Homebrewery`: 'The Homebrewery - NaturalCrit'}</title>
</head>
<body>
<main id="reactRoot">${require(`../build/${name}/ssr.js`)(props)}</main>
<script src=${`/${name}/bundle.js`}></script>
<script>start_app(${JSON.stringify(props)})</script>
</body>
</html>
`;
return `<!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=${`/${name}/bundle.css`} rel='stylesheet' />
<link rel="icon" href="/assets/favicon.ico" type="image/x-icon" />
${ogMetaTags}
<meta name="twitter:card" content="summary">
<title>${title.length ? `${title} - The Homebrewery`: 'The Homebrewery - NaturalCrit'}</title>
</head>
<body>
<main id="reactRoot">${require(`../build/${name}/ssr.js`)(props)}</main>
<script src=${`/${name}/bundle.js`}></script>
<script>start_app(${JSON.stringify(props)})</script>
</body>
</html>
`;
};
module.exports = template;

17840
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "homebrewery",
"description": "Create authentic looking D&D homebrews using only markdown",
"version": "3.3.0",
"version": "3.4.1",
"engines": {
"node": "16.11.x"
},
@@ -51,7 +51,7 @@
]
},
"dependencies": {
"@babel/core": "^7.19.6",
"@babel/core": "^7.20.5",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.19.4",
"@babel/preset-react": "^7.18.6",
@@ -60,34 +60,35 @@
"codemirror": "^5.65.6",
"cookie-parser": "^1.4.6",
"create-react-class": "^15.7.0",
"dedent-tabs": "^0.10.1",
"dedent-tabs": "^0.10.2",
"express": "^4.18.2",
"express-async-handler": "^1.2.0",
"express-static-gzip": "2.1.7",
"fs-extra": "10.1.0",
"googleapis": "108.0.0",
"fs-extra": "11.1.0",
"googleapis": "109.0.1",
"js-yaml": "^4.1.0",
"jwt-simple": "^0.5.6",
"less": "^3.13.1",
"lodash": "^4.17.21",
"marked": "4.1.1",
"marked": "4.2.3",
"marked-extended-tables": "^1.0.5",
"markedLegacy": "npm:marked@^0.3.19",
"moment": "^2.29.4",
"mongoose": "^6.7.0",
"mongoose": "^6.7.5",
"nanoid": "3.3.4",
"nconf": "^0.12.0",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"npm": "^8.10.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-frame-component": "4.1.3",
"react-router-dom": "6.4.2",
"react-router-dom": "6.4.4",
"sanitize-filename": "1.6.3",
"superagent": "^6.1.0",
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
},
"devDependencies": {
"eslint": "^8.26.0",
"eslint-plugin-react": "^7.31.10",
"eslint": "^8.28.0",
"eslint-plugin-react": "^7.31.11",
"jest": "^29.2.2",
"supertest": "^6.3.1"
}

View File

@@ -1,4 +1,4 @@
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
/*eslint max-lines: ["warn", {"max": 400, "skipBlankLines": true, "skipComments": true}]*/
// Set working directory to project root
process.chdir(`${__dirname}/..`);
@@ -77,6 +77,14 @@ const faqText = require('fs').readFileSync('faq.md', 'utf8');
String.prototype.replaceAll = function(s, r){return this.split(s).join(r);};
const defaultMetaTags = {
site_name : 'The Homebrewery - Make your Homebrew content look legit!',
title : 'The Homebrewery',
description : 'A NaturalCrit Tool for creating authentic Homebrews using Markdown.',
image : `${config.get('publicUrl')}/thumbnail.png`,
type : 'website'
};
//Robots.txt
app.get('/robots.txt', (req, res)=>{
return res.sendFile(`robots.txt`, { root: process.cwd() });
@@ -87,17 +95,29 @@ app.get('/', (req, res, next)=>{
req.brew = {
text : welcomeText,
renderer : 'V3'
},
req.ogMeta = { ...defaultMetaTags,
title : 'Homepage',
description : 'Homepage'
};
splitTextStyleAndMetadata(req.brew);
return next();
});
//Home page v3
//Home page Legacy
app.get('/legacy', (req, res, next)=>{
req.brew = {
text : welcomeTextLegacy,
renderer : 'legacy'
},
req.ogMeta = { ...defaultMetaTags,
title : 'Homepage (Legacy)',
description : 'Homepage'
};
splitTextStyleAndMetadata(req.brew);
return next();
});
@@ -107,7 +127,13 @@ app.get('/migrate', (req, res, next)=>{
req.brew = {
text : migrateText,
renderer : 'V3'
},
req.ogMeta = { ...defaultMetaTags,
title : 'v3 Migration Guide',
description : 'A brief guide to converting Legacy documents to the v3 renderer.'
};
splitTextStyleAndMetadata(req.brew);
return next();
});
@@ -118,7 +144,13 @@ app.get('/changelog', async (req, res, next)=>{
title : 'Changelog',
text : changelogText,
renderer : 'V3'
},
req.ogMeta = { ...defaultMetaTags,
title : 'Changelog',
description : 'Development changelog.'
};
splitTextStyleAndMetadata(req.brew);
return next();
});
@@ -129,7 +161,13 @@ app.get('/faq', async (req, res, next)=>{
title : 'FAQ',
text : faqText,
renderer : 'V3'
},
req.ogMeta = { ...defaultMetaTags,
title : 'FAQ',
description : 'Frequently Asked Questions'
};
splitTextStyleAndMetadata(req.brew);
return next();
});
@@ -153,12 +191,19 @@ app.get('/download/:id', asyncHandler(getBrew('share')), (req, res)=>{
sanitizeBrew(brew, 'share');
const prefix = 'HB - ';
const encodeRFC3986ValueChars = (str)=>{
return (
encodeURIComponent(str)
.replace(/[!'()*]/g, (char)=>{`%${char.charCodeAt(0).toString(16).toUpperCase()}`;})
);
};
let fileName = sanitizeFilename(`${prefix}${brew.title}`).replaceAll(' ', '');
if(!fileName || !fileName.length) { fileName = `${prefix}-Untitled-Brew`; };
res.set({
'Cache-Control' : 'no-cache',
'Content-Type' : 'text/plain',
'Content-Disposition' : `attachment; filename="${fileName}.txt"`
'Content-Disposition' : `attachment; filename*=UTF-8''${encodeRFC3986ValueChars(fileName)}.txt`
});
res.status(200).send(brew.text);
});
@@ -167,6 +212,12 @@ app.get('/download/:id', asyncHandler(getBrew('share')), (req, res)=>{
app.get('/user/:username', async (req, res, next)=>{
const ownAccount = req.account && (req.account.username == req.params.username);
req.ogMeta = { ...defaultMetaTags,
title : `${req.params.username}'s Collection`,
description : 'View my collection of homebrew on the Homebrewery.'
// type : could be 'profile'?
};
const fields = [
'googleId',
'title',
@@ -224,6 +275,15 @@ app.get('/user/:username', async (req, res, next)=>{
//Edit Page
app.get('/edit/:id', asyncHandler(getBrew('edit')), (req, res, next)=>{
req.brew = req.brew.toObject ? req.brew.toObject() : req.brew;
req.ogMeta = { ...defaultMetaTags,
title : req.brew.title || 'Untitled Brew',
description : req.brew.description || 'No description.',
image : req.brew.thumbnail || defaultMetaTags.image,
type : 'article'
};
sanitizeBrew(req.brew, 'edit');
splitTextStyleAndMetadata(req.brew);
res.header('Cache-Control', 'no-cache, no-store'); //reload the latest saved brew when pressing back button, not the cached version before save.
@@ -235,6 +295,12 @@ app.get('/new/:id', asyncHandler(getBrew('share')), (req, res, next)=>{
sanitizeBrew(req.brew, 'share');
splitTextStyleAndMetadata(req.brew);
req.brew.title = `CLONE - ${req.brew.title}`;
req.ogMeta = { ...defaultMetaTags,
title : 'New',
description : 'Start crafting your homebrew on the Homebrewery!'
};
return next();
});
@@ -242,6 +308,13 @@ app.get('/new/:id', asyncHandler(getBrew('share')), (req, res, next)=>{
app.get('/share/:id', asyncHandler(getBrew('share')), asyncHandler(async (req, res, next)=>{
const { brew } = req;
req.ogMeta = { ...defaultMetaTags,
title : req.brew.title || 'Untitled Brew',
description : req.brew.description || 'No description.',
image : req.brew.thumbnail || defaultMetaTags.image,
type : 'article'
};
if(req.params.id.length > 12 && !brew._id) {
const googleId = req.params.id.slice(0, -12);
const shareId = req.params.id.slice(-12);
@@ -262,6 +335,60 @@ app.get('/print/:id', asyncHandler(getBrew('share')), (req, res, next)=>{
next();
});
//Account Page
app.get('/account', asyncHandler(async (req, res, next)=>{
const data = {};
data.title = 'Account Information Page';
let auth;
let files;
if(req.account) {
if(req.account.googleId) {
try {
auth = await GoogleActions.authCheck(req.account, res, false);
} catch (e) {
auth = undefined;
console.log('Google auth check failed!');
console.log(e);
}
if(auth.credentials.access_token) {
try {
files = await GoogleActions.listGoogleBrews(auth);
} catch (e) {
files = undefined;
console.log('List Google files failed!');
console.log(e);
}
}
}
const query = { authors: req.account.username, googleId: { $exists: false } };
const brews = await HomebrewModel.find(query, 'id')
.catch((err)=>{
console.log(err);
});
data.uiItems = {
username : req.account.username,
issued : req.account.issued,
mongoCount : brews.length,
googleId : Boolean(req.account.googleId),
authCheck : Boolean(req.account.googleId && auth.credentials.access_token),
fileCount : files?.length || '-'
};
}
req.brew = data;
req.ogMeta = { ...defaultMetaTags,
title : `Account Page`,
description : null
};
return next();
}));
const nodeEnv = config.get('node_env');
const isLocalEnvironment = config.get('local_environments').includes(nodeEnv);
// Local only
@@ -276,8 +403,6 @@ if(isLocalEnvironment){
});
}
//Render the page
const templateFn = require('./../client/template.js');
app.use(asyncHandler(async (req, res, next)=>{
@@ -296,7 +421,8 @@ app.use(asyncHandler(async (req, res, next)=>{
account : req.account,
enable_v3 : config.get('enable_v3'),
enable_themes : config.get('enable_themes'),
config : configuration
config : configuration,
ogMeta : req.ogMeta
};
const title = req.brew ? req.brew.title : '';
const page = await templateFn('homebrew', title, props)

View File

@@ -5,24 +5,28 @@ const { nanoid } = require('nanoid');
const token = require('./token.js');
const config = require('./config.js');
const keys = typeof(config.get('service_account')) == 'string' ?
JSON.parse(config.get('service_account')) :
config.get('service_account');
let serviceAuth;
try {
serviceAuth = google.auth.fromJSON(keys);
serviceAuth.scopes = [
'https://www.googleapis.com/auth/drive'
];
} catch (err) {
console.warn(err);
console.log('Please make sure that a Google Service Account is set up properly in your config files.');
if(!config.get('service_account')){
console.log('No Google Service Account in config files - Google Drive integration will not be available.');
} else {
const keys = typeof(config.get('service_account')) == 'string' ?
JSON.parse(config.get('service_account')) :
config.get('service_account');
try {
serviceAuth = google.auth.fromJSON(keys);
serviceAuth.scopes = ['https://www.googleapis.com/auth/drive'];
} catch (err) {
console.warn(err);
console.log('Please make sure the Google Service Account is set up properly in your config files.');
}
}
google.options({ auth: serviceAuth || config.get('google_api_key') });
const GoogleActions = {
authCheck : (account, res)=>{
authCheck : (account, res, updateTokens=true)=>{
if(!account || !account.googleId){ // If not signed into Google
const err = new Error('Not Signed In');
err.status = 401;
@@ -40,7 +44,7 @@ const GoogleActions = {
refresh_token : account.googleRefreshToken
});
oAuth2Client.on('tokens', (tokens)=>{
updateTokens && oAuth2Client.on('tokens', (tokens)=>{
if(tokens.refresh_token) {
account.googleRefreshToken = tokens.refresh_token;
}

View File

@@ -32,7 +32,7 @@ const mustacheSpans = {
start(src) { return src.match(/{{[^{]/)?.index; }, // Hint to Marked.js to stop and check for a match
tokenizer(src, tokens) {
const completeSpan = /^{{[^\n]*}}/; // Regex for the complete token
const inlineRegex = /{{(?::(?:"[\w,\-()#%. ]*"|[\w\,\-()#%.]*)|[^"'{}\s])*\s*|}}/g;
const inlineRegex = /{{(?=((?::(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*)*))\1 *|}}/g;
const match = completeSpan.exec(src);
if(match) {
//Find closing delimiter
@@ -82,7 +82,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])* *$|^ *}}$/gm;
const blockRegex = /^ *{{(?=((?::(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*)*))\1 *$|^ *}}$/gm;
const match = completeBlock.exec(src);
if(match) {
//Find closing delimiter
@@ -130,7 +130,7 @@ const mustacheInjectInline = {
level : 'inline',
start(src) { return src.match(/ *{[^{\n]/)?.index; }, // Hint to Marked.js to stop and check for a match
tokenizer(src, tokens) {
const inlineRegex = /^ *{((?::(?:"[\w,\-()#%. ]*"|[\w\,\-()#%.]*)|[^"'{}\s])*)}/g;
const inlineRegex = /^ *{(?=((?::(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*)*))\1}/g;
const match = inlineRegex.exec(src);
if(match) {
const lastToken = tokens[tokens.length - 1];
@@ -165,7 +165,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])*)}/ym;
const inlineRegex = /^ *{(?=((?::(?:"[\w,\-()#%. ]*"|[\w\-()#%.]*)|[^"':{}\s]*)*))\1}/ym;
const match = inlineRegex.exec(src);
if(match) {
const lastToken = tokens[tokens.length - 1];

View File

@@ -9,8 +9,8 @@ describe('Tests for static pages', ()=>{
return app.get('/').expect(200);
});
it('Home page v3 works', ()=>{
return app.get('/v3_preview').expect(200);
it('Home page legacy works', ()=>{
return app.get('/legacy').expect(200);
});
it('Changelog page works', ()=>{

View File

@@ -58,6 +58,7 @@ body {
text-rendering : optimizeLegibility;
page-break-before : always;
page-break-after : always;
contain : size;
//*****************************
// * BASE
// *****************************/

View File

@@ -82,7 +82,7 @@ body {
// * BASE
// *****************************/
:where(.page){
.page{
p{
overflow-wrap : break-word; //TODO: MAKE ALL MARGINS TOP-ONLY. USE * + * STYLE SELECTORS
display : block;
@@ -214,6 +214,7 @@ body {
table{
.useSansSerif();
width : 100%;
line-height : 16px;
& + * {
margin-top : 0.325cm;
}
@@ -224,7 +225,7 @@ body {
vertical-align : bottom;
//padding : 0.14em 0.4em;
padding : 0px 1.5px; // Both of these are temporary, just to force
line-height : 16px; // PDF to render at same height until Chrome 108
//line-height : 16px; // PDF to render at same height until Chrome 108
}
}
tbody{
@@ -232,7 +233,7 @@ body {
td{
//padding : 0.14em 0.4em;
padding : 0px 1.5px; // Both of these are temporary, just to force
line-height : 16px; // PDF to render at same height until Chrome 108
//line-height : 16px; // PDF to render at same height until Chrome 108
}
&:nth-child(odd){
background-color : var(--HB_Color_Accent);
@@ -240,9 +241,6 @@ body {
}
}
}
div table:has(~table) { // Divs with side-by-side tables add an extra line
margin-bottom: -0.325cm; // of vertical space at bottom. This works around it.
}
//*****************************
// * NOTE
// *****************************/
@@ -598,7 +596,7 @@ body {
//*****************************
// * SPELL LIST
// *****************************/
:where(.page) .spellList{
.page .spellList{
.useSansSerif();
column-count : 2;
ul+h5{
@@ -625,7 +623,7 @@ body {
//*****************************
// * CLASS TABLE
// *****************************/
:where(.page) .classTable{
.page .classTable{
th[colspan]:not([rowspan]) {
white-space : nowrap;
}
@@ -682,7 +680,7 @@ body {
//*****************************
// * TABLE OF CONTENTS
// *****************************/
:where(.page) {
.page {
&:has(.toc):after {
display: none;
}
@@ -759,7 +757,7 @@ body {
//*****************************
// * DEFINITION LISTS
// *****************************/
:where(.page) {
.page {
dl {
line-height : 1.25em;
padding-left : 1em;
@@ -789,10 +787,10 @@ body {
//*****************************
// * WIDE
// *****************************/
:where(.page) .wide{
.page .wide{
margin-bottom : 0.325cm;
}
:where(.page) h1 + *{
.page h1 + *{
margin-top : 0;
}

View File

@@ -39,11 +39,12 @@ body {
text-rendering : optimizeLegibility;
page-break-before : always;
page-break-after : always;
contain : size;
}
//*****************************
// * BASE
// *****************************/
:where(.page){
.page{
p{
overflow-wrap : break-word;
display : block;
@@ -77,13 +78,7 @@ body {
img{
z-index : -1;
}
:not(:where(.wide,.columnSplit,.blank,hr,h1)) + :where(h2,h3,h4,h5,h6,table,dl,.block) {
margin-top : 0.325cm; //NOTE: MAKE ALL MARGINS TOP-ONLY FOR BEST RESULTS WITH COLUMN BREAKS. USE * + * STYLE SELECTORS
}
:is(h1,h3,h3,h4,h5,h6) + * {
margin-top : 0;
}
//*****************************
// * HEADERS
// *****************************/
@@ -116,6 +111,9 @@ body {
font-weight : bold;
}
}
div:not(.columnWrapper) > table + table { // Side-by-side tables should not
margin-top : 0; // have vertical spacing.
}
/* Watermark */
.watermark {
@@ -218,7 +216,7 @@ body {
//*****************************
// * MUSTACHE DIVS/SPANS
// *****************************/
:where(.page) {
.page {
.block {
break-inside : avoid;
display : inline-block;
@@ -233,7 +231,7 @@ body {
//*****************************
// * DEFINITION LISTS
// *****************************/
:where(.page) {
.page {
dl {
padding-left : 1em;
white-space : pre-line;
@@ -253,17 +251,20 @@ body {
//*****************************
// * BLANK LINE
// *****************************/
:where(.page) {
.page {
.blank {
height : 1em;
margin-top : 0;
& + * {
margin-top : 0;
}
}
}
//*****************************
// * WIDE
// *****************************/
:where(.page) {
.page {
.wide{
column-span : all;
display : block;

View File

@@ -62,7 +62,7 @@
//*****************************
// * BASE
// *****************************/
:where(.page){
.page{
color : var(--HB_Color_Text);
font-family : ReenieBeanie;
font-size : 0.53cm;
@@ -554,6 +554,6 @@
//*****************************
// * WIDE
// *****************************/
:where(.page) .wide {
.page .wide {
margin-bottom : 0.45cm;
}