Commit Graph
100 Commits
Author SHA1 Message Date
Trevor Buckner ee4ecc0b41 Default 'legacy' if not set. Auto-change styles.
* Fix brew styles overwriting each other.

* Word wrapping, start fixing spacing on Title letter

* Fix \page in legacy brews when not at line start

* Fix Page Padding

* Set 'legacy' as default value if not set in brew saved file.
2021-02-08 15:09:09 -05:00
Trevor Buckner e5ccfa3a50 Fix /page not working in legacy mode. (#1233)
* Fix brew styles overwriting each other.

* Word wrapping, start fixing spacing on Title letter

* Fix \page in legacy brews when not at line start
2021-02-08 13:58:24 -05:00
Trevor Buckner c642a35fb3 Fix brew styles overwriting each other. (#1230) 2021-02-05 14:58:41 -05:00
Trevor Buckner 2fe353377b Revert accidental color change 2021-02-05 09:38:20 -05:00
Trevor Buckner de1017a20a Legacy renderer (#1229)
* Include two versions of Marked.js

* Include two versions of Marked.js

* Working two different render pipelines

Adds stylesheet "styleLegacy.less"
Adds markdownHandler "markdownLegacy.js"
The BrewRenderer will switch between these and the new pipeline dependent on the "version" prop passed in.

* Mustache-style div blocks

* Legacy snippets & columnbreak

* Codemirror styling for Div Blocks

* Lint

* Codemirror highlights for inline Divs as well

These will turn red `{{class Content}}`

Multi-line divs will turn purple

```
{{class,class2
content
}}
```

No real need for these to be different colors. Just for testing.

* More lint

* Update dependencies.

* Adding Button to switch render pipelines

* Update Marked.js

* Popup alert to refresh page when renderer changed

* Don't compress files in Development (very slow)

* Block DIV or inline Span depending on {{ placement

* \column emits a Div instead of Span

* Allow share page to use new renderer

* {{ divs no longer need empty lines. Spans work in lists.

* Typo

* Typo

* Enforce \page must be at start of line. Code cleanup.

* Inject newlines after/before {{/}} to avoid needing blank lines

* Fixes issues with tables.

* Remove console.log

* Fix spacing issue for Spans

* Move things from Brewrenderer to Markdown

Try to keep all custom text fiddling in one spot.

* Rename variables

* Update Font-Awesome to v5.15. Fix style issues on popups.

* Update {{ Divs/Spans, Fix nested hilighting

* Fixed Spans/divs with no tags or just commas

* Use blacklist for {{ to allow more characters

* Update package-lock.json

* Update all icons to Font-awesome 5

* V3 hidden behind config variable

Add "globalThis.enable_v3 = true" in the console to enable.

* lint

* Give user styles higher priority to still allow overrides

* Apply style priority to *all* user styles

* Change .legacy .v3 to .phb, .phb3
2021-02-04 23:31:37 -05:00
Trevor Buckner e2cd7d9f07 Legacy renderer (#1184)
* Include two versions of Marked.js

* Include two versions of Marked.js

* Working two different render pipelines

Adds stylesheet "styleLegacy.less"
Adds markdownHandler "markdownLegacy.js"
The BrewRenderer will switch between these and the new pipeline dependent on the "version" prop passed in.

* Mustache-style div blocks

* Legacy snippets & columnbreak

* Codemirror styling for Div Blocks

* Lint

* Codemirror highlights for inline Divs as well

These will turn red `{{class Content}}`

Multi-line divs will turn purple

```
{{class,class2
content
}}
```

No real need for these to be different colors. Just for testing.

* More lint

* Update dependencies.

* Adding Button to switch render pipelines

* Update Marked.js

* Popup alert to refresh page when renderer changed

* Don't compress files in Development (very slow)

* Block DIV or inline Span depending on {{ placement

* \column emits a Div instead of Span

* Allow share page to use new renderer

* {{ divs no longer need empty lines. Spans work in lists.

* Typo

* Typo

* Enforce \page must be at start of line. Code cleanup.

* Inject newlines after/before {{/}} to avoid needing blank lines

* Fixes issues with tables.

* Remove console.log

* Fix spacing issue for Spans

* Move things from Brewrenderer to Markdown

Try to keep all custom text fiddling in one spot.

* Rename variables

* Update Font-Awesome to v5.15. Fix style issues on popups.

* Update {{ Divs/Spans, Fix nested hilighting

* Fixed Spans/divs with no tags or just commas

* Use blacklist for {{ to allow more characters

* Update package-lock.json

* Update all icons to Font-awesome 5

* V3 hidden behind config variable

Add "globalThis.enable_v3 = true" in the console to enable.

* lint
2021-02-02 20:38:25 -05:00
Trevor Bucknerdependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>G.AmbatteSean Robertsonericscheid
6a2e39355c V2.10.7 (#1215)
* Fix for box-shadow/border-image issues on blockquotes in new columns (#1179)

* Fix for issues with box-shadow and border-images on blockquotes when they appear at the top of columns other than the first.

* Update phb.style.less

Change to `-webkit-transform` IAW Github PR discussion

* Add comment

Co-authored-by: Sean Robertson <srobertson@fqnz.co.nz>
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>

* Title will always return *something*, and not CSS (#1214)

* Bump codemirror from 5.59.1 to 5.59.2 (#1200)

Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.59.1 to 5.59.2.
- [Release notes](https://github.com/codemirror/CodeMirror/releases)
- [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codemirror/CodeMirror/compare/5.59.1...5.59.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump mongoose from 5.11.9 to 5.11.13 (#1199)

Bumps [mongoose](https://github.com/Automattic/mongoose) from 5.11.9 to 5.11.13.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md)
- [Commits](https://github.com/Automattic/mongoose/compare/5.11.9...5.11.13)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump fs-extra from 9.0.1 to 9.1.0 (#1197)

Bumps [fs-extra](https://github.com/jprichardson/node-fs-extra) from 9.0.1 to 9.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/9.0.1...9.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump eslint from 7.17.0 to 7.18.0 (#1195)

Bumps [eslint](https://github.com/eslint/eslint) from 7.17.0 to 7.18.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.17.0...v7.18.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump nconf from 0.11.0 to 0.11.1 (#1190)

Bumps [nconf](https://github.com/flatiron/nconf) from 0.11.0 to 0.11.1.
- [Release notes](https://github.com/flatiron/nconf/releases)
- [Changelog](https://github.com/indexzero/nconf/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flatiron/nconf/compare/v0.11.0...v0.11.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump googleapis from 66.0.0 to 67.0.0 (#1189)

Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 66.0.0 to 67.0.0.
- [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases)
- [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/v66.0.0...v67.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>

* Bump express-static-gzip from 2.1.0 to 2.1.1 (#1180)

Bumps [express-static-gzip](https://github.com/tkoenig89/express-static-gzip) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/tkoenig89/express-static-gzip/releases)
- [Commits](https://github.com/tkoenig89/express-static-gzip/compare/v2.1.0...v2.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>

* use fa-info-circle instead of fa-bars (#1109)

* use fa-info-circle instead of fa-bars

* Change Metadata button to Info Icon with Text

Co-authored-by: Trevor Buckner <calculuschild@gmail.com>

* Up Version

Co-authored-by: G.Ambatte <sean@robertson-family.nz>
Co-authored-by: Sean Robertson <srobertson@fqnz.co.nz>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: ericscheid <ericscheid@users.noreply.github.com>
2021-01-25 21:47:36 -05:00
Trevor Buckner 39b160e202 Update Dependencies (#1178)
* Update Dependencies

* Up version number

* Typo
2021-01-02 18:30:11 -05:00
Trevor Buckner aa065fa4d8 Do not Server-Side Render the markdown (#1177)
1) Rendering is fast enough on the client we don't need to provide SSR for the brew contents.
2) This leaves our server open to REDOS attacks if users create ridiculously long single lines of text. The Markdown parser slows down with exponential time which becomes noticeable at 10,000+ characters in one line, and at 200,000+ characters will stall the server and eventually crash.
3) This now shows a nice loading circle for the half-second that a page takes to render. If a user tries to load a huge line of text the loading circle will be there instead of a blank white page.
2021-01-02 16:54:50 -05:00
Trevor Buckner 8e1951ba67 Access google files with Service Account
Using API key is triggering "automation" warnings from Google
2020-12-25 15:15:51 -05:00
Trevor Buckner 3dba731dd7 Popup confirmation when switching between google and hb (#1155)
* Popup confirmation when switching between google and hb

* Allow closing error popup.

* Up version.
2020-12-18 23:51:08 -05:00
Trevor Buckner f8f19efcaa update several dependencies (#1154) 2020-12-11 23:22:02 -05:00
Trevor Buckner 980fdf5ad1 Small bug causing crashes with Tags (#1152)
Also: Force Google to always send to trash instead of fully deleting.

Remove unneeded console.logs to speed up server.
2020-12-11 16:18:28 -05:00
Trevor Buckner e127855d84 Add detailed MongoDB Install instructions 2020-11-29 23:20:28 -05:00
Trevor Buckner 8ffea70b2f Remove metadata on the Homepage (#1121)
* Remove the metadata button on home page

1) Hopefully make it more clear that the Homepage is meant as a sandbox to test out the site, not a real brew that will be saved.

2) Also, avoid errors resulting from trying to modify the metadata of a brew that doesn't really exist yet.

* Lint
2020-11-27 21:14:15 -05:00
Trevor Buckner 3fbddd2e41 Revert Blockquote list font size
Was technically correct, but messed up some existing brews.
2020-11-27 20:57:01 -05:00
Trevor Buckner 5a17697e7e Merge pull request #1118 from naturalcrit/fixGoogleMetadata
Fix metadata in Google docs
2020-11-25 13:26:14 -05:00
Trevor Buckner 6f66fdc6d6 Bump version to 2.10.4 2020-11-25 13:24:10 -05:00
Trevor Buckner a29fdb43c9 Merge pull request #1108 from ericscheid/fix-inconsistent-list-item-sizing-#1085
line-heights consistent in bq li (#1085)
2020-11-23 19:21:46 -05:00
Trevor Buckner 7462e66858 Fix metadata in Google docs
Update view counts via service account since modifying another users' file properties requires increased permission scope
2020-11-22 23:53:34 -05:00
Trevor Buckner b0375bddd1 Merge pull request #1099 from naturalcrit/optimize-page-load
Fix broken API calls
2020-11-12 17:31:07 -05:00
Trevor Buckner 56795afabb Fix broken API calls
expressStaticGzip was serving empty index files when it saw requests ending in '/' like 'api/newGoogle/'
2020-11-12 17:17:02 -05:00
Trevor Buckner acf9f464f0 Merge pull request #1098 from naturalcrit/optimize-page-load
Compress static files
2020-11-11 22:22:45 -05:00
Trevor Buckner 74c615f156 Cleanup 2020-11-11 22:21:27 -05:00
Trevor Buckner 133af4ea2c lint 2020-11-11 22:02:17 -05:00
Trevor Buckner 4182c79354 Use a library instead. Checks that the browser is compatible first. 2020-11-11 22:01:42 -05:00
Trevor Buckner 759d986188 lint 2020-11-11 21:41:48 -05:00
Trevor Buckner 600ca90fc0 Serve compressed static files if available 2020-11-11 21:19:49 -05:00
Trevor Buckner 3b52888877 Merge pull request #1078 from RKuerten/update-b-i
Updated makeBold and makeItalic functions
2020-10-28 22:26:49 -04:00
Trevor Buckner e23120a4c6 Reduce duplicate code 2020-10-28 22:25:25 -04:00
Trevor Buckner 38d47f6aa1 Remove console.log slowing things down. 2020-10-27 11:24:07 -04:00
Trevor Buckner 3a25123d7b Fix internal section link in iFrame 2020-10-27 11:06:07 -04:00
Trevor Buckner 6c813ddab1 Fix links breaking in iFrame 2020-10-26 13:50:37 -04:00
Trevor Buckner 965870f8ed Merge pull request #1075 from RKuerten/fix-brew-title
Changed page title to show the brew title
2020-10-26 13:38:17 -04:00
Trevor Buckner 8add76fb50 Linting 2020-10-26 13:27:37 -04:00
Trevor Buckner 45d1bef302 Update README.md
Couple of extra steps. Need to fill out the MongoDB setup
2020-10-24 23:41:21 -04:00
Trevor Buckner 7d9e1aad83 Merge pull request #1074 from naturalcrit/BrewRendererIframe
Brew renderer iframe
2020-10-24 23:27:17 -04:00
Trevor Buckner aa2d1f3bc9 Fix missing FontAwesome fonts in iFrame 2020-10-22 12:44:18 -04:00
Trevor Buckner f6bd1ef513 Update Version number 2020-10-22 10:36:55 -04:00
Trevor Buckner c75ac3c0f5 Render brew in Iframe to not crash editor 2020-10-21 20:39:43 -04:00
Trevor Buckner ac2d6fe9a8 Fix share uncompressing views... again 2020-10-19 17:36:58 -04:00
Trevor Buckner 40d120d875 Woops!
Accidentally broke sharing.
2020-10-19 16:56:34 -04:00
Trevor Buckner 5e2fdcf1e9 Merge pull request #1067 from naturalcrit/compress
Fix Shared View uncompressing brew text
2020-10-19 16:44:42 -04:00
Trevor Buckner 57c8c24b20 Lint 2020-10-19 16:38:26 -04:00
Trevor Buckner 460d3fe111 Prevent share view uncompressing text. 2020-10-19 16:37:01 -04:00
Trevor Buckner 1d50cbf684 Update admin.api.js 2020-10-19 16:24:19 -04:00
Trevor Buckner 3a250d3da4 Update admin.api.js 2020-10-19 16:15:41 -04:00
Trevor Buckner d05b819ff2 Fix recent links when transferring to Google Brews 2020-10-19 15:48:44 -04:00
Trevor Buckner fcb3f9ca26 Merge pull request #1055 from naturalcrit/updateDependencies
update dependencies
2020-10-12 15:38:22 -04:00
Trevor Buckner 69b42ee6e0 update dependencies 2020-10-12 15:35:01 -04:00
Trevor Buckner 77973f0037 v2.10.1 - Fix brews lost on back button 2020-10-12 14:30:42 -04:00
Trevor Buckner 7f8f39916d Merge pull request #1050 from naturalcrit/googleDriveIntegration
Google drive integration
2020-10-12 14:18:10 -04:00
Trevor Buckner cc8bf6744b Move Patreon button 2020-10-08 16:12:12 -04:00
Trevor Buckner bf17d6894f use NanoId as function in Mongoose default
For some reason, Mongoose will reuse the old ID generated if you call nanoid directly. If you wrap it in a function, it will call it new each time a new document is created.

Also updated patreon link :)
2020-10-08 11:03:52 -04:00
Trevor Buckner 900f5b136f Fix login url 2020-10-07 20:22:15 -04:00
Trevor Buckner 194a9c0c40 Typo 2020-10-07 20:07:28 -04:00
Trevor Buckner f6f9b768cc Ensure share links are updated on transfer to google 2020-10-07 20:01:32 -04:00
Trevor Buckner 8fe0148821 Fix Share links 2020-10-07 17:13:37 -04:00
Trevor Buckner 28ed2fe8f2 Fix Config spelling (must be all lowercase) 2020-10-07 16:17:05 -04:00
Trevor Buckner 131df2d82a Bug Fix 2020-10-07 15:55:07 -04:00
Trevor Buckner 0f5ec6c40c Bug Test... 2020-10-07 15:48:07 -04:00
Trevor Buckner 39cbadb100 Small Typo 2020-10-07 15:39:37 -04:00
Trevor Buckner 0afb503860 Update Version number & cleanup 2020-10-07 15:02:42 -04:00
Trevor Buckner ed1c589e2d Linting 2020-10-06 14:21:15 -04:00
Trevor Buckner 864cc7a7bb Fix issues making brews when not signed in 2020-10-06 14:20:09 -04:00
Trevor Buckner 657a374895 Code Cleanup
Remove req, res from update, new, and getFolder google actions
2020-10-06 14:08:51 -04:00
Trevor Buckner 35e1ce0df2 Initial Commit. All seems to be working...?
EditPage.jsx and GoogleActions.js need to be cleaned up and shortened...
2020-10-05 23:33:15 -04:00
Trevor Buckner 2065ff80ff Merge pull request #1008 from naturalcrit/dependabot/npm_and_yarn/babel/preset-env-7.11.0
Bump @babel/preset-env from 7.9.6 to 7.11.0
2020-08-28 15:52:52 -04:00
Trevor Buckner b24bba87d9 Merge pull request #1007 from naturalcrit/dependabot/npm_and_yarn/elliptic-6.5.3
[Security] Bump elliptic from 6.5.2 to 6.5.3
2020-08-28 15:52:32 -04:00
Trevor Buckner e810445ac9 Merge pull request #1025 from naturalcrit/updateDependencies
Update dependencies
2020-08-28 15:45:49 -04:00
Trevor Buckner 5afbb4ee4e Update changelog.md 2020-08-28 15:44:43 -04:00
Trevor Buckner 6ae4cd143c update several dependencies 2020-08-28 15:17:59 -04:00
Trevor Buckner f754ecd6c3 Fix invisible paragraphs at top of new columns
Code was old Firefox fix that doesn't seem to do anything anymore anyway.
2020-07-19 02:32:58 -04:00
Trevor Buckner 62a827ce49 Update more dependencies 2020-05-20 10:14:05 -04:00
Trevor Buckner e971da2b59 Merge pull request #943 from naturalcrit/dependabot/npm_and_yarn/eslint-plugin-react-7.20.0
Bump eslint-plugin-react from 7.19.0 to 7.20.0
2020-05-19 01:54:55 -04:00
Trevor Buckner 2d092cb290 Forgot to update styles for BrewItems 2020-05-19 01:45:53 -04:00
Trevor Buckner 22a9799674 Update vitreum (#946)
- Updates Vitreum to v6.0.1 + some custom fixes.
  - Stylesheets must be imported with `require('./sheet.less');` but can also can now share stylesheets between jsx components.
  - Should eliminate a lot of security concerns with older nested dependencies.
  - Changed a lot of files to make this work
- Also removes dependency on PicoRouter in favor of React-Router
2020-05-19 01:36:31 -04:00
Trevor Buckner 7c813be13a Revert Marked Update
Too many edge cases still broken. Bah.
2020-05-10 21:11:03 -04:00
Trevor Buckner e94148b2f0 Merge pull request #938 from naturalcrit/update-Marked-renderer
Update marked renderer
2020-05-09 13:57:40 -04:00
Trevor Buckner ec4f6e4327 Redundant marked version 2020-05-09 13:38:25 -04:00
Trevor Buckner fcbd117784 Merge branch 'master' into update-Marked-renderer 2020-05-09 13:33:33 -04:00
Trevor Buckner dab716a9e0 Lint 2020-05-09 13:16:39 -04:00
Trevor Buckner 9265e25c73 Update popup to notify update
Also point to latest FAQ page on Reddit
2020-05-08 15:32:39 -04:00
Trevor Buckner 4ad63d5bce Change text in RenderWarning popup
Reflect our policy of testing only on Chrome, but remove the specific issue of column-span support as that is now supported by other browsers.
2020-05-08 15:04:38 -04:00
Trevor Buckner a0e92b54d0 Fix multiline IMG tags breaking 2020-05-08 13:15:35 -04:00
Trevor Buckner 62f549f038 Fix Markdown rendering right after Divs 2020-05-06 16:30:35 -04:00
Trevor Buckner e8f3b0c8d0 Fix Tables with uneven columns 2020-05-02 15:03:18 -04:00
Trevor Buckner 587ce78f4e Update robots.txt
This was blocking Google from updating the `noindex` tag.
2020-04-21 22:46:42 -04:00
Trevor Buckner 7ca1dd3c68 Update Marked.js to 1.0.0 2020-04-20 22:43:46 -04:00
Trevor Buckner 58543f0b4d Merge branch 'master' into update-Marked-renderer 2020-04-20 21:40:04 -04:00
Trevor Buckner e88253f364 Added robots.txt, nofollow in metatags
Also noindex on /print/ pages
2020-04-20 13:46:18 -04:00
Trevor Buckner bdf37d8fe7 Add robots noindex to edit and share pages 2020-04-20 12:15:27 -04:00
Trevor Buckner 22908207a3 Google verification for testing Robots.txt 2020-04-20 12:03:28 -04:00
Trevor Buckner 70430f84e1 Small tweaks and linting 2020-04-14 11:15:05 -04:00
Trevor Buckner 5631ef7be7 Fix HTML right before markdown
Allow raw HTML tags to end without a blank line if markdown is right after
2020-04-14 10:26:42 -04:00
Trevor Buckner 5bc948ab0a All fixes seem to be working? 2020-03-25 12:09:50 -04:00
Trevor Buckner 28c5d7d84a Update .gitignore 2020-03-24 10:01:28 -04:00
Trevor Buckner 825702ee1d Forgot version number 2020-03-11 09:41:16 -04:00
Trevor Buckner 61b58032ca Upping changelog to v2.8.2 2020-03-11 09:40:50 -04:00
Trevor Buckner 546cc13c1c Release 2.8.2
Marking this as a stable version since it's been a while, in preparation for adding new features.
2020-03-11 09:29:04 -04:00