@@ -354,6 +362,8 @@ const Editor = createClass({
theme={this.props.brew.theme}
undo={this.undo}
redo={this.redo}
+ foldCode={this.foldCode}
+ unfoldCode={this.unfoldCode}
historySize={this.historySize()}
currentEditorTheme={this.state.editorTheme}
updateEditorTheme={this.updateEditorTheme}
diff --git a/client/homebrew/editor/snippetbar/snippetbar.jsx b/client/homebrew/editor/snippetbar/snippetbar.jsx
index 246d534a9..d60e51388 100644
--- a/client/homebrew/editor/snippetbar/snippetbar.jsx
+++ b/client/homebrew/editor/snippetbar/snippetbar.jsx
@@ -37,6 +37,8 @@ const Snippetbar = createClass({
undo : ()=>{},
redo : ()=>{},
historySize : ()=>{},
+ foldCode : ()=>{},
+ unfoldCode : ()=>{},
updateEditorTheme : ()=>{},
cursorPos : {}
};
@@ -144,6 +146,22 @@ const Snippetbar = createClass({
renderEditorButtons : function(){
if(!this.props.showEditButtons) return;
+ let foldButtons;
+ if(this.props.view == 'text'){
+ foldButtons =
+ <>
+
@@ -154,6 +172,7 @@ const Snippetbar = createClass({
+ {foldButtons}
diff --git a/client/homebrew/editor/snippetbar/snippetbar.less b/client/homebrew/editor/snippetbar/snippetbar.less
index ed2dcebce..8dc6a8b9d 100644
--- a/client/homebrew/editor/snippetbar/snippetbar.less
+++ b/client/homebrew/editor/snippetbar/snippetbar.less
@@ -10,7 +10,6 @@
top : 0px;
right : 0px;
height : @menuHeight;
- width : 125px;
justify-content : space-between;
&>div{
height : @menuHeight;
@@ -46,6 +45,22 @@
color : black;
}
}
+ &.foldAll{
+ .tooltipLeft('Fold All');
+ font-size : 0.75em;
+ color : grey;
+ &.active{
+ color : black;
+ }
+ }
+ &.unfoldAll{
+ .tooltipLeft('Unfold All');
+ font-size : 0.75em;
+ color : grey;
+ &.active{
+ color : black;
+ }
+ }
&.editorTheme{
.tooltipLeft('Editor Themes');
font-size : 0.75em;
diff --git a/faq.md b/faq.md
index 72e6a7d1f..c7254952b 100644
--- a/faq.md
+++ b/faq.md
@@ -102,7 +102,7 @@ The best way to avoid this is to leave space at the end of a column equal to one
### Why do I need to manually create a new page? Why doesn't text flow between pages?
-A Homebrewery document is at it's core an HTML & CSS document, and currently limited by the specs of those technologies. It is currently not possible to flow content from inside one box ("page") to the inside of another box. It seems likely that someday CSS will add this capability, and if/when that happens, Homebrewery will adopt it as soon as possible.
+A Homebrewery document is at its core an HTML & CSS document, and currently limited by the specs of those technologies. It is currently not possible to flow content from inside one box ("page") to the inside of another box. It seems likely that someday CSS will add this capability, and if/when that happens, Homebrewery will adopt it as soon as possible.
### Where do I get images?
The Homebrewery does not provide images for use besides some page elements and example images for snippets. You will need to find your own images for use and be sure you are following the appropriate license requirements.
@@ -126,4 +126,4 @@ The Homebrewery defaults to creating US Letter page sizes. If you are printing
### Typing `#### Adhesion` in the text editor doesn't show the header at all in the completed page?
-Your ad-blocking software is mistakenly assuming your text to be an ad. Whitelist homebrewery.naturalcrit.com in your ad-blocking software.
\ No newline at end of file
+Your ad-blocking software is mistakenly assuming your text to be an ad. Whitelist homebrewery.naturalcrit.com in your ad-blocking software.
diff --git a/package.json b/package.json
index 5e5d263eb..c3a5c4c29 100644
--- a/package.json
+++ b/package.json
@@ -3,8 +3,8 @@
"description": "Create authentic looking D&D homebrews using only markdown",
"version": "3.10.0",
"engines": {
- "npm": "^10.2.x",
- "node": ">=20.8.x"
+ "npm": "^10.2.x",
+ "node": "^20.8.x"
},
"repository": {
"type": "git",
@@ -105,13 +105,13 @@
"marked-smartypants-lite": "^1.0.1",
"markedLegacy": "npm:marked@^0.3.19",
"moment": "^2.29.4",
- "mongoose": "^7.6.4",
+ "mongoose": "^8.0.0",
"nanoid": "3.3.4",
"nconf": "^0.12.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-frame-component": "^4.1.3",
- "react-router-dom": "6.17.0",
+ "react-router-dom": "6.18.0",
"sanitize-filename": "1.6.3",
"superagent": "^8.1.2",
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
diff --git a/scripts/buildHomebrew.js b/scripts/buildHomebrew.js
index 6706ab591..f072b0359 100644
--- a/scripts/buildHomebrew.js
+++ b/scripts/buildHomebrew.js
@@ -154,14 +154,14 @@ fs.emptyDirSync('./build');
// build(bundles);
//
-})().catch(console.error);
+ //In development, set up LiveReload (refreshes browser), and Nodemon (restarts server)
+ if(isDev){
+ livereload('./build'); // Install the Chrome extension LiveReload to automatically refresh the browser
+ watchFile('./server.js', { // Restart server when change detected to this file or any nested directory from here
+ ignore : ['./build', './client', './themes'], // Ignore folders that are not running server code / avoids unneeded restarts
+ ext : 'js json' // Extensions to watch (only .js/.json by default)
+ //watch : ['./server', './themes'], // Watch additional folders if needed
+ });
+ }
-//In development, set up LiveReload (refreshes browser), and Nodemon (restarts server)
-if(isDev){
- livereload('./build'); // Install the Chrome extension LiveReload to automatically refresh the browser
- watchFile('./server.js', { // Restart server when change detected to this file or any nested directory from here
- ignore : ['./build', './client', './themes'], // Ignore folders that are not running server code / avoids unneeded restarts
- ext : 'js json' // Extensions to watch (only .js/.json by default)
- //watch : ['./server', './themes'], // Watch additional folders if needed
- });
-}
+})().catch(console.error);
\ No newline at end of file