From c23c8fb5c547540c0705bef900340c9a6e358126 Mon Sep 17 00:00:00 2001 From: Yasutake Yohei <61961825+yasutakeyohei@users.noreply.github.com> Date: Sat, 3 Oct 2026 14:36:10 +0900 Subject: public/bluebey-studio: 鼻ちょうちんを球に、寝ている動きを追加、見出しにアイコン MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 鼻ちょうちんを単純な球にし、奥行き(おくゆき)も設定できるように - 「ねている」の動きを追加。呼吸に合わせて鼻ちょうちんが膨らみ・縮む - 各タブの見出し(メニュー一覧)にアイコンを追加 - 操作案内の文言を実態(ぶるべーをドラッグで移動)に合わせて更新 --- public/bluebey-studio/src/ui.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'public/bluebey-studio/src/ui.js') diff --git a/public/bluebey-studio/src/ui.js b/public/bluebey-studio/src/ui.js index e184f5e..46c5adb 100644 --- a/public/bluebey-studio/src/ui.js +++ b/public/bluebey-studio/src/ui.js @@ -36,10 +36,12 @@ export function toast(message) { toastTimer = setTimeout(() => node.classList.remove('show'), 2400); } -export function section(parent, title, { open = false } = {}) { +export function section(parent, title, { open = false, icon = null } = {}) { const body = h('div', { class: 'sec-body' }); const head = h('button', { type: 'button', class: 'sec-head' }, - h('span', { text: title }), + h('span', { class: 'sec-title' }, + icon ? secIcon(icon) : null, + h('span', { text: title })), h('span', { class: 'chev', text: '▾' })); const el = h('section', { class: `sec${open ? '' : ' closed'}` }, head, body); head.addEventListener('click', () => el.classList.toggle('closed')); @@ -83,6 +85,15 @@ function tabIcon(d) { return svg; } +function secIcon(d) { + const svg = tabIcon(d); + svg.setAttribute('class', 'sec-icon'); + svg.setAttribute('width', '16'); + svg.setAttribute('height', '16'); + svg.style.verticalAlign = 'middle'; + return svg; +} + /** * Tabbed container: returns the per-tab panels to fill in. When a definition * carries an `icon` (an SVG path `d`) the tab shows only that icon, and the -- cgit v1.3.1