mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-11 21:49:21 +00:00
Merge pull request #3126 from nourkagha/kofi-followups
🩹 Refine Ko-fi integration
This commit is contained in:
43 files changed
+117
-9
No files matched your search
@@ -41,7 +41,7 @@ After installing (any method): delete the site's generated `hugo.toml` in the pr
|
||||
All config lives in the site's `config/_default/` (reference: https://blowfish.page/docs/configuration/):
|
||||
|
||||
- `hugo.toml` — core Hugo settings, theme/module import, taxonomies, related-content config.
|
||||
- `params.toml` — theme behavior. Key areas: `colorScheme`; `defaultAppearance`/`autoSwitchAppearance` (dark mode); `defaultBackgroundImage` + `backgroundCanvas` (site-wide fixed backdrop); `[header] layout` (`basic`, `fixed`, `fixed-fill`, `fixed-gradient`, `fixed-fill-blur`, `floating`) and `mobileMenuStyle` (`fullscreen`/`dropdown`); `[homepage] layout` (`page`, `profile`, `hero`, `card`, `background`, `landing`, `custom`) + `layoutSwitcher`; `[article]`, `[list]`, `[taxonomy]`, `[term]` display flags (hero styles, TOC, reading time/progress, breadcrumbs, `cardView`, `featureImageHover`, …); `[footer]`; search; analytics; comments; Firebase (views/likes).
|
||||
- `params.toml` — theme behavior. Key areas: `colorScheme`; `defaultAppearance`/`autoSwitchAppearance` (dark mode); `defaultBackgroundImage` + `backgroundCanvas` (site-wide fixed backdrop); `[header] layout` (`basic`, `fixed`, `fixed-fill`, `fixed-gradient`, `fixed-fill-blur`, `floating`) and `mobileMenuStyle` (`fullscreen`/`dropdown`); `[homepage] layout` (`page`, `profile`, `hero`, `card`, `background`, `landing`, `custom`) + `layoutSwitcher`; `[article]`, `[list]`, `[taxonomy]`, `[term]` display flags (hero styles, TOC, reading time/progress, breadcrumbs, `cardView`, `featureImageHover`, …); `[footer]`; search; analytics; comments; support (`[buymeacoffee]`, `[kofi]`); Firebase (views/likes).
|
||||
- `languages.<code>.toml` — site title, author profile (name, image, headline, bio, `links` social icons). One file per language for multilingual sites.
|
||||
- `menus.<code>.toml` — `[[main]]`, `[[subnavigation]]`, and `[[footer]]` entries (`name`, `pageRef`/`url`, `weight`, optional `pre` icon).
|
||||
- `markup.toml` — Goldmark config; keep `unsafe = true` (the theme relies on HTML in Markdown).
|
||||
|
||||
@@ -366,7 +366,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
||||
| --- | --- | --- |
|
||||
| `kofi.identifier` | _Not set_ | The identifier to the target kofi account. |
|
||||
| `kofi.globalWidget` | _Not set_ | Activate the global kofi widget. |
|
||||
| `kofi.globalWidgetText` | _Not set_ | Message that will be displayed the first time a new user lands on the site. |
|
||||
| `kofi.globalWidgetText` | `"Sostienimi"` | The text displayed on the floating widget button. |
|
||||
| `kofi.globalWidgetBackgroundColor` | `#00B9FE` | Widget background color in hex format. |
|
||||
| `kofi.globalWidgetTextColor` | `#FFFFFF` | Widget text color in hex format. |
|
||||
|
||||
|
||||
@@ -366,7 +366,7 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ
|
||||
| --- | --- | --- |
|
||||
| `kofi.identifier` | _未設定_ | ターゲットの Ko-fi アカウントの識別子。 |
|
||||
| `kofi.globalWidget` | _未設定_ | グローバル Ko-fi ウィジェットを有効にします。 |
|
||||
| `kofi.globalWidgetText` | _未設定_ | 新しいユーザーが初めてサイトにアクセスしたときに表示されるテキスト。 |
|
||||
| `kofi.globalWidgetText` | `"支援する"` | フローティングウィジェットのボタンに表示されるテキスト。 |
|
||||
| `kofi.globalWidgetBackgroundColor` | `#00B9FE` | ウィジェットの背景色(16進数形式)。 |
|
||||
| `kofi.globalWidgetTextColor` | `#FFFFFF` | ウィジェットの文字色(16進数形式)。 |
|
||||
|
||||
|
||||
@@ -428,7 +428,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
||||
| --- | --- | --- |
|
||||
| `kofi.identifier` | _Not set_ | The identifier to the target kofi account. |
|
||||
| `kofi.globalWidget` | _Not set_ | Activate the global kofi widget. |
|
||||
| `kofi.globalWidgetText` | _Not set_ | Message that will be displayed the first time a new user lands on the site. |
|
||||
| `kofi.globalWidgetText` | `"Support me"` | The text displayed on the floating widget button. |
|
||||
| `kofi.globalWidgetBackgroundColor` | `#00B9FE` | Widget background color in hex format. |
|
||||
| `kofi.globalWidgetTextColor` | `#FFFFFF` | Widget text color in hex format. |
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中
|
||||
| --- | --- | --- |
|
||||
| `kofi.identifier` | 无 | kofi 账户的用户名。 |
|
||||
| `kofi.globalWidget` | 无 | 激活全局的 kofi 组件。 |
|
||||
| `kofi.globalWidgetText` | 无 | 新用户首次访问网站时显示的消息。 |
|
||||
| `kofi.globalWidgetText` | `"支持我"` | 悬浮组件按钮上显示的文本。 |
|
||||
| `kofi.globalWidgetBackgroundColor` | `#00B9FE` | 组件颜色,使用 HEX 格式。 |
|
||||
| `kofi.globalWidgetTextColor` | `#FFFFFF` | 组件文字颜色,使用 HEX 格式。 |
|
||||
|
||||
|
||||
@@ -86,3 +86,6 @@ cookie_notice:
|
||||
privacy_policy: "سياسة الخصوصية الخاصة بنا"
|
||||
button: "فهمت"
|
||||
image_alt: "أيقونة ملف تعريف الارتباط"
|
||||
|
||||
kofi:
|
||||
support_me: "ادعمني"
|
||||
@@ -86,3 +86,6 @@ cookie_notice:
|
||||
privacy_policy: "политика за поверителност"
|
||||
button: "Разбрах"
|
||||
image_alt: "Икона на бисквитка"
|
||||
|
||||
kofi:
|
||||
support_me: "Подкрепете ме"
|
||||
@@ -82,3 +82,6 @@ cookie_notice:
|
||||
privacy_policy: "গোপনীয়তা নীতি"
|
||||
button: "বুঝেছি"
|
||||
image_alt: "কুকির আইকন"
|
||||
|
||||
kofi:
|
||||
support_me: "আমাকে সমর্থন করুন"
|
||||
@@ -93,3 +93,6 @@ cookie_notice:
|
||||
privacy_policy: "política de privacitat"
|
||||
button: "Entès"
|
||||
image_alt: "Icona de galeta"
|
||||
|
||||
kofi:
|
||||
support_me: "Dóna'm suport"
|
||||
@@ -86,3 +86,6 @@ cookie_notice:
|
||||
privacy_policy: "zásady ochrany osobních údajů"
|
||||
button: "Rozumím"
|
||||
image_alt: "Ikona cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Podpořte mě"
|
||||
@@ -93,3 +93,6 @@ cookie_notice:
|
||||
privacy_policy: "privatlivspolitik"
|
||||
button: "Forstået"
|
||||
image_alt: "Cookie-ikon"
|
||||
|
||||
kofi:
|
||||
support_me: "Støt mig"
|
||||
@@ -110,3 +110,6 @@ cookie_notice:
|
||||
privacy_policy: "Datenschutzerklärung"
|
||||
button: "Verstanden"
|
||||
image_alt: "Cookie-Symbol"
|
||||
|
||||
kofi:
|
||||
support_me: "Unterstütze mich"
|
||||
@@ -109,3 +109,6 @@ admonition:
|
||||
tip: "Tip"
|
||||
todo: "Todo"
|
||||
warning: "Warning"
|
||||
|
||||
kofi:
|
||||
support_me: "Support me"
|
||||
@@ -90,3 +90,6 @@ cookie_notice:
|
||||
privacy_policy: "privatecan politikon"
|
||||
button: "Komprenite"
|
||||
image_alt: "Kuketa simbolo"
|
||||
|
||||
kofi:
|
||||
support_me: "Subtenu min"
|
||||
@@ -85,3 +85,6 @@ cookie_notice:
|
||||
privacy_policy: "política de privacidad"
|
||||
button: "Entendido"
|
||||
image_alt: "Icono de cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Apóyame"
|
||||
@@ -78,3 +78,6 @@ shortcode:
|
||||
|
||||
recent:
|
||||
show_more: "Erakutsi gehiago"
|
||||
|
||||
kofi:
|
||||
support_me: "Lagundu nazazu"
|
||||
@@ -92,3 +92,6 @@ cookie_notice:
|
||||
privacy_policy: "سیاست حفظ حریم خصوصی ما"
|
||||
button: "متوجه شدم"
|
||||
image_alt: "نماد کوکی"
|
||||
|
||||
kofi:
|
||||
support_me: "از من حمایت کنید"
|
||||
@@ -80,3 +80,6 @@ cookie_notice:
|
||||
privacy_policy: "tietosuojaselosteemme"
|
||||
button: "Ymmärretty"
|
||||
image_alt: "Evästeen kuvake"
|
||||
|
||||
kofi:
|
||||
support_me: "Tue minua"
|
||||
@@ -83,3 +83,6 @@ cookie_notice:
|
||||
privacy_policy: "politique de confidentialité"
|
||||
button: "Compris"
|
||||
image_alt: "Icône de cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Soutenez-moi"
|
||||
@@ -92,3 +92,6 @@ cookie_notice:
|
||||
privacy_policy: "política de privacidade"
|
||||
button: "Entendido"
|
||||
image_alt: "Icona de cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Apóiame"
|
||||
@@ -80,3 +80,6 @@ cookie_notice:
|
||||
privacy_policy: "מדיניות הפרטיות שלנו"
|
||||
button: "הבנתי"
|
||||
image_alt: "סמל קובץ Cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "תמכו בי"
|
||||
@@ -82,3 +82,6 @@ cookie_notice:
|
||||
privacy_policy: "pravila privatnosti"
|
||||
button: "Razumijem"
|
||||
image_alt: "Ikona kolačića"
|
||||
|
||||
kofi:
|
||||
support_me: "Podržite me"
|
||||
@@ -80,3 +80,6 @@ cookie_notice:
|
||||
privacy_policy: "adatvédelmi tájékoztatónkat"
|
||||
button: "Rendben"
|
||||
image_alt: "Süti ikon"
|
||||
|
||||
kofi:
|
||||
support_me: "Támogass engem"
|
||||
@@ -86,3 +86,6 @@ cookie_notice:
|
||||
privacy_policy: "kebijakan privasi kami"
|
||||
button: "Mengerti"
|
||||
image_alt: "Ikon cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Dukung saya"
|
||||
@@ -97,3 +97,6 @@ cookie_notice:
|
||||
privacy_policy: "informativa sulla privacy"
|
||||
button: "Ho capito"
|
||||
image_alt: "Icona cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Sostienimi"
|
||||
@@ -109,3 +109,6 @@ cookie_notice:
|
||||
privacy_policy: "プライバシーポリシー"
|
||||
button: "了解しました"
|
||||
image_alt: "Cookie アイコン"
|
||||
|
||||
kofi:
|
||||
support_me: "支援する"
|
||||
@@ -86,3 +86,6 @@ cookie_notice:
|
||||
privacy_policy: "개인정보 처리방침"
|
||||
button: "확인했습니다"
|
||||
image_alt: "쿠키 아이콘"
|
||||
|
||||
kofi:
|
||||
support_me: "후원하기"
|
||||
@@ -102,3 +102,6 @@ admonition:
|
||||
tip: "Tips"
|
||||
todo: "Gjøremål"
|
||||
warning: "Advarsel"
|
||||
|
||||
kofi:
|
||||
support_me: "Støtt meg"
|
||||
@@ -88,3 +88,6 @@ cookie_notice:
|
||||
privacy_policy: "privacybeleid"
|
||||
button: "Begrepen"
|
||||
image_alt: "Cookie-pictogram"
|
||||
|
||||
kofi:
|
||||
support_me: "Steun mij"
|
||||
@@ -87,3 +87,6 @@ cookie_notice:
|
||||
privacy_policy: "politykę prywatności"
|
||||
button: "Rozumiem"
|
||||
image_alt: "Ikona pliku cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Wesprzyj mnie"
|
||||
@@ -83,3 +83,6 @@ cookie_notice:
|
||||
privacy_policy: "política de privacidade"
|
||||
button: "Entendi"
|
||||
image_alt: "Ícone de cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Me apoie"
|
||||
@@ -83,3 +83,6 @@ cookie_notice:
|
||||
privacy_policy: "política de privacidade"
|
||||
button: "Compreendi"
|
||||
image_alt: "Ícone de cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Apoie-me"
|
||||
@@ -80,3 +80,6 @@ cookie_notice:
|
||||
privacy_policy: "politica noastră de confidențialitate"
|
||||
button: "Am înțeles"
|
||||
image_alt: "Pictogramă cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Susține-mă"
|
||||
@@ -86,3 +86,6 @@ cookie_notice:
|
||||
privacy_policy: "политикой конфиденциальности"
|
||||
button: "Понятно"
|
||||
image_alt: "Значок cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Поддержите меня"
|
||||
@@ -80,3 +80,6 @@ cookie_notice:
|
||||
privacy_policy: "integritetspolicy"
|
||||
button: "Förstått"
|
||||
image_alt: "Cookie-ikon"
|
||||
|
||||
kofi:
|
||||
support_me: "Stöd mig"
|
||||
@@ -91,3 +91,6 @@ cookie_notice:
|
||||
privacy_policy: "นโยบายความเป็นส่วนตัวของเรา"
|
||||
button: "เข้าใจแล้ว"
|
||||
image_alt: "ไอคอนคุกกี้"
|
||||
|
||||
kofi:
|
||||
support_me: "สนับสนุน"
|
||||
@@ -76,3 +76,6 @@ cookie_notice:
|
||||
privacy_policy: "Gizlilik Politikamız"
|
||||
button: "Anladım"
|
||||
image_alt: "Çerez simgesi"
|
||||
|
||||
kofi:
|
||||
support_me: "Beni destekle"
|
||||
@@ -93,3 +93,6 @@ cookie_notice:
|
||||
privacy_policy: "політикою конфіденційності"
|
||||
button: "Зрозуміло"
|
||||
image_alt: "Значок cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Підтримайте мене"
|
||||
@@ -89,3 +89,6 @@ cookie_notice:
|
||||
privacy_policy: "chính sách quyền riêng tư của chúng tôi"
|
||||
button: "Đã hiểu"
|
||||
image_alt: "Biểu tượng cookie"
|
||||
|
||||
kofi:
|
||||
support_me: "Ủng hộ tôi"
|
||||
@@ -109,3 +109,6 @@ cookie_notice:
|
||||
privacy_policy: "隐私政策"
|
||||
button: "明白了"
|
||||
image_alt: "Cookie 图标"
|
||||
|
||||
kofi:
|
||||
support_me: "支持我"
|
||||
@@ -109,3 +109,6 @@ cookie_notice:
|
||||
privacy_policy: "隱私權政策"
|
||||
button: "了解了"
|
||||
image_alt: "Cookie 圖示"
|
||||
|
||||
kofi:
|
||||
support_me: "支持我"
|
||||
@@ -74,12 +74,12 @@
|
||||
data-x_margin="18"
|
||||
data-y_margin="18"></script>
|
||||
{{ end }}
|
||||
{{ if site.Params.kofi.globalWidget | default false }}
|
||||
{{ if and (site.Params.kofi.globalWidget | default false) site.Params.kofi.identifier }}
|
||||
<script src="https://storage.ko-fi.com/cdn/scripts/overlay-widget.js"></script>
|
||||
<script>
|
||||
kofiWidgetOverlay.draw('{{ site.Params.kofi.identifier }}', {
|
||||
'type': 'floating-chat',
|
||||
'floating-chat.donateButton.text': '{{ site.Params.kofi.globalWidgetText | default "" }}',
|
||||
'floating-chat.donateButton.text': '{{ cond (isset site.Params.kofi "globalwidgettext") site.Params.kofi.globalWidgetText (i18n "kofi.support_me") }}',
|
||||
'floating-chat.donateButton.background-color': '{{ site.Params.kofi.globalWidgetBackgroundColor | default "#00B9FE" }}',
|
||||
'floating-chat.donateButton.text-color': '{{ site.Params.kofi.globalWidgetTextColor | default "#FFFFFF" }}',
|
||||
});
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{{ $isRTL := .Site.Params.rtl | default false }}
|
||||
{{ $coffeeIsRight := and (eq (lower site.Params.buymeacoffee.globalWidgetPosition) "right") .Site.Params.buymeacoffee.globalWidget }}
|
||||
{{ $coffeeIsRight := and (eq (lower .Site.Params.buymeacoffee.globalWidgetPosition) "right") .Site.Params.buymeacoffee.globalWidget }}
|
||||
{{ if not $coffeeIsRight }}
|
||||
{{ $coffeeIsRight = false }}
|
||||
{{ end }}
|
||||
|
||||
{{ $needAvoidCoffee := ne $coffeeIsRight $isRTL }}
|
||||
|
||||
{{ $kofiEnabled := .Site.Params.kofi.globalWidget | default false }}
|
||||
{{ $kofiEnabled := and (.Site.Params.kofi.globalWidget | default false) .Site.Params.kofi.identifier }}
|
||||
{{ $needAvoidKofi := and $kofiEnabled $isRTL }}
|
||||
{{ $needExtraOffset := or $needAvoidCoffee $needAvoidKofi }}
|
||||
|
||||
|
||||
Reference in new issue
Block a user