2 Commits

Author SHA1 Message Date
e637d8e806 Add copy button to Star Wars Style Journal
- Added a copy button to the Star Wars Style Journal sheet.
- The copy button allows users to easily copy the content of the journal to their clipboard.
- A notification is displayed upon successful copying.
2025-03-02 11:39:01 -06:00
add2f1d091 Squashed commit of the following:
All checks were successful
Release Creation / build (release) Successful in 19s
commit 1edb07dbb8
Author: Anthony Correa <a@correa.co>
Date:   Fri Feb 7 15:09:39 2025 -0600

    Update module version to 0.3.1

    - Updated the module version from 0.3.0 to 0.3.1 in the module.json file.

commit 8734cdb64e
Author: Anthony Correa <a@correa.co>
Date:   Fri Feb 7 15:06:44 2025 -0600

    Update font-family and font-style for actor header fields

commit ee5302c2fd
Author: Anthony Correa <a@correa.co>
Date:   Fri Feb 7 15:05:31 2025 -0600

    Remove unused font-face declaration

    - Removed unused font-face declaration for 'StarJedi' from the CSS file.
    - This change aims to reduce unnecessary code and improve file size efficiency.
    - No impact on existing styles or functionality.

commit 00a066eafd
Author: Anthony Correa <a@correa.co>
Date:   Fri Feb 7 15:00:01 2025 -0600

    Refactor Star Wars FFG CSS for improved readability

    - Updated the CSS class for the Star Wars FFG sheet to include the .actor class, which will help in styling the actor section.
    - Introduced a new .title-card class to style the title card in the actor section.
    - Added a new .drag-note class to style the drag note in the actor section.
    - Updated the .block-title and .shadow-text classes to use the Teuton Mager font family for improved readability.
    - Changed the font-weight of the .characteristic-value, .characteristic-label, .skill-name, and .skillsHeader [class*=pure-u] classes to bold and uppercase for better visibility.
    - Removed the .header-name input class, as it was no longer needed.

commit 5a1f70fe89
Author: Anthony Correa <a@correa.co>
Date:   Fri Feb 7 14:57:52 2025 -0600

    Add color palette, fonts

    - Included new color variables for dice, boxes, headings, and stat blocks.
    - Updated fonts for headings, paragraphs, and statblock labels and values.
2025-02-07 15:19:24 -06:00
4 changed files with 134 additions and 15 deletions

View File

@@ -1,13 +1,14 @@
{
"id": "asc-starwars-style-journal",
"title": "Star Wars Style Journal",
"version": "0.3.0",
"version": "0.4",
"download": "https://gitea.ascorrea.com/asc/asc-starwars-style-journal/releases/download/latest/module.zip",
"manifest": "https://gitea.ascorrea.com/asc/asc-starwars-style-journal/releases/download/latest/module.json",
"compatibility": {
"minimum": "12",
"verified": "12"
},
"scripts": ["scripts/vendor/turndown.js"],
"esmodules": ["scripts/asc-starwars.js"],
"styles": [
"styles/asc-ffg-starwars.css",

View File

@@ -1,3 +1,5 @@
var turndownService = new TurndownService()
export class StarWarsStyleJournalSheet extends JournalSheet {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
@@ -7,6 +9,8 @@ export class StarWarsStyleJournalSheet extends JournalSheet {
async _render(force, options) {
await super._render(force, {...options, collapsed:true});
}
}
export class StarWarsTextPageSheet extends JournalTextPageSheet {
@@ -18,4 +22,33 @@ export class StarWarsTextPageSheet extends JournalTextPageSheet {
resizable: true,
});
}
activateListeners(html) {
super.activateListeners(html);
// Ensure the button is not duplicated
if (html.find(".asc-copy-button").length > 0) return;
// Create the button element
const button = $(`<div class="asc-copy"><button><i class="fas fa-clipboard"></i>Copy</button></div>`);
// Insert it inside the .journal-header
const journal_header = html.find(".journal-header aside")
journal_header.append(button);
// Attach event listener
button.click(this._onCopyButtonClick.bind(this));
}
_onCopyButtonClick(event) {
event.preventDefault();
var editorContent = this.element.find(".editor-content").html();
// Replace linked items
editorContent = editorContent.replace(/@\w+\[.+\]\{(.*?)\}/g,"$1")
const markdownContent = turndownService.turndown(editorContent)
// Copy to clipboard
navigator.clipboard.writeText(markdownContent)
.then(()=>ui.notifications.info("Journal content copied as Markdown!"));
}
}

View File

@@ -5,8 +5,59 @@
--dice-color-boost: #A2D2E9;
--dice-color-challenge: #D2263F;
--dice-color-difficulty: #532D7F;
--dice-color-force: #FFFFFF;
--dice-color-proficiency: #F9EA2F;
--dice-color-setback: #0E0E0E;
--color-box-eote: #455052;
--color-box-heading-eote: #B3A48D;
--color-bulletpoint-eote: #741213;
--color-heading-1-eote: #52644A;
--color-heading-2-eote: #741213;
--color-heading-3-eote: #886D26;
--color-heading-4-eote: #741213;
--color-statblock-background-eote: #AEA08A;
--color-statblock-ornate-eote: #3F6933;
--color-statblock-textbackground-eote: #63040A;
--color-statblock-thresholdbackground-eote: #001450;
--color-box-fad: #32362B;
--color-box-heading-fad: #BFD1C9;
--color-bulletpoint-fad: #4AD9FF;
--color-heading-1-fad: #62060D;
--color-heading-2-fad: #9F8E15;
--color-heading-3-fad: #259EAA;
--color-heading-4-fad: #62060D;
--color-statblock-background-fad: #BE8B3E;
--color-statblock-ornate-fad: #1E3958;
--color-statblock-textbackground-fad: #85C4A6;
--color-statblock-thresholdbackground-fad: #3C6735;
--color-box-core: #1B3147;
--color-box-heading-core: #BFCCC9;
--color-bulletpoint-core: #4AD9FF;
--color-heading-1-core: #766A08;
--color-heading-2-core: #25A1AA;
--color-heading-3-core: #76030D;
--color-heading-4-core: #766A08;
--color-statblock-background-core: #E89914;
--color-statblock-ornate-core: #705A0F;
--color-statblock-textbackground-core: #770312;
--color-statblock-thresholdbackground-core: #705A0F;
--color-box-aor: #1D3751;
--color-box-heading-aor: #BFCCC4;
--color-bulletpoint-aor: #66050A;
--color-heading-1-aor: #259EAA;
--color-heading-2-aor: #D03B0E;
--color-heading-3-aor: #756908;
--color-heading-4-aor: #259EAA;
--color-statblock-background-aor: #C2E3D1;
--color-statblock-ornate-aor: #E22A17;
--color-statblock-textbackground-aor: #0F3776;
--color-statblock-thresholdbackground-aor: #770310;
--font-headings-font: 'Elektra Medium Pro'
--font-paragraph-text: "ITC Symbol"
--font-box-heading-font: "Teuton Fett"
--font-statblock-labels: "Teuton Mager"
--font-statblock-values: "Teuton Mager"
}
body {
@@ -26,16 +77,48 @@ body {
font-size: 1rem;
}
.starwarsffg .header-fields .header-name input {
font-family: 'Elektra Pro';
font-weight: bold;
text-transform: uppercase;
font-style: normal;
}
.starwarsffg.sheet.actor {
.header-fields {
font-family: 'Elektra Pro';
font-weight: bold;
text-transform: uppercase;
font-style: normal;
.title-card {
text-transform: uppercase;
padding: .2rem;
}
input {
text-transform: uppercase;
}
.drag-note {
font-family: 'Teuton Mager';
font-weight: lighter;
text-transform: none;
}
}
.block-title, .shadow-text {
font-family: 'Teuton Mager';
font-weight: bold;
}
.characteristic-value, .characteristic-label, .skill-name, .skillsHeader [class*=pure-u] {
font-family: 'Teuton Mager';
&[class*=pure-u] {
font-weight: bold;
text-transform: uppercase;
}
}
}
.characteristic-value, .characteristic-label {
font-family: 'Teuton Mager';
}
h1, h2, h3, h4, h5,
button {

View File

@@ -8,11 +8,6 @@
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");
@@ -23,6 +18,13 @@
src: url("../fonts/SWCrawlBody.ttf");
}
.asc-starwars .asc-copy {
width: 100%;
button {
}
}
.asc-starwars .journal-entry-content, .asc-starwars .editor-container, .chat-message.asc-starwars .message-content {
background-image:url(../artwork/stars.png) !important;
background-repeat:repeat !important;