変更: assets/css/tetris.css, assets/css/theme.css, assets/js/theme.js, docs/BETA1-CHANGELOG.md, footer.php, functions.php, header.php, style.css
changedassets/css/tetris.css
--- previous/assets/css/tetris.css
+++ 0.16.0-beta.3/assets/css/tetris.css
@@ -60,7 +60,7 @@
display:grid;
height:100%;
margin:0 auto;
- width:min(1100px,calc((100dvh - var(--layout-top) - var(--footer-height) - 80px)/2 + 250px),calc(100vw - 20px));
+ width:min(1100px,calc((var(--viewport-content-height) - 80px)/2 + 250px),calc(100vw - 20px));
}
#tetris-doodle-root .row{ display:grid; grid-template-columns:minmax(0,1fr); height:100%; min-height:0; align-items:stretch; }
changedassets/css/theme.css
--- previous/assets/css/theme.css
+++ 0.16.0-beta.3/assets/css/theme.css
@@ -13,10 +13,13 @@
--ink: #202124;
--muted: #868686;
--page: 1280px;
- --site-header-height: 212.40625px;
- --desktop-context-height: 52px;
+ --brand-height: 120px;
+ --ticker-height: 35px;
+ --primary-nav-height: 58px;
+ --context-height: 52px;
--mobile-context-height: 56px;
- --layout-top: calc(var(--site-header-height) + var(--desktop-context-height));
+ --desktop-top-stack-height: calc(var(--brand-height) + var(--ticker-height) + var(--primary-nav-height) + var(--context-height));
+ --mobile-top-stack-height: 149px;
--content-edge-gap: 20px;
--page-top-clearance: var(--content-edge-gap);
--content-top: 12px;
@@ -32,7 +35,7 @@
--mobile-nav-height: 48px;
--mobile-credit-height: 16px;
--mobile-dock-height: 64px;
- --viewport-content-top: var(--layout-top);
+ --viewport-content-top: var(--desktop-top-stack-height);
--viewport-content-bottom: calc(100dvh - var(--footer-height));
--viewport-content-height: calc(var(--viewport-content-bottom) - var(--viewport-content-top));
--view-fade-duration: .86s;
@@ -49,7 +52,7 @@
}
* { box-sizing: border-box; }
-html { -webkit-tap-highlight-color:transparent; scroll-padding-top:calc(var(--layout-top) + var(--page-top-clearance)); }
+html { -webkit-tap-highlight-color:transparent; scroll-padding-top:calc(var(--desktop-top-stack-height) + var(--page-top-clearance)); }
body {
background: var(--surface);
color: var(--ink);
@@ -72,7 +75,7 @@
overflow:hidden;
position:fixed;
right:0;
- top:calc(var(--layout-top) + var(--page-top-clearance));
+ top:calc(var(--desktop-top-stack-height) + var(--page-top-clearance));
touch-action:none;
}
a { color: inherit; }
@@ -82,23 +85,21 @@
.skip-link:focus { top:8px; }
.screen-reader-text { clip:rect(1px,1px,1px,1px); clip-path:inset(50%); height:1px; overflow:hidden; position:absolute!important; white-space:nowrap; width:1px; }
-.site-header {
- background: var(--surface);
+.site-top-stack {
+ background:var(--surface);
box-shadow:0 7px 18px rgba(163,177,198,.34);
- left: 0;
- position: fixed;
- right: 0;
- top: 0;
- z-index: 9990;
-}
-.admin-bar .site-header { top: 32px; }
-.site-main { padding-top:calc(var(--layout-top) + var(--page-top-clearance)); }
-[data-context-section], [data-focus-item] { scroll-margin-top:calc(var(--layout-top) + 8px); }
-.desktop-context-slot { height:var(--desktop-context-height); overflow:visible; }
-.desktop-context-slot:empty { height:0; }
-.mobile-context-slot { display:none; }
-html[data-has-context="false"] { --desktop-context-height:0px; }
-.brand { background:var(--surface); height:119.40625px; position:relative; }
+ position:sticky;
+ top:0;
+ z-index:9990;
+}
+.admin-bar .site-top-stack { top:32px; }
+.site-header { background:var(--surface); }
+.site-main { min-height:1px; }
+[data-context-section], [data-focus-item] { scroll-margin-top:calc(var(--desktop-top-stack-height) + 8px); }
+.context-slot { height:var(--context-height); overflow:visible; }
+.context-slot:empty { height:0; }
+html[data-has-context="false"] { --context-height:0px; --desktop-top-stack-height:calc(var(--brand-height) + var(--ticker-height) + var(--primary-nav-height)); }
+.brand { background:var(--surface); height:var(--brand-height); position:relative; }
.brand::after { background:rgba(117,128,146,.48); content:""; height:1px; left:10px; position:absolute; right:10px; top:79px; }
.brand__name, .brand__role {
font-family: "Archivo Black", "Arial Black", sans-serif;
@@ -112,7 +113,7 @@
white-space: nowrap;
}
.brand__name { font-size:60px; height:60px; line-height:60px; top:19px; }
-.brand__role { color:#000; font-size:36px; height:50.40625px; line-height:50.4px; top:65px; }
+.brand__role { color:#000; font-size:36px; height:50px; line-height:50px; top:65px; }
.brand__name-text,.brand__role-text { display:inline-flex; width:max-content; }
.brand__name-character { display:inline-block; margin-right:-3px; }
.brand__role-character { display:inline-block; margin-right:-2px; }
@@ -148,8 +149,7 @@
@keyframes nav-glow { 0%,100% { box-shadow:var(--neu-small),inset 0 1px 2px rgba(255,255,255,.42),0 0 0 0 var(--glow); } 50% { box-shadow:var(--neu-small),inset 0 1px 2px rgba(255,255,255,.42),0 0 16px 5px var(--glow); } }
-.desktop-context-slot .context-nav { height:var(--desktop-context-height); padding-block:6px; }
-.desktop-context-slot .context-nav { box-shadow:0 7px 18px rgba(163,177,198,.34); }
+.context-slot .context-nav { height:var(--context-height); padding-block:6px; }
.context-nav { --context-accent:var(--green); align-items:center; background:linear-gradient(var(--surface),rgba(237,241,247,.82)); display:grid; gap:10px; grid-template-columns:100px minmax(0,1fr) 100px; height:40px; overflow:visible; padding:0 12px; white-space:nowrap; }
.context-nav--schedule { --context-accent:var(--yellow); }
@@ -256,9 +256,9 @@
.event-artists__item { display:block; min-width:0; white-space:nowrap; }
.event-artists__detail--many { gap:3px 16px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.event-artists__detail--many .event-artists__item--wide { grid-column:1 / -1; }
-.focus-page.is-focus .event-card.is-picked .event-artists__list { display:none; }
-.focus-page.is-focus .event-card.is-picked .event-artists__detail { display:block; }
-.focus-page.is-focus .event-card.is-picked .event-artists__detail--many { display:grid; }
+.focus-page.is-focus .focus-stage .event-card.is-picked .event-artists__list { display:none; }
+.focus-page.is-focus .focus-stage .event-card.is-picked .event-artists__detail { display:block; }
+.focus-page.is-focus .focus-stage .event-card.is-picked .event-artists__detail--many { display:grid; }
.detail-list,.work-row__details { display:grid; gap:3px 20px; grid-template-columns:172px minmax(0,1fr); margin:0; }
.detail-list dt,.detail-list dd,.work-row__details dt,.work-row__details dd { margin:0; }
.detail-list dd,.work-row__details dd { background:rgba(245,248,251,.48); border:1px solid rgba(255,255,255,.58); border-radius:11px; box-shadow:inset 1px 1px 3px rgba(143,158,184,.2),inset -1px -1px 3px rgba(255,255,255,.72); font-weight:700; line-height:1.45; padding:3px 9px; }
@@ -330,8 +330,6 @@
.profile-page .language-tabs { min-height:0; }
.profile-page .language-tabs__panel { height:100%; overflow:auto; overscroll-behavior:contain; }
}
-.focus-page.is-focus .event-card.is-picked.has-focus-details { overflow:visible; z-index:20; }
-.focus-page.is-focus .event-card.is-picked.has-focus-details .focus-item__extras-inner { overflow:visible; }
.event-skull-parade { align-items:end; display:grid; gap:clamp(4px,1.5vw,18px); grid-template-columns:repeat(var(--skull-count),minmax(0,1fr)); isolation:isolate; margin:0 auto; max-width:var(--skull-parade-max-width); min-height:clamp(92px,14vw,170px); overflow:visible; padding:12px clamp(6px,2vw,20px) 6px; position:relative; width:100%; }
.focus-parade-layer { bottom:calc(100dvh - var(--viewport-content-bottom) + 8px); left:50%; max-width:calc(100vw - 28px); pointer-events:none; position:fixed; transform:translateX(-50%); width:min(calc(100vw - 28px),var(--skull-parade-max-width)); z-index:9988; }
.focus-parade-layer:empty { display:none; }
@@ -373,7 +371,7 @@
.event-focus__note { background:rgba(245,248,251,.48); border:1px solid rgba(255,255,255,.58); border-radius:11px; box-shadow:inset 1px 1px 3px rgba(143,158,184,.2),inset -1px -1px 3px rgba(255,255,255,.72); font-size:16px; font-weight:700; line-height:1.45; padding:12px 14px; }
.event-focus__note p { margin:0 0 1em; }
.event-focus__note p:last-child { margin-bottom:0; }
-.focus-return-control { align-items:flex-end; background:var(--red); border:1px solid rgba(255,255,255,.5); border-radius:0 0 500px 500px; box-shadow:var(--neu-small),inset 0 1px 2px rgba(255,255,255,.42); color:#fff; cursor:pointer; display:flex; height:92px; justify-content:center; opacity:0; padding:0 0 18px; pointer-events:none; position:fixed; right:max(18px,calc((100vw - var(--record-shell)) / 2 + var(--record-shell-inline))); top:var(--layout-top); transform:translateY(-58px); transition:opacity .24s ease,transform .48s cubic-bezier(.16,1,.3,1); width:48px; z-index:9989; }
+.focus-return-control { align-items:flex-end; background:var(--red); border:1px solid rgba(255,255,255,.5); border-radius:0 0 500px 500px; box-shadow:var(--neu-small),inset 0 1px 2px rgba(255,255,255,.42); color:#fff; cursor:pointer; display:flex; height:92px; justify-content:center; opacity:0; padding:0 0 18px; pointer-events:none; position:fixed; right:max(18px,calc((100vw - var(--record-shell)) / 2 + var(--record-shell-inline))); top:var(--desktop-top-stack-height); transform:translateY(-58px); transition:opacity .24s ease,transform .48s cubic-bezier(.16,1,.3,1); width:48px; z-index:9989; }
.focus-return-control svg { fill:none; height:28px; overflow:visible; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:3.4; width:28px; }
.focus-page.is-focus .focus-return-control { opacity:1; pointer-events:auto; transform:translateY(0); }
.focus-return-control:active { box-shadow:var(--neu-inset); transform:translateY(1px); }
@@ -385,12 +383,8 @@
.focus-stage[hidden] { display:none; }
.focus-page.is-focus [data-focus-list] { display:none; }
.focus-stage > [data-focus-item] { margin:0; }
-.focus-page [data-focus-item].is-focus-moving { pointer-events:none; will-change:transform; z-index:30; }
-.focus-page.is-focus-closing [data-focus-item].is-picked { pointer-events:none; }
-.focus-page .module-section,.focus-page .year-section__title,.focus-page [data-focus-item] { transition:opacity var(--view-fade-duration) ease-in-out; }
-.focus-page:is(.is-focus-leaving,.is-focus-returning) .module-section:not(.is-picked-section),
-.focus-page:is(.is-focus-leaving,.is-focus-returning) .is-picked-section > .year-section__title,
-.focus-page:is(.is-focus-leaving,.is-focus-returning) .is-picked-section > [data-focus-item]:not(.is-picked) { opacity:0; pointer-events:none; }
+.focus-stage .is-picked.has-focus-details { overflow:visible; position:relative; z-index:20; }
+.focus-stage .is-picked.has-focus-details .focus-item__extras-inner { overflow:visible; }
.focus-panel__back { margin:0; }
.prose { font-size:17px; }
.prose p { margin:0 0 1.2em; }
@@ -434,7 +428,7 @@
overflow:hidden;
position:fixed;
right:0;
- top:calc(var(--layout-top) + var(--page-top-clearance));
+ top:calc(var(--desktop-top-stack-height) + var(--page-top-clearance));
}
.home-stage__album-link { align-items:center; color:var(--red); display:flex; flex-direction:column; font-weight:900; left:20%; position:absolute; text-decoration:none; top:20px; width:154px; z-index:2; }
.home-stage__album-link img { animation:home-skull 2.4s ease-in-out infinite; width:148px; }
@@ -467,7 +461,7 @@
@media (min-width: 768px) {
.link-row__button { font-size:clamp(14px,1.25vw,16px); white-space:nowrap; }
.home-stage {
- --home-head-position-unit:min(7.708333vw,calc((100dvh - var(--layout-top) - var(--footer-height) - 64px) / 5));
+ --home-head-position-unit:min(7.708333vw,calc((100dvh - var(--desktop-top-stack-height) - var(--footer-height) - 64px) / 5));
--home-head-size:clamp(224px,15.416667vw,296px);
background-position:center center;
background-size:cover;
@@ -494,12 +488,11 @@
}
@media (max-width: 767px) {
- :root { --site-header-height:149px; --desktop-context-height:0px; --layout-top:var(--site-header-height); --page-top-clearance:8px; --viewport-content-top:var(--layout-top); --viewport-content-bottom:calc(100dvh - var(--mobile-dock-height) - var(--mobile-context-height)); --viewport-content-height:calc(var(--viewport-content-bottom) - var(--viewport-content-top)); --content-top:4px; --content-inline:14px; --content-bottom:calc(var(--mobile-dock-height) + var(--mobile-context-height) + 6px); --module-gap:22px; --module-section-gap:28px; --module-padding:14px; --module-radius:20px; --record-shell-inline:14px; }
+ :root { --page-top-clearance:8px; --viewport-content-top:var(--mobile-top-stack-height); --viewport-content-bottom:calc(100dvh - var(--mobile-dock-height) - var(--mobile-context-height)); --viewport-content-height:calc(var(--viewport-content-bottom) - var(--viewport-content-top)); --content-top:4px; --content-inline:14px; --content-bottom:calc(var(--mobile-dock-height) + var(--mobile-context-height) + 6px); --module-gap:22px; --module-section-gap:28px; --module-padding:14px; --module-radius:20px; --record-shell-inline:14px; }
body { padding-bottom:calc(var(--mobile-dock-height) + var(--mobile-context-height)); }
html[data-has-context="false"] body { padding-bottom:var(--mobile-dock-height); }
- .site-main { padding-top:calc(var(--layout-top) + var(--page-top-clearance)); }
html[data-current-view="tetris"] .tetris-page { bottom:var(--mobile-dock-height); }
- .admin-bar .site-header { top:46px; }
+ .admin-bar .site-top-stack { top:46px; }
.brand { height:79px; }
.brand::after { top:52px; }
.brand__name { font-size:32px; height:32px; line-height:32px; top:19px; }
@@ -508,8 +501,7 @@
.news-ticker { height:32px; }
.site-nav { gap:20px; height:38px; padding:5px 15px; }
.site-nav__link { border-radius:500px; font-family:"Archivo Black",sans-serif; font-size:14px; height:28px; padding:0 3px; }
- .desktop-context-slot { display:none; }
- .context-nav { display:none; }
+
.content-shell { padding:var(--content-top) var(--content-inline) var(--content-bottom); }
.page-title,.calendar-link { font-size:28px; }
.event-card { display:block; }
@@ -537,8 +529,8 @@
.site-footer { display:none; }
.mobile-dock { bottom:0; display:block; left:0; position:fixed; right:0; z-index:9999; }
:root.is-web-app .mobile-dock { background:rgba(119,128,143,.94); padding-bottom:env(safe-area-inset-bottom, 0px); }
- .mobile-context-slot { bottom:var(--mobile-dock-height); display:block; height:var(--mobile-context-height); left:0; position:fixed; right:0; z-index:9998; }
- .mobile-context-slot:empty { display:none; }
+ .context-slot { bottom:var(--mobile-dock-height); height:var(--mobile-context-height); left:0; position:fixed; right:0; z-index:9998; }
+ .context-slot:empty { display:none; }
.context-nav { background:rgba(237,241,247,.97); bottom:auto; box-shadow:0 -5px 14px rgba(163,177,198,.5); display:grid; gap:0; grid-template-columns:20% minmax(0,60%) 20%; height:56px; left:auto; overflow:hidden; padding:0; position:relative; right:auto; z-index:auto; }
.context-nav__section-link { align-items:center; align-self:stretch; background:linear-gradient(90deg,#fff,var(--surface)); border-radius:16px; display:flex; justify-content:center; padding:0 5px; position:relative; z-index:2; }
.context-nav__section-link:last-child { background:linear-gradient(90deg,var(--surface),#fff); }
@@ -563,7 +555,7 @@
html:not([data-current-view="home"]) .home-dog,html:not([data-current-view="home"]) .home-runner-track { display:none; }
.home-dog,.home-runner-track { bottom:var(--mobile-dock-height); }
:root.is-web-app[data-current-view="home"] .home-dog { display:block !important; opacity:1; visibility:visible; }
- .admin-bar .home-stage { top:calc(var(--layout-top) + var(--page-top-clearance)); }
+ .admin-bar .home-stage { top:calc(var(--mobile-top-stack-height) + var(--page-top-clearance)); }
.focus-parade-layer {
bottom:calc(100dvh - var(--viewport-content-bottom) + 8px);
max-width:calc(100vw - 16px);
@@ -578,7 +570,7 @@
.event-skull-parade__slot img { --skull-visual-scale:1.34; }
.focus-return-control {
right:12px;
- top:var(--layout-top);
+ top:var(--mobile-top-stack-height);
}
}
@@ -609,6 +601,13 @@
.keep-phrase { white-space:normal; }
}
+@media (max-width: 767px) {
+ html { scroll-padding-top:calc(var(--mobile-top-stack-height) + 8px); }
+ [data-context-section], [data-focus-item] { scroll-margin-top:calc(var(--mobile-top-stack-height) + 8px); }
+ .site-top-stack { top:0; }
+ .admin-bar .site-top-stack { top:46px; }
+}
+
.calendar-dissolve-overlay {
overflow:hidden;changedassets/js/theme.js
--- previous/assets/js/theme.js
+++ 0.16.0-beta.3/assets/js/theme.js
@@ -6,13 +6,9 @@
var moduleDetailCache = new Map();
var targetActivation = 0;
var lastLinkThanksAnimation = -1;
- var motionTimeScale = 2;
var webAppQuery = window.matchMedia('(display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui)');
var viewFadeDuration = 860;
- function motionTime(milliseconds) {
- return milliseconds * motionTimeScale;
- }
if ('scrollRestoration' in window.history) window.history.scrollRestoration = 'manual';
@@ -44,29 +40,17 @@
root.classList.toggle('is-web-app', webAppQuery.matches || window.navigator.standalone === true);
}
- function contentTop() {
- return parseFloat(window.getComputedStyle(root).getPropertyValue('--layout-top')) || 0;
- }
-
- function scrollElementToContentTop(target) {
- if (!target) return;
- var destination = window.scrollY + target.getBoundingClientRect().top - contentTop() - 8;
- window.scrollTo({ top: Math.max(0, destination), left: 0, behavior: 'auto' });
- }
-
- function scrollTargetBelowHeader(target) {
- scrollElementToContentTop(target);
+ function stickyOffset() {
+ var stack = document.getElementById('site-top-stack');
+ return stack && window.getComputedStyle(stack).position === 'sticky' ? stack.getBoundingClientRect().height : 0;
}
function activateTarget(target) {
var activation = ++targetActivation;
if (!target) return;
- if (window.getComputedStyle(target).position === 'fixed') {
- window.scrollTo({ top: 0, left: 0, behavior: 'auto' });
- return;
- }
window.requestAnimationFrame(function () {
- if (activation === targetActivation && document.documentElement.contains(target)) scrollElementToContentTop(target);
+ if (activation !== targetActivation || !document.documentElement.contains(target)) return;
+ target.scrollIntoView({ block: 'start', behavior: 'auto' });
});
}
@@ -79,25 +63,30 @@
activateTarget(document.getElementById(hash));
}
+ function contextSlot() {
+ return document.querySelector('[data-context-slot]');
+ }
+
function contextSlots() {
- return Array.from(document.querySelectorAll('[data-context-slot]'));
+ var slot = contextSlot();
+ return slot ? [slot] : [];
}
function contextHtml() {
- var slot = contextSlots()[0];
+ var slot = contextSlot();
return slot ? slot.innerHTML : '';
}
function setContextHtml(html) {
+ var slot = contextSlot();
var value = html || '';
- contextSlots().forEach(function (slot) { slot.innerHTML = value; });
+ if (slot) slot.innerHTML = value;
root.setAttribute('data-has-context', value.trim() ? 'true' : 'false');
}
function visibleContext() {
- return contextSlots().map(function (slot) { return slot.firstElementChild; }).find(function (node) {
- return node && window.getComputedStyle(node).display !== 'none';
- }) || null;
+ var slot = contextSlot();
+ return slot ? slot.firstElementChild : null;
}
function setupTabs() {
@@ -153,34 +142,10 @@
}
function calendarDateFromRoot(calendarRoot) {
- var candidates = [
- calendarRoot.getAttribute('data-current-date'),
- calendarRoot.getAttribute('data-date'),
- calendarRoot.getAttribute('data-month'),
- calendarRoot.textContent
- ].filter(Boolean);
- for (var index = 0; index < candidates.length; index += 1) {
- var match = String(candidates[index]).match(/((?:19|20)\d{2})\D{0,6}(1[0-2]|0?[1-9])/);
- if (match) return { year: Number(match[1]), month: Number(match[2]) };
- }
- var now = new Date();
- return { year: now.getFullYear(), month: now.getMonth() + 1 };
- }
-
- function calendarNavButtons(calendarRoot) {
- var buttons = Array.from(calendarRoot.querySelectorAll('.jaikki-calendar__nav, button, [role="button"]'));
- var previous = null;
- var next = null;
- buttons.forEach(function (button) {
- var label = [button.getAttribute('aria-label'), button.getAttribute('title'), button.textContent].filter(Boolean).join(' ').toLowerCase();
- if (!previous && /(prev|previous|前|戻|‹|←)/.test(label)) previous = button;
- if (!next && /(next|次|進|›|→)/.test(label)) next = button;
- });
- if ((!previous || !next) && buttons.length >= 2) {
- previous = previous || buttons[0];
- next = next || buttons[buttons.length - 1];
- }
- return { previous: previous, next: next };
+ var value = calendarRoot.getAttribute('data-current-date') || '';
+ var match = value.match(/^((?:19|20)\d{2})-(1[0-2]|0[1-9])$/);
+ if (!match) return null;
+ return { year: Number(match[1]), month: Number(match[2]) };
}
function navigateCalendarTo(year, month) {
@@ -195,7 +160,7 @@
calendarRoot.dispatchEvent(event);
if (event.defaultPrevented) return true;
- var directTarget = calendarRoot.querySelector('[data-year="' + targetYear + '"][data-month="' + targetMonth + '"], [data-date="' + targetYear + '-' + String(targetMonth).padStart(2, '0') + '"]');
+ var directTarget = calendarRoot.querySelector('[data-jcs-year="' + targetYear + '"][data-jcs-month="' + targetMonth + '"]');
if (directTarget) {
directTarget.click();
return true;
@@ -229,6 +194,7 @@
function shiftMonth(offset) {
var current = calendarDateFromRoot(calendarRoot);
+ if (!current) return;
var target = new Date(current.year, current.month - 1 + offset, 1);
navigateCalendarTo(target.getFullYear(), target.getMonth());
}
@@ -316,7 +282,7 @@
return a.boundingClientRect.top - b.boundingClientRect.top;
})[0];
if (visible) select(visible.target.getAttribute('data-context-key'));
- }, { rootMargin: '-' + Math.round(contentTop() + 8) + 'px 0px -70% 0px', threshold: 0 });
+ }, { rootMargin: '-' + Math.round(stickyOffset() + 8) + 'px 0px -70% 0px', threshold: 0 });
sections.forEach(function (section) { observer.observe(section); });
registerViewCleanup(function () { observer.disconnect(); });
}
@@ -353,8 +319,8 @@
skull.classList.add('event-skull-motion--' + Math.floor(Math.random() * 10));
skull.style.setProperty('--skull-from-x', (fromRight ? distance : -distance) + 'px');
skull.style.setProperty('--skull-spin', (fromRight ? -turns : turns) + 'deg');
- skull.style.setProperty('--skull-delay', ((index * 0.09 + Math.random() * 0.22) * motionTimeScale).toFixed(2) + 's');
- skull.style.setProperty('--skull-duration', ((1.25 + Math.random() * 1.05) * motionTimeScale).toFixed(2) + 's');
+ skull.style.setProperty('--skull-delay', (index * 0.18 + Math.random() * 0.44).toFixed(2) + 's');
+ skull.style.setProperty('--skull-duration', (2.5 + Math.random() * 2.1).toFixed(2) + 's');
});
window.requestAnimationFrame(function () { parade.classList.add('is-rolling'); });
});
@@ -389,39 +355,31 @@
if (!page) return;
var list = page.querySelector('[data-focus-list]');
if (!list) return;
+
var stage = document.createElement('div');
stage.className = 'focus-stage';
stage.setAttribute('data-focus-stage', '');
stage.hidden = true;
page.insertBefore(stage, list);
- var supportsFloatingReturn = ['opus', 'works', 'schedule'].indexOf(page.getAttribute('data-view-root')) !== -1;
- var returnControl = null;
- if (supportsFloatingReturn) {
- returnControl = document.createElement('button');
- returnControl.className = 'focus-return-control';
- returnControl.type = 'button';
- returnControl.setAttribute('aria-label', '一覧へ戻る');
- returnControl.setAttribute('data-focus-close', '');
- returnControl.innerHTML = '<svg viewBox="0 0 32 32" aria-hidden="true" focusable="false"><path d="M25 5v8c0 5.8-3.7 9-9.5 9H7"/><path d="M13 15.5 6.5 22 13 28.5"/></svg>';
- page.appendChild(returnControl);
- }
+
+ var returnControl = document.createElement('button');
+ returnControl.className = 'focus-return-control';
+ returnControl.type = 'button';
+ returnControl.setAttribute('aria-label', '一覧へ戻る');
+ returnControl.setAttribute('data-focus-close', '');
+ returnControl.innerHTML = '<svg viewBox="0 0 32 32" aria-hidden="true" focusable="false"><path d="M25 5v8c0 5.8-3.7 9-9.5 9H7"/><path d="M13 15.5 6.5 22 13 28.5"/></svg>';
+ page.appendChild(returnControl);
+
var paradeLayer = document.createElement('div');
paradeLayer.className = 'focus-parade-layer';
paradeLayer.setAttribute('aria-hidden', 'true');
document.body.appendChild(paradeLayer);
- var activeItem = null;
- var activeSection = null;
- var originParent = null;
- var originNextSibling = null;
- var listUrl = window.location.href;
+
+ var activeSource = null;
+ var activeClone = null;
+ var listUrl = archiveUrl();
var archiveTitle = document.title;
var savedListScroll = 0;
- var transitionId = 0;
- var reduceFocusMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
- var onArtistResize = function () { if (activeItem) layoutEventArtists(activeItem); };
- window.addEventListener('resize', onArtistResize, { passive: true });
- registerViewCleanup(function () { window.removeEventListener('resize', onArtistResize); });
-
function clearParadeLayer() {
resetEventSkullParades(paradeLayer);
@@ -437,45 +395,52 @@
setupEventSkullParades(paradeLayer);
}
+ function archiveUrl() {
+ var listBase = page.getAttribute('data-view-list-url');
+ if (listBase) return listBase;
+ var url = new URL(window.location.href);
+ url.searchParams.delete('focus');
+ url.searchParams.delete('item');
+ url.searchParams.delete('event');
+ url.hash = '';
+ return url.href;
+ }
+
+ function sanitizeClone(clone) {
+ clone.removeAttribute('id');
+ clone.querySelectorAll('[id]').forEach(function (node) { node.removeAttribute('id'); });
+ clone.querySelectorAll('[data-focus-link]').forEach(function (link) {
+ link.removeAttribute('data-focus-link');
+ link.setAttribute('tabindex', '-1');
+ });
+ return clone;
+ }
+
function loadDetails(item, type, itemId) {
var slot = item.querySelector('[data-focus-details]');
if (!slot || !window.fetch) return;
var cacheKey = type + ':' + itemId;
- var reveal = function (html) {
- if (!document.documentElement.contains(item)) return;
- if (slot.getAttribute('data-details-loaded') !== 'true') {
- var details = document.createElement('div');
- details.className = 'focus-item__extras-inner';
- details.innerHTML = html || '';
- var paradeTemplate = details.querySelector('[data-event-skull-parade]');
- if (paradeTemplate) slot.setAttribute('data-parade-html', paradeTemplate.outerHTML);
- renderParadeFromDetails(details);
- slot.replaceChildren(details);
- slot.setAttribute('data-details-loaded', 'true');
- } else {
- clearParadeLayer();
- var paradeHtml = slot.getAttribute('data-parade-html');
- if (paradeHtml) {
- var holder = document.createElement('div');
- holder.innerHTML = paradeHtml;
- renderParadeFromDetails(holder);
- }
- }
+
+ function reveal(html) {
+ if (activeClone !== item || !document.documentElement.contains(item)) return;
+ var details = document.createElement('div');
+ details.className = 'focus-item__extras-inner';
+ details.innerHTML = html || '';
+ renderParadeFromDetails(details);
+ slot.replaceChildren(details);
slot.removeAttribute('aria-busy');
item.classList.remove('is-expanding');
- window.requestAnimationFrame(function () {
- if (activeItem !== item || page.classList.contains('is-focus-closing')) return;
- item.classList.add('has-focus-details');
- layoutEventArtists(item);
-
- });
- };
+ item.classList.add('has-focus-details');
+ layoutEventArtists(item);
+ }
+
item.classList.add('is-expanding');
slot.setAttribute('aria-busy', 'true');
if (moduleDetailCache.has(cacheKey)) {
reveal(moduleDetailCache.get(cacheKey));
return;
}
+
var endpoint = window.location.origin + '/wp-json/ho/v1/details/' + encodeURIComponent(type) + '/' + encodeURIComponent(itemId);
window.fetch(endpoint, { credentials: 'same-origin' }).then(function (response) {
if (!response.ok) throw new Error('Module details request failed');
@@ -485,76 +450,47 @@
moduleDetailCache.set(cacheKey, html);
reveal(html);
}).catch(function () {
- if (!document.documentElement.contains(item)) return;
+ if (activeClone !== item) return;
slot.removeAttribute('aria-busy');
item.classList.remove('is-expanding');
});
}
- function archiveUrl() {
- var listBase = page.getAttribute('data-view-list-url');
- if (listBase) return listBase;
- var url = new URL(window.location.href);
- url.searchParams.delete('focus');
- url.searchParams.delete('item');
- url.searchParams.delete('event');
- url.hash = '';
- return url.href;
- }
-
function closeItem() {
- if (!activeItem || page.classList.contains('is-focus-closing')) return;
- var restoredItem = activeItem;
- var restoredSection = activeSection;
- page.classList.add('is-focus-closing');
+ if (!activeClone) return;
clearParadeLayer();
- restoredItem.classList.remove('is-expanding', 'has-focus-details');
-
- originParent.insertBefore(restoredItem, originNextSibling);
+ stage.replaceChildren();
stage.hidden = true;
- page.classList.remove('is-focus', 'is-focus-leaving', 'is-focus-closing', 'is-focus-returning');
+ list.hidden = false;
+ page.classList.remove('is-focus');
+ if (activeSource) activeSource.removeAttribute('aria-current');
+ activeSource = null;
+ activeClone = null;
+ document.title = archiveTitle;
window.scrollTo({ top: savedListScroll, left: 0, behavior: 'auto' });
-
- activeItem = null;
- activeSection = null;
- originParent = null;
- originNextSibling = null;
- document.title = archiveTitle;
- restoredItem.classList.remove('is-picked', 'is-focus-moving');
- restoredItem.removeAttribute('aria-current');
- if (restoredSection) restoredSection.classList.remove('is-picked-section');
- }
-
- function openItem(item, link, initial) {
- if (!item || !link || activeItem) return;
- activeItem = item;
+ }
+
+ function openItem(source, link, initial) {
+ if (!source || !link || activeClone) return;
+ var type = source.getAttribute('data-focus-type');
+ var itemId = source.getAttribute('data-focus-id');
+ if (!type || !itemId) return;
+
+ activeSource = source;
+ activeSource.setAttribute('aria-current', 'true');
+ activeClone = sanitizeClone(source.cloneNode(true));
+ activeClone.classList.add('is-picked');
savedListScroll = initial ? 0 : window.scrollY;
- listUrl = archiveUrl() + '#' + item.id;
- var type = item.getAttribute('data-focus-type');
- var itemId = item.getAttribute('data-focus-id');
- originParent = item.parentNode;
- originNextSibling = item.nextSibling;
- activeSection = item.closest('.module-section');
- if (activeSection) activeSection.classList.add('is-picked-section');
- item.classList.add('is-picked');
- item.setAttribute('aria-current', 'true');
+ listUrl = archiveUrl() + (source.id ? '#' + source.id : '');
+
+ stage.replaceChildren(activeClone);
+ stage.hidden = false;
+ list.hidden = true;
+ page.classList.add('is-focus');
replaceLocation(archiveUrl() + '#focus-' + type + '-' + itemId, { hoPartial: true, hoListFocus: true });
document.title = link.textContent.trim() + ' – ' + archiveTitle;
- var thisTransition = ++transitionId;
- var finish = function () {
- if (thisTransition !== transitionId || activeItem !== item) return;
- stage.hidden = false;
- stage.appendChild(item);
- page.classList.remove('is-focus-leaving');
- page.classList.add('is-focus');
- window.scrollTo({ top: 0, left: 0, behavior: 'auto' });
- loadDetails(item, type, itemId);
- };
- if (initial || reduceFocusMotion) finish();
- else {
- page.classList.add('is-focus-leaving');
- window.setTimeout(finish, motionTime(190));
- }
+ window.scrollTo({ top: 0, left: 0, behavior: 'auto' });
+ loadDetails(activeClone, type, itemId);
}
var onFocusClick = function (event) {
@@ -573,30 +509,28 @@
};
page.addEventListener('click', onFocusClick);
+ var onResize = function () { if (activeClone) layoutEventArtists(activeClone); };
+ window.addEventListener('resize', onResize, { passive: true });
+
registerViewCleanup(listen(window, 'popstate', function () {
- if (activeItem && !/^#focus-(event|work|credit)-[0-9]+$/.test(window.location.hash) && !new URL(window.location.href).searchParams.get('focus')) closeItem();
+ if (activeClone && !/^#focus-(event|work|credit)-[0-9]+$/.test(window.location.hash) && !new URL(window.location.href).searchParams.get('focus')) closeItem();
}));
- registerViewCleanup(function () {
- transitionId += 1;
- page.removeEventListener('click', onFocusClick);
- if (activeItem && originParent) {
- originParent.insertBefore(activeItem, originNextSibling);
- activeItem.classList.remove('is-picked', 'is-expanding', 'has-focus-details', 'is-focus-moving');
- activeItem.removeAttribute('aria-current');
- if (activeSection) activeSection.classList.remove('is-picked-section');
- }
- clearParadeLayer();
- if (returnControl) returnControl.remove();
- paradeLayer.remove();
- stage.remove();
- page.classList.remove('is-focus', 'is-focus-leaving', 'is-focus-closing', 'is-focus-returning');
- });
-
registerViewCleanup(listen(document, 'ho:resetfocus', function () {
- if (!activeItem) return;
+ if (!activeClone) return;
replaceLocation(archiveUrl(), { hoPartial: true });
closeItem();
}));
+ registerViewCleanup(function () {
+ page.removeEventListener('click', onFocusClick);
+ window.removeEventListener('resize', onResize);
+ clearParadeLayer();
+ paradeLayer.remove();
+ returnControl.remove();
+ stage.remove();
+ list.hidden = false;
+ page.classList.remove('is-focus');
+ if (activeSource) activeSource.removeAttribute('aria-current');
+ });
var initialUrl = new URL(window.location.href);
var focusHash = initialUrl.hash.match(/^#focus-(event|work|credit)-([0-9]+)$/);
@@ -768,7 +702,7 @@
});
}
- function captureView(view, main, contextSlot) {
+ function captureView(view, main) {
var fragment = document.createDocumentFragment();
while (main.firstChild) fragment.appendChild(main.firstChild);
viewStates.set(view, { fragment: fragment, contextHtml: contextHtml(), title: document.title });
@@ -789,7 +723,6 @@
targetActivation += 1;
navigating = true;
var main = document.querySelector('.site-main');
- var contextSlot = contextSlots()[0];
var fromView = currentView();
var calendarDissolve = fromView === 'calendar' && targetView === 'calendar';
var oldCalendarPage = calendarDissolve ? document.querySelector('.calendar-page') : null;
@@ -803,7 +736,7 @@
var result = results[0];
disposeView();
if (fromView === targetView) main.replaceChildren();
- else captureView(fromView, main, contextSlot);
+ else captureView(fromView, main);
var contextHtml = '';
var title = '';
var assets = null;changeddocs/BETA1-CHANGELOG.md
--- previous/docs/BETA1-CHANGELOG.md
+++ 0.16.0-beta.3/docs/BETA1-CHANGELOG.md
@@ -115,3 +115,13 @@
- Calendarの同一ページ内履歴(前月・次月・年移動)をブラウザバックで復元。
- 重複していたProfile文脈ナビ条件を削除。
- サービスアカウント方式の companion plugin に対応。
+
+## 0.16.0-beta.3
+
+- Rebuilt the top layout as one sticky document-flow stack; removed content-offset padding and measured header constants.
+- Replaced duplicate desktop/mobile context navigation DOM with one responsive context slot.
+- Rebuilt single-module focus mode to render a clone while keeping the archive DOM untouched.
+- Removed legacy focus-transition classes, DOM move/restore calculations, and scaled animation timing helpers.
+- Limited scrolling code to explicit hash navigation and stored-list-position restoration.
+- Changed calendar integration to use the plugin's documented `data-current-date` and `data-jcs-*` attributes instead of text heuristics.
+- Removed obsolete layout variables from the Tetris integration.
changedfooter.php
--- previous/footer.php
+++ 0.16.0-beta.3/footer.php
@@ -6,7 +6,6 @@
*/
?>
</main>
-<div class="mobile-context-slot" data-context-slot="mobile"><?php echo ho_view_context_html( ho_current_view() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
<img class="home-dog" src="<?php echo esc_url( get_template_directory_uri() . '/assets/img/8686_dog.webp' ); ?>" alt="" aria-hidden="true">
<div class="home-runner-track" aria-hidden="true"><a href="<?php echo esc_url( ho_view_url( 'calendar' ) ); ?>" data-view-link="calendar" tabindex="-1"><img src="<?php echo esc_url( get_template_directory_uri() . '/assets/img/8686_skull-run.webp' ); ?>" alt=""></a></div>
<footer class="site-footer">©Skeleton Music Factory, Japan</footer>
changedfunctions.php
--- previous/functions.php
+++ 0.16.0-beta.3/functions.php
@@ -9,7 +9,7 @@
exit;
}
-define( 'HO_THEME_VERSION', '0.16.0-beta.2' );
+define( 'HO_THEME_VERSION', '0.16.0-beta.3' );
require_once get_template_directory() . '/inc/setup.php';
require_once get_template_directory() . '/inc/post-types.php';
changedheader.php
--- previous/header.php
+++ 0.16.0-beta.3/header.php
@@ -20,6 +20,7 @@
<body <?php body_class( 'ho-site' ); ?>>
<?php wp_body_open(); ?>
<a class="skip-link" href="#main-content">本文へ移動</a>
+<div class="site-top-stack" id="site-top-stack">
<header class="site-header" id="site-header">
<div class="brand">
<?php $brand_name = get_theme_mod( 'ho_brand_name', 'Hiroki Ohnuma' ); $brand_role = get_theme_mod( 'ho_role', 'composer' ); ?>
@@ -29,6 +30,7 @@
</div>
<?php ho_recent_posts_ticker(); ?>
<?php ho_render_primary_nav(); ?>
- <div class="desktop-context-slot" data-context-slot="desktop"><?php echo $context_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
</header>
+ <div class="context-slot" data-context-slot><?php echo $context_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
+</div>
<main class="site-main" id="main-content">
changedstyle.css
--- previous/style.css
+++ 0.16.0-beta.3/style.css
@@ -3,7 +3,7 @@
Theme URI: https://8686.jaikki-rocky.com/
Author: Hiroki Ohnuma / Codex
Description: Beta 1 edition of the Hiroki Ohnuma official site theme. A lightweight, plugin-independent theme preserving the current visual system.
-Version: 0.16.0-beta.2
+Version: 0.16.0-beta.3
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: hiroki-ohnuma