diff --git a/src/module.json b/src/module.json index f82997e..d28f2e3 100644 --- a/src/module.json +++ b/src/module.json @@ -6,6 +6,9 @@ "minimum": "12", "verified": "12" }, - "scripts": ["scripts/main.js"], - "styles": ["styles/starwars-journal.css"] + "esmodules": ["scripts/asc-starwars.js"], + "styles": [ + "styles/asc-ffg-starwars.css", + "styles/asc-starwars-journal.css" + ] } \ No newline at end of file diff --git a/src/scripts/asc-starwars.js b/src/scripts/asc-starwars.js new file mode 100644 index 0000000..06a44f1 --- /dev/null +++ b/src/scripts/asc-starwars.js @@ -0,0 +1,11 @@ +import {StarWarsStyleJournalSheet} from "./journalSheets.js" +// ui.notifications.info +// Register the custom journal sheet + +Hooks.once('ready', () => { + console.log('ASC Star Wars Style Journal | Registering custom sheet...'); + Journal.registerSheet('asc-starwars-style-journal', StarWarsStyleJournalSheet, { + label: 'Star Wars Style Journal', + makeDefault: false // Set to true if you want this as the default + }); +}); \ No newline at end of file diff --git a/src/scripts/journalSheets.js b/src/scripts/journalSheets.js new file mode 100644 index 0000000..6001726 --- /dev/null +++ b/src/scripts/journalSheets.js @@ -0,0 +1,7 @@ +export class StarWarsStyleJournalSheet extends JournalSheet { + static get defaultOptions() { + return mergeObject(super.defaultOptions, { + classes: [...(super.defaultOptions.classes || []), 'asc-starwars-customsheet'], + }); + } +} \ No newline at end of file diff --git a/src/scripts/main.js b/src/scripts/main.js deleted file mode 100644 index bbb172f..0000000 --- a/src/scripts/main.js +++ /dev/null @@ -1,23 +0,0 @@ -class StarWarsJournalSheet extends JournalSheet { - static get defaultOptions() { - const options = super.defaultOptions; - options.classes.push('asc-starwars-journal-sheet'); - return options; - } - } - -Hooks.on("ready", function() { - console.log("Star Wars Style Journal | Registering the module's sheets."); - //This code runs once the Foundry VTT software begins its initialization workflow - DocumentSheetConfig.registerSheet(Journal, "asc-starwars-style-journal", StarWarsJournalSheet, { - label: "Star Wars", - types: ["base"], - makeDefault: false - }); - - console.log("Star Wars Style Journal | Ready.") -}); - -Hooks.on("ready", function() { - //This code runs once core initialization is ready and game data is available. -}); \ No newline at end of file diff --git a/src/styles/asc-ffg-starwars.css b/src/styles/asc-ffg-starwars.css new file mode 100644 index 0000000..e69de29 diff --git a/src/styles/asc-starwars-journal.css b/src/styles/asc-starwars-journal.css new file mode 100644 index 0000000..614c7ad --- /dev/null +++ b/src/styles/asc-starwars-journal.css @@ -0,0 +1,101 @@ +@font-face { + font-family: "News Cycle"; + src: url("../fonts/NewsCycle-Regular.ttf"); +} +@font-face { + font-family: "News Cycle"; + font-weight: bold; + src: url("../fonts/NewsCycle-Bold.ttf"); +} + +@font-face { + font-family: StarJedi; + src: url("../fonts/StarJedi-DGRW.woff"); +} + +@font-face { + font-family: SWCrawlTitle; + src: url("../fonts/SWCrawlTitle.ttf"); +} + +@font-face { + font-family: SWCrawlBody; + src: url("../fonts/SWCrawlBody.ttf"); +} + +.asc-starwars-customsheet .journal-entry-content, .editor-container { + background-image:url(../artwork/stars.png) !important; + background-repeat:repeat !important; + background-position:center top !important; + background-color:black !important; + color: #ffd54e; + font-family:SWCrawlBody; + padding-top: 2rem; + + .journal-header { + display: none; + } + + .editor-content { + padding-top: 1rem; + } + + article { + transform:perspective(300px) rotateX(10deg); + } + + article, .editor-content { + font-size:larger; + width:80%; + margin:auto; + + a.content-link { + background: inherit; + text-transform: uppercase; + border: none; + font-weight: 900; + } + + &.editor-content { + p, strong, em { + border: #686868BF 1px solid; + } + } + + h1 { + text-align:center; + border-bottom:none; + font-size:inherit; + line-height:1.5em; + } + + h2 { + text-align:center; + padding-bottom: 8px; + border-bottom:solid #ffffff4a 1.1px; + font-size:xxx-large; + text-transform: lowercase; + font-family:"SWCrawlTitle"; + } + + em, strong { + text-transform:uppercase; + font-weight:bold; + font-size:1.2em; + font-style: inherit; + } + + strong { + + padding-right:.5em; + } + + p { + text-align:justify; + margin-bottom: 1em; + line-height:1.35em; + } + + } + +} \ No newline at end of file diff --git a/src/styles/starwars-journal.css b/src/styles/starwars-journal.css deleted file mode 100644 index 5edeeb4..0000000 --- a/src/styles/starwars-journal.css +++ /dev/null @@ -1,89 +0,0 @@ -@font-face { - font-family: "News Cycle"; - src: url("../fonts/NewsCycle-Regular.ttf"); -} -@font-face { - font-family: "News Cycle"; - font-weight: bold; - src: url("../fonts/NewsCycle-Bold.ttf"); -} - -@font-face { - font-family: StarJedi; - src: url("../fonts/StarJedi-DGRW.woff"); -} - -@font-face { - font-family: SWCrawlTitle; - src: url("../fonts/SWCrawlTitle.ttf"); -} - -@font-face { - font-family: SWCrawlBody; - src: url("../fonts/SWCrawlBody.ttf"); -} - -.asc-starwars-journal-sheet p a.content-link { - background: inherit; - text-transform: uppercase; - border: none; - font-weight: 900; -} - -.asc-starwars-journal-sheet p a.mention, -.asc-starwars-journal-sheet p a.entity-mention, -.asc-starwars-journal-sheet p a.mention em, -.asc-starwars-journal-sheet p a.entity-mention em{ - color: inherit; - text-transform: uppercase; - font-style: inherit; - font-weight: 900; -} - -.asc-starwars-journal-sheet .single-page{ - background-image:url(../artwork/stars.png); - background-repeat:repeat; - background-position:center top; - background-color:black; -} - -.asc-starwars-journal-sheet article h1 { - text-align:center; - border-bottom:none; - font-size:inherit; - line-height:1.5em; -} - -.asc-starwars-journal-sheet article h2{ - text-align:center; - padding-bottom: 8px; - border-bottom:solid white 1.1px; - font-size:210%; - text-transform: lowercase; - font-family:"SWCrawlTitle"; -} - -.asc-starwars-journal-sheet article { - font-family:SWCrawlBody; -} - -.asc-starwars-journal-sheet article p{ - text-align:justify; - margin-bottom: 1em; - line-height:1.35em; -} - -.asc-starwars-journal-sheet article .hook{ - text-transform:uppercase; - font-weight:bold; - padding-right:.5em; - font-size:1.2em -} - -.asc-starwars-journal-sheet article { - color:#ffd54e; - font-size:larger; - width:80%; - margin:auto; - transform:perspective(300px) rotateX(10deg) -} \ No newline at end of file