mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 18:32:41 +00:00
Merge branch 'master' into pr/1568
This commit is contained in:
@@ -6,8 +6,8 @@ version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/node:12.16.3
|
||||
- image: circleci/mongo:3.4-jessie
|
||||
- image: circleci/node:16.10.0
|
||||
- image: circleci/mongo:4.4
|
||||
|
||||
working_directory: ~/repo
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
FROM node:14.15
|
||||
FROM node:16.11-alpine
|
||||
RUN apk --no-cache add git
|
||||
|
||||
ENV NODE_ENV=docker
|
||||
|
||||
|
||||
69
changelog.md
69
changelog.md
@@ -30,7 +30,74 @@ pre {
|
||||
}
|
||||
```
|
||||
|
||||
# changelog
|
||||
## changelog
|
||||
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
|
||||
|
||||
### Wednesday 17/11/2021 - v3.0.4
|
||||
{{taskList
|
||||
* [x] Fixed incorrect sorting of Google brews by page count and views on the user page.
|
||||
|
||||
Fixes issues: [#1793](https://github.com/naturalcrit/homebrewery/issues/1793)
|
||||
|
||||
* [x] Added code folding! Only on a page-level for now. Hotkeys `CTRL + [` and `CTRL + ]` to fold/unfold all pages. (Thanks jeddai, new contributor!)
|
||||
|
||||
Fixes issues: [#629](https://github.com/naturalcrit/homebrewery/issues/629)
|
||||
|
||||
* [x] Fixed rendering issues due to the latest Chrome update to version 96. (Also thanks to jeddai!)
|
||||
|
||||
Fixes issues: [#1828](https://github.com/naturalcrit/homebrewery/issues/1828)
|
||||
}}
|
||||
|
||||
### Wednesday 27/10/2021 - v3.0.3
|
||||
|
||||
{{taskList
|
||||
* [x] Moved **Post To Reddit** button from {{fa,fa-info-circle}} **Properties** menu to the **SHARE** {{fa,fa-share-alt}} button as a dropdown.
|
||||
|
||||
* [x] Added a **Copy URL** button to the **SHARE** {{fa,fa-share-alt}} button as a dropdown.
|
||||
|
||||
* [x] Fixed pages being printed directly from `/new` not recognizing the V3 renderer.
|
||||
|
||||
Fixes issues: [#1702](https://github.com/naturalcrit/homebrewery/issues/1702)
|
||||
|
||||
* [x] Updated links to [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) on home page.
|
||||
|
||||
Fixes issues: [#1744](https://github.com/naturalcrit/homebrewery/issues/1744)
|
||||
|
||||
* [x] Added a [FAQ page](https://homebrewery.naturalcrit.com/faq).
|
||||
|
||||
Fixes issues: [#810](https://github.com/naturalcrit/homebrewery/issues/810)
|
||||
|
||||
* [x] Added {{fa,fa-undo}} **Undo** and {{fa,fa-redo}} **Redo** buttons to the snippet bar.
|
||||
|
||||
* [x] Switching between the {{fa,fa-beer}} **Brew** and {{fa,fa-paint-brush}} **Style** tabs no longer loses your scroll position or undo history.
|
||||
|
||||
Fixes issues: [#1735](https://github.com/naturalcrit/homebrewery/issues/1735)
|
||||
|
||||
* [x] Divider bar between editor and preview panels can no longer be dragged off the edge of the screen.
|
||||
|
||||
Fixes issues: [#1674](https://github.com/naturalcrit/homebrewery/issues/1674)
|
||||
}}
|
||||
|
||||
|
||||
### Wednesday 06/10/2021 - v3.0.2
|
||||
|
||||
{{taskList
|
||||
* [x] Fixed V3 **EDITOR → QR Code** snippet not working on `/new` (unsaved) pages.
|
||||
|
||||
Fixes issues: [#1710](https://github.com/naturalcrit/homebrewery/issues/1710)
|
||||
|
||||
* [x] Reorganized several snippets from the **Brew Editor** panel into the **Style Editor** panel.
|
||||
|
||||
Fixes issues: [Reported on Reddit](https://www.reddit.com/r/homebrewery/comments/pm6ki7/two_version_of_class_features_making_it_look_more/)
|
||||
|
||||
* [x] Added a page counter to the right of each `\page` line in V3 to help navigate your brews. Starts counting from page 2.
|
||||
|
||||
Fixes issues: [#846](https://github.com/naturalcrit/homebrewery/issues/846)
|
||||
|
||||
* [x] Moved the changelog to be accessible by clicking on the Homebrewery version number.
|
||||
|
||||
Fixes issues: [#1166](https://github.com/naturalcrit/homebrewery/issues/1166)
|
||||
}}
|
||||
|
||||
### Friday, 17/09/2021 - v3.0.1
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
|
||||
require('./editor.less');
|
||||
const React = require('react');
|
||||
const createClass = require('create-react-class');
|
||||
@@ -59,6 +60,10 @@ const Editor = createClass({
|
||||
window.removeEventListener('resize', this.updateEditorSize);
|
||||
},
|
||||
|
||||
componentDidUpdate : function() {
|
||||
this.highlightCustomMarkdown();
|
||||
},
|
||||
|
||||
updateEditorSize : function() {
|
||||
if(this.refs.codeEditor) {
|
||||
let paneHeight = this.refs.main.parentNode.clientHeight;
|
||||
@@ -103,7 +108,7 @@ const Editor = createClass({
|
||||
const codeMirror = this.refs.codeEditor.codeMirror;
|
||||
|
||||
//reset custom text styles
|
||||
const customHighlights = codeMirror.getAllMarks();
|
||||
const customHighlights = codeMirror.getAllMarks().filter((mark)=>!mark.__isFold); //Don't undo code folding
|
||||
for (let i=0;i<customHighlights.length;i++) customHighlights[i].clear();
|
||||
|
||||
const lineNumbers = _.reduce(this.props.brew.text.split('\n'), (r, line, lineNumber)=>{
|
||||
@@ -176,30 +181,60 @@ const Editor = createClass({
|
||||
this.refs.codeEditor?.updateSize();
|
||||
},
|
||||
|
||||
//Called by CodeEditor after document switch, so Snippetbar can refresh UndoHistory
|
||||
rerenderParent : function (){
|
||||
this.forceUpdate();
|
||||
},
|
||||
|
||||
renderEditor : function(){
|
||||
if(this.isText()){
|
||||
return <CodeEditor key='text'
|
||||
ref='codeEditor'
|
||||
language='gfm'
|
||||
value={this.props.brew.text}
|
||||
onChange={this.props.onTextChange} />;
|
||||
return <>
|
||||
<CodeEditor key='codeEditor'
|
||||
ref='codeEditor'
|
||||
language='gfm'
|
||||
view={this.state.view}
|
||||
value={this.props.brew.text}
|
||||
onChange={this.props.onTextChange}
|
||||
rerenderParent={this.rerenderParent} />
|
||||
</>;
|
||||
}
|
||||
if(this.isStyle()){
|
||||
return <CodeEditor key='style'
|
||||
ref='codeEditor'
|
||||
language='css'
|
||||
value={this.props.brew.style ?? DEFAULT_STYLE_TEXT}
|
||||
onChange={this.props.onStyleChange} />;
|
||||
return <>
|
||||
<CodeEditor key='codeEditor'
|
||||
ref='codeEditor'
|
||||
language='css'
|
||||
view={this.state.view}
|
||||
value={this.props.brew.style ?? DEFAULT_STYLE_TEXT}
|
||||
onChange={this.props.onStyleChange}
|
||||
rerenderParent={this.rerenderParent} />
|
||||
</>;
|
||||
}
|
||||
if(this.isMeta()){
|
||||
return <MetadataEditor
|
||||
metadata={this.props.brew}
|
||||
onChange={this.props.onMetaChange} />;
|
||||
return <>
|
||||
<CodeEditor key='codeEditor'
|
||||
view={this.state.view}
|
||||
style={{ display: 'none' }}
|
||||
rerenderParent={this.rerenderParent} />
|
||||
<MetadataEditor
|
||||
metadata={this.props.brew}
|
||||
onChange={this.props.onMetaChange} />
|
||||
</>;
|
||||
}
|
||||
},
|
||||
|
||||
redo : function(){
|
||||
return this.refs.codeEditor?.redo();
|
||||
},
|
||||
|
||||
historySize : function(){
|
||||
return this.refs.codeEditor?.historySize();
|
||||
},
|
||||
|
||||
undo : function(){
|
||||
return this.refs.codeEditor?.undo();
|
||||
},
|
||||
|
||||
render : function(){
|
||||
this.highlightCustomMarkdown();
|
||||
return (
|
||||
<div className='editor' ref='main'>
|
||||
<SnippetBar
|
||||
@@ -208,7 +243,10 @@ const Editor = createClass({
|
||||
onViewChange={this.handleViewChange}
|
||||
onInject={this.handleInject}
|
||||
showEditButtons={this.props.showEditButtons}
|
||||
renderer={this.props.renderer} />
|
||||
renderer={this.props.renderer}
|
||||
undo={this.undo}
|
||||
redo={this.redo}
|
||||
historySize={this.historySize()} />
|
||||
|
||||
{this.renderEditor()}
|
||||
</div>
|
||||
|
||||
@@ -4,42 +4,62 @@
|
||||
width : 100%;
|
||||
|
||||
.codeEditor{
|
||||
height : 100%;
|
||||
height : 100%;
|
||||
counter-reset : page;
|
||||
counter-increment : page;
|
||||
.pageLine{
|
||||
background-color : fade(#333, 15%);
|
||||
border-bottom : #333 solid 1px;
|
||||
background : #33333328;
|
||||
border-top : #339 solid 1px;
|
||||
&:after{
|
||||
content : counter(page);
|
||||
counter-increment : page;
|
||||
float : right;
|
||||
color : gray;
|
||||
}
|
||||
}
|
||||
.columnSplit{
|
||||
font-style : italic;
|
||||
color : grey;
|
||||
background-color : fade(#299, 15%);
|
||||
border-bottom : #299 solid 1px;
|
||||
font-style : italic;
|
||||
color : grey;
|
||||
background-color : fade(#299, 15%);
|
||||
border-bottom : #299 solid 1px;
|
||||
}
|
||||
.block{
|
||||
color : purple;
|
||||
color : purple;
|
||||
font-weight : bold;
|
||||
//font-style: italic;
|
||||
}
|
||||
.inline-block{
|
||||
color : red;
|
||||
color : red;
|
||||
font-weight : bold;
|
||||
//font-style: italic;
|
||||
}
|
||||
}
|
||||
|
||||
.brewJump{
|
||||
position: absolute;
|
||||
background-color: @teal;
|
||||
cursor: pointer;
|
||||
width : 30px;
|
||||
height : 30px;
|
||||
display : flex;
|
||||
align-items : center;
|
||||
bottom : 20px;
|
||||
right : 20px;
|
||||
z-index: 1000000;
|
||||
justify-content:center;
|
||||
position : absolute;
|
||||
background-color : @teal;
|
||||
cursor : pointer;
|
||||
width : 30px;
|
||||
height : 30px;
|
||||
display : flex;
|
||||
align-items : center;
|
||||
bottom : 20px;
|
||||
right : 20px;
|
||||
z-index : 1000000;
|
||||
justify-content : center;
|
||||
.tooltipLeft("Jump to brew page");
|
||||
}
|
||||
|
||||
.editorToolbar{
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 50%;
|
||||
color: black;
|
||||
font-size: 13px;
|
||||
z-index: 9;
|
||||
span {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -65,18 +65,6 @@ const MetadataEditor = createClass({
|
||||
});
|
||||
},
|
||||
|
||||
getRedditLink : function(){
|
||||
const meta = this.props.metadata;
|
||||
|
||||
const shareLink = (meta.googleId || '') + meta.shareId;
|
||||
const title = `${meta.title} [${meta.systems.join(' ')}]`;
|
||||
const text = `Hey guys! I've been working on this homebrew. I'd love your feedback. Check it out.
|
||||
|
||||
**[Homebrewery Link](https://homebrewery.naturalcrit.com/share/${shareLink})**`;
|
||||
|
||||
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title)}&text=${encodeURIComponent(text)}`;
|
||||
},
|
||||
|
||||
renderSystems : function(){
|
||||
return _.map(SYSTEMS, (val)=>{
|
||||
return <label key={val}>
|
||||
@@ -127,21 +115,6 @@ const MetadataEditor = createClass({
|
||||
</div>;
|
||||
},
|
||||
|
||||
renderShareToReddit : function(){
|
||||
if(!this.props.metadata.shareId) return;
|
||||
|
||||
return <div className='field reddit'>
|
||||
<label>reddit</label>
|
||||
<div className='value'>
|
||||
<a href={this.getRedditLink()} target='_blank' rel='noopener noreferrer'>
|
||||
<button className='publish'>
|
||||
<i className='fab fa-reddit-alien' /> share to reddit
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>;
|
||||
},
|
||||
|
||||
renderRenderOptions : function(){
|
||||
if(!global.enable_v3) return;
|
||||
|
||||
@@ -215,8 +188,6 @@ const MetadataEditor = createClass({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{this.renderShareToReddit()}
|
||||
|
||||
{this.renderDelete()}
|
||||
|
||||
</div>;
|
||||
|
||||
@@ -77,11 +77,6 @@
|
||||
.button(@red);
|
||||
}
|
||||
}
|
||||
.reddit.field .value{
|
||||
button{
|
||||
.button(@purple);
|
||||
}
|
||||
}
|
||||
.authors.field .value{
|
||||
font-size: 0.8em;
|
||||
line-height : 1.5em;
|
||||
|
||||
@@ -22,7 +22,10 @@ const Snippetbar = createClass({
|
||||
onInject : ()=>{},
|
||||
onToggle : ()=>{},
|
||||
showEditButtons : true,
|
||||
renderer : 'legacy'
|
||||
renderer : 'legacy',
|
||||
undo : ()=>{},
|
||||
redo : ()=>{},
|
||||
historySize : ()=>{}
|
||||
};
|
||||
},
|
||||
|
||||
@@ -60,6 +63,15 @@ const Snippetbar = createClass({
|
||||
if(!this.props.showEditButtons) return;
|
||||
|
||||
return <div className='editors'>
|
||||
<div className={`editorTool undo ${this.props.historySize.undo ? 'active' : ''}`}
|
||||
onClick={this.props.undo} >
|
||||
<i className='fas fa-undo' />
|
||||
</div>
|
||||
<div className={`editorTool redo ${this.props.historySize.redo ? 'active' : ''}`}
|
||||
onClick={this.props.redo} >
|
||||
<i className='fas fa-redo' />
|
||||
</div>
|
||||
<div className='divider'></div>
|
||||
<div className={cx('text', { selected: this.props.view === 'text' })}
|
||||
onClick={()=>this.props.onViewChange('text')}>
|
||||
<i className='fa fa-beer' />
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
top : 0px;
|
||||
right : 0px;
|
||||
height : @menuHeight;
|
||||
width : 90px;
|
||||
width : 125px;
|
||||
justify-content : space-between;
|
||||
&>div{
|
||||
height : @menuHeight;
|
||||
@@ -30,6 +30,29 @@
|
||||
&.meta{
|
||||
.tooltipLeft('Properties');
|
||||
}
|
||||
&.undo{
|
||||
.tooltipLeft('Undo');
|
||||
font-size : 0.75em;
|
||||
color : grey;
|
||||
&.active{
|
||||
color : black;
|
||||
}
|
||||
}
|
||||
&.redo{
|
||||
.tooltipLeft('Redo');
|
||||
font-size : 0.75em;
|
||||
color : grey;
|
||||
&.active{
|
||||
color : black;
|
||||
}
|
||||
}
|
||||
&.divider {
|
||||
background: linear-gradient(#000, #000) no-repeat center/1px 100%;
|
||||
width: 5px;
|
||||
&:hover{
|
||||
background-color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.snippetBarButton{
|
||||
|
||||
@@ -13,7 +13,7 @@ const watercolorGen = require('./watercolor.gen.js');
|
||||
module.exports = [
|
||||
|
||||
{
|
||||
groupName : 'Editor',
|
||||
groupName : 'Text Editor',
|
||||
icon : 'fas fa-pencil-alt',
|
||||
view : 'text',
|
||||
snippets : [
|
||||
@@ -55,7 +55,7 @@ module.exports = [
|
||||
gen : (brew)=>{
|
||||
return `![]` +
|
||||
`(https://api.qrserver.com/v1/create-qr-code/?data=` +
|
||||
`https://homebrewery.naturalcrit.com/share/${brew.shareId}` +
|
||||
`https://homebrewery.naturalcrit.com${brew.shareId ? `/share/${brew.shareId}` : ''}` +
|
||||
`&size=100x100) {width:100px;mix-blend-mode:multiply}`;
|
||||
}
|
||||
},
|
||||
@@ -79,35 +79,41 @@ module.exports = [
|
||||
icon : 'fas fa-book',
|
||||
gen : TableOfContentsGen
|
||||
},
|
||||
{
|
||||
name : 'Add Comment',
|
||||
icon : 'fas fa-code',
|
||||
gen : '<!-- This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). -->'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
groupName : 'Style Editor',
|
||||
icon : 'fas fa-pencil-alt',
|
||||
view : 'style',
|
||||
snippets : [
|
||||
{
|
||||
name : 'Remove Drop Cap',
|
||||
icon : 'fas fa-remove-format',
|
||||
gen : '<style>\n' +
|
||||
' .phb3 h1+p:first-letter {\n' +
|
||||
' all: unset;\n' +
|
||||
' }\n' +
|
||||
'</style>'
|
||||
gen : dedent`/* Removes Drop Caps */
|
||||
.page h1+p:first-letter {
|
||||
all: unset;
|
||||
}\n\n`
|
||||
},
|
||||
{
|
||||
name : 'Tweak Drop Cap',
|
||||
icon : 'fas fa-sliders-h',
|
||||
gen : '<style>\n' +
|
||||
' /* Drop Cap settings */\n' +
|
||||
' .phb3 h1 + p::first-letter {\n' +
|
||||
' float: left;\n' +
|
||||
' font-family: SolberaImitationRemake;\n' +
|
||||
' font-size: 3.5cm;\n' +
|
||||
' color: #222;\n' +
|
||||
' line-height: .8em;\n' +
|
||||
' }\n' +
|
||||
'</style>'
|
||||
gen : dedent`/* Drop Cap settings */
|
||||
.page h1 + p::first-letter {
|
||||
font-family: SolberaImitationRemake;
|
||||
font-size: 3.5cm;
|
||||
background-image: linear-gradient(-45deg, #322814, #998250, #322814);
|
||||
line-height: 1em;
|
||||
}\n\n`
|
||||
},
|
||||
{
|
||||
name : 'Add Comment',
|
||||
icon : 'fas fa-code', /* might need to be fa-solid fa-comment-code --not sure, Gazook */
|
||||
gen : dedent`\n
|
||||
<!-- This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). -->
|
||||
`
|
||||
icon : 'fas fa-code',
|
||||
gen : '/* This is a comment that will not be rendered into your brew. */'
|
||||
},
|
||||
]
|
||||
},
|
||||
@@ -254,36 +260,6 @@ module.exports = [
|
||||
icon : 'fas fa-table',
|
||||
view : 'text',
|
||||
snippets : [
|
||||
{
|
||||
name : 'Class Table',
|
||||
icon : 'fas fa-table',
|
||||
gen : ClassTableGen.full('classTable,frame,decoration,wide'),
|
||||
},
|
||||
{
|
||||
name : 'Class Table (unframed)',
|
||||
icon : 'fas fa-border-none',
|
||||
gen : ClassTableGen.full('classTable,wide'),
|
||||
},
|
||||
{
|
||||
name : '1/2 Class Table',
|
||||
icon : 'fas fa-list-alt',
|
||||
gen : ClassTableGen.half('classTable,decoration,frame'),
|
||||
},
|
||||
{
|
||||
name : '1/2 Class Table (unframed)',
|
||||
icon : 'fas fa-border-none',
|
||||
gen : ClassTableGen.half('classTable'),
|
||||
},
|
||||
{
|
||||
name : '1/3 Class Table',
|
||||
icon : 'fas fa-border-all',
|
||||
gen : ClassTableGen.third('classTable,frame'),
|
||||
},
|
||||
{
|
||||
name : '1/3 Class Table (unframed)',
|
||||
icon : 'fas fa-border-none',
|
||||
gen : ClassTableGen.third('classTable'),
|
||||
},
|
||||
{
|
||||
name : 'Table',
|
||||
icon : 'fas fa-th-list',
|
||||
@@ -343,6 +319,36 @@ module.exports = [
|
||||
}}
|
||||
\n`;
|
||||
}
|
||||
},
|
||||
{
|
||||
name : 'Class Table',
|
||||
icon : 'fas fa-table',
|
||||
gen : ClassTableGen.full('classTable,frame,decoration,wide'),
|
||||
},
|
||||
{
|
||||
name : 'Class Table (unframed)',
|
||||
icon : 'fas fa-border-none',
|
||||
gen : ClassTableGen.full('classTable,wide'),
|
||||
},
|
||||
{
|
||||
name : '1/2 Class Table',
|
||||
icon : 'fas fa-list-alt',
|
||||
gen : ClassTableGen.half('classTable,decoration,frame'),
|
||||
},
|
||||
{
|
||||
name : '1/2 Class Table (unframed)',
|
||||
icon : 'fas fa-border-none',
|
||||
gen : ClassTableGen.half('classTable'),
|
||||
},
|
||||
{
|
||||
name : '1/3 Class Table',
|
||||
icon : 'fas fa-border-all',
|
||||
gen : ClassTableGen.third('classTable,frame'),
|
||||
},
|
||||
{
|
||||
name : '1/3 Class Table (unframed)',
|
||||
icon : 'fas fa-border-none',
|
||||
gen : ClassTableGen.third('classTable'),
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -360,44 +366,36 @@ module.exports = [
|
||||
{
|
||||
name : 'A4 Page Size',
|
||||
icon : 'far fa-file',
|
||||
gen : ['/* A4 Page Size */',
|
||||
'.page{',
|
||||
' width : 210mm;',
|
||||
' height : 296.8mm;',
|
||||
'}',
|
||||
''
|
||||
].join('\n')
|
||||
gen : dedent`/* A4 Page Size */
|
||||
.page{
|
||||
width : 210mm;
|
||||
height : 296.8mm;
|
||||
}\n\n`
|
||||
},
|
||||
{
|
||||
name : 'Square Page Size',
|
||||
icon : 'far fa-file',
|
||||
gen : ['/* Square Page Size */',
|
||||
'.page {',
|
||||
' width : 125mm;',
|
||||
' height : 125mm;',
|
||||
' padding : 12.5mm;',
|
||||
' columns : unset;',
|
||||
'}',
|
||||
''
|
||||
].join('\n')
|
||||
gen : dedent`/* Square Page Size */
|
||||
.page {
|
||||
width : 125mm;
|
||||
height : 125mm;
|
||||
padding : 12.5mm;
|
||||
columns : unset;
|
||||
}\n\n`
|
||||
},
|
||||
{
|
||||
name : 'Ink Friendly',
|
||||
icon : 'fas fa-tint',
|
||||
gen : dedent`
|
||||
/* Ink Friendly */
|
||||
.pages *:is(.page,.monster,.note,.descriptive) {
|
||||
*:is(.page,.monster,.note,.descriptive) {
|
||||
background : white !important;
|
||||
box-shadow : 0px 0px 3px !important;
|
||||
}
|
||||
|
||||
.page .note:before {
|
||||
box-shadow : 0px 0px 3px;
|
||||
filter : drop-shadow(0px 0px 3px #888) !important;
|
||||
}
|
||||
|
||||
.page img {
|
||||
visibility : hidden;
|
||||
}`
|
||||
}\n\n`
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@ const dedent = require('dedent-tabs').default;
|
||||
module.exports = [
|
||||
|
||||
{
|
||||
groupName : 'Editor',
|
||||
groupName : 'Text Editor',
|
||||
icon : 'fas fa-pencil-alt',
|
||||
view : 'text',
|
||||
snippets : [
|
||||
@@ -78,33 +78,44 @@ module.exports = [
|
||||
icon : 'fas fa-book',
|
||||
gen : TableOfContentsGen
|
||||
},
|
||||
{
|
||||
name : 'Add Comment',
|
||||
icon : 'fas fa-code',
|
||||
gen : '<!-- This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). -->'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
groupName : 'Style Editor',
|
||||
icon : 'fas fa-pencil-alt',
|
||||
view : 'style',
|
||||
snippets : [
|
||||
{
|
||||
name : 'Remove Drop Cap',
|
||||
icon : 'fas fa-remove-format',
|
||||
gen : '<style>\n' +
|
||||
' .phb h1+p:first-letter {\n' +
|
||||
' all: unset;\n' +
|
||||
' }\n' +
|
||||
'</style>'
|
||||
gen : dedent`/* Removes Drop Caps */
|
||||
.phb h1+p:first-letter {
|
||||
all: unset;
|
||||
}\n\n`
|
||||
},
|
||||
{
|
||||
name : 'Tweak Drop Cap',
|
||||
icon : 'fas fa-sliders-h',
|
||||
gen : '<style>\n' +
|
||||
' /* Drop Cap settings */\n' +
|
||||
' .phb h1 + p::first-letter {\n' +
|
||||
' float: left;\n' +
|
||||
' font-family: Solberry;\n' +
|
||||
' font-size: 10em;\n' +
|
||||
' color: #222;\n' +
|
||||
' line-height: .8em;\n' +
|
||||
' }\n' +
|
||||
'</style>'
|
||||
gen : dedent`/* Drop Cap Settings */
|
||||
.phb h1 + p::first-letter {
|
||||
float: left;
|
||||
font-family: Solberry;
|
||||
font-size: 10em;
|
||||
color: #222;
|
||||
line-height: .8em;
|
||||
}\n\n`
|
||||
},
|
||||
{
|
||||
name : 'Add Comment',
|
||||
icon : 'fas fa-code',
|
||||
gen : `\n<!-- This is a comment that will not be rendered into your brew. Hotkey (Ctrl/Cmd + /). -->\n\n`
|
||||
gen : '/* This is a comment that will not be rendered into your brew. */'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -39,7 +39,9 @@ const Navbar = createClass({
|
||||
<Nav.item href='/' className='homebrewLogo'>
|
||||
<div>The Homebrewery</div>
|
||||
</Nav.item>
|
||||
<Nav.item>{`v${this.state.ver}`}</Nav.item>
|
||||
<Nav.item newTab={true} href='/changelog' color='purple' icon='far fa-file-alt'>
|
||||
{`v${this.state.ver}`}
|
||||
</Nav.item>
|
||||
<PatreonNavItem />
|
||||
{/*this.renderChromeWarning()*/}
|
||||
</Nav.section>
|
||||
|
||||
@@ -399,7 +399,21 @@ const EditPage = createClass({
|
||||
this.state.brew.shareId;
|
||||
},
|
||||
|
||||
getRedditLink : function(){
|
||||
|
||||
const shareLink = this.processShareId();
|
||||
const systems = this.props.brew.systems.length > 0 ? ` [${this.props.brew.systems.join(' - ')}]` : '';
|
||||
const title = `${this.props.brew.title} ${systems}`;
|
||||
const text = `Hey guys! I've been working on this homebrew. I'd love your feedback. Check it out.
|
||||
|
||||
**[Homebrewery Link](https://homebrewery.naturalcrit.com/share/${shareLink})**`;
|
||||
|
||||
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title)}&text=${encodeURIComponent(text)}`;
|
||||
},
|
||||
|
||||
renderNavbar : function(){
|
||||
const shareLink = this.processShareId();
|
||||
|
||||
return <Navbar>
|
||||
|
||||
{this.state.alertTrashedGoogleBrew &&
|
||||
@@ -420,9 +434,20 @@ const EditPage = createClass({
|
||||
{this.renderSaveButton()}
|
||||
<NewBrew />
|
||||
<ReportIssue />
|
||||
<Nav.item newTab={true} href={`/share/${this.processShareId()}`} color='teal' icon='fas fa-share-alt'>
|
||||
Share
|
||||
</Nav.item>
|
||||
<Nav.dropdown>
|
||||
<Nav.item color='teal' icon='fas fa-share-alt'>
|
||||
share
|
||||
</Nav.item>
|
||||
<Nav.item color='blue' href={`/share/${shareLink}`}>
|
||||
view
|
||||
</Nav.item>
|
||||
<Nav.item color='blue' onClick={()=>{navigator.clipboard.writeText(`https://homebrewery.naturalcrit.com/share/${shareLink}`);}}>
|
||||
copy url
|
||||
</Nav.item>
|
||||
<Nav.item color='blue' href={this.getRedditLink()} newTab={true} rel='noopener noreferrer'>
|
||||
post to reddit
|
||||
</Nav.item>
|
||||
</Nav.dropdown>
|
||||
<PrintLink shareId={this.processShareId()} />
|
||||
<RecentNavItem brew={this.state.brew} storageKey='edit' />
|
||||
<Account />
|
||||
|
||||
@@ -59,9 +59,6 @@ const HomePage = createClass({
|
||||
<Nav.section>
|
||||
<NewBrewItem />
|
||||
<IssueNavItem />
|
||||
<Nav.item newTab={true} href='/changelog' color='purple' icon='far fa-file-alt'>
|
||||
Changelog
|
||||
</Nav.item>
|
||||
<RecentNavItem />
|
||||
<AccountNavItem />
|
||||
</Nav.section>
|
||||
|
||||
@@ -45,7 +45,11 @@ With the latest major update to *The Homebrewery* we've implemented an extended
|
||||
What's new in the latest update? Check out the full changelog [here](/changelog)
|
||||
|
||||
### Bugs, Issues, Suggestions?
|
||||
Have an idea of how to make The Homebrewery better? Or did you find something that wasn't quite right? Head [here](https://www.reddit.com/r/homebrewery/submit?selftext=true&title=%5BIssue%5D%20Describe%20Your%20Issue%20Here) and let me know!.
|
||||
Take a quick look at our [Frequently Asked Questions page](/faq) to see if your question has a handy answer.
|
||||
|
||||
Need help getting started or just the right look for your brew? Head to [r/Homebrewery](https://www.reddit.com/r/homebrewery/submit?selftext=true&title=%5BIssue%5D%20Describe%20Your%20Issue%20Here) and let us know!
|
||||
|
||||
Have an idea to make The Homebrewery better? Or did you find something that wasn't quite right? Check out the [GitHub Repo](https://github.com/naturalcrit/homebrewery/) to report technical issues.
|
||||
|
||||
### Legal Junk
|
||||
The Homebrewery is licensed using the [MIT License](https://github.com/naturalcrit/homebrewery/blob/master/license). This means you are free to use The Homebrewery codebase any way that you want, except for claiming that you made it yourself.
|
||||
@@ -53,7 +57,7 @@ The Homebrewery is licensed using the [MIT License](https://github.com/naturalcr
|
||||
If you wish to sell or in some way gain profit for what you make on this site, it's your responsibility to ensure you have the proper licenses/rights for any images or resources used.
|
||||
|
||||
### More Resources
|
||||
If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/comments/3uwxx9/resources_open_to_the_community/).
|
||||
If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/wiki/resources).
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -34,13 +34,18 @@ After clicking the "Print" item in the navbar a new page will open and a print d
|
||||
* In **Options** make sure "Background Images" is selected.
|
||||
* Hit print and enjoy! You're done!
|
||||
|
||||
If you want to save ink or have a monochrome printer, add the **PRINT → {{fas,fa-tint}} Ink Friendly** snippet to your brew before you print
|
||||
If you want to save ink or have a monochrome printer, add the **PRINT → {{fas,fa-tint}} Ink Friendly** snippet to your brew!
|
||||
}}
|
||||
|
||||
<img src='https://i.imgur.com/hMna6G0.png' style='position:absolute;bottom:50px;left:120px;width:180px' />
|
||||
 {position:absolute,bottom:20px,left:130px,width:220px}
|
||||
|
||||
<div class='pageNumber'>1</div>
|
||||
<div class='footnote'>PART 1 | FANCINESS</div>
|
||||
{{artist,bottom:160px,left:100px
|
||||
##### Homebrew Mug
|
||||
[naturalcrit](https://homebrew.naturalcrit.com)
|
||||
}}
|
||||
|
||||
{{pageNumber 1}}
|
||||
{{footnote PART 1 | FANCINESS}}
|
||||
|
||||
\column
|
||||
|
||||
@@ -52,7 +57,7 @@ Much of the syntax and styling has changed in V3. Code in one version may be bro
|
||||
Scroll down to the next page for a brief summary of the changes and new features available in V3!
|
||||
|
||||
#### New Things All The Time!
|
||||
What's new in the latest update? Check out the full changelog [here](/changelog).
|
||||
Check out the latest updates in the full changelog [here](/changelog).
|
||||
|
||||
### Helping out
|
||||
Like this tool? Want to buy me a beer? [Head here](https://www.patreon.com/Naturalcrit) to help me keep the servers running.
|
||||
@@ -60,6 +65,8 @@ Like this tool? Want to buy me a beer? [Head here](https://www.patreon.com/Natur
|
||||
This tool will **always** be free, never have ads, and I will never offer any "premium" features or whatever.
|
||||
|
||||
### Bugs, Issues, Suggestions?
|
||||
Take a quick look at our [Frequently Asked Questions page](/faq) to see if your question has a handy answer.
|
||||
|
||||
Need help getting started or just the right look for your brew? Head to [r/Homebrewery](https://www.reddit.com/r/homebrewery/submit?selftext=true&title=%5BIssue%5D%20Describe%20Your%20Issue%20Here) and let us know!
|
||||
|
||||
Have an idea to make The Homebrewery better? Or did you find something that wasn't quite right? Check out the [GitHub Repo](https://github.com/naturalcrit/homebrewery/) to report technical issues.
|
||||
@@ -72,8 +79,8 @@ If you wish to sell or in some way gain profit for what's created on this site,
|
||||
#### Crediting Me
|
||||
If you'd like to credit me in your brew, I'd be flattered! Just reference that you made it with The Homebrewery.
|
||||
|
||||
### More Resources
|
||||
If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/comments/3uwxx9/resources_open_to_the_community/).
|
||||
### More Homebrew Resources
|
||||
Check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/wiki/resources).
|
||||
|
||||
|
||||
\page
|
||||
@@ -84,7 +91,6 @@ The Homebrewery aims to make homebrewing as simple as possible, providing a live
|
||||
In version 3.0.0, with a goal of adding maximum flexibility without users resorting to complex HTML to accomplish simple tasks, Homebrewery provides an extended verision of Markdown with additional syntax.
|
||||
**You can enable V3 via the {{fa,fa-info-circle}} Properties button!**
|
||||
|
||||
|
||||
### Curly Brackets
|
||||
The biggest change in V3 is the replacement of `<span></span>` and `<div></div>` with `{{ }}` for a cleaner custom formatting. Inline spans and block elements can be created and given ID's and Classes, as well as css properties, each of which are comma separated with no spaces. Use double quotes if a value requires spaces. Spans and Blocks start the same:
|
||||
|
||||
@@ -97,7 +103,6 @@ My favorite author is {{pen,#author,color:orange,font-family:"trebuchet ms" Bran
|
||||
My favorite book is Wheel of Time. This block has a class of `purple`, an id of `book`, and centered text with a colored background. The opening and closing brackets are on lines separate from the block contents.
|
||||
}}
|
||||
|
||||
|
||||
#### Injection
|
||||
For any element not inside a span or block, you can *inject* attributes using the same syntax but with single brackets in a single line immediately after the element.
|
||||
|
||||
@@ -159,12 +164,8 @@ Using *Curly Injection* you can assign an id, classes, or specific inline CSS pr
|
||||
## Snippets
|
||||
Homebrewery comes with a series of *code snippets* found at the top of the editor pane that make it easy to create brews as quickly as possible. Just set your cursor where you want the code to appear in the editor pane, choose a snippet, and make the adjustments you need.
|
||||
|
||||
|
||||
## Style Editor Panel
|
||||
|
||||
{{fa,fa-paint-brush}} Technically released prior to v3 but still new to many users, check out the new **Style Editor** located on the right side of the Snippet bar. This editor accepts CSS for styling without requiring `<style>` tags-- anything that would have gone inside style tags before can now be placed here, and snippets that insert CSS styles are now located on that tab.
|
||||
|
||||
|
||||
|
||||
<div class='pageNumber'>2</div>
|
||||
<div class='footnote'>PART 2 | BORING STUFF</div>
|
||||
{{pageNumber 2}}
|
||||
{{footnote PART 2 | BORING STUFF}}
|
||||
|
||||
@@ -45,47 +45,44 @@ const NewPage = createClass({
|
||||
},
|
||||
|
||||
getInitialState : function() {
|
||||
const brew = this.props.brew;
|
||||
|
||||
if(typeof window !== 'undefined') { //Load from localStorage if in client browser
|
||||
const brewStorage = localStorage.getItem(BREWKEY);
|
||||
const styleStorage = localStorage.getItem(STYLEKEY);
|
||||
const metaStorage = JSON.parse(localStorage.getItem(METAKEY));
|
||||
|
||||
if(!brew.text || !brew.style){
|
||||
brew.text = brew.text || (brewStorage ?? '');
|
||||
brew.style = brew.style || (styleStorage ?? undefined);
|
||||
// brew.title = metaStorage?.title || this.state.brew.title;
|
||||
// brew.description = metaStorage?.description || this.state.brew.description;
|
||||
brew.renderer = metaStorage?.renderer || brew.renderer;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
brew : {
|
||||
text : this.props.brew.text || '',
|
||||
style : this.props.brew.style || undefined,
|
||||
text : brew.text || '',
|
||||
style : brew.style || undefined,
|
||||
gDrive : false,
|
||||
title : this.props.brew.title || '',
|
||||
description : this.props.brew.description || '',
|
||||
tags : this.props.brew.tags || '',
|
||||
title : brew.title || '',
|
||||
description : brew.description || '',
|
||||
tags : brew.tags || '',
|
||||
published : false,
|
||||
authors : [],
|
||||
systems : this.props.brew.systems || [],
|
||||
renderer : this.props.brew.renderer || 'legacy'
|
||||
systems : brew.systems || [],
|
||||
renderer : brew.renderer || 'legacy'
|
||||
},
|
||||
|
||||
isSaving : false,
|
||||
saveGoogle : (global.account && global.account.googleId ? true : false),
|
||||
errors : null,
|
||||
htmlErrors : Markdown.validate(this.props.brew.text)
|
||||
htmlErrors : Markdown.validate(brew.text)
|
||||
};
|
||||
},
|
||||
|
||||
componentDidMount : function() {
|
||||
const brewStorage = localStorage.getItem(BREWKEY);
|
||||
const styleStorage = localStorage.getItem(STYLEKEY);
|
||||
const metaStorage = JSON.parse(localStorage.getItem(METAKEY));
|
||||
|
||||
const brew = this.state.brew;
|
||||
|
||||
if(!this.state.brew.text || !this.state.brew.style){
|
||||
brew.text = this.state.brew.text || (brewStorage ?? '');
|
||||
brew.style = this.state.brew.style || (styleStorage ?? undefined);
|
||||
// brew.title = metaStorage?.title || this.state.brew.title;
|
||||
// brew.description = metaStorage?.description || this.state.brew.description;
|
||||
brew.renderer = metaStorage?.renderer || this.state.brew.renderer;
|
||||
}
|
||||
|
||||
this.setState((prevState)=>({
|
||||
brew : brew,
|
||||
htmlErrors : Markdown.validate(prevState.brew.text)
|
||||
}));
|
||||
|
||||
document.addEventListener('keydown', this.handleControlKeys);
|
||||
},
|
||||
componentWillUnmount : function() {
|
||||
@@ -274,7 +271,6 @@ const NewPage = createClass({
|
||||
},
|
||||
|
||||
print : function(){
|
||||
localStorage.setItem('print', `<style>\n${this.state.brew.style}\n</style>\n\n${this.state.brew.text}`);
|
||||
window.open('/print?dialog=true&local=print', '_blank');
|
||||
},
|
||||
|
||||
|
||||
@@ -7,6 +7,10 @@ const { Meta } = require('vitreum/headtags');
|
||||
const MarkdownLegacy = require('naturalcrit/markdownLegacy.js');
|
||||
const Markdown = require('naturalcrit/markdown.js');
|
||||
|
||||
const BREWKEY = 'homebrewery-new';
|
||||
const STYLEKEY = 'homebrewery-new-style';
|
||||
const METAKEY = 'homebrewery-new-meta';
|
||||
|
||||
const PrintPage = createClass({
|
||||
getDefaultProps : function() {
|
||||
return {
|
||||
@@ -21,28 +25,42 @@ const PrintPage = createClass({
|
||||
|
||||
getInitialState : function() {
|
||||
return {
|
||||
brewText : this.props.brew.text
|
||||
brew : {
|
||||
text : this.props.brew.text || '',
|
||||
style : this.props.brew.style || undefined,
|
||||
renderer : this.props.brew.renderer || 'legacy'
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
componentDidMount : function() {
|
||||
if(this.props.query.local){
|
||||
this.setState((prevState, prevProps)=>({
|
||||
brewText : localStorage.getItem(prevProps.query.local)
|
||||
}));
|
||||
if(this.props.query.local == 'print'){
|
||||
const brewStorage = localStorage.getItem(BREWKEY);
|
||||
const styleStorage = localStorage.getItem(STYLEKEY);
|
||||
const metaStorage = JSON.parse(localStorage.getItem(METAKEY));
|
||||
|
||||
this.setState((prevState, prevProps)=>{
|
||||
return {
|
||||
brew : {
|
||||
text : brewStorage,
|
||||
style : styleStorage,
|
||||
renderer : metaStorage.renderer || 'legacy'
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
if(this.props.query.dialog) window.print();
|
||||
},
|
||||
|
||||
renderStyle : function() {
|
||||
if(!this.props.brew.style) return;
|
||||
return <div style={{ display: 'none' }} dangerouslySetInnerHTML={{ __html: `<style> ${this.props.brew.style} </style>` }} />;
|
||||
if(!this.state.brew.style) return;
|
||||
return <div style={{ display: 'none' }} dangerouslySetInnerHTML={{ __html: `<style> ${this.state.brew.style} </style>` }} />;
|
||||
},
|
||||
|
||||
renderPages : function(){
|
||||
if(this.props.brew.renderer == 'legacy') {
|
||||
return _.map(this.state.brewText.split('\\page'), (pageText, index)=>{
|
||||
if(this.state.brew.renderer == 'legacy') {
|
||||
return _.map(this.state.brew.text.split('\\page'), (pageText, index)=>{
|
||||
return <div
|
||||
className='phb page'
|
||||
id={`p${index + 1}`}
|
||||
@@ -50,7 +68,7 @@ const PrintPage = createClass({
|
||||
key={index} />;
|
||||
});
|
||||
} else {
|
||||
return _.map(this.state.brewText.split(/^\\page$/gm), (pageText, index)=>{
|
||||
return _.map(this.state.brew.text.split(/^\\page$/gm), (pageText, index)=>{
|
||||
pageText += `\n\n \n\\column\n `; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
|
||||
return (
|
||||
<div className='page' id={`p${index + 1}`} key={index} >
|
||||
@@ -65,7 +83,7 @@ const PrintPage = createClass({
|
||||
render : function(){
|
||||
return <div>
|
||||
<Meta name='robots' content='noindex, nofollow' />
|
||||
<link href={`${this.props.brew.renderer == 'legacy' ? '/themes/5ePhbLegacy.style.css' : '/themes/5ePhb.style.css'}`} rel='stylesheet'/>
|
||||
<link href={`${this.state.brew.renderer == 'legacy' ? '/themes/5ePhbLegacy.style.css' : '/themes/5ePhb.style.css'}`} rel='stylesheet'/>
|
||||
{/* Apply CSS from Style tab */}
|
||||
{this.renderStyle()}
|
||||
<div className='pages' ref='pages'>
|
||||
|
||||
@@ -29,18 +29,14 @@ const SharePage = createClass({
|
||||
};
|
||||
},
|
||||
|
||||
getInitialState : function() {
|
||||
return {
|
||||
showDropdown : false
|
||||
};
|
||||
},
|
||||
|
||||
componentDidMount : function() {
|
||||
document.addEventListener('keydown', this.handleControlKeys);
|
||||
},
|
||||
|
||||
componentWillUnmount : function() {
|
||||
document.removeEventListener('keydown', this.handleControlKeys);
|
||||
},
|
||||
|
||||
handleControlKeys : function(e){
|
||||
if(!(e.ctrlKey || e.metaKey)) return;
|
||||
const P_KEY = 80;
|
||||
@@ -57,28 +53,6 @@ const SharePage = createClass({
|
||||
this.props.brew.shareId;
|
||||
},
|
||||
|
||||
handleDropdown : function(show){
|
||||
this.setState({
|
||||
showDropdown : show
|
||||
});
|
||||
},
|
||||
|
||||
renderDropdown : function(){
|
||||
if(!this.state.showDropdown) return null;
|
||||
|
||||
return <div className='dropdown'>
|
||||
<a href={`/source/${this.processShareId()}`} className='item'>
|
||||
view
|
||||
</a>
|
||||
<a href={`/download/${this.processShareId()}`} className='item'>
|
||||
download
|
||||
</a>
|
||||
<a href={`/new/${this.processShareId()}`} className='item'>
|
||||
clone to new
|
||||
</a>
|
||||
</div>;
|
||||
},
|
||||
|
||||
render : function(){
|
||||
return <div className='sharePage sitePage'>
|
||||
<Meta name='robots' content='noindex, nofollow' />
|
||||
@@ -90,12 +64,20 @@ const SharePage = createClass({
|
||||
<Nav.section>
|
||||
{this.props.brew.shareId && <>
|
||||
<PrintLink shareId={this.processShareId()} />
|
||||
<Nav.item icon='fas fa-code' color='red' className='source'
|
||||
onMouseEnter={()=>this.handleDropdown(true)}
|
||||
onMouseLeave={()=>this.handleDropdown(false)}>
|
||||
source
|
||||
{this.renderDropdown()}
|
||||
</Nav.item>
|
||||
<Nav.dropdown>
|
||||
<Nav.item color='red' icon='fas fa-code'>
|
||||
source
|
||||
</Nav.item>
|
||||
<Nav.item color='blue' href={`/source/${this.processShareId()}`}>
|
||||
view
|
||||
</Nav.item>
|
||||
<Nav.item color='blue' href={`/download/${this.processShareId()}`}>
|
||||
download
|
||||
</Nav.item>
|
||||
<Nav.item color='blue' href={`/new/${this.processShareId()}`}>
|
||||
clone to new
|
||||
</Nav.item>
|
||||
</Nav.dropdown>
|
||||
</>}
|
||||
<RecentNavItem brew={this.props.brew} storageKey='view' />
|
||||
<Account />
|
||||
|
||||
@@ -2,49 +2,4 @@
|
||||
.content{
|
||||
overflow-y : hidden;
|
||||
}
|
||||
.source.navItem{
|
||||
position : relative;
|
||||
.dropdown{
|
||||
position : absolute;
|
||||
top : 28px;
|
||||
left : 0px;
|
||||
z-index : 10000;
|
||||
width : 100%;
|
||||
h4{
|
||||
display : block;
|
||||
box-sizing : border-box;
|
||||
padding : 5px 0px;
|
||||
background-color : #333;
|
||||
font-size : 0.8em;
|
||||
color : #bbb;
|
||||
text-align : center;
|
||||
border-top : 1px solid #888;
|
||||
&:nth-of-type(1){ background-color: darken(@teal, 20%); }
|
||||
&:nth-of-type(2){ background-color: darken(@purple, 30%); }
|
||||
}
|
||||
.item{
|
||||
.animate(background-color);
|
||||
position : relative;
|
||||
display : block;
|
||||
width : 100%;
|
||||
vertical-align : middle;
|
||||
padding : 13px 5px;
|
||||
box-sizing : border-box;
|
||||
background-color : #333;
|
||||
color : white;
|
||||
text-decoration : none;
|
||||
border-top : 1px solid #888;
|
||||
&:hover{
|
||||
background-color : @blue;
|
||||
}
|
||||
.title{
|
||||
display : inline-block;
|
||||
overflow : hidden;
|
||||
width : 100%;
|
||||
text-overflow : ellipsis;
|
||||
white-space : nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ const RecentNavItem = require('../../navbar/recent.navitem.jsx').both;
|
||||
const Account = require('../../navbar/account.navitem.jsx');
|
||||
const NewBrew = require('../../navbar/newbrew.navitem.jsx');
|
||||
const BrewItem = require('./brewItem/brewItem.jsx');
|
||||
const ReportIssue = require('../../navbar/issue.navitem.jsx');
|
||||
|
||||
// const brew = {
|
||||
// title : 'SUPER Long title woah now',
|
||||
@@ -162,6 +163,7 @@ const UserPage = createClass({
|
||||
<Navbar>
|
||||
<Nav.section>
|
||||
<NewBrew />
|
||||
<ReportIssue />
|
||||
<RecentNavItem />
|
||||
<Account />
|
||||
</Nav.section>
|
||||
|
||||
315
faq.md
315
faq.md
@@ -1,243 +1,152 @@
|
||||
```css
|
||||
h5 {
|
||||
font-size: .35cm !important;
|
||||
}
|
||||
|
||||
.taskList li {
|
||||
list-style-type : none;
|
||||
}
|
||||
|
||||
.taskList li input {
|
||||
margin-left : -0.52cm;
|
||||
transform: translateY(.05cm);
|
||||
filter: brightness(1.1) drop-shadow(1px 2px 1px #222);
|
||||
}
|
||||
|
||||
.taskList li input[checked] {
|
||||
filter: sepia(100%) hue-rotate(60deg) saturate(3.5) contrast(4) brightness(1.1) drop-shadow(1px 2px 1px #222);
|
||||
}
|
||||
|
||||
pre + * {
|
||||
margin-top: 0.17cm;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin-top: 0.17cm;
|
||||
}
|
||||
|
||||
.page pre code {
|
||||
word-break:break-word;
|
||||
}
|
||||
|
||||
.page p + pre {
|
||||
margin-top : 0.1cm;
|
||||
}
|
||||
|
||||
.page h1 + p:first-letter {
|
||||
all:unset;
|
||||
}
|
||||
|
||||
.page .toc ul {
|
||||
margin-top:0;
|
||||
}
|
||||
|
||||
.page h3 {
|
||||
font-family:inherit;
|
||||
font-size:inherit;
|
||||
border:inherit;
|
||||
margin-top:12px;
|
||||
margin-bottom:5px
|
||||
}
|
||||
|
||||
.page h3:before {
|
||||
content:'Q.';
|
||||
position:absolute;
|
||||
font-size:2em;
|
||||
margin-left:-1.2em;
|
||||
}
|
||||
|
||||
.page .columnSplit + h3 {
|
||||
margin-top:0;
|
||||
}
|
||||
```
|
||||
|
||||
# FAQ
|
||||
{{wide Updated Oct. 11, 2021}}
|
||||
|
||||
**Last Edit:** 26.11.2020
|
||||
|
||||
## Website Issues
|
||||
**Q:** The site is down for me! Anyone else?
|
||||
**A:** You can check https://downforeveryoneorjustme.com/homebrewery.naturalcrit.com to see if the homebrewery is up.
|
||||
### The site is down for me! Anyone else?
|
||||
|
||||
**Q:** How do I log out?
|
||||
**A:** Go to http://www.naturalcrit.com/login, there you can click "logout".
|
||||
You can check the site status here: [Everyone or Just Me](https://downforeveryoneorjustme.com/homebrewery.naturalcrit.com)
|
||||
|
||||
**Q:** Is there a way to reset or restore my password?
|
||||
**A:** Currently no. This is, however, a feature that is being worked on. No ETA right now.
|
||||
### How do I log out?
|
||||
|
||||
**Q:** I can't access my profile page, what gives?
|
||||
**A:** Most likely you used your e-mail address as your username, which is currently not supported. Please create a new account, avoiding special characters (like @, #, or the like).
|
||||
Go to https://homebrewery.naturalcrit.com/login, and hit the "*logout*" link.
|
||||
|
||||
**Q:** The preview window is suddenly gone, I can only see the editor side of the homebrewery (or the other way around)
|
||||
**A:** Press CTRL+SHIFT+i (or right-click and select "Inspect") while in the homebrewery.
|
||||
### Why am I getting an error when trying to save, and my account is linked to Google?
|
||||
|
||||
Expand `body` -> `main` -> `div class="homebrew"` -> `div class="editPage page"` -> `div class="content"` -> `div class="splitPane"`.
|
||||
A sign-in with Google only lasts a year until the authentication expires. You must go [here](https://www.naturalcrit.com/login), click the *Log-out* button, and then sign back in using your Google account.
|
||||
|
||||
There you will find 3 divs: `<div class="pane" [...]>`, `<div class="divider" [...]>`, and `<div class="pane" [...]>`. The first (or second, depending on which side of the homebrewery went missing) `<div class="pane">` has a style tag, that looks similar to this: `<div class="pane" data-reactid="36" style="flex: 0 0 auto; width: 925px;">`.
|
||||
### I lost my password, how do I reset it? How do I change my password?
|
||||
|
||||
Change whatever stands behind `width:` to something smaller than your display width. Here's a screenshot of how it looks expanded: [imgur](https://i.imgur.com/QdqPNIg.png).
|
||||
Homebrewery is specifically designed to not hold personal information as a measure to protect both users and admin, and does not require an email address. Thus it would be difficult to send a new password to a user. Reach out to the moderators on [the subreddit](https://www.reddit.com/r/homebrewery) with your Homebrewery username.
|
||||
|
||||
**Q:** I worked on a brew for $x hours, and when I returned the next day, all changes were gone?
|
||||
**A:** This happens when you did not close the tab but closed the browser, or used the back button of your browser to return to your brew! If you return to your brew under these circumstances, the version of your brew you saved before is still loaded in the cache, so you need to refresh or reopen the page for your recent changes to be in said cache. If you start working on your brew without refreshing, all changes you made in the meantime are gone. Additionally, pay extra attention to the next question below!
|
||||
If you have linked your account with a Google account, you would change your password within Google.
|
||||
|
||||
**Q:** Is there a way to restore a previous version of my brew?
|
||||
**A:** Currently, no. This would take too much of a toll on the amount of storage the homebrewery requires. This may be solved in the future.
|
||||
### Is there a way to restore a previous version of my brew?
|
||||
|
||||
**Q:** The code and/or preview window of my brew are just blue, nothing else. Also, the version in the top displays 0.0.0.
|
||||
**A:** You have an error in the HTML you used in your brew. That's why the page can't render properly anymore. Click the Share button in the top right, then click the Source button in the top right, get your brew's code, create a new brew, paste the code in there, fix the HTML error, and you're done. At this point, you can also delete the old brew, it is not fixable.
|
||||
Currently, there is no way to do this through the site yourself. This would take too much of a toll on the amount of storage the homebrewery requires. However, we do have daily backups of our database that we keep for 8 days, and you can contact the moderators on [the subreddit](https://www.reddit.com/r/homebrewery) with your Homebrewery username, the name of the lost brew, and the last known time it was working properly. We can manually look through our backups and restore it if it exists.
|
||||
|
||||
**Q:** I have important brews, but I can't access them anymore because [...]
|
||||
**A:** Most important thing to remember: Save early, save often. Also, check out the "Back Up Your Stuff!" section below for more information.
|
||||
### I worked on a brew for X hours, and suddenly all the text disappeared!
|
||||
|
||||
## Text Issues
|
||||
**Q:** How do I resize text globally/locally?
|
||||
**A:** [Globally](https://old.reddit.com/r/homebrewery/comments/8bivc7/question_how_do_i_resize_text_globally/dx8et7c/) |
|
||||
[Locally](https://old.reddit.com/r/homebrewery/comments/9pvj0q/font_size_change/)
|
||||
This usually happens if you accidentally drag-select all of your text and then start typing which overwrites the selection. Do not panic, and do not refresh the page or reload your brew quite yet as it is probably auto-saved in this state already. Simply press CTRL+Z as many times as needed to undo your last few changes and you will be back to where you were, then make sure to save your brew in the "good" state.
|
||||
|
||||
**Q:** How do I use different fonts in my brews?
|
||||
**A:** The best way, I would say, is to transform the font you want to use into the base64 format, using a website such as [fontsquirrel.com](https://www.fontsquirrel.com/tools/webfont-generator). Once there, click "Expert..." and go all the way down to "CSS" and mark "Base64 encode" and "Yes, the fonts I'm uploading are legally eligible for web embedding." (make sure that they, infact, are!). Go back to the top and click "Upload font". Select the font file you want to use. Once the font is transformed, click "Download your kit" at the bottom. In the resulting .zip file, you will find a file named "stylesheet.css". Open it and copy all of its contents.
|
||||
\column
|
||||
|
||||
Go to your homebrew and either add the copied information to your `<style>` section, or create a new section via `<style></style>` and paste the copied information there. You can then use `font-family: fontname`, where *fontname* is the part after `font-family: ` in the `@font-face` segment, to add that font to your brew.
|
||||
### Why is only Chrome supported?
|
||||
|
||||
***Example:*** You want to have a different font for all elements with the `testFontClass` class. This is how you would go about that:
|
||||
Different browsers have differing abilities to handle web styling (or "CSS"). For example, Firefox is not currently capable of handling column breaks well but Chrome has no problem. Also, each browser has slight differences in how they display pages which can make it a nightmare to compensate for. These capabilities change over time and we are hopeful that each browser update bridges these gaps and adds more features; until then, we will develop with one browser in mind.
|
||||
|
||||
1. Upload your font to [fontsquirrel.com](https://www.fontsquirrel.com/tools/webfont-generator) and have it base64 encoded.
|
||||
### Both my friend and myself are using Chrome, but the brews still look different. Why?
|
||||
|
||||
2. In the resulting .zip file, look for the .css file, open it, and copy its contents, which will look something like this (Your `url()` parts will be much longer, I removed most of it for the sake of readability):
|
||||
A pixel can be rendered differently depending on the browser, operating system, computer, or screen. Unless you and your friend have exactly the same setup, it is likely your online brew will have very tiny differences. However, sometimes a few pixels is all it takes to create *big* differences....for example, an extra pixel can cause a whole line of text or even a monster stat block to run out of space in it's current column and be pushed to the next column or even off the page.
|
||||
|
||||
@font-face {
|
||||
font-family: 'testFont';
|
||||
src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAA[...]+wEAAA=) format('woff2'),
|
||||
url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAHTcABI[...]+wAAAADYwmAT) format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
The best way to avoid this is to leave space at the end of a column equal to one or two lines of text. Or, create a PDF from your document for sharing--- PDF's are designed to be rendered the same on all devices.
|
||||
|
||||
3. In your homebrew, either add a `<style></style>` section at the top or, if you already have one, add the copied `@font-face{ [...] }` to it.
|
||||
### Why do I need to manually create a new page? Why doesn't text flow between pages?
|
||||
|
||||
4. In that same `<style>` section, add a new class that uses the new font:
|
||||
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.
|
||||
|
||||
.phb .testFontClass {
|
||||
font-family: testFont;
|
||||
}
|
||||
### 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.
|
||||
|
||||
5. Now everytime you do something like `<p class="testFontClass">This is in a different font.</p>`, your newly added font will be used.
|
||||
Once you have an image you would like to use, it is recommended to host it somewhere that won't disappear; commonly, people host their images on [Imgur](https://www.imgur.com). Create an account and upload your images there, and use the *Direct Link* that is shown when you click into the image from the gallery in your Homebrewery document.
|
||||
|
||||
If you think that the base64 encoded font takes up a bit too much space in your brew, see the question below.
|
||||
\page
|
||||
|
||||
**Q:** I heavily customized the style of my brews, and I have a lot of brews in which I want to use my custom style, without having to copy it over everytime I change a little detail about it.
|
||||
**A:** Create a new file on your computer, and name it something like `MyHomebrewStyle.css`. Put all the style information you use into this file (do not add the `<style></style>` tags to this file!). Upload said file to a place that is accessible to the homebrewery. Go to your brew, remove everything within your `<style></style>` tags, and add this: `@import "https://my.website.com/MyHomebrewStyle.css";`
|
||||
### A particular font does not work for my language, what do I do?
|
||||
The fonts used were originally created for use with the English language, though revisions since then have added more support for other languages. They are still not complete sets and may be missing a glyph/character you need. Unfortunately, the volunteer group as it stands at the time of this writing does not have a font guru, so it would be difficult to add more glyphs (especially complicated glyphs). Let us know which glyph is missing on the subreddit, but you may need to search [Google Fonts](https://fonts.google.com) for an alternative font if you need something fast.
|
||||
|
||||
Be aware that, should you change something in that css file, your homebrew will have to be reloaded for these changes to take effect.
|
||||
### Whenever I click on the "Get PDF" button, instead of getting a download, it opens Print Preview in another tab.
|
||||
Yes, this is by design. In the print preview, select "Save as PDF" as the Destination, and then click "Save". There will be a normal download dialog where you can save your brew as a PDF.
|
||||
|
||||
**Q:** How do I use different colors in my brews?
|
||||
**A:** [Described here](https://old.reddit.com/r/homebrewery/comments/9kesk1/changing_text_colour_to_white/)
|
||||
### The preview window is suddenly gone, I can only see the editor side of the Homebrewery (or the other way around).
|
||||
|
||||
**Q:** How do I get a line break without indentation?
|
||||
**A:** [Described here](https://old.reddit.com/r/homebrewery/comments/8hmr50/getting_line_breaks_without_getting_a_new/)
|
||||
1. Press `CTRL`+`SHIFT`+`i` (or right-click and select "Inspect") while in the Homebrewery.
|
||||
|
||||
**Q:** How do I fix line indentations in monster statblocks?
|
||||
**A:** [Described here](https://old.reddit.com/r/homebrewery/comments/ag46i1/indentation_problem/)
|
||||
2. Expand...
|
||||
```
|
||||
- `body`
|
||||
- `main`
|
||||
- `div class="homebrew"`
|
||||
- `div class="editPage page"`
|
||||
- `div class="content"`
|
||||
- `div class="splitPane"`
|
||||
```
|
||||
|
||||
**Q:** When I write more text than fits into the two columns on the page, the text overflows into a third column and goes off-page. Why isn't a new page generated for the text?
|
||||
**A:** Auto-generating a new page via code lies between tricky and impossible. Use `\page` to create a new page manually. If you have an idea about how to implement auto-new-page-ing, head over to [GitHub](https://github.com/naturalcrit/homebrewery) and let us know.
|
||||
There you will find 3 divs: `div class="pane" [...]`, `div class="divider" [...]`, and `div class="pane" [...]`.
|
||||
|
||||
**Q:** Typing `#### Adhesion` in the formatting doesn't show the titling at all in the completed page?
|
||||
**A:** Whitelist homebrewery.naturalcrit.com in your ad-blocking software.
|
||||
The `class="pane"` looks similar to this: `div class="pane" data-reactid="36" style="flex: 0 0 auto; width: 925px;"`.
|
||||
|
||||
## Paper Size
|
||||
**Q:** I have white borders on the bottom/sides of the print preview.
|
||||
**A:** The homebrewery paper size and your print paper size do not match.
|
||||
Change whatever stands behind width: to something smaller than your display width.
|
||||
|
||||
The default homebrewery paper size is “Letter.”
|
||||
### I have white borders on the bottom/sides of the print preview.
|
||||
|
||||
If you are in the US (and you did not add the A4 snippet), in the "Print to PDF" window, click "More settings" and change "Paper size" to "Letter".
|
||||
The Homebrewery paper size and your print paper size do not match.
|
||||
|
||||
If you are anywhere else, your default "Paper size" setting is most likely "A4" and you need to change it to "Letter" (as described above). You can also add the A4 snippet to the top of your brew to make it A4-sized.
|
||||
The Homebrewery defaults to creating US Letter page sizes. If you are printing with A4 size paper, you must add the "A4 Page Size" snippet. In the "Print" dialog be sure your Paper Size matches the page size in Homebrewery.
|
||||
|
||||
## Get PDF
|
||||
**Q:** Whenever I click on the "Get PDF" button, instead of getting a download, it opens Print Preview in another tab.
|
||||
**A:** Yes, this is by design. In the print preview, select "Save as PDF" as the Destination, and then click "Save". There will be a normal download dialog where you can save your brew as a PDF.
|
||||
|
||||
---
|
||||
### Typing `#### Adhesion` in the text editor doesn't show the header at all in the completed page?
|
||||
|
||||
# PSAs
|
||||
|
||||
## Back Up Your Stuff!
|
||||
|
||||
By that I mean, when you brew, occasionally hit CTRL + A, CTRL + C, open a texteditor (on your local machine), CTRL + V your brew in there, and save that file.
|
||||
|
||||
You can go as crazy as you want to be with that. Create one file per brew, that's fine. Create one file per brew per day you edit it, that's even better. Create one file per brew per day you edit it, save it in two or more separate (remote) locations? That's even more better (I do it that way ;) ).
|
||||
|
||||
Whatever method you prefer, just do it.
|
||||
|
||||
Also, see the "Backing Up Brews with a Bookmarklet", "Backing Up Brews with Linux" section, and the comments below.
|
||||
|
||||
## Brewmasters
|
||||
|
||||
|
||||
We recently started the "Brewmasters" program, where we give out a special flair to users that have proven that they know what they are talking about when it comes to using the [Homebrewery](https://homebrewery.naturalcrit.com).
|
||||
|
||||
The first member to earn this special flair is u/VexbaneAramori, who is a pillar of this community.
|
||||
|
||||
Brewmasters can nominate other active users to become Brewmasters via ModMail as well.
|
||||
|
||||
Thanks to all who help to make this community more helpful and welcoming. :)
|
||||
|
||||
**18.05.2020 - Update:** We're happy to announce that u/Jintonix has joined the ranks of our Brewmasters. Welcome!
|
||||
|
||||
---
|
||||
|
||||
# Miscellaneous
|
||||
|
||||
## Backing Up Brews with a Bookmarklet
|
||||
|
||||
This solution was provided by u/garumoo in the [comments](https://www.reddit.com/r/homebrewery/comments/adh6lh/faqs_psas_announcements/edrvz8o/) of the old [PSA](https://www.reddit.com/r/homebrewery/comments/adh6lh/faqs_psas_announcements/).
|
||||
|
||||
> Here is a handy bookmarklet for saving your brew
|
||||
>
|
||||
> Just create a new bookmark, put it onto your browser button bar, and edit it, changing the URL to:
|
||||
|
||||
javascript:(function() {var nav=document.getElementsByClassName('navContent')[0];var share=nav.querySelector('.navItem[icon="fa-share-alt"');var code=nav.querySelector('.navItem[icon="fa-code"');if(share||code){let brewtitle=document.getElementsByClassName('brewTitle')[0].innerText;let date=new Date();let dd=date.getDate();let mm=date.getMonth()+1;let yyyy=date.getFullYear();let hour=date.getHours();let mins=date.getMinutes();dd=dd<10?'0'+dd:dd;mm=mm<10?'0'+mm:mm;hour=hour<10?'0'+hour:hour;mins=mins<10?'0'+mins:mins;let dateString=`${yyyy}-${mm}-${dd}-${hour}${mins}`;let filename=brewtitle+'-'+dateString+'.md';var sourceuri=share?share.href.replace('share','source'):code.href;fetch(sourceuri).then((response)=>{if(response.ok){return response.text()}}).then((payload)=>{var div=document.createElement('div');div.innerHTML=payload;var brewtext=div.innerText;delete div;let data_uri='data:text/markdown; charset=UTF-8,'+encodeURIComponent(brewtext);var link=document.createElement("a");link.download=filename;link.href=data_uri;document.body.appendChild(link);link.click();document.body.removeChild(link);delete link})}})();
|
||||
|
||||
> Then, while viewing either the edit or the share versions, just click the bookmarklet. It should then download as a text file named as Brewtitle-yyyy-mm-dd-hhmm.md
|
||||
>
|
||||
> The code doesn't sanitise the brewtitle so if you have a funky brewtitle and things blow up that's on you.
|
||||
|
||||
## Backing Up Brews with Linux
|
||||
|
||||
This following script was written by myself, u/Thurse. For an easier to use script, check out u/-Hydrargyros-'s [comment](https://www.reddit.com/r/homebrewery/comments/adh6lh/faqs_psas_announcements/ee9xtsw/) on the old [PSA](https://www.reddit.com/r/homebrewery/comments/adh6lh/faqs_psas_announcements/).
|
||||
|
||||
Hello everyone,
|
||||
as of now, I'm pretty sure everyone has read our [PSA on Backing Up Your Stuff](https://old.reddit.com/r/homebrewery/comments/a0ubx1/psa_back_up_your_stuff/), as you should... :)
|
||||
|
||||
In the PSA thread, u/sonaplayer offered a way to automatically back up your stuff via Google Docs. Although a good method, it can't handle larger brews, so it wasn't for me. I actually corresponded with u/sonaplayer on the topic, and said at one point "maybe someday I will write something in bash...". Well, "someday" was during the christmas holidays, so I present to you:
|
||||
|
||||
A bash script to backup your brews!
|
||||
|
||||
### How does this work?
|
||||
|
||||
1. Go to https://pastebin.com/hkx0NXid and click "download".
|
||||
1a. You can actually look at the source code there to see how it works.
|
||||
2. Save the file as `backupBrews.sh` (this should be the default name already).
|
||||
2a. If it isn't already on a Linux system, transfer the file to one. Or use "[git bash for Windows](https://gitforwindows.org/)" or whatever tickles your fancy.
|
||||
3. Make sure you put it to a place where you have sufficient permissions to read, write, and create folders.
|
||||
4. The script should run on any Linux, I tested it on Raspbian and with "git bash for Windows".
|
||||
5. The simplest way to use this is `./backupBrews.sh -b BrewId` where the `BrewId` is the last part of the SHARE link: https://homebrewery.naturalcrit.com/share/*HereIsTheBrewId*. You don't need the whole link, just the `BrewId` part! Also, don't use the EDIT id, because that won't work.
|
||||
5a. There will be several checks, if they pass, your brew will be downloaded and "cleaned up". What does that mean? When you get the source of your brew, all the `<` will be replaced with `<` and all the `>` will be replaced with `>`. The clean up process turns all the `<` and `>` back into `<` and `>`, so that you can theoretically take the text from the .md file and paste it into the homebrewery, ready to go. **Be aware:** Clean up can take quite a while. My Raspberry Pi 3 B+ needs about 10 minutes to clean up my largest brew at ~1,000,000 characters.
|
||||
5b. A folder will be created in the current location of the script, named as follows: `./backup/BrewId/`
|
||||
5c. Inside that folder, a file named BrewId_YYYYMMDD_HHMMSS.md will be created.
|
||||
6. That's it. For advanced usage, see `--help` or the info below.
|
||||
|
||||
### Advanced Usage
|
||||
|
||||
Apparently, you are not content with the tool's basic function. That's cool, I wasn't either. :)
|
||||
|
||||
There are some more options you can use, described in detail below.
|
||||
|
||||
|
||||
|
||||
#### Mandatory Options
|
||||
|
||||
* `-b BrewId`
|
||||
|
||||
At least one `-b BrewId` is mandatory, else the program will exit. You can do however many brews at once as you like. Just make sure to use `-b BrewId`, and all's good.
|
||||
|
||||
***Example.*** `./backupBrews.sh -b BrewId1 -b BrewId2 -b BrewId3`
|
||||
|
||||
Instead of using the BrewId as the name for the folder and the file, you can give your brew a (short) name. You should avoid spaces and special characters. If you must, you can use quotes to have spaces in the name. BrewName and BrewId have to be separated via `::`.
|
||||
|
||||
***Example.*** `./backupBrews.sh -b BrewName1::BrewId1`
|
||||
|
||||
You can of course combine these options:
|
||||
|
||||
***Example.*** `./backupBrews.sh -b BrewName1::BrewId1 -b BrewId2 -b "Dont use spaces"::BrewId3`
|
||||
|
||||
|
||||
|
||||
#### Optional options
|
||||
|
||||
* `--help`
|
||||
|
||||
Show the help. This is the only option you can use without the `-b` option.
|
||||
|
||||
|
||||
|
||||
* `-s`
|
||||
|
||||
The tool is verbose by default. The `-s` option turns off all output. You are still able to get an exit status via `echo $?`.
|
||||
|
||||
***Example.*** `./backupBrews.sh -s -b BrewId`
|
||||
|
||||
|
||||
|
||||
* `-d dateformat`
|
||||
|
||||
This changes the date format at the end of the backup file. Standard is `%Y%m%d_%H%M%S`. You can enter whatever is accepted by `date`. See `date --help` for more information. The example below gives you the current unix timestamp, so your filename would look something like this: `BrewId_1546297200.md`
|
||||
|
||||
***Example.*** `./backupBrews.sh -d %s -b BrewId`
|
||||
|
||||
|
||||
|
||||
* `-l location`
|
||||
|
||||
This changes the savelocation of your backups. The example below puts the brew folders into a folder called "backup" in the home of the current user, like so: `~/backup/BrewId/BrewId_20190101_000000.md`. Be aware that this script will only create a folder for the brew, not folders above that. To use the example, if the folder `~/backup/` doesn't exist, this tool will not create that folder and simply exit.
|
||||
|
||||
***Example.*** `./backupBrews.sh -l "~/backup/" -b BrewId`
|
||||
|
||||
|
||||
|
||||
You can of course combine all of the options mentioned above:
|
||||
|
||||
***Example.*** `./backupBrews.sh -s -d %s -l "~/backup/" -b BrewName1::BrewId1 -b BrewId2 -b "Dont use spaces"::BrewId3`
|
||||
|
||||
---
|
||||
|
||||
If you have any questions, feel free to ask.
|
||||
Your ad-blocking software is mistakenly assuming your text to be an ad. Whitelist homebrewery.naturalcrit.com in your ad-blocking software.
|
||||
3459
package-lock.json
generated
3459
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "homebrewery",
|
||||
"description": "Create authentic looking D&D homebrews using only markdown",
|
||||
"version": "3.0.1",
|
||||
"version": "3.0.4",
|
||||
"engines": {
|
||||
"node": "14.15.x"
|
||||
"node": "16.11.x"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -40,29 +40,29 @@
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.15.5",
|
||||
"@babel/plugin-transform-runtime": "^7.15.0",
|
||||
"@babel/preset-env": "^7.15.6",
|
||||
"@babel/preset-react": "^7.14.5",
|
||||
"@babel/core": "^7.16.0",
|
||||
"@babel/plugin-transform-runtime": "^7.16.4",
|
||||
"@babel/preset-env": "^7.16.4",
|
||||
"@babel/preset-react": "^7.16.0",
|
||||
"body-parser": "^1.19.0",
|
||||
"classnames": "^2.3.1",
|
||||
"codemirror": "^5.63.0",
|
||||
"cookie-parser": "^1.4.5",
|
||||
"codemirror": "^5.64.0",
|
||||
"cookie-parser": "^1.4.6",
|
||||
"create-react-class": "^15.7.0",
|
||||
"dedent-tabs": "^0.10.1",
|
||||
"express": "^4.17.1",
|
||||
"express-async-handler": "^1.1.4",
|
||||
"express-static-gzip": "2.1.1",
|
||||
"fs-extra": "10.0.0",
|
||||
"googleapis": "87.0.0",
|
||||
"googleapis": "92.0.0",
|
||||
"jwt-simple": "^0.5.6",
|
||||
"less": "^3.13.1",
|
||||
"lodash": "^4.17.21",
|
||||
"marked": "3.0.4",
|
||||
"marked": "3.0.8",
|
||||
"markedLegacy": "npm:marked@^0.3.19",
|
||||
"moment": "^2.29.1",
|
||||
"mongoose": "^6.0.7",
|
||||
"nanoid": "3.1.25",
|
||||
"mongoose": "^6.0.14",
|
||||
"nanoid": "3.1.30",
|
||||
"nconf": "^0.11.3",
|
||||
"prop-types": "15.7.2",
|
||||
"query-string": "7.0.1",
|
||||
@@ -75,8 +75,8 @@
|
||||
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-react": "^7.26.0",
|
||||
"eslint": "^8.3.0",
|
||||
"eslint-plugin-react": "^7.27.1",
|
||||
"pico-check": "^2.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
"codemirror/mode/gfm/gfm.js",
|
||||
"codemirror/mode/css/css.js",
|
||||
"codemirror/mode/javascript/javascript.js",
|
||||
"codemirror/addon/fold/foldcode.js",
|
||||
"codemirror/addon/fold/foldgutter.js",
|
||||
"moment",
|
||||
"superagent",
|
||||
"marked"
|
||||
|
||||
@@ -120,10 +120,10 @@ GoogleActions = {
|
||||
updatedAt : file.modifiedTime,
|
||||
gDrive : true,
|
||||
googleId : file.id,
|
||||
pageCount : file.properties.pageCount,
|
||||
pageCount : parseInt(file.properties.pageCount),
|
||||
title : file.properties.title,
|
||||
description : file.description,
|
||||
views : file.properties.views,
|
||||
views : parseInt(file.properties.views),
|
||||
tags : '',
|
||||
published : file.properties.published ? file.properties.published == 'true' : false,
|
||||
authors : [req.account.username], //TODO: properly save and load authors to google drive
|
||||
|
||||
@@ -13,6 +13,13 @@ if(typeof navigator !== 'undefined'){
|
||||
require('codemirror/mode/gfm/gfm.js'); //Github flavoured markdown
|
||||
require('codemirror/mode/css/css.js');
|
||||
require('codemirror/mode/javascript/javascript.js');
|
||||
|
||||
//Addons
|
||||
require('codemirror/addon/fold/foldcode.js');
|
||||
require('codemirror/addon/fold/foldgutter.js');
|
||||
|
||||
const foldCode = require('./fold-code');
|
||||
foldCode.registerHomebreweryHelper(CodeMirror);
|
||||
}
|
||||
|
||||
const CodeEditor = createClass({
|
||||
@@ -25,28 +32,48 @@ const CodeEditor = createClass({
|
||||
};
|
||||
},
|
||||
|
||||
getInitialState : function() {
|
||||
return {
|
||||
docs : {}
|
||||
};
|
||||
},
|
||||
|
||||
componentDidMount : function() {
|
||||
this.buildEditor();
|
||||
const newDoc = CodeMirror.Doc(this.props.value, this.props.language);
|
||||
this.codeMirror.swapDoc(newDoc);
|
||||
},
|
||||
|
||||
componentDidUpdate : function(prevProps) {
|
||||
if(prevProps.language !== this.props.language){ //rebuild editor when switching tabs
|
||||
this.buildEditor();
|
||||
}
|
||||
if(this.codeMirror && this.codeMirror.getValue() != this.props.value) { //update editor contents if brew.text is changed from outside
|
||||
if(prevProps.view !== this.props.view){ //view changed; swap documents
|
||||
let newDoc;
|
||||
|
||||
if(!this.state.docs[this.props.view]) {
|
||||
newDoc = CodeMirror.Doc(this.props.value, this.props.language);
|
||||
} else {
|
||||
newDoc = this.state.docs[this.props.view];
|
||||
}
|
||||
|
||||
const oldDoc = { [prevProps.view]: this.codeMirror.swapDoc(newDoc) };
|
||||
|
||||
this.setState((prevState)=>({
|
||||
docs : _.merge({}, prevState.docs, oldDoc)
|
||||
}));
|
||||
|
||||
this.props.rerenderParent();
|
||||
} else if(this.codeMirror?.getValue() != this.props.value) { //update editor contents if brew.text is changed from outside
|
||||
this.codeMirror.setValue(this.props.value);
|
||||
}
|
||||
},
|
||||
|
||||
buildEditor : function() {
|
||||
this.codeMirror = CodeMirror(this.refs.editor, {
|
||||
value : this.props.value,
|
||||
lineNumbers : true,
|
||||
lineWrapping : this.props.wrap,
|
||||
mode : this.props.language, //TODO: CSS MODE DOESN'T SEEM TO LOAD PROPERLY
|
||||
indentWithTabs : true,
|
||||
tabSize : 2,
|
||||
extraKeys : {
|
||||
lineNumbers : true,
|
||||
lineWrapping : this.props.wrap,
|
||||
indentWithTabs : true,
|
||||
tabSize : 2,
|
||||
historyEventDelay : 250,
|
||||
extraKeys : {
|
||||
'Ctrl-B' : this.makeBold,
|
||||
'Cmd-B' : this.makeBold,
|
||||
'Ctrl-I' : this.makeItalic,
|
||||
@@ -56,8 +83,35 @@ const CodeEditor = createClass({
|
||||
'Ctrl-/' : this.makeComment,
|
||||
'Cmd-/' : this.makeComment,
|
||||
'Ctrl-K' : this.makeLink,
|
||||
'Cmd-K' : this.makeLink
|
||||
}
|
||||
'Cmd-K' : this.makeLink,
|
||||
'Ctrl-[' : this.foldAllCode,
|
||||
'Cmd-[' : this.foldAllCode,
|
||||
'Ctrl-]' : this.unfoldAllCode,
|
||||
'Cmd-]' : this.unfoldAllCode
|
||||
},
|
||||
foldGutter : true,
|
||||
foldOptions : {
|
||||
scanUp : true,
|
||||
rangeFinder : CodeMirror.fold.homebrewery,
|
||||
widget : (from, to)=>{
|
||||
let text = '';
|
||||
let currentLine = from.line;
|
||||
const maxLength = 50;
|
||||
while (currentLine <= to.line && text.length <= maxLength) {
|
||||
text += this.codeMirror.getLine(currentLine);
|
||||
if(currentLine < to.line)
|
||||
text += ' ';
|
||||
currentLine += 1;
|
||||
}
|
||||
|
||||
text = text.trim();
|
||||
if(text.length > maxLength)
|
||||
text = `${text.substr(0, maxLength)}...`;
|
||||
|
||||
return `\u21A4 ${text} \u21A6`;
|
||||
}
|
||||
},
|
||||
gutters : ['CodeMirror-linenumbers', 'CodeMirror-foldgutter']
|
||||
});
|
||||
|
||||
// Note: codeMirror passes a copy of itself in this callback. cm === this.codeMirror. Either one works.
|
||||
@@ -117,6 +171,14 @@ const CodeEditor = createClass({
|
||||
}
|
||||
},
|
||||
|
||||
foldAllCode : function() {
|
||||
this.codeMirror.execCommand('foldAll');
|
||||
},
|
||||
|
||||
unfoldAllCode : function() {
|
||||
this.codeMirror.execCommand('unfoldAll');
|
||||
},
|
||||
|
||||
//=-- Externally used -==//
|
||||
setCursorPosition : function(line, char){
|
||||
setTimeout(()=>{
|
||||
@@ -130,10 +192,19 @@ const CodeEditor = createClass({
|
||||
updateSize : function(){
|
||||
this.codeMirror.refresh();
|
||||
},
|
||||
redo : function(){
|
||||
return this.codeMirror.redo();
|
||||
},
|
||||
undo : function(){
|
||||
return this.codeMirror.undo();
|
||||
},
|
||||
historySize : function(){
|
||||
return this.codeMirror.doc.historySize();
|
||||
},
|
||||
//----------------------//
|
||||
|
||||
render : function(){
|
||||
return <div className='codeEditor' ref='editor' />;
|
||||
return <div className='codeEditor' ref='editor' style={this.props.style}/>;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
@import (less) 'codemirror/lib/codemirror.css';
|
||||
@import (less) 'codemirror/addon/fold/foldgutter.css';
|
||||
|
||||
.codeEditor{
|
||||
|
||||
.CodeMirror-foldmarker {
|
||||
font-family: inherit;
|
||||
text-shadow: none;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
26
shared/naturalcrit/codeEditor/fold-code.js
Normal file
26
shared/naturalcrit/codeEditor/fold-code.js
Normal file
@@ -0,0 +1,26 @@
|
||||
module.exports = {
|
||||
registerHomebreweryHelper : function(CodeMirror) {
|
||||
CodeMirror.registerHelper('fold', 'homebrewery', function(cm, start) {
|
||||
const matcher = /^\\page.*/;
|
||||
const prevLine = cm.getLine(start.line - 1);
|
||||
|
||||
if(start.line === cm.firstLine() || prevLine.match(matcher)) {
|
||||
const lastLineNo = cm.lastLine();
|
||||
let end = start.line;
|
||||
|
||||
while (end < lastLineNo) {
|
||||
if(cm.getLine(end + 1).match(matcher))
|
||||
break;
|
||||
++end;
|
||||
}
|
||||
|
||||
return {
|
||||
from : CodeMirror.Pos(start.line, 0),
|
||||
to : CodeMirror.Pos(end, cm.getLine(end).length)
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -68,6 +68,46 @@ const Nav = {
|
||||
}
|
||||
}),
|
||||
|
||||
dropdown : createClass({
|
||||
getInitialState : function() {
|
||||
return {
|
||||
showDropdown : false
|
||||
};
|
||||
},
|
||||
|
||||
handleDropdown : function(show){
|
||||
this.setState({
|
||||
showDropdown : show
|
||||
});
|
||||
},
|
||||
|
||||
renderDropdown : function(dropdownChildren){
|
||||
if(!this.state.showDropdown) return null;
|
||||
|
||||
return (
|
||||
<div className='navDropdown'>
|
||||
{dropdownChildren}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
||||
render : function () {
|
||||
const dropdownChildren = React.Children.map(this.props.children, (child, i)=>{
|
||||
// Ignore the first child
|
||||
if(i < 1) return;
|
||||
return child;
|
||||
});
|
||||
return (
|
||||
<div className='navDropdownContainer'
|
||||
onMouseEnter={()=>this.handleDropdown(true)}
|
||||
onMouseLeave={()=>this.handleDropdown(false)}>
|
||||
{this.props.children[0]}
|
||||
{this.renderDropdown(dropdownChildren)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
@keyframes glideDropDown {
|
||||
0% {transform : translate(0px, -100%);
|
||||
opacity : 0;
|
||||
background-color: #333;}
|
||||
100% {transform : translate(0px, 0px);
|
||||
opacity : 1;
|
||||
background-color: #333;}
|
||||
}
|
||||
nav{
|
||||
background-color : #333;
|
||||
.navContent{
|
||||
@@ -78,4 +86,25 @@ nav{
|
||||
.navSection:last-child .navItem{
|
||||
border-left : 1px solid #666;
|
||||
}
|
||||
.navDropdownContainer{
|
||||
position: relative;
|
||||
.navDropdown {
|
||||
position : absolute;
|
||||
top : 28px;
|
||||
left : 0px;
|
||||
z-index : 10000;
|
||||
width : 100%;
|
||||
.navItem{
|
||||
animation-name: glideDropDown;
|
||||
animation-duration: 0.4s;
|
||||
position : relative;
|
||||
display : block;
|
||||
width : 100%;
|
||||
vertical-align : middle;
|
||||
padding : 8px 5px;
|
||||
border : 1px solid #888;
|
||||
border-bottom : 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,8 +40,12 @@ const SplitPane = createClass({
|
||||
},
|
||||
handleMove : function(e){
|
||||
if(!this.state.isDragging) return;
|
||||
|
||||
const minWidth = 1;
|
||||
const maxWidth = window.innerWidth - 13;
|
||||
const newSize = Math.min(maxWidth, Math.max(minWidth, e.pageX));
|
||||
this.setState({
|
||||
size : e.pageX
|
||||
size : newSize
|
||||
});
|
||||
},
|
||||
/*
|
||||
|
||||
@@ -28,5 +28,8 @@
|
||||
color : #666;
|
||||
}
|
||||
}
|
||||
&:hover{
|
||||
background-color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ body {
|
||||
p{
|
||||
overflow-wrap : break-word; //TODO: MAKE ALL MARGINS TOP-ONLY. USE * + * STYLE SELECTORS
|
||||
display : block;
|
||||
line-height : 1.3em;
|
||||
line-height : 1.25em;
|
||||
&+* {
|
||||
margin-top : 0.325cm;
|
||||
}
|
||||
@@ -90,14 +90,14 @@ body {
|
||||
ul{
|
||||
margin-bottom : 0.8em;
|
||||
padding-left : 1.4em;
|
||||
line-height : 1.3em;
|
||||
line-height : 1.25em;
|
||||
list-style-position : outside;
|
||||
list-style-type : disc;
|
||||
}
|
||||
ol{
|
||||
margin-bottom : 0.8em;
|
||||
padding-left : 1.4em;
|
||||
line-height : 1.3em;
|
||||
line-height : 1.25em;
|
||||
list-style-position : outside;
|
||||
list-style-type : decimal;
|
||||
}
|
||||
@@ -146,9 +146,9 @@ body {
|
||||
font-size : 3.5cm;
|
||||
padding-left : 40px; //Allow background color to extend into margins
|
||||
margin-left : -40px;
|
||||
margin-top :-0.3cm;
|
||||
padding-bottom :2px;
|
||||
margin-bottom :-20px;
|
||||
margin-top : -0.3cm;
|
||||
padding-bottom : 2px;
|
||||
margin-bottom : -20px;
|
||||
background-image : linear-gradient(-45deg, #322814, #998250, #322814);
|
||||
background-clip : text;
|
||||
-webkit-background-clip : text;
|
||||
@@ -162,17 +162,20 @@ body {
|
||||
//margin-top : 0px; //Font is misaligned. Shift up slightly
|
||||
//margin-bottom : 0.05cm;
|
||||
font-size : 0.75cm;
|
||||
line-height : 0.988em; //Font is misaligned. Shift up slightly
|
||||
}
|
||||
h3{
|
||||
//margin-top : -0.1cm; //Font is misaligned. Shift up slightly
|
||||
//margin-bottom : 0.1cm;
|
||||
font-size : 0.575cm;
|
||||
border-bottom : 2px solid @headerUnderline;
|
||||
line-height : 0.995em; //Font is misaligned. Shift up slightly
|
||||
}
|
||||
h4{
|
||||
//margin-top : -0.02cm; //Font is misaligned. Shift up slightly
|
||||
//margin-bottom : 0.02cm;
|
||||
font-size : 0.458cm;
|
||||
line-height : 0.971em; //Font is misaligned. Shift up slightly
|
||||
}
|
||||
h5{
|
||||
//margin-top : -0.02cm; //Font is misaligned. Shift up slightly
|
||||
@@ -180,6 +183,7 @@ body {
|
||||
font-family : ScalySansSmallCapsRemake;
|
||||
font-size : 0.423cm;
|
||||
font-weight : 900;
|
||||
line-height : 0.951em; //Font is misaligned. Shift up slightly
|
||||
& + * {
|
||||
margin-top : 0.2cm;
|
||||
}
|
||||
@@ -238,9 +242,6 @@ body {
|
||||
display : block;
|
||||
padding-bottom : 0px;
|
||||
}
|
||||
p + p {
|
||||
padding-top : .8em;
|
||||
}
|
||||
:last-child {
|
||||
margin-bottom : 0;
|
||||
}
|
||||
@@ -271,9 +272,6 @@ body {
|
||||
padding-bottom : 0px;
|
||||
line-height : 1.5em;
|
||||
}
|
||||
p + p {
|
||||
padding-top : .8em;
|
||||
}
|
||||
:last-child {
|
||||
margin-bottom : 0;
|
||||
}
|
||||
@@ -581,7 +579,7 @@ body {
|
||||
}
|
||||
p, ul{
|
||||
font-size : 0.352cm;
|
||||
line-height : 1.3em;
|
||||
line-height : 1.265em;
|
||||
}
|
||||
ul{
|
||||
margin-bottom : 0.5em;
|
||||
@@ -741,7 +739,7 @@ body {
|
||||
// *****************************/
|
||||
.page {
|
||||
dl {
|
||||
line-height : 1.3em;
|
||||
line-height : 1.25em;
|
||||
padding-left : 1em;
|
||||
white-space : pre-line;
|
||||
& + * {
|
||||
|
||||
@@ -63,7 +63,7 @@ body {
|
||||
// *****************************/
|
||||
p{
|
||||
padding-bottom : 0.8em;
|
||||
line-height : 1.3em;
|
||||
line-height : 1.269em;
|
||||
&+p{
|
||||
margin-top : -0.8em;
|
||||
}
|
||||
@@ -71,14 +71,14 @@ body {
|
||||
ul{
|
||||
margin-bottom : 0.8em;
|
||||
padding-left : 1.4em;
|
||||
line-height : 1.3em;
|
||||
line-height : 1.269em;
|
||||
list-style-position : outside;
|
||||
list-style-type : disc;
|
||||
}
|
||||
ol{
|
||||
margin-bottom : 0.8em;
|
||||
padding-left : 1.4em;
|
||||
line-height : 1.3em;
|
||||
line-height : 1.269em;
|
||||
list-style-position : outside;
|
||||
list-style-type : decimal;
|
||||
}
|
||||
@@ -126,7 +126,7 @@ body {
|
||||
font-family : Solberry;
|
||||
font-size : 10em;
|
||||
color : #222;
|
||||
line-height : 0.8em;
|
||||
line-height : 0.795em;
|
||||
}
|
||||
}
|
||||
h2{
|
||||
@@ -191,7 +191,7 @@ body {
|
||||
box-shadow : 1px 4px 14px #888;
|
||||
p, ul{
|
||||
font-size : 0.352cm;
|
||||
line-height : 1.1em;
|
||||
line-height : 1.083em;
|
||||
}
|
||||
}
|
||||
//If a note starts a column, give it space at the top to render border
|
||||
@@ -371,7 +371,7 @@ body {
|
||||
}
|
||||
p, ul{
|
||||
font-size : 0.352cm;
|
||||
line-height : 1.3em;
|
||||
line-height : 1.263em;
|
||||
}
|
||||
ul{
|
||||
margin-bottom : 0.5em;
|
||||
@@ -425,7 +425,7 @@ body {
|
||||
p{
|
||||
display : block;
|
||||
padding-bottom : 0px;
|
||||
line-height : 1.5em;
|
||||
line-height : 1.47em;
|
||||
}
|
||||
p + p {
|
||||
padding-top : .8em;
|
||||
@@ -457,7 +457,7 @@ body {
|
||||
p, p + p {
|
||||
margin : unset;
|
||||
text-indent : unset;
|
||||
line-height : 1em;
|
||||
line-height : 0.941em;
|
||||
}
|
||||
h5 {
|
||||
font-size : 1.3em;
|
||||
|
||||
Reference in New Issue
Block a user