From 1e10f70f57d3944f4e34be26ed06f665f0048516 Mon Sep 17 00:00:00 2001 From: Erin Schnabel Date: Fri, 21 Nov 2025 21:38:06 -0500 Subject: [PATCH] =?UTF-8?q?=E2=98=95=EF=B8=8F=20coffee?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 1 + esbuild.config.mjs | 4 ++-- src/dn-SettingsTab.ts | 9 +++++++++ src/styles.css | 7 +++++++ 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 src/styles.css diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3379c57..4dfcf13 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,5 +124,6 @@ jobs: gh release upload "${{ steps.build.outputs.version }}" --clobber \ ${{ github.event.repository.name }}-${{ steps.build.outputs.version }}.zip \ './build/main.js#main.js' \ + './build/styles.css#styles.css' \ './manifest.json' \ './manifest-beta.json' diff --git a/esbuild.config.mjs b/esbuild.config.mjs index ccdebde..1114c75 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -15,7 +15,7 @@ const parameters = { banner: { js: banner, }, - entryPoints: ['src/main.ts'], + entryPoints: ['src/main.ts', 'src/styles.css'], bundle: true, external: [ 'obsidian', @@ -54,4 +54,4 @@ if (prod) { } else { const ctx = await esbuild.context(parameters); await ctx.watch() -} \ No newline at end of file +} diff --git a/src/dn-SettingsTab.ts b/src/dn-SettingsTab.ts index 5963330..a8d1bf2 100644 --- a/src/dn-SettingsTab.ts +++ b/src/dn-SettingsTab.ts @@ -153,6 +153,15 @@ export class DeckNotesSettingsTab extends PluginSettingTab { "frontmatter or inline before each H2. Lines starting " + "with #flashcards are stripped from display.", }); + + const div = this.containerEl.createDiv("deck-cards-coffee"); + div.createEl("a", { + href: "https://www.buymeacoffee.com/ebullient", + }).createEl("img", { + attr: { + src: "https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=☕&slug=ebullient&button_colour=8e6787&font_colour=ebebeb&font_family=Inter&outline_colour=392a37&coffee_colour=ecc986", + }, + }); } /** Save on exit */ diff --git a/src/styles.css b/src/styles.css new file mode 100644 index 0000000..9d50220 --- /dev/null +++ b/src/styles.css @@ -0,0 +1,7 @@ +.deck-cards-coffee { + text-align: center; + img { + margin: auto; + height: 30px; + } +}