commit b7d49fda6572c3a0b90fcac0eacbfd3304f6b962 Author: Anthony Correa Date: Thu Jun 27 13:32:19 2024 -0500 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..2786221 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# Newspaper Styled Journal +A olde timey newspaper sheet theme for FoundryVTT \ No newline at end of file diff --git a/dist/module.zip b/dist/module.zip new file mode 100644 index 0000000..6137e87 Binary files /dev/null and b/dist/module.zip differ diff --git a/src/artwork/newspaper-title-flourish.svg b/src/artwork/newspaper-title-flourish.svg new file mode 100644 index 0000000..2a7a109 --- /dev/null +++ b/src/artwork/newspaper-title-flourish.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/module.json b/src/module.json new file mode 100644 index 0000000..ea313f7 --- /dev/null +++ b/src/module.json @@ -0,0 +1,21 @@ +{ + "id": "asc-newspaper-style-journal", + "title": "Newspaper Styled Journal", + "description": "A olde timey newspaper sheet theme", + "version": "0.1.0", + "compatibility": { + "minimum": "12", + "verified": "12" + }, + "authors": ["lmxsdl"], + "scripts": [], + "esmodules": [ + "scripts/newspaper.js" + ], + "styles": [ + "styles/newspaper.css" + ], + "relationships": { + "requires": [ + ]} +} \ No newline at end of file diff --git a/src/scripts/newspaper.js b/src/scripts/newspaper.js new file mode 100644 index 0000000..ec4ab15 --- /dev/null +++ b/src/scripts/newspaper.js @@ -0,0 +1,19 @@ +class Newspaper extends JournalSheet { + static get defaultOptions() { + return foundry.utils.mergeObject(super.defaultOptions, { + classes: [...super.defaultOptions.classes, "newspaper"], + }); + } +} + +Hooks.on("init", (documentTypes) => { +console.log("Custom Journals | Registering the module's sheets."); + +DocumentSheetConfig.registerSheet(Journal, "asc-newsaer-style-journal", Newspaper, { + label: "Newspaper", + types: ["base"], + makeDefault: false +}); + +console.log("Custom Journals | Ready.") +}); diff --git a/src/styles/newspaper.css b/src/styles/newspaper.css new file mode 100644 index 0000000..5e96ebe --- /dev/null +++ b/src/styles/newspaper.css @@ -0,0 +1,169 @@ +/* + Thanks, attributions & links + ************************************* + Parchment, by FilterForge : https://www.flickr.com/photos/filterforge/9340122531 +*/ + +@import url('https://fonts.googleapis.com/css2?family=Noticia+Text:ital,wght@0,400;0,700;1,400;1,700&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=UnifrakturCook:wght@700&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&display=swap'); + +body { + --newspaper-background-texture-image: url(../textures/parchment.jpg); + --newspaper-headline-font: 'Noticia Text'; + --newspaper-base-font: 'EB Garamond'; + --newspaper-name-font: 'UnifrakturCook'; +} + +/************************************************ + Headers and text +************************************************/ + +.newspaper h1, +.newspaper h2 { + border-bottom: 0px; + font-family: var(--newspaper-headline-font); + line-height: 85%; +} + +.newspaper .journal-entry-page { + font-family: var(--newspaper-base-font) !important; +} + +.newspaper div.newspaper-content { + column-count: 2; + text-align: justify; +} + +.newspaper div.newspaper-content p:first-child{ + margin-top: 0; +} + +.newspaper h1.newspaper-date { + display: none; +} + +.newspaper p.newspaper-date { + column-count: 1; + text-align: end; + font-size: xx-small; +} + +.newspaper p.newspaper-name { + column-count: 1; + font-family: var(--newspaper-name-font); + font-size: 5em; + margin: 8px; + text-align: center; +} + +.newspaper .scrollable { + padding: 0.5rem; +} + +.newspaper .newspaper-name:before, .newspaper .newspaper-name:after { + display: none; + content: ''; + background-image: url(../artwork/newspaper-title-flourish.svg); + background-size: 1em 1em; + height: 1em; + width: 1em; +} + +.newspaper .newspaper-name:before { + margin-right: 0.2ch; +} + +.newspaper .newspaper-name:after { + margin-left: 0.2ch; +} + +.newspaper p.newspaper-tagline { + column-count: 1; + /* font-size: 2.8em; */ + font-style: italic; + text-align: center; + border: black solid; + font-size: x-small; +} + +.newspaper h2 { + font-size: xxx-large; + text-align: center; + font-weight: bold; + text-transform: uppercase; +} + +.newspaper img { + height: 300px; +} + +.newspaper .journal-entry-content div:has(img){ + text-align: center; +} + +.newspaper blockquote p{ + column-count: 1; + text-align: center; +} + +.newspaper blockquote { + margin: 0; + padding: inherit; + border: none; + font-style: italic; + column-count: 1-count +} + +.newspaper .editor-content>h3 { + font-size: 2.4em; +} + +.newspaper .editor-content>p, .newspaper .editor-content>ul { + font-size: 2.2em; +} + +/* MEME minimal compatibility */ + +.newspaper .CodeMirror p, +.newspaper .CodeMirror ul { + font-family: var(--newspaper-base-font); + font-size: 2.2em; +} + +/************************************************ + Special text and highlights +************************************************/ + +/* Modifies Polyglot CSS */ + +.newspaper .polyglot-journal { + background-color: #b38e4c60; +} + +/************************************************ + Background and various window elements +************************************************/ + +/* Background */ + +.newspaper .window-content .journal-entry-content .single-page { + background: var(--newspaper-background-texture-image); + background-size: cover; +} + +/* + One Journal compatibility +*/ + +/* Background with OneJournal */ + +#OneJournalShell .newspaper.one-journal-attached .window-content .single-page { + background: var(--newspaper-background-texture-image); +} + +/* Entry title underline with OneJournal */ + +/* .newspaper.one-journal-attached form input[name="name"] { + border-width: 0; +} */ \ No newline at end of file diff --git a/src/textures/parchment.jpg b/src/textures/parchment.jpg new file mode 100644 index 0000000..43d0e57 Binary files /dev/null and b/src/textures/parchment.jpg differ diff --git a/zip-for-release.sh b/zip-for-release.sh new file mode 100644 index 0000000..4ae82cb --- /dev/null +++ b/zip-for-release.sh @@ -0,0 +1 @@ +git archive --format zip --output dist/module.zip master:src \ No newline at end of file