From bd4db36d9052bfb7031ddb35d67e8a1508935a2d Mon Sep 17 00:00:00 2001 From: Anthony Correa Date: Thu, 6 Feb 2025 18:34:16 -0600 Subject: [PATCH] Update font paths and colors for SW-RPG symbols - Updated font path in `sw-rpg-symbol.css` to use relative path. - Added new `--dice-color-setback` variable to `asc-ffg-starwars.css` for setback color. - Updated `.starwars-rpg-info` CSS to use `--dice-color-setback` variable for setback color. - Added `.symbol` class to `.starwars-rpg-info` CSS to use `--dice-color-setback` variable for setback color. - Updated `.symbol` class in `.starwars-rpg-info` CSS to use `--dice-color-setback` variable for setback color. - Updated `.ability` class in `.starwars-rpg-info` CSS to use `--dice-color-ability` variable for ability color. - Updated `.proficiency` class in `.starwars-rpg-info` CSS to use `--dice-color-proficiency` variable for proficiency color. - Updated `.boost` class in `.starwars-rpg-info` CSS to use `--dice-color-boost` variable for boost color. - Updated `.difficulty` class in `.starwars-rpg-info` CSS to use `--dice-color-difficulty` variable for difficulty color. - Updated `.challenge` class in `.starwars-rpg-info` CSS to use `--dice-color-challenge` variable for challenge color. Added a workflow to automatically create a release when a new version is published. - It uses actions to extract the version number, substitute manifest and download URLs, create a zip file, set a commit message, and create a release with the files. - Added `*.code-workspace` and `.vscode` to the `.gitignore` to exclude these files from version control. --- .gitea/workflows/main.yml | 59 +++++++++++++++++++++++ .gitignore | 2 + src/fonts/SW-RPG-Symbol/sw-rpg-symbol.css | 2 +- src/styles/asc-ffg-starwars.css | 43 +++++++++++------ 4 files changed, 90 insertions(+), 16 deletions(-) create mode 100644 .gitea/workflows/main.yml create mode 100644 .gitignore diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml new file mode 100644 index 0000000..eba3b83 --- /dev/null +++ b/.gitea/workflows/main.yml @@ -0,0 +1,59 @@ +name: Release Creation + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + # get part of the tag after the `v` + - name: Extract tag version number + id: get_version + uses: battila7/get-version-action@v2 + + # Substitute the Manifest and Download URLs in the module.json + - name: Substitute Manifest and Download Links For Versioned Ones + id: sub_manifest_link_version + uses: microsoft/variable-substitution@v1 + with: + files: 'src/module.json' + env: + version: ${{steps.get_version.outputs.version-without-v}} + url: https://gitea.ascorrea.com/${{github.repository}} + manifest: https://gitea.ascorrea.com/${{github.repository}}/releases/latest/download/module.json + download: https://gitea.ascorrea.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip + + # Create a zip file with all files required by the module to add to the release + - name: Create files (module.zip, module.json) for release + working-directory: ./src + run: > + mkdir -p ../dist + && zip ../dist/module.zip . + && cp src/module.json ../dist/ + && echo \"Done!\nZipped module.json and copied module.js.\" + + - name: Setting commit message variable + id: commit-message + # Per + # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#example-of-a-multiline-string + run: | + { + echo 'COMMIT_MESSAGE<> "$GITHUB_OUTPUT" + + # Create a release for this specific version + - name: Update Release with Files + id: create_version_release + uses: akkuman/gitea-release-action@v1 + with: + files: |- + ./dist/module.json + ./dist/module.zip + body: |- + ${{ steps.commit-message.outputs.COMMIT_MESSAGE }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6fa6570 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.code-workspace +.vscode \ No newline at end of file diff --git a/src/fonts/SW-RPG-Symbol/sw-rpg-symbol.css b/src/fonts/SW-RPG-Symbol/sw-rpg-symbol.css index a8f765b..87bea9e 100644 --- a/src/fonts/SW-RPG-Symbol/sw-rpg-symbol.css +++ b/src/fonts/SW-RPG-Symbol/sw-rpg-symbol.css @@ -1,6 +1,6 @@ @font-face { font-family: "SW-RPG"; - src: url("worlds/shared/fonts/SW-RPG-Symbol.otf") format("opentype"), url("../files/font/SW-RPG-Symbol.ttf") format("truetype"), url("../files/font/SW-RPG-Symbol.woff") format("woff"); + src: url("./SW-RPG-Symbol.otf") format("opentype"), url("./SW-RPG-Symbol.ttf") format("truetype"), url("./SW-RPG-Symbol.woff") format("woff"); font-weight: normal; font-style: normal; } \ No newline at end of file diff --git a/src/styles/asc-ffg-starwars.css b/src/styles/asc-ffg-starwars.css index f3a19a5..6adce37 100644 --- a/src/styles/asc-ffg-starwars.css +++ b/src/styles/asc-ffg-starwars.css @@ -6,6 +6,7 @@ --dice-color-challenge: #D2263F; --dice-color-difficulty: #532D7F; --dice-color-proficiency: #F9EA2F; + --dice-color-setback: #0E0E0E; } body { @@ -49,33 +50,45 @@ button { font-family: 'SF Distant Galaxy'; } + + .starwars-rpg-info { - font-family: 'SW-RPG'; - text-shadow: - -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; + .symbol, + .difficulty, + .ability, + .challenge, + .setback, + .proficiency, + .boost + { + font-family: "SW-RPG"; + text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; + } .boost { - color: #c3e1fe; + color: var(--dice-color-boost); } .ability { - color: #4f7f32; + color: var(--dice-color-ability); } .proficiency { - color: #fdee66; + color: var(--dice-color-proficiency); } - .setback { - color: #0E0E0E; - } - .difficulty { - color: #3c1b4f; - } - .challenge { - color: #ca2722; - } .symbol { color: #000; } + + .setback { + color: var(--dice-color-setback); + } + .difficulty { + color: var(--dice-color-difficulty); + } + .challenge { + color: var(--dice-color-challenge); + } + .symbol { color: #000; }