0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-04 03:52:40 +00:00
Commit Graph

48 Commits

Author SHA1 Message Date
Gazook89
1fb63f8be3 initial commit to add programmatic page counts in editor
update element classname to be more descriptive, remove some commented code.
2021-11-07 16:33:50 -06:00
Trevor Buckner
47b99a24fb Clear out unneeded style when editor is hidden in Metadata panel 2021-10-24 16:46:46 -04:00
Trevor Buckner
63d659ff49 use CodeMirror Documents
Instead of re-building the whole editor box with every tab switch, we just swap in and out CodeMirror "documents".

Maintains undo history, scroll position, highlight coloring, etc.
2021-10-19 23:49:11 -04:00
G.Ambatte
9dd885e7eb Move Undo/Redo to SnippetBar 2021-10-18 22:29:26 +13:00
G.Ambatte
9bc52b412c Initial pass at Editor Toolbar - Undo and Redo. 2021-10-18 22:29:25 +13:00
Trevor Buckner
0610c9fe98 fix injecting images putting the cursor midway into the next line of text. 2021-09-01 14:54:52 -04:00
Trevor Buckner
1a71ba0eb2 Force \page on V3 to be alone on line. 2021-08-31 12:08:31 -04:00
Trevor Buckner
e14c8c5e91 Lint 2021-08-31 12:03:59 -04:00
Trevor Buckner
13ba5ebcc8 Fix snippets crashing in empty brew
If this.props.brew.text is an empty string, it will evaluate to `false` and, but since `isStyle()` is also false, `text` is just undefined.
2021-08-31 11:56:48 -04:00
G.Ambatte
04b2421793 Update client/homebrew/editor/editor.jsx
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2021-08-28 11:03:47 +12:00
G.Ambatte
31c348baff Handle brew.style being undefined when inject snippets. 2021-08-21 11:37:01 +12:00
Trevor Buckner
213ef9d94b Fix cursor getting stuck on divider in Meta panel view 2021-07-30 22:44:00 -04:00
Trevor Buckner
5b039b82a3 Update snippets 2021-07-30 12:31:30 -04:00
Trevor Buckner
98915e158d Fix editor highlighting 2021-07-30 02:11:26 -04:00
Trevor Buckner
e07bb1b3c2 Don't save style tab if user never put anything in it 2021-06-24 23:29:01 -04:00
Trevor Buckner
1ef5bfed94 Remove default text 2021-06-05 16:09:23 -04:00
Trevor Buckner
e67fadef02 Separate "style" and "metadata" panels 2021-06-05 15:58:31 -04:00
Trevor Buckner
983a37c77f Make cursor move to end of snippet after insertion 2021-04-06 11:43:34 -04:00
Christian Brickhouse
68811eb3fc Implementing magic item snippet from Issue 671. (#842)
* Implementing magic item snippet from Issue 671.

* Fixes syntax errors. Function moved into existing magic module.

* Implementing magic item snippet from Issue 671.

* Fixes syntax errors. Function moved into existing magic module.

* Magic Item Snippet, <dl>, `:` for blank line

Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2021-02-24 21:58:11 -05:00
Trevor Buckner
468b7319d1 Unify brew structure in all pages 2021-02-20 21:59:18 -05:00
Rasmus Bækgaard
009a11a9f5 Add QR-Code as snippet under Editor (#539)
* Add snippet for QR-code

* Add snippet for QR-code

* Refactor to expose metadata to snippets

* Lint

Co-authored-by: Rasmus Bækgaard <git@bakgaard.net>
Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
2021-02-19 23:39:29 -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
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 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
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
Scott Tolksdorf
f18a181e2e Updating to user create-react-class 2018-04-09 00:12:56 -04:00
Scott Tolksdorf
ed1b5252be lint 2018-04-09 00:12:56 -04:00
Scott Tolksdorf
9fe6fd979b Adding in line highlight for new pages 2017-01-19 12:10:19 -05:00
Scott Tolksdorf
70346ffce7 Fixed saving authors and systems to brews 2017-01-19 12:06:14 -05:00
Scott Tolksdorf
c417c1aa0c Hiding the editor snapping for now 2017-01-19 11:50:01 -05:00
Scott Tolksdorf
5e04e5dc99 Code to brew page jumping working 2017-01-17 23:32:34 -05:00
Scott Tolksdorf
be783e5f6b Added a table of contents snippet 2016-12-03 15:47:20 -05:00
Scott Tolksdorf
21d3c5bfc8 Fixed a capitalization error 2016-11-25 00:58:28 -05:00
Scott Tolksdorf
6af9dd9325 Added in a brew item component 2016-11-24 00:07:04 -05:00
Scott Tolksdorf
e61bf22788 Added in metadata editor 2016-11-23 14:47:28 -05:00
Scott Tolksdorf
b134e11a86 Fixed a unclick bug with the splitpane 2016-08-20 13:29:28 -04:00
Scott Tolksdorf
888d3faa4c Editor and renderer redraw when you resize the browser 2016-08-20 13:26:48 -04:00
Scott Tolksdorf
626cba6062 Newlines 2016-05-28 09:41:05 -04:00
Scott Tolksdorf
c084cb2d8b Styling the snippet groups a bit better 2016-05-14 14:55:27 -04:00
Scott Tolksdorf
6f6f5649d4 Snippets done 2016-05-10 22:29:00 -04:00
Scott Tolksdorf
ad02f99ebe Editor pane looks finished, injecting snippet text is workign and snippet group structure done 2016-05-06 13:59:41 -04:00
Scott Tolksdorf
c418ea5b42 Updated font awesome and sketching out the snippet bar 2016-05-05 10:03:51 -04:00
Scott Tolksdorf
4139a8ee12 UPdating the homebrew editor with new snippet bar 2016-05-05 08:36:33 -04:00
Scott Tolksdorf
25b53a7c24 Added a bunch of random generators 2016-01-05 16:41:19 -05:00
Scott Tolksdorf
fb8ddfe9fa So much polish 2016-01-04 17:02:55 -05:00
Scott
29d03c8263 Full class tables workign with background 2015-12-28 21:03:20 -05:00
Scott
ecd17a22c7 Added page accents, page shadow, and spacing 2015-12-22 21:11:08 -05:00
Scott
1b1860bb0a it works 2015-12-19 23:16:35 -05:00