0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-22 08:58:11 +00:00

Merge branch 'master' into moveSnippetImages

This commit is contained in:
David Bolack
2026-01-27 20:25:11 -06:00
102 changed files with 2432 additions and 2136 deletions

View File

@@ -1,14 +1,14 @@
/* eslint-disable max-lines */
const MagicGen = require('./snippets/magic.gen.js');
const ClassTableGen = require('./snippets/classtable.gen.js');
const MonsterBlockGen = require('./snippets/monsterblock.gen.js');
const ClassFeatureGen = require('./snippets/classfeature.gen.js');
const CoverPageGen = require('./snippets/coverpage.gen.js');
const TableOfContentsGen = require('./snippets/tableOfContents.gen.js');
const dedent = require('dedent-tabs').default;
import MagicGen from './snippets/magic.gen.js';
import ClassTableGen from './snippets/classtable.gen.js';
import MonsterBlockGen from './snippets/monsterblock.gen.js';
import ClassFeatureGen from './snippets/classfeature.gen.js';
import CoverPageGen from './snippets/coverpage.gen.js';
import TableOfContentsGen from './snippets/tableOfContents.gen.js';
import dedent from 'dedent';
module.exports = [
export default [
{
groupName : 'Text Editor',

View File

@@ -1,6 +1,6 @@
const _ = require('lodash');
import _ from 'lodash';
module.exports = function(classname){
export default function(classname){
classname = _.sample(['archivist', 'fancyman', 'linguist', 'fletcher',
'notary', 'berserker-typist', 'fishmongerer', 'manicurist', 'haberdasher', 'concierge']);

View File

@@ -1,4 +1,4 @@
const _ = require('lodash');
import _ from 'lodash';
const features = [
'Astrological Botany',
@@ -50,7 +50,7 @@ const getFeature = (level)=>{
return res.join(', ');
};
module.exports = {
export default {
full : function(){
const classname = _.sample(classnames);

View File

@@ -1,4 +1,4 @@
const _ = require('lodash');
import _ from 'lodash';
const titles = [
'The Burning Gallows',
@@ -98,7 +98,7 @@ const subtitles = [
];
module.exports = ()=>{
export default ()=>{
return `<style>
.phb#p1{ text-align:center; }
.phb#p1:after{ display:none; }

View File

@@ -1,10 +1,10 @@
const _ = require('lodash');
import _ from 'lodash';
const ClassFeatureGen = require('./classfeature.gen.js');
import ClassFeatureGen from './classfeature.gen.js';
const ClassTableGen = require('./classtable.gen.js');
import ClassTableGen from './classtable.gen.js';
module.exports = function(){
export default function(){
const classname = _.sample(['Archivist', 'Fancyman', 'Linguist', 'Fletcher',
'Notary', 'Berserker-Typist', 'Fishmongerer', 'Manicurist', 'Haberdasher', 'Concierge']);

View File

@@ -1,4 +1,4 @@
const _ = require('lodash');
import _ from 'lodash';
const spellNames = [
'Astral Rite of Acne',
@@ -48,7 +48,7 @@ const spellNames = [
'Ultimate Ritual of Mouthwash',
];
module.exports = {
export default {
spellList : function(){
const levels = ['Cantrips (0 Level)', '1st Level', '2nd Level', '3rd Level', '4th Level', '5th Level', '6th Level', '7th Level', '8th Level', '9th Level'];

View File

@@ -1,4 +1,4 @@
const _ = require('lodash');
import _ from 'lodash';
const genList = function(list, max){
return _.sampleSize(list, _.random(0, max)).join(', ') || 'None';
@@ -137,7 +137,7 @@ const genAction = function(){
};
module.exports = {
export default {
full : function(){
return `${[

View File

@@ -1,4 +1,4 @@
const _ = require('lodash');
import _ from 'lodash';
const getTOC = (pages)=>{
const add1 = (title, page)=>{
@@ -47,7 +47,7 @@ const getTOC = (pages)=>{
return res;
};
module.exports = function(props){
export default function(props){
const pages = props.brew.text.split('\\page');
const TOC = getTOC(pages);
const markdown = _.reduce(TOC, (r, g1, idx1)=>{

View File

@@ -1,4 +1,4 @@
module.exports = [
export default [
];

View File

@@ -1,17 +1,14 @@
/* eslint-disable max-lines */
import MagicGen from './snippets/magic.gen.js';
import ClassTableGen from './snippets/classtable.gen.js';
import MonsterBlockGen from './snippets/monsterblock.gen.js';
import scriptGen from './snippets/script.gen.js';
import ClassFeatureGen from './snippets/classfeature.gen.js';
import CoverPageGen from './snippets/coverpage.gen.js';
import QuoteGen from './snippets/quote.gen.js';
import dedent from 'dedent';
const MagicGen = require('./snippets/magic.gen.js');
const ClassTableGen = require('./snippets/classtable.gen.js');
const MonsterBlockGen = require('./snippets/monsterblock.gen.js');
const scriptGen = require('./snippets/script.gen.js');
const ClassFeatureGen = require('./snippets/classfeature.gen.js');
const CoverPageGen = require('./snippets/coverpage.gen.js');
const QuoteGen = require('./snippets/quote.gen.js');
const dedent = require('dedent-tabs').default;
module.exports = [
export default [
{
groupName : 'Style Editor',
icon : 'fas fa-pencil-alt',

View File

@@ -1,7 +1,7 @@
const _ = require('lodash');
const dedent = require('dedent-tabs').default;
import _ from 'lodash';
import dedent from 'dedent';
module.exports = function(classname){
export default function(classname){
classname = _.sample(['archivist', 'fancyman', 'linguist', 'fletcher',
'notary', 'berserker-typist', 'fishmongerer', 'manicurist', 'haberdasher', 'concierge']);

View File

@@ -1,5 +1,5 @@
const _ = require('lodash');
const dedent = require('dedent-tabs').default;
import _ from 'lodash';
import dedent from 'dedent';
const features = [
'Astrological Botany', 'Biochemical Sorcery', 'Civil Divination',
@@ -18,7 +18,7 @@ const classnames = [
'Haberdasher', 'Manicurist', 'Netrunner', 'Weirkeeper'
];
module.exports = {
export default {
non : function(snippetClasses){
return dedent`
{{${snippetClasses}

View File

@@ -1,5 +1,5 @@
const _ = require('lodash');
const dedent = require('dedent-tabs').default;
import _ from 'lodash';
import dedent from 'dedent';
const titles = [
'The Burning Gallows', 'The Ring of Nenlast',
@@ -78,7 +78,7 @@ const coverText = [
'Enter a world of wonder and danger, where you can find allies and enemies among the various races and factions that inhabit it. You can choose to join or oppose any of them, or forge your own path. The game world is alive and responsive to your actions.'
];
module.exports = {
export default {
front : function() {
return dedent`

View File

@@ -1,10 +1,9 @@
const _ = require('lodash');
import _ from 'lodash';
const ClassFeatureGen = require('./classfeature.gen.js');
import ClassFeatureGen from './classfeature.gen.js';
import ClassTableGen from './classtable.gen.js';
const ClassTableGen = require('./classtable.gen.js');
module.exports = function(){
export default function(){
const classname = _.sample(['Archivist', 'Fancyman', 'Linguist', 'Fletcher',
'Notary', 'Berserker-Typist', 'Fishmongerer', 'Manicurist', 'Haberdasher', 'Concierge']);

View File

@@ -1,4 +1,4 @@
const _ = require('lodash');
import _ from 'lodash';
const spellNames = [
'Astral Rite of Acne',
@@ -54,7 +54,7 @@ const itemNames = [
'Staff of Endless Confetti',
];
module.exports = {
export default {
spellList : function(){
const levels = ['Cantrips (0 Level)', '1st Level', '2nd Level', '3rd Level', '4th Level', '5th Level', '6th Level', '7th Level', '8th Level', '9th Level'];

View File

@@ -1,5 +1,5 @@
const _ = require('lodash');
const dedent = require('dedent-tabs').default;
import _ from 'lodash';
import dedent from 'dedent';
const genList = function(list, max){
return _.sampleSize(list, _.random(0, max)).join(', ') || 'None';
@@ -152,7 +152,7 @@ const genAction = function(){
};
module.exports = {
export default {
monster : function(classes, genLines){
return dedent`

View File

@@ -1,4 +1,4 @@
const _ = require('lodash');
import _ from 'lodash';
const quotes = [
'The sword glinted in the dim light, its edges keen and deadly. As the adventurer reached for it, he couldn\'t help but feel a surge of excitement mixed with fear. This was no ordinary blade.',
@@ -40,7 +40,7 @@ const books = [
'Frost and Fury',
];
module.exports = ()=>{
export default ()=>{
return `
{{quote
${_.sample(quotes)}

View File

@@ -1,7 +1,7 @@
const _ = require('lodash');
const dedent = require('dedent-tabs').default;
import _ from 'lodash';
import dedent from 'dedent';
module.exports = {
export default {
dwarvish : ()=>{
return dedent `##### Dwarvish Runes: Sample Alphabet
{{runeTable,wide,frame,font-family:Davek

View File

@@ -1,5 +1,5 @@
const _ = require('lodash');
import _ from 'lodash';
module.exports = ()=>{
export default ()=>{
return `{{watercolor${_.random(1, 12)},top:20px,left:30px,width:300px,background-color:#BBAD82,opacity:80%}}\n\n`;
};

View File

@@ -615,6 +615,7 @@
text-align : center;
-webkit-text-stroke : 0.1cm black;
paint-order : stroke;
text-transform : none;
}
.logo {
position : absolute;

View File

@@ -1,19 +1,18 @@
/* eslint-disable max-lines */
import dedent from 'dedent';
import WatercolorGen from './snippets/watercolor.gen.js';
import ImageMaskGen from './snippets/imageMask.gen.js';
import FooterGen from './snippets/footer.gen.js';
import LicenseGenWotC from './snippets/licenseWotC.gen.js';
import LicenseGenGNU from './snippets/licenseGNU.gen.js';
import LicenseGen from './snippets/license.gen.js';
import LicenseGenAelf from './snippets/licenseAELF.js';
import LicenseDTTRPGGCC from './snippets/licenseDTRPGCC.gen.js';
import LicenseMongoosePublishing from './snippets/licenseMongoose.gen.js';
import TableOfContentsGen from './snippets/tableOfContents.gen.js';
import indexGen from './snippets/index.gen.js';
const WatercolorGen = require('./snippets/watercolor.gen.js');
const ImageMaskGen = require('./snippets/imageMask.gen.js');
const FooterGen = require('./snippets/footer.gen.js');
const LicenseGenWotC = require('./snippets/licenseWotC.gen.js');
const LicenseGenGNU = require('./snippets/licenseGNU.gen.js');
const LicenseGen = require('./snippets/license.gen.js');
const LicenseGenAelf = require('./snippets/licenseAELF.js');
const LicenseDTTRPGGCC = require('./snippets/licenseDTRPGCC.gen.js');
const LicenseMongoosePublishing = require('./snippets/licenseMongoose.gen.js');
const dedent = require('dedent-tabs').default;
const TableOfContentsGen = require('./snippets/tableOfContents.gen.js');
const indexGen = require('./snippets/index.gen.js');
module.exports = [
export default [
{
groupName : 'Text Editor',
@@ -209,7 +208,7 @@ module.exports = [
view : 'text',
snippets : [
{
name : 'AELF',
name : 'AELF',
subsnippets : [
{
name : 'Title Page Declaration',
@@ -329,51 +328,51 @@ module.exports = [
]
},
{
name : 'DTRPG Community Content',
incon : 'fab fa-dtrpg',
name : 'DTRPG Community Content',
incon : 'fab fa-dtrpg',
subsnippets : [
{
name : "Chronicle System Guild Colophon",
name : 'Chronicle System Guild Colophon',
gen : LicenseDTTRPGGCC.greenRoninChronicleSystemGuildColophon,
},
{
name : 'Green Ronin\'s Age Creator\'s Alliance',
name : 'Green Ronin\'s Age Creator\'s Alliance',
subsnippets : [
{
name : "Required Text",
name : 'Required Text',
subsnippets : [
{
name : "Colophon",
name : 'Colophon',
gen : LicenseDTTRPGGCC.greenRoninAgeCreatorsAllianceColophon,
},
{
name : "Cover",
name : 'Cover',
gen : LicenseDTTRPGGCC.greenRoninAgeCreatorsAllianceCover,
},
]
},
{
name : "Logos",
name : 'Logos',
subsnippets : [
{
name : "Age",
name : 'Age',
gen : LicenseDTTRPGGCC.greenRoninAgeCreatorsAllianceLogo,
},
{
name : "Blue Rose",
name : 'Blue Rose',
gen : LicenseDTTRPGGCC.greenRoninAgeCreatorsAllianceBlueRoseLogo,
},
{
name : "Fantasy Age Compatible",
name : 'Fantasy Age Compatible',
gen : LicenseDTTRPGGCC.greenRoninAgeCreatorsAllianceFantasyAgeCompatible,
},
{
name : "Modern AGE Compatible",
name : 'Modern AGE Compatible',
gen : LicenseDTTRPGGCC.greenRoninAgeCreatorsAllianceModernAGECompatible,
},
]
@@ -382,30 +381,30 @@ module.exports = [
},
{
name : "Hero Kid\'s Creators Guild",
name : 'Hero Kid\'s Creators Guild',
subsnippets : [
{
name: "Required Text",
name : 'Required Text',
subsnippets : [
{
name : "heroForgeHeroKidsCreatorsGuildColophon",
name : 'heroForgeHeroKidsCreatorsGuildColophon',
gen : LicenseDTTRPGGCC.heroForgeHeroKidsCreatorsGuildColophon,
},
{
name : "heroForgeHeroKidsCreatorsGuildSuperKidsColophon",
name : 'heroForgeHeroKidsCreatorsGuildSuperKidsColophon',
gen : LicenseDTTRPGGCC.heroForgeHeroKidsCreatorsGuildSuperKidsColophon,
},
{
name : "heroForgeHeroKidsCreatorsGuildCover",
name : 'heroForgeHeroKidsCreatorsGuildCover',
gen : LicenseDTTRPGGCC.heroForgeHeroKidsCreatorsGuildCover,
},
{
name : "heroForgeHeroKidsCreatorsGuildSuperKidsCover",
name : 'heroForgeHeroKidsCreatorsGuildSuperKidsCover',
gen : LicenseDTTRPGGCC.heroForgeHeroKidsCreatorsGuildSuperKidsCover,
},
]
@@ -414,33 +413,33 @@ module.exports = [
},
{
name : "Travellers' Aid Society",
name : 'Travellers\' Aid Society',
subsnippets : [
{
name : "Legal Statement",
name : 'Legal Statement',
gen : LicenseMongoosePublishing.TASLegal,
}
]
},
{
name : "Super-Powered by M&M",
name : 'Super-Powered by M&M',
subsnippets : [
{
name : "Required Text",
name : 'Required Text',
subsnippets : [
{
name : "Colophon",
name : 'Colophon',
gen : LicenseDTTRPGGCC.greenRoninSuperPoweredMMColophon,
},
{
name : "Cover",
name : 'Cover',
gen : LicenseDTTRPGGCC.greenRoninSuperPoweredMMCover,
},
{
name : "Section 15",
name : 'Section 15',
gen : LicenseDTTRPGGCC.greenRoninSuperPoweredMMSection15,
},
]

View File

@@ -1,6 +1,6 @@
import Markdown from '../../../../shared/markdown.js';
module.exports = {
export default {
createFooterFunc : function(headerSize=1){
return (props)=>{
const cursorPos = props.cursorPos;

View File

@@ -1,7 +1,7 @@
const _ = require('lodash');
const dedent = require('dedent-tabs').default;
import _ from 'lodash';
import dedent from 'dedent';
module.exports = {
export default {
center : ()=>{
return dedent`
{{imageMaskCenter${_.random(1, 16)},--offsetX:0%,--offsetY:0%,--rotation:0

View File

@@ -1,6 +1,6 @@
const dedent = require('dedent-tabs').default;
import dedent from 'dedent';
module.exports = ()=>{
export default ()=>{
return dedent`
{{index,wide,columns:5;
##### Index

View File

@@ -1,11 +1,11 @@
/* eslint-disable max-lines */
const dedent = require('dedent');
import dedent from 'dedent';
// Small and one-off licenses
// Licenses in this file consist of one or two functions at most. If something is larger,
// Licenses in this file consist of one or two functions at most. If something is larger,
// has more assets, or variations, break it out into a distinct file.
module.exports = {
export default {
mit : function () {
return dedent`

View File

@@ -1,9 +1,9 @@
/* eslint-disable max-lines */
const dedent = require('dedent');
import dedent from 'dedent';
// AELF License
module.exports = {
export default {
aelfTitleNotice : function() {
return `This work includes AELF Open Gaming Content, which may only be used under the terms of the AELF Open License version 1.0a. This product is not endorsed or reviewed by Mythmere Games LLC or any other contributor of AELF Open Gaming Content and does not represent the views of Mythmere Games LLC any other contributor.`;
},

View File

@@ -1,9 +1,9 @@
/* eslint-disable max-lines */
const dedent = require('dedent');
import dedent from 'dedent';
// DriveThruRPG/OneBookShelf Community Content Programs
module.exports = {
export default {
// Alligator Alley Entertainment Starforger's Guild
alligatorAlleyEntertainmentStarforgersGuildColophon : function() {
return dedent `
@@ -168,8 +168,8 @@ module.exports = {
`;
},
// Monte Cook's Cypher License
monteCookCypherCover : `Requires the Cypher System Rulebook from Monte Cook Games. Distributed through the Cypher System CreatorTM at DriveThruRPG.`,
monteCookCypherColophon : function() {
monteCookCypherCover : `Requires the Cypher System Rulebook from Monte Cook Games. Distributed through the Cypher System CreatorTM at DriveThruRPG.`,
monteCookCypherColophon : function() {
return dedent`
This product was created under license. CYPHER SYSTEM and its logo, and CYPHER SYSTEM CREATOR and its logo, are trademarks of Monte Cook Games, LLC in the U.S.A. and other countries. All Monte Cook Games characters and character names, and the distinctive likenesses thereof, are trademarks of Monte Cook Games, LLC. [](www.montecookgames.com)

View File

@@ -1,9 +1,9 @@
/* eslint-disable max-lines */
const dedent = require('dedent');
import dedent from 'dedent';
// GNU Licenses
module.exports = {
export default {
gpl3 : function () {
return dedent`{{license,wide

View File

@@ -1,9 +1,9 @@
/* eslint-disable max-lines */
const dedent = require('dedent');
import dedent from 'dedent';
// Mongoose Publishing Licenses
module.exports = {
export default {
fairUseLong : function() {
return `The Traveller, 2300AD and Twilight: 2000 games in all forms are owned by Mongoose Publishing. Copyright 1977 - 2025 Mongoose Publishing. Traveller is a registered trademark of Mongoose Publishing. Mongoose Publishing permits web sites and fanzines for this game, provided it contains this notice, that Mongoose Publishing is notified, and subject to a withdrawal of permission on 90 days notice. The contents of this site are for personal, non-commercial use only. Any use of Mongoose Publishing's copyrighted material or trademarks anywhere on this web site and its files should not be viewed as a challenge to those copyrights or trademarks. In addition, any program/articles/file on this site cannot be republished or distributed without the consent of the author who contributed it.\n\n`;
},

View File

@@ -1,7 +1,7 @@
/* eslint-disable max-lines */
const dedent = require('dedent');
module.exports = {
import dedent from 'dedent';
export default {
ogl1a : function () {
return dedent`
{{license,wide

View File

@@ -1,4 +1,4 @@
const dedent = require('dedent-tabs').default;
import dedent from 'dedent';
// Map each actual page to its footer label, accounting for skips or numbering resets
const mapPages = (pages)=>{
@@ -65,7 +65,7 @@ const getTOC = ()=>{
return getMarkdown(headings, pageMap);
};
module.exports = function(props){
export default function(props){
const TOC = getTOC();
return dedent`

View File

@@ -1,5 +1,5 @@
const _ = require('lodash');
import _ from 'lodash';
module.exports = ()=>{
export default ()=>{
return `{{watercolor${_.random(1, 12)},top:20px,left:30px,width:300px,background-color:#BBAD82,opacity:80%}}\n\n`;
};

View File

@@ -1,4 +1,4 @@
module.exports = [
export default [
];

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 143 KiB