feat: add dismiss button for store call-to-action and style updates

This commit is contained in:
CNCKitchen
2026-04-02 10:28:37 +02:00
parent 80f597141c
commit 6ad91f9707
5 changed files with 27 additions and 1 deletions
+3 -1
View File
@@ -74,7 +74,9 @@
<canvas id="viewport"></canvas> <canvas id="viewport"></canvas>
<div id="brush-cursor"></div> <div id="brush-cursor"></div>
<div id="store-cta-wrapper"> <div id="store-cta-wrapper">
<span id="store-cta" data-i18n-html="cta.store">Support this tool? Shop at <a href="https://geni.us/CNCStoreTexture" target="_blank" rel="noopener noreferrer">CNCKitchen.STORE</a> or donate on <a href="https://www.paypal.me/CNCKitchen" target="_blank" rel="noopener noreferrer">PayPal</a></span> <span id="store-cta">
<span data-i18n-html="cta.store">Support this tool? Shop at <a href="https://geni.us/CNCStoreTexture" target="_blank" rel="noopener noreferrer">CNCKitchen.STORE</a> or donate on <a href="https://www.paypal.me/CNCKitchen" target="_blank" rel="noopener noreferrer">PayPal</a></span><button id="store-cta-dismiss" aria-label="Dismiss">&times;</button>
</span>
</div> </div>
</div> </div>
<div id="viewport-footer"> <div id="viewport-footer">
+5
View File
@@ -445,6 +445,11 @@ function wireEvents() {
if (e.target === licenseOverlay) licenseOverlay.classList.add('hidden'); if (e.target === licenseOverlay) licenseOverlay.classList.add('hidden');
}); });
// ── Support banner dismiss ──
document.getElementById('store-cta-dismiss').addEventListener('click', () => {
document.getElementById('store-cta-wrapper').classList.add('store-cta-hidden');
});
// ── Export ── // ── Export ──
exportBtn.addEventListener('click', () => { exportBtn.addEventListener('click', () => {
if (sessionStorage.getItem('stlt-no-sponsor') === '1') { if (sessionStorage.getItem('stlt-no-sponsor') === '1') {
+19
View File
@@ -258,6 +258,25 @@ main {
#store-cta a:hover { #store-cta a:hover {
opacity: 0.85; opacity: 0.85;
} }
#store-cta-dismiss {
background: none;
border: none;
color: #fff;
font-size: 11px;
line-height: 1;
cursor: pointer;
opacity: 0.7;
padding: 0 2px;
margin-left: 8px;
font-weight: bold;
vertical-align: top;
position: relative;
top: -4px;
transition: opacity 0.15s;
}
#store-cta-dismiss:hover {
opacity: 1;
}
.store-cta-hidden { .store-cta-hidden {
display: none !important; display: none !important;
} }
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB