0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 12:02:48 +00:00

update app templates for welcome messages, add new images

This commit is contained in:
Charlie Humphreys
2022-01-26 21:56:12 -06:00
parent c2ca9f8f10
commit 22b80ffbb2
12 changed files with 36 additions and 52 deletions

View File

@@ -1,27 +1,4 @@
```css
#header {
display: flex;
flex: 0 0 auto;
justify-content: space-between;
}
#header a {
color: black;
}
i.domt:before {
content: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='utf-8'%3F%3E%3Csvg version='1.1' id='Layer_3' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' height='31' width='31' viewBox='0 0 36 36' style='enable-background:new 0 0 36 36;' xml:space='preserve'%3E%3Cstyle type='text/css'%3E .st0%7Bopacity:0.9;%7D .st1%7Bfill:%23001013;%7D .st2%7Bfill:%23FFFFFF;%7D .st3%7Bfill:%23AA2A29;%7D%0A%3C/style%3E%3Cg class='st0'%3E%3Cpath d='M6.2,1.5C6,1.8,5.9,2,5.8,2.3C5.7,2.8,5.5,3.3,5.5,3.9c0,7.7,0,15.3,0,23c0,1.8,1.2,3.3,2.9,3.7c0.2,0,0.5,0.1,0.7,0.1 c6.3,0,12.7,0,19,0h0.6c-0.3-1.1-0.9-3.1-0.9-3.1l0.2,0.2c0,0,3.8,3.5,5.7,5.2c0.2,0.2,0.3,0.4,0.3,0.7c0,0.8,0,1.5,0,2.3 c-0.6-0.5-1.1-0.9-1.6-1.4c-0.9-0.8-1.8-1.6-2.6-2.3c-0.2-0.2-0.4-0.3-0.7-0.3c-7.2,0-14.3,0-21.5,0c-1.9,0-3.1-0.8-3.8-2.6 c-0.1-0.2-0.1-0.5-0.1-0.7c0-7.1,0-14.3,0-21.4V4.8C3.8,3.3,4.7,2.1,6.2,1.5z'/%3E%3C/g%3E%3Cpath class='st1' d='M28,28c0,0,0.5,1.8,0.8,2.8h-0.5c-6.4,0-12.7,0-19.1,0c-1.6,0-3.2-0.9-3.7-3.1c0-0.2,0-0.4,0-0.5 c0-7.8,0-15.7,0-23.5c0-1.8,1.4-3.4,3.2-3.5c0.3,0,0.5,0,0.8,0c7.5,0,15.1,0,22.6,0c1.2,0,2.3,0.3,3.1,1.3c0.6,0.7,0.9,1.5,0.9,2.3 c0,10.2,0,20.5,0,30.7c0,0.1,0,0.2,0,0.4c-0.4-0.3-0.7-0.6-1-0.9c-2.2-2-4.3-3.9-6.5-5.9c-0.1-0.1-0.3-0.3-0.3-0.3l-0.2-0.2L28,28z' /%3E%3Cpath class='st2' d='M35.4,33.9c-0.7-0.6-1.4-1.2-2-1.8c-1.7-1.6-3.4-3.2-5.2-4.8c-0.2-0.2-0.4-0.3-0.7-0.2 c-0.3,0.1-0.3,0.4-0.2,0.7c0.2,0.8,0.4,1.5,0.7,2.2c0,0.1,0,0.1,0,0.2c-0.1,0-0.3,0-0.4,0c-6.2,0-12.4,0-18.5,0 c-1.7,0-3-1.2-3.2-2.7c0-0.3-0.1-0.6-0.1-0.9c0-7.6,0-15.2,0-22.8c0-1,0.3-1.8,1-2.5c0.5-0.5,1.2-0.8,1.9-0.8c0.2,0,0.4,0,0.5,0 c7.6,0,15.1,0,22.7,0c0.9,0,1.7,0.2,2.4,0.8c0.7,0.7,1,1.6,1,2.5c0,3.7,0,7.5,0,11.2L35.4,33.9L35.4,33.9z'/%3E%3Cpath class='st3' d='M25.6,9.6c-1.1,4.1-2.1,8.2-3.2,12.3l-8.9-9.1L25.6,9.6z'/%3E%3Cpath class='st3' d='M31.9,18.3L23.1,22c1-4,2.1-8,3.1-11.9l0.1,0L31.9,18.3z'/%3E%3Cpath class='st3' d='M12.1,23.5c0.3-3.3,0.5-6.6,0.8-10l8.7,8.9L12.1,23.5z'/%3E%3Cpath class='st3' d='M17.4,3.8l7.6,5.1L13.3,12L17.4,3.8z'/%3E%3Cpath class='st3' d='M30.5,19.7l-6.7,6.7c-0.3-1.2-0.6-2.4-0.9-3.5L30.5,19.7z'/%3E%3Cpath class='st3' d='M22.1,23.1c0.3,1.2,0.6,2.3,1,3.5l-9.1-2.4l0-0.1L22.1,23.1z'/%3E%3Cpath class='st3' d='M31.3,16l-4.7-6.9l2.5-2L31.3,16L31.3,16z'/%3E%3Cpath class='st3' d='M12.1,12.9c-0.2,2.8-0.4,5.6-0.6,8.4l-0.1,0c-0.8-2.9-1.6-5.9-2.4-8.9L12.1,12.9z'/%3E%3Cpath class='st3' d='M26,8.5l-6.3-4.2l0-0.1l8.6,2.3L26,8.5z'/%3E%3Cpath class='st3' d='M9.5,11.7l6.1-6.3l0.1,0.1l-3.4,6.7L9.5,11.7z'/%3E%3C/svg%3E%0A");
}
```
<div id="header" class="wide">
# The Homebrewery
<div class="links" style="">
<a href="https://discord.gg/by3deKx" target="_blank" title="discord"><i class="domt"></i></a>
<a href="https://github.com/naturalcrit/homebrewery" target="_blank" title="github"><i class="fab fa-github fa-3x"></i></a>
<a href="https://www.reddit.com/r/homebrewery/" target="_blank"><i class="fab fa-reddit fa-3x" title="reddit" style="color: #FF4500"></i></a>
</div>
</div>
Welcome traveler from an antique land. Please sit and tell us of what you have seen. The unheard of monsters, who slither and bite. Tell us of the wondrous items and and artifacts you have found, their mysteries yet to be unlocked. Of the vexing vocations and surprising skills you have seen.
@@ -81,17 +58,20 @@ 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/wiki/resources).
<a href='https://discord.gg/by3deKx' target='_blank'><img src='/assets/discordOfManyThings.svg' alt='Discord of Many Things Logo' title='Discord of Many Things Logo' style='width:50px; float: right; padding-left: 10px;'/></a>
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). The Discord of Many Things is another great resource to connect with fellow homebrewers for help and feedback.
<img src='https://i.imgur.com/hMna6G0.png' style='position:absolute;bottom:50px;right:30px;width:280px' />
<img src='https://i.imgur.com/hMna6G0.png' style='position:absolute;bottom:40px;right:30px;width:280px' />
<div class='pageNumber'>1</div>
<div class='footnote'>PART 1 | FANCINESS</div>
<div style='position: absolute; top: 40px; right: 60px;'>
<a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things'><img src='/assets/discord.png' height='36px'/></a><span style='position: absolute; left: -4px; top: 40px'>Discord</span>
<a href='https://github.com/naturalcrit/homebrewery' target='_blank' title='github' style='color: black; padding-left: 10px;'><img src='/assets/github.png' height='36px'/></a><span style='position: absolute; top: 40px; left: 48px'>Github</span>
<a href='https://patreon.com/NaturalCrit' target='_blank' title='patreon' style='color: black; padding-left: 10px;'><img src='/assets/patreon.png' height='36px'/></a><span style='position: absolute; top: 40px; right: 46px'>Patreon</span>
<a href='https://www.reddit.com/r/homebrewery/' target='_blank' title='reddit' style='color: black; padding-left: 10px;'><img src='/assets/reddit.png' height='36px'/></a><span style='position: absolute; top: 40px; right: 0px;'>Reddit</span>
</div>
\page

View File

@@ -1,13 +1,3 @@
```css
.page #example + table td {
border:1px dashed #00000030;
}
.page {
padding-bottom : 1.1cm;
}
```
# The Homebrewery *V3*
Welcome traveler from an antique land. Please sit and tell us of what you have seen. The unheard of monsters, who slither and bite. Tell us of the wondrous items and and artifacts you have found, their mysteries yet to be unlocked. Of the vexing vocations and surprising skills you have seen.
@@ -44,6 +34,13 @@ If you want to save ink or have a monochrome printer, add the **PRINT → {{fas,
[naturalcrit](https://homebrew.naturalcrit.com)
}}
{{position:absolute;top:40px;right:-580px
<a href='https://discord.gg/by3deKx' target='_blank' title='discord' style='color: black;'><img src='/assets/discord.png' height='36px'/></a><span style='position: absolute; left: -6px; top: 40px'>Discord</span>
<a href='https://github.com/naturalcrit/homebrewery' target='_blank' title='github' style='color: black; padding-left: 10px;'><img src='/assets/github.png' height='36px'/></a><span style='position: absolute; top: 40px; left: 47px'>Github</span>
<a href='https://patreon.com/NaturalCrit' target='_blank' title='patreon' style='color: black; padding-left: 10px;'><img src='/assets/patreon.png' height='36px'/></a><span style='position: absolute; top: 40px; left: 93px'>Patreon</span>
<a href='https://www.reddit.com/r/homebrewery/' target='_blank' title='reddit' style='color: black; padding-left: 10px;'><img src='/assets/reddit.png' height='36px'/></a><span style='position: absolute; top: 40px; left: 147px;'>Reddit</span>
}}
{{pageNumber 1}}
{{footnote PART 1 | FANCINESS}}
@@ -79,12 +76,12 @@ 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 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
### More Homebrew Resources
<a href='https://discord.gg/by3deKx' target='_blank'><img src='/assets/discordOfManyThings.svg' alt='Discord of Many Things Logo' title='Discord of Many Things Logo' style='width:50px; float: right; padding-left: 10px;'/></a>
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). The <a href='https://discord.gg/by3deKx' target='_blank' title='Discord of Many Things'>Discord of Many Things</a> is another great resource to connect with fellow homebrewers for help and feedback.
## Markdown+
The Homebrewery aims to make homebrewing as simple as possible, providing a live editor with Markdown syntax that is more human-readable and faster to write with than raw HTML.
@@ -122,6 +119,8 @@ A blank line can be achieved with a run of one or more `:` alone on a line. More
Much nicer than `<br><br><br><br><br>`
\column
### Definition Lists
V3 uses HTML *definition lists* to create "lists" with hanging indents.
@@ -130,14 +129,12 @@ V3 uses HTML *definition lists* to create "lists" with hanging indents.
### Column Breaks
Column and page breaks with `\column` and `\page`.
\column
### Tables
Tables now allow column & row spanning between cells. This is included in some updated snippets, but a simplified example is given below.
A cell can be spanned across columns by grouping multiple pipe `|` characters at the end of a cell.
Row spanning is achieved by adding a `^` at the end of a cell just before the `|`.
Row spanning is achieved by adding a `^` at the end of a cell just before the `|`.
These can be combined to span a cell across both columns and rows. Cells must have the same colspan if they are to be rowspan'd.
@@ -164,8 +161,13 @@ 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.
{{pageNumber 2}}
{{footnote PART 2 | BORING STUFF}}
\page
## 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.
{{pageNumber 2}}
{{pageNumber 3}}
{{footnote PART 2 | BORING STUFF}}

View File

@@ -25,6 +25,7 @@ const build = async ({ bundle, render, ssr })=>{
await fs.outputFile('./build/homebrew/bundle.js', bundle);
await fs.outputFile('./build/homebrew/ssr.js', ssr);
await fs.copy('./themes/fonts', './build/fonts');
await fs.copy('./themes/assets', './build/assets');
let src = './themes/5ePhbLegacy.style.less';
//Parse brew theme files
less.render(fs.readFileSync(src).toString(), {
@@ -73,6 +74,6 @@ pack('./client/homebrew/homebrew.jsx', {
if(isDev){
livereload('./build');
watchFile('./server.js', {
watch : ['./client'] // Watch additional folders if you want
watch : ['./client', './server'] // Watch additional folders if you want
});
}

View File

@@ -4,7 +4,7 @@ const server = require('./server/app.js');
const config = require('nconf')
.argv()
.env({ lowerCase: true })
.file('environment', { file: `config/${process.env.NODE_ENV}.json` })
.file('environment', { file: `${__dirname}/config/${process.env.NODE_ENV}.json` })
.file('defaults', { file: 'config/default.json' });
DB.connect(config).then(()=>{

View File

@@ -75,7 +75,7 @@ app.use(require('./forcessl.mw.js'));
const config = require('nconf')
.argv()
.env({ lowerCase: true })
.file('environment', { file: `config/${process.env.NODE_ENV}.json` })
.file('environment', { file: `${__dirname}/../config/${process.env.NODE_ENV}.json` })
.file('defaults', { file: 'config/default.json' });
//Account Middleware

View File

@@ -6,7 +6,7 @@ const token = require('./token.js');
const config = require('nconf')
.argv()
.env({ lowerCase: true }) // Load environment variables
.file('environment', { file: `config/${process.env.NODE_ENV}.json` })
.file('environment', { file: `${__dirname}/../config/${process.env.NODE_ENV}.json` })
.file('defaults', { file: 'config/default.json' });
//let oAuth2Client;

View File

@@ -4,7 +4,7 @@ const jwt = require('jwt-simple');
const config = require('nconf')
.argv()
.env({ lowerCase: true }) // Load environment variables
.file('environment', { file: `config/${process.env.NODE_ENV}.json` })
.file('environment', { file: `${__dirname}/../config/${process.env.NODE_ENV}.json` })
.file('defaults', { file: 'config/default.json' });
// Generate an Access Token for the given User ID

BIN
themes/assets/discord.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@@ -0,0 +1 @@
<svg id="Layer_3" data-name="Layer 3" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350.028 390.552"><defs><style>.cls-1{opacity:0.9;}.cls-2{fill:#001013;}.cls-3{fill:#fff;}.cls-4{fill:#aa2a29;}</style></defs><title>Discord of Many Things blank</title><g class="cls-1"><path d="M100.991,82.743c-1.649,3.324-3.395,5.768-4.1,8.482-1.49,5.753-3.44,11.644-3.455,17.482q-.332,125.259-.141,250.519c.007,20.122,12.708,36.368,31.407,40.239a38.328,38.328,0,0,0,7.722.761q103.611,0,207.222-.088h6.314c-3.256-11.462-9.664-34.015-9.664-34.015l2.431,2.023s41.561,37.755,62.33,56.6c2.489,2.26,3.694,4.462,3.593,7.885-.241,8.186-.078,16.383-.078,25.492-6.333-5.527-11.928-10.35-17.457-15.247-9.586-8.493-19.2-16.957-28.644-25.6a10.032,10.032,0,0,0-7.39-2.774q-117.228-.1-234.457-.334c-20.632-.031-33.959-9.189-41.021-28.578-.852-2.339-.783-5.091-.784-7.653q-.057-116.5-.031-233.007V119.145C74.791,102.517,84.2,89.068,100.991,82.743Z" transform="translate(-74.79 -67.573)"/></g><path class="cls-2" d="M338.234,371.589s5.556,19.924,8.513,30.53h-5.075c-69.335,0-138.67-.1-208,.074-16.925.043-35.116-9.515-40.505-33.247a26.538,26.538,0,0,1-.379-5.827q-.027-128.172.025-256.344c.021-19.276,15.226-36.749,34.427-38.688a82.669,82.669,0,0,1,8.279-.447q123.288-.034,246.578-.067c13.265-.016,24.7,3.79,33.278,14.235a39.273,39.273,0,0,1,9.447,25.5q-.015,167.477-.012,334.955c0,1.245-.1,2.49-.2,4.645-4.075-3.565-7.6-6.552-11.018-9.655q-35.236-31.992-70.44-64.017c-1.2-1.091-3.713-3.147-3.713-3.147l-2-1.775Z" transform="translate(-74.79 -67.573)"/><path class="cls-3" d="M419.838,435.934c-7.848-6.892-15.026-12.977-21.961-19.329q-28.235-25.86-56.253-51.954c-2.314-2.157-4.59-3.247-7.356-1.784-3.036,1.607-2.77,4.676-2.022,7.359,2.286,8.2,4.817,16.338,7.24,24.5a17.108,17.108,0,0,1,.294,1.851c-1.486.084-2.872.233-4.258.233-67.363.012-134.726-.155-202.088.123-18.267.075-32.955-13.095-34.769-29.353a92.257,92.257,0,0,1-.886-10.108Q97.7,233.488,97.793,109.5c.013-10.518,3.19-20.063,11.156-27.471a31.92,31.92,0,0,1,20.439-8.917c1.948-.109,3.9-.181,5.852-.181q123.5-.014,247-.063c9.957-.012,18.894,2.145,26.329,9.1,7.956,7.441,11.177,16.934,11.214,27.457.142,40.84.057,81.681.057,122.522V435.934Z" transform="translate(-74.79 -67.573)"/><path class="cls-4" d="M311.029,170.975c-11.8,45.005-23.315,88.959-35.123,134.016l-97.168-98.883Z" transform="translate(-74.79 -67.573)"/><path class="cls-4" d="M380.8,265.712l-95.97,40.316c11.438-43.808,22.639-86.709,33.839-129.609l1.08-.272Z" transform="translate(-74.79 -67.573)"/><path class="cls-4" d="M165.3,322.955c2.91-36.463,5.761-72.179,8.709-109.116l94.711,96.472Z" transform="translate(-74.79 -67.573)"/><path class="cls-4" d="M223.458,107.926l83.127,55.063L178.71,196.919Z" transform="translate(-74.79 -67.573)"/><path class="cls-4" d="M366.285,281.366l-72.5,73.414c-3.524-13.182-6.849-25.617-10.306-38.549Z" transform="translate(-74.79 -67.573)"/><path class="cls-4" d="M274.874,318.478c3.445,12.8,6.765,25.143,10.376,38.559l-98.635-26.556.032-1.153Z" transform="translate(-74.79 -67.573)"/><path class="cls-4" d="M374.888,241.261l-51.71-75.57,26.8-21.529,25.831,96.619Z" transform="translate(-74.79 -67.573)"/><path class="cls-4" d="M165.492,207.523c-2.39,30.748-4.736,60.942-7.083,91.135l-1.063.159c-8.5-31.936-17-63.872-25.705-96.581Z" transform="translate(-74.79 -67.573)"/><path class="cls-4" d="M317.039,159.316l-68.251-45.24.307-.794,93.794,25.212Z" transform="translate(-74.79 -67.573)"/><path class="cls-4" d="M136.517,193.952,203.5,125.03l1.086.832L167.794,198.9Z" transform="translate(-74.79 -67.573)"/></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

BIN
themes/assets/github.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

BIN
themes/assets/patreon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
themes/assets/reddit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB