Skip to content

armgit / bento

Public Imported from GitHub
0

Bento, the office suite that fits in a file

Slideshow nudge: peach (wordmark) colour, show every load until presented, gentler fade-in

nyblnet93c8ec3a2411
diff --git a/slides/src/editor/editor.ts b/slides/src/editor/editor.ts
index 87d5a89c..78949a30 100644
--- a/slides/src/editor/editor.ts
+++ b/slides/src/editor/editor.ts
@@ -283,16 +283,16 @@ export class Editor {
const showB = btn(ICONS.slideshow, t('Slideshow'), () => this.present(false, true),
t('Start the slideshow fullscreen — F toggles fullscreen, S opens speaker view, Esc ends'))
showB.classList.add('ed-pill-main')
- // First-run nudge: newcomers don't always spot how to start a show — run the
- // neon runner around the Slideshow pill until they've presented once (flag
- // set in present()). Hover replays it any time (CSS :hover). When the
- // first-run laps finish fading, drop the class + set the flag so hover takes
- // over cleanly (a lingering class would replay the finite run on mouse-out).
- try { if (!localStorage.getItem('bento-slideshow-hinted')) pill.classList.add('ed-hint-pulse') } catch { /* storage off */ }
+ // Nudge: newcomers don't always spot how to start a show — run the neon
+ // runner around the Slideshow pill on EVERY editor load until they've
+ // actually started a slideshow once (flag set in present(), not when the
+ // hint merely plays — so it keeps nudging until it's used). Hover replays it
+ // any time (CSS :hover). When the laps finish fading, just drop the class so
+ // hover takes over cleanly (a lingering class would replay on mouse-out).
+ try { if (!localStorage.getItem('bento-slideshow-started')) pill.classList.add('ed-hint-pulse') } catch { /* storage off */ }
pill.addEventListener('animationend', (e) => {
if ((e as AnimationEvent).animationName !== 'ed-runner-fade') return
pill.classList.remove('ed-hint-pulse')
- try { localStorage.setItem('bento-slideshow-hinted', '1') } catch { /* storage off */ }
})
const caret = btn('<span class="ed-caret">▴</span>', '', () => pill.classList.toggle('open'),
t('More ways to present'))
@@ -1407,8 +1407,8 @@ export class Editor {
present(fromStart = false, fullscreen = true) {
if (this.presenting) return
- // They've found the slideshow — retire the first-run pulse for good.
- try { localStorage.setItem('bento-slideshow-hinted', '1') } catch { /* storage off */ }
+ // They've started a slideshow — retire the first-run nudge for good.
+ try { localStorage.setItem('bento-slideshow-started', '1') } catch { /* storage off */ }
document.querySelector('.ed-hint-pulse')?.classList.remove('ed-hint-pulse')
this.canvas.commitTextEdit()
this.presenting = true
diff --git a/slides/src/styles.css b/slides/src/styles.css
index 24cfa12a..0873eb04 100644
--- a/slides/src/styles.css
+++ b/slides/src/styles.css
@@ -1556,17 +1556,17 @@ body.ed-col-resizing { cursor: col-resize; user-select: none; }
inset: -1px;
border-radius: inherit;
padding: 3px;
- background: conic-gradient(from var(--ed-runner-a),
- rgb(255 107 74 / 0) 0deg,
- rgb(255 107 74 / 0) 225deg,
- rgb(255 107 74 / 0.55) 300deg,
- rgb(255 160 130 / 1) 345deg,
- rgb(255 244 238 / 1) 357deg,
- rgb(255 107 74 / 0) 360deg);
+ background: conic-gradient(from var(--ed-runner-a), /* peach = wordmark slash #FF9E8A */
+ rgb(255 158 138 / 0) 0deg,
+ rgb(255 158 138 / 0) 225deg,
+ rgb(255 158 138 / 0.55) 300deg,
+ rgb(255 184 168 / 1) 345deg,
+ rgb(255 244 238 / 1) 357deg,
+ rgb(255 158 138 / 0) 360deg);
-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
- filter: drop-shadow(0 0 2px rgb(255 140 110 / 0.95)) drop-shadow(0 0 7px rgb(255 107 74 / 0.6));
+ filter: drop-shadow(0 0 2px rgb(255 170 152 / 0.95)) drop-shadow(0 0 7px rgb(255 158 138 / 0.6));
pointer-events: none;
opacity: 0;
transition: opacity 0.5s ease; /* fade OUT on mouse-leave */
@@ -1582,13 +1582,13 @@ body.ed-col-resizing { cursor: col-resize; user-select: none; }
animation: ed-runner 1.3s linear 5, ed-runner-fade 6.5s ease-out 1 forwards;
}
@keyframes ed-runner { to { --ed-runner-a: 360deg; } }
-@keyframes ed-runner-fade { 0% { opacity: 0; } 4%, 86% { opacity: 1; } 100% { opacity: 0; } }
+@keyframes ed-runner-fade { 0% { opacity: 0; } 10%, 86% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
.ed-present-pill::after { transition: none; }
.ed-present-pill.ed-hint-pulse::after,
.ed-present-pill:hover::after {
animation: none;
- background: rgb(255 107 74 / 0.85);
+ background: rgb(255 158 138 / 0.85);
opacity: 1;
}
}