mirror of
https://github.com/db9979/wibosim.git
synced 2026-12-06 05:24:08 +01:00
Eigener Satz farbiger SVG-Illustrationen (art.js) mit dezenten CSS-Animationen, farbige Kacheln mit Beschreibung, aktive Markierung in der unteren Leiste; ruhig bei reduzierter Bewegung. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUhQVoPUusUzxgxLWkK
30 lines
1.9 KiB
JavaScript
30 lines
1.9 KiB
JavaScript
// „Projekt unterstützen“: freiwillige Spende über Buy me a coffee (externer Link, öffnet in neuem Tab)
|
||
import { art } from './art.js';
|
||
|
||
export const SUPPORT_URL = 'https://buymeacoffee.com/zquu1xu570';
|
||
|
||
/** Eigene Kaffeetasse als SVG (kein externes Bild – CSP erlaubt nur eigene Quellen) */
|
||
export const COFFEE_SVG = `<svg class="coffee-ico" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
|
||
<path d="M8 2.5c-.6.8-.6 1.6 0 2.4M11.5 2.5c-.6.8-.6 1.6 0 2.4M15 2.5c-.6.8-.6 1.6 0 2.4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
|
||
<path d="M4 7.5h13.5v6.2a5.3 5.3 0 0 1-5.3 5.3H9.3A5.3 5.3 0 0 1 4 13.7z" fill="currentColor"/>
|
||
<path d="M17.5 9h1.2a2.6 2.6 0 0 1 0 5.2h-1.6" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
|
||
<path d="M3 21h16" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
|
||
</svg>`;
|
||
|
||
const attrs = `href="${SUPPORT_URL}" target="_blank" rel="noopener noreferrer"`;
|
||
|
||
/** Kleiner Knopf (Navigation) */
|
||
export const supportButton = (label = 'Kaffee spendieren') =>
|
||
`<a class="bmc-btn" ${attrs} title="WiBoSim mit einem Kaffee unterstützen (öffnet buymeacoffee.com)">${COFFEE_SVG}<span>${label}</span></a>`;
|
||
|
||
/** Kachel für das Menü „Mehr“ */
|
||
export const supportTile = () =>
|
||
`<a class="more-item bmc-tile" ${attrs}>${art('coffee', { cls: 'more-art' })}<span class="more-t">Projekt unterstützen</span><small class="more-sub">Kaffee spendieren</small></a>`;
|
||
|
||
/** Hinweisbox (z. B. in „Was ist neu?“) */
|
||
export const supportNote = () => `<div class="bmc-note">
|
||
<span class="bmc-note-ico">${COFFEE_SVG}</span>
|
||
<p><b>Dir gefällt WiBoSim?</b> Das Spiel ist kostenlos und werbefrei und wird in der Freizeit entwickelt. Über einen Kaffee freut sich der Entwickler – freiwillig, ohne Vorteile im Spiel.</p>
|
||
<a class="bmc-btn" ${attrs}>${COFFEE_SVG}<span>Kaffee spendieren</span></a>
|
||
</div>`;
|