Bento, the office suite that fits in a file
TypeScript mit-licenseofficeoffice-365office-suiteoffice-toolsoffice365open-sourcepowerpointself-hostedsingle-page-appslidesslideshareslideshowslideshow-galleryslideshow-makerslideshows
Editor: first-run Slideshow nudge + About links back to bento.page
nyblnete87ba35ec6e8
diff --git a/slides/src/editor/editor.ts b/slides/src/editor/editor.tsindex 0787872e..3a425602 100644--- a/slides/src/editor/editor.ts+++ b/slides/src/editor/editor.ts@@ -283,6 +283,9 @@ 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 — pulse+ // the Slideshow pill until they've presented once (flag set in present()).+ try { if (!localStorage.getItem('bento-slideshow-hinted')) pill.classList.add('ed-hint-pulse') } catch { /* storage off */ }const caret = btn('<span class="ed-caret">▴</span>', '', () => pill.classList.toggle('open'),t('More ways to present'))caret.classList.add('ed-pill-caret')@@ -1396,6 +1399,9 @@ 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 */ }+ document.querySelector('.ed-hint-pulse')?.classList.remove('ed-hint-pulse')this.canvas.commitTextEdit()this.presenting = truestartPresentation(this.store.doc, fromStart ? 0 : this.store.currentIndex, (last) => {@@ -1927,15 +1933,30 @@ export class Editor {const box = div('ed-about')const head = div('ed-about-head')+ // The logo/wordmark links home (new tab) — a gentle route back to the site.head.innerHTML =+ `<a class="ed-about-logo" href="https://bento.page" target="_blank" rel="noopener">` +`<svg viewBox="0 0 32 32" width="28" height="28" aria-hidden="true">` +`<rect width="32" height="32" rx="7" fill="#16273E"/>` +`<rect x="5" y="5" width="7" height="22" rx="2.5" fill="#5E7699"/>` +`<rect x="14" y="5" width="13" height="10" rx="2.5" fill="#FF9E8A"/>` +`<rect x="14" y="17" width="13" height="10" rx="2.5" fill="#F0EBE0"/>` +- `</svg><div><b>Bento<span style="color:#FF9E8A">/</span>Slides</b><span>v${APP_VERSION} · format v${FORMAT_VERSION}</span></div>`+ `</svg><div><b>Bento<span style="color:#FF9E8A">/</span>Slides</b><span>v${APP_VERSION} · format v${FORMAT_VERSION}</span></div>` ++ `</a>`+ head.querySelector('a')?.setAttribute('title', t('Visit bento.page (opens in a new tab)'))box.appendChild(head)+ // Engagement nudge back to the site (templates / gallery / agent guide).+ const promo = div('ed-about-promo')+ promo.innerHTML = t(+ 'New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.',+ {+ home: '<a href="https://bento.page" target="_blank" rel="noopener">bento.page</a>',+ gh: '<a href="https://github.com/nyblnet/bento" target="_blank" rel="noopener">GitHub</a>',+ },+ )+ box.appendChild(promo)+const status = div('ed-about-status')status.textContent =this.lastAutoCheck?.status === 'current'diff --git a/slides/src/i18n/de.ts b/slides/src/i18n/de.tsindex a20d2808..2873eb9d 100644--- a/slides/src/i18n/de.ts+++ b/slides/src/i18n/de.ts@@ -4,6 +4,8 @@import type { Catalog } from '../i18n'export const de: Catalog = {+ "Visit bento.page (opens in a new tab)": "bento.page besuchen (öffnet in neuem Tab)",+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "Neu bei Bento? Vorlagen, die Galerie und den KI-Bearbeitungsleitfaden findest du auf {home} — oder gib ⭐ auf {gh}.","Morph": "Morph","Morph id": "Morph-ID","Pair with": "Verknüpfen mit",diff --git a/slides/src/i18n/es.ts b/slides/src/i18n/es.tsindex 0d2608c4..aae8fb4b 100644--- a/slides/src/i18n/es.ts+++ b/slides/src/i18n/es.ts@@ -4,6 +4,8 @@import type { Catalog } from '../i18n'export const es: Catalog = {+ "Visit bento.page (opens in a new tab)": "Visitar bento.page (se abre en una pestaña nueva)",+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "¿Nuevo en Bento? Encuentra plantillas, la galería y la guía de edición con IA en {home} — o dale ⭐ en {gh}.","Morph": "Morph","Morph id": "Id de morph","Pair with": "Emparejar con",diff --git a/slides/src/i18n/fr.ts b/slides/src/i18n/fr.tsindex 75caa830..ccc3badd 100644--- a/slides/src/i18n/fr.ts+++ b/slides/src/i18n/fr.ts@@ -4,6 +4,8 @@import type { Catalog } from '../i18n'export const fr: Catalog = {+ "Visit bento.page (opens in a new tab)": "Visiter bento.page (nouvel onglet)",+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "Nouveau sur Bento ? Trouvez des modèles, la galerie et le guide d’édition par IA sur {home} — ou mettez une ⭐ sur {gh}.","Morph": "Morph","Morph id": "Id de morph","Pair with": "Associer à",diff --git a/slides/src/i18n/it.ts b/slides/src/i18n/it.tsindex 7986ee72..89e78474 100644--- a/slides/src/i18n/it.ts+++ b/slides/src/i18n/it.ts@@ -4,6 +4,8 @@import type { Catalog } from '../i18n'export const it: Catalog = {+ "Visit bento.page (opens in a new tab)": "Visita bento.page (si apre in una nuova scheda)",+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "Nuovo su Bento? Trovi modelli, la galleria e la guida all’editing con IA su {home} — o metti una ⭐ su {gh}.","Morph": "Morph","Morph id": "Id morph","Pair with": "Abbina a",diff --git a/slides/src/i18n/ja.ts b/slides/src/i18n/ja.tsindex 391cabdc..d8357782 100644--- a/slides/src/i18n/ja.ts+++ b/slides/src/i18n/ja.ts@@ -4,6 +4,8 @@import type { Catalog } from '../i18n'export const ja: Catalog = {+ "Visit bento.page (opens in a new tab)": "bento.page を開く(新しいタブ)",+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "Bento は初めてですか?テンプレート、ギャラリー、AI編集ガイドは {home} でどうぞ — {gh} で ⭐ もぜひ。","Morph": "モーフ","Morph id": "モーフ id","Pair with": "ペア設定",diff --git a/slides/src/i18n/zh-Hans.ts b/slides/src/i18n/zh-Hans.tsindex 278cee6c..96a3fb4a 100644--- a/slides/src/i18n/zh-Hans.ts+++ b/slides/src/i18n/zh-Hans.ts@@ -4,6 +4,8 @@import type { Catalog } from '../i18n'export const zhHans: Catalog = {+ "Visit bento.page (opens in a new tab)": "访问 bento.page(在新标签页打开)",+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "第一次用 Bento?在 {home} 查看模板、图库和 AI 编辑指南 — 也欢迎到 {gh} 点 ⭐。","Morph": "变形","Morph id": "变形 id","Pair with": "配对",diff --git a/slides/src/i18n/zh-Hant.ts b/slides/src/i18n/zh-Hant.tsindex aad282c6..514b7eaa 100644--- a/slides/src/i18n/zh-Hant.ts+++ b/slides/src/i18n/zh-Hant.ts@@ -4,6 +4,8 @@import type { Catalog } from '../i18n'export const zhHant: Catalog = {+ "Visit bento.page (opens in a new tab)": "造訪 bento.page(在新分頁開啟)",+ "New to Bento? Find templates, the gallery and the AI editing guide at {home} — or ⭐ it on {gh}.": "第一次用 Bento?在 {home} 查看範本、圖庫和 AI 編輯指南 — 也歡迎到 {gh} 按 ⭐。","Morph": "變形","Morph id": "變形 id","Pair with": "配對",diff --git a/slides/src/styles.css b/slides/src/styles.cssindex 1d13efb3..ff8b5b27 100644--- a/slides/src/styles.css+++ b/slides/src/styles.css@@ -508,6 +508,25 @@ option { background: #fff; color: #1e2a3a; }}.ed-about-head b { font-size: 15px; display: block; }.ed-about-head span { font-size: 11.5px; color: var(--muted); }+/* logo/wordmark links home — keep it looking like the logo, not a link */+.ed-about-logo {+ display: flex;+ align-items: center;+ gap: 10px;+ color: inherit;+ text-decoration: none;+ border-radius: 8px;+}+.ed-about-logo:hover { opacity: 0.82; }+/* engagement line back to the site */+.ed-about-promo {+ font-size: 12.5px;+ color: var(--muted);+ line-height: 1.5;+ margin: -2px 0 2px;+}+.ed-about-promo a { color: var(--blue); text-decoration: none; }+.ed-about-promo a:hover { text-decoration: underline; }.ed-about-row { display: flex; gap: 8px; }.ed-about-status {min-height: 18px;@@ -1512,6 +1531,17 @@ body.ed-col-resizing { cursor: col-resize; user-select: none; }box-shadow: 0 4px 14px rgb(20 30 45 / 0.10);overflow: visible;}+/* first-run nudge: an expanding ring draws the eye to how to start a show.+ Runs a few times then settles; retired for good once they present (JS). */+@keyframes ed-hint-pulse {+ 0% { box-shadow: 0 4px 14px rgb(20 30 45 / 0.10), 0 0 0 0 rgb(91 141 239 / 0.55); }+ 70% { box-shadow: 0 4px 14px rgb(20 30 45 / 0.10), 0 0 0 11px rgb(91 141 239 / 0); }+ 100% { box-shadow: 0 4px 14px rgb(20 30 45 / 0.10), 0 0 0 0 rgb(91 141 239 / 0); }+}+.ed-present-pill.ed-hint-pulse { animation: ed-hint-pulse 1.8s ease-out 4; }+@media (prefers-reduced-motion: reduce) {+ .ed-present-pill.ed-hint-pulse { animation: none; box-shadow: 0 4px 14px rgb(20 30 45 / 0.10), 0 0 0 3px rgb(91 141 239 / 0.5); }+}.ed-present-pill .ed-pill-main {border-radius: 999px 0 0 999px;padding: 6px 10px 6px 14px;