This commit is contained in:
@@ -379,11 +379,41 @@
|
||||
"title": "Working on Eid day",
|
||||
"url": "/blogs/2026/05-may/working-on-eid-day-27-05-26.html"
|
||||
},
|
||||
{
|
||||
"slug": "07-06-26-week-review",
|
||||
"title": "[07-06-2026] - Weekly Review",
|
||||
"url": "/blogs/2026/06-june/07-06-week-review.html"
|
||||
},
|
||||
{
|
||||
"slug": "14-06-26-week-review",
|
||||
"title": "[14-06-2026] - Weekly Review",
|
||||
"url": "/blogs/2026/06-june/14-06-week-review.html"
|
||||
},
|
||||
{
|
||||
"slug": "21-06-26-week-review",
|
||||
"title": "[21-06-2026] - Weekly Review",
|
||||
"url": "/blogs/2026/06-june/21-06-week-review.html"
|
||||
},
|
||||
{
|
||||
"slug": "28-06-26-week-review",
|
||||
"title": "[28-06-2026] - Weekly Review",
|
||||
"url": "/blogs/2026/06-june/28-06-week-review.html"
|
||||
},
|
||||
{
|
||||
"slug": "cleaning-up-the-repos",
|
||||
"title": "Cleaning up the repos",
|
||||
"url": "/blogs/2026/06-june/cleaning-up-the-repos.html"
|
||||
},
|
||||
{
|
||||
"slug": "05-07-26-week-review",
|
||||
"title": "[05-07-2026] - Weekly Review",
|
||||
"url": "/blogs/2026/07-july/05-07-week-review.html"
|
||||
},
|
||||
{
|
||||
"slug": "12-07-26-week-review",
|
||||
"title": "[12-07-2026] - Weekly Review",
|
||||
"url": "/blogs/2026/07-july/12-07-week-review.html"
|
||||
},
|
||||
{
|
||||
"slug": "publish-pages",
|
||||
"title": "How to publish pages using Org Publish",
|
||||
|
||||
356
assets/scripts/pages/house.js
Executable file
356
assets/scripts/pages/house.js
Executable file
@@ -0,0 +1,356 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
const STORAGE_KEY = "zxh_house_of_pages_v1";
|
||||
const MAIN_ROOM_IDS = Object.freeze([
|
||||
"foyer", "library", "study", "kitchen", "workshop", "playroom", "attic", "garden"
|
||||
]);
|
||||
|
||||
const ROOMS = Object.freeze({
|
||||
foyer: room({
|
||||
title: "Foyer",
|
||||
eyebrow: "Arrivals",
|
||||
description: "The front door opens onto the newest corners of the site.",
|
||||
caption: "A brass key waits in a blue bowl beside the door.",
|
||||
curated: [
|
||||
["Home", "/"],
|
||||
["Recently updated", "/recently-updated.html"],
|
||||
["Contact", "/home/contact.html"]
|
||||
],
|
||||
include: ["/recently-updated.html", "/home/contact.html"]
|
||||
}),
|
||||
library: room({
|
||||
title: "Library",
|
||||
eyebrow: "Knowledge",
|
||||
description: "Notes and lasting ideas gather here, arranged less strictly than the shelves suggest.",
|
||||
caption: "One book has been returned with a pressed leaf instead of a bookmark.",
|
||||
curated: [
|
||||
["All posts", "/posts/posts-list.html"],
|
||||
["Categories", "/home/categories.html"],
|
||||
["Posts introduction", "/posts/posts-intro.html"]
|
||||
],
|
||||
include: ["/posts/"],
|
||||
exclude: ["/posts/career/"]
|
||||
}),
|
||||
study: room({
|
||||
title: "Study",
|
||||
eyebrow: "Work",
|
||||
description: "Engineering notes, professional lessons, and active competencies cover the desk.",
|
||||
caption: "The lamp is still warm; somebody meant to come back after tea.",
|
||||
curated: [
|
||||
["Career library", "/posts/career/career-list.html"],
|
||||
["Competency status", "/home/status.html"],
|
||||
["Probation objectives", "/posts/career/probation-objectives.html"]
|
||||
],
|
||||
include: ["/posts/career/"]
|
||||
}),
|
||||
kitchen: room({
|
||||
title: "Kitchen",
|
||||
eyebrow: "Daily life",
|
||||
description: "Weekly reviews and ordinary days stay close to the kettle.",
|
||||
caption: "A shopping list shares the table with a thought worth keeping.",
|
||||
curated: [
|
||||
["All blogs", "/blogs/blogs-list.html"],
|
||||
["Weekly reviews", "/tags/review.html"],
|
||||
["Blog introduction", "/blogs/blogs-intro.html"]
|
||||
],
|
||||
include: ["/blogs/"]
|
||||
}),
|
||||
workshop: room({
|
||||
title: "Workshop",
|
||||
eyebrow: "Living systems",
|
||||
description: "Trackers, services, plans, and practical machinery keep the house running.",
|
||||
caption: "Every drawer is labelled except the one containing all the labels.",
|
||||
curated: [
|
||||
["Services", "/home/services.html"],
|
||||
["Wird tracker", "/home/wird-tracker.html"],
|
||||
["Countdowns", "/home/countdown.html"],
|
||||
["Backlog", "/home/backlog.html"]
|
||||
],
|
||||
include: ["/home/services.html", "/home/wird-tracker.html", "/home/countdown.html", "/home/backlog.html"]
|
||||
}),
|
||||
playroom: room({
|
||||
title: "Playroom",
|
||||
eyebrow: "Experiments",
|
||||
description: "Games, generators, puzzles, and stranger little mechanisms wait on the floor.",
|
||||
caption: "A wooden moon rolls beneath the cabinet whenever nobody is looking.",
|
||||
curated: [
|
||||
["Play hub", "/play/play.html"],
|
||||
["Ash Below the Lake", "/play/rpg.html"],
|
||||
["The Rain Index", "/play/the-rain-index.html"]
|
||||
],
|
||||
include: ["/play/"],
|
||||
exclude: ["/play/house.html", "/play/play.html"]
|
||||
}),
|
||||
attic: room({
|
||||
title: "Attic",
|
||||
eyebrow: "Keepsakes",
|
||||
description: "Personal fragments and older writing rest beneath the roof beams.",
|
||||
caption: "The smallest box is labelled: things that became important later.",
|
||||
curated: [
|
||||
["Lima archive", "/lima/index.html"],
|
||||
["Blog archive", "/blogs/blogs-list.html"],
|
||||
["Memory Cabinet", "/play/memory.html"]
|
||||
],
|
||||
include: ["/lima/", "/blogs/2025/"]
|
||||
}),
|
||||
garden: room({
|
||||
title: "Garden",
|
||||
eyebrow: "Notes left outside",
|
||||
description: "Loose notes, paths between topics, and recently tended pages grow beyond the back step.",
|
||||
caption: "Someone has tied a question to the pear tree with green thread.",
|
||||
curated: [
|
||||
["Notes wall", "/home/notes.html"],
|
||||
["Categories", "/home/categories.html"],
|
||||
["Recently updated", "/recently-updated.html"],
|
||||
["Sitemap", "/sitemap.html"]
|
||||
],
|
||||
include: ["/tags/", "/home/notes.html", "/home/categories.html"]
|
||||
}),
|
||||
archive: room({
|
||||
title: "Archive Room",
|
||||
eyebrow: "The Ninth Door",
|
||||
description: "The house keeps one room for the shape of itself: maps, labels, plans, and unfinished intentions.",
|
||||
caption: "On the inside of the door: A house is an index that learned how to wait.",
|
||||
curated: [
|
||||
["Sitemap", "/sitemap.html"],
|
||||
["Categories", "/home/categories.html"],
|
||||
["Backlog", "/home/backlog.html"]
|
||||
],
|
||||
include: ["/sitemap.html", "/home/categories.html", "/home/backlog.html"]
|
||||
})
|
||||
});
|
||||
|
||||
function room(config) {
|
||||
return Object.freeze(Object.assign({ exclude: [] }, config, {
|
||||
curated: Object.freeze(config.curated.map((link) => Object.freeze(link.slice()))),
|
||||
include: Object.freeze(config.include.slice()),
|
||||
exclude: Object.freeze((config.exclude || []).slice())
|
||||
}));
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
const root = document.querySelector('.house-root[data-play-page="house"]');
|
||||
if (!root) return;
|
||||
initHouse(root);
|
||||
});
|
||||
|
||||
function initHouse(root) {
|
||||
const roomButtons = Array.from(root.querySelectorAll("[data-house-room]"));
|
||||
const mainButtons = roomButtons.filter((button) => MAIN_ROOM_IDS.includes(button.dataset.houseRoom));
|
||||
const secretButton = root.querySelector(".house-secret-door");
|
||||
const panel = root.querySelector("[data-house-panel]");
|
||||
const status = root.querySelector("[data-house-status]");
|
||||
const reset = root.querySelector("[data-house-reset]");
|
||||
const state = loadState();
|
||||
let pages = [];
|
||||
let indexStatus = "loading";
|
||||
|
||||
root.classList.add("is-enhanced");
|
||||
state.visited = state.visited.filter((id) => MAIN_ROOM_IDS.includes(id));
|
||||
if (state.visited.length === MAIN_ROOM_IDS.length) state.secretUnlocked = true;
|
||||
renderSecret();
|
||||
|
||||
roomButtons.forEach((button) => {
|
||||
button.addEventListener("click", () => selectRoom(button.dataset.houseRoom, true));
|
||||
button.addEventListener("keydown", (event) => moveRoomFocus(event, button));
|
||||
});
|
||||
|
||||
reset.addEventListener("click", () => {
|
||||
state.visited = [];
|
||||
state.secretUnlocked = false;
|
||||
saveState(state);
|
||||
roomButtons.forEach((button) => button.classList.remove("is-visited"));
|
||||
renderSecret();
|
||||
selectRoom("foyer", false);
|
||||
status.textContent = "The house has forgotten this visit. Choose a room to begin again.";
|
||||
});
|
||||
|
||||
fetch("/search-index.json", { credentials: "same-origin" })
|
||||
.then((response) => {
|
||||
if (!response.ok) throw new Error(`Search index returned ${response.status}`);
|
||||
return response.json();
|
||||
})
|
||||
.then((index) => {
|
||||
pages = flattenIndex(index);
|
||||
indexStatus = "ready";
|
||||
renderRoom(root.querySelector("[data-house-room][aria-selected='true']")?.dataset.houseRoom || "foyer");
|
||||
})
|
||||
.catch((error) => {
|
||||
console.warn("House shelves could not be catalogued", error);
|
||||
indexStatus = "failed";
|
||||
renderRoom(root.querySelector("[data-house-room][aria-selected='true']")?.dataset.houseRoom || "foyer");
|
||||
});
|
||||
|
||||
function selectRoom(id, countVisit) {
|
||||
const config = ROOMS[id];
|
||||
const selected = roomButtons.find((button) => button.dataset.houseRoom === id);
|
||||
if (!config || !selected) return;
|
||||
|
||||
roomButtons.forEach((button) => {
|
||||
const active = button === selected;
|
||||
button.classList.toggle("is-selected", active);
|
||||
button.setAttribute("aria-selected", String(active));
|
||||
button.tabIndex = active ? 0 : -1;
|
||||
});
|
||||
|
||||
if (countVisit && MAIN_ROOM_IDS.includes(id) && !state.visited.includes(id)) {
|
||||
state.visited.push(id);
|
||||
selected.classList.add("is-visited");
|
||||
if (state.visited.length === MAIN_ROOM_IDS.length) state.secretUnlocked = true;
|
||||
saveState(state);
|
||||
renderSecret();
|
||||
}
|
||||
|
||||
panel.setAttribute("aria-labelledby", selected.id);
|
||||
root.dataset.houseActive = id;
|
||||
renderRoom(id);
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
function renderRoom(id) {
|
||||
const config = ROOMS[id];
|
||||
if (!config) return;
|
||||
root.querySelector("[data-house-eyebrow]").textContent = config.eyebrow;
|
||||
root.querySelector("[data-house-title]").textContent = config.title;
|
||||
root.querySelector("[data-house-description]").textContent = config.description;
|
||||
root.querySelector("[data-house-caption]").textContent = config.caption;
|
||||
renderLinks(root.querySelector("[data-house-curated]"), config.curated.map(([title, href]) => ({ title, href })));
|
||||
|
||||
const dynamicList = root.querySelector("[data-house-dynamic]");
|
||||
if (indexStatus === "loading") {
|
||||
renderEmpty(dynamicList, "The shelves are being catalogued…");
|
||||
return;
|
||||
}
|
||||
if (indexStatus === "failed") {
|
||||
renderEmpty(dynamicList, "The shelves could not be catalogued today.");
|
||||
return;
|
||||
}
|
||||
|
||||
const curatedPaths = new Set(config.curated.map((link) => normalizePath(link[1])));
|
||||
const matches = pages
|
||||
.filter((page) => matchesRoom(page.path, config))
|
||||
.filter((page) => !curatedPaths.has(page.path))
|
||||
.filter((page) => !isGeneratedListing(page.path))
|
||||
.sort((a, b) => a.path.localeCompare(b.path))
|
||||
.slice(0, 4);
|
||||
|
||||
if (matches.length === 0) renderEmpty(dynamicList, "Nothing else is resting here yet.");
|
||||
else renderLinks(dynamicList, matches.map((page) => ({ title: humanizeFilename(page.name), href: page.path })));
|
||||
}
|
||||
|
||||
function renderSecret() {
|
||||
secretButton.hidden = !state.secretUnlocked;
|
||||
mainButtons.forEach((button) => button.classList.toggle("is-visited", state.visited.includes(button.dataset.houseRoom)));
|
||||
root.classList.toggle("has-secret", state.secretUnlocked);
|
||||
}
|
||||
|
||||
function updateStatus() {
|
||||
if (state.secretUnlocked) {
|
||||
status.textContent = "All eight rooms remember you. Somewhere nearby, a ninth door has appeared.";
|
||||
} else {
|
||||
const remaining = MAIN_ROOM_IDS.length - state.visited.length;
|
||||
status.textContent = `${state.visited.length} of ${MAIN_ROOM_IDS.length} rooms visited · ${remaining} ${remaining === 1 ? "room" : "rooms"} still unlit.`;
|
||||
}
|
||||
}
|
||||
|
||||
function moveRoomFocus(event, current) {
|
||||
if (!MAIN_ROOM_IDS.includes(current.dataset.houseRoom)) return;
|
||||
const movement = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 }[event.key];
|
||||
if (!movement) return;
|
||||
event.preventDefault();
|
||||
const index = mainButtons.indexOf(current);
|
||||
const next = mainButtons[(index + movement + mainButtons.length) % mainButtons.length];
|
||||
next.focus();
|
||||
selectRoom(next.dataset.houseRoom, true);
|
||||
}
|
||||
|
||||
selectRoom("foyer", true);
|
||||
}
|
||||
|
||||
function flattenIndex(root) {
|
||||
const found = [];
|
||||
const seen = new Set();
|
||||
|
||||
function visit(node) {
|
||||
if (!node || typeof node !== "object") return;
|
||||
if (node.type === "file" && typeof node.url === "string") {
|
||||
const path = normalizePath(node.url);
|
||||
if (path.endsWith(".html") && !seen.has(path)) {
|
||||
seen.add(path);
|
||||
found.push({ name: node.name || path.split("/").pop(), path });
|
||||
}
|
||||
}
|
||||
if (Array.isArray(node.children)) node.children.forEach(visit);
|
||||
}
|
||||
|
||||
visit(root);
|
||||
return found;
|
||||
}
|
||||
|
||||
function matchesRoom(path, config) {
|
||||
const included = config.include.some((prefix) => path.startsWith(normalizePath(prefix)));
|
||||
const excluded = config.exclude.some((prefix) => path.startsWith(normalizePath(prefix)));
|
||||
return included && !excluded && path !== "/play/house.html";
|
||||
}
|
||||
|
||||
function isGeneratedListing(path) {
|
||||
const filename = path.split("/").pop() || "";
|
||||
return filename === "index.html" || filename.endsWith("-list.html") || filename.endsWith("-intro.html");
|
||||
}
|
||||
|
||||
function humanizeFilename(name) {
|
||||
return String(name || "Untitled page")
|
||||
.replace(/\.html$/i, "")
|
||||
.replace(/^\d{2}-\d{2}-/, "")
|
||||
.replace(/[._-]+/g, " ")
|
||||
.replace(/\b\w/g, (letter) => letter.toUpperCase())
|
||||
.trim();
|
||||
}
|
||||
|
||||
function normalizePath(path) {
|
||||
const clean = String(path || "").replace(/\\/g, "/").split(/[?#]/)[0];
|
||||
return clean.startsWith("/") ? clean : `/${clean}`;
|
||||
}
|
||||
|
||||
function renderLinks(list, links) {
|
||||
list.replaceChildren(...links.map(({ title, href }) => {
|
||||
const item = document.createElement("li");
|
||||
const anchor = document.createElement("a");
|
||||
anchor.href = href;
|
||||
anchor.textContent = title;
|
||||
item.appendChild(anchor);
|
||||
return item;
|
||||
}));
|
||||
}
|
||||
|
||||
function renderEmpty(list, message) {
|
||||
const item = document.createElement("li");
|
||||
item.className = "house-empty";
|
||||
item.textContent = message;
|
||||
list.replaceChildren(item);
|
||||
}
|
||||
|
||||
function loadState() {
|
||||
try {
|
||||
const saved = JSON.parse(localStorage.getItem(STORAGE_KEY) || "{}");
|
||||
return {
|
||||
visited: Array.isArray(saved.visited) ? saved.visited.slice() : [],
|
||||
secretUnlocked: saved.secretUnlocked === true
|
||||
};
|
||||
} catch (_error) {
|
||||
return { visited: [], secretUnlocked: false };
|
||||
}
|
||||
}
|
||||
|
||||
function saveState(state) {
|
||||
try {
|
||||
localStorage.setItem(STORAGE_KEY, JSON.stringify({
|
||||
visited: state.visited,
|
||||
secretUnlocked: state.secretUnlocked
|
||||
}));
|
||||
} catch (_error) {
|
||||
// The house remains navigable when storage is unavailable.
|
||||
}
|
||||
}
|
||||
})();
|
||||
601
assets/styles/pages/house.css
Executable file
601
assets/styles/pages/house.css
Executable file
@@ -0,0 +1,601 @@
|
||||
.house-root {
|
||||
--house-ink: #34271e;
|
||||
--house-wood: #744a2d;
|
||||
--house-wood-dark: #4a2e20;
|
||||
--house-plaster: #eadcbf;
|
||||
--house-lamp: #e7b85a;
|
||||
--house-green: #607451;
|
||||
--house-blue: #617789;
|
||||
--house-rug: #914d3f;
|
||||
--house-shadow: rgba(43, 29, 18, 0.18);
|
||||
max-width: 1180px;
|
||||
}
|
||||
|
||||
.house-heading {
|
||||
max-width: 760px;
|
||||
}
|
||||
|
||||
.house-visually-hidden {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.house-statusbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
margin: 1rem 0;
|
||||
padding: 0.75rem 1rem;
|
||||
border: 1px solid color-mix(in oklab, var(--border) 72%, var(--house-wood));
|
||||
border-radius: 8px;
|
||||
background: color-mix(in oklab, var(--surface) 92%, var(--house-lamp) 8%);
|
||||
box-shadow: 0 8px 24px var(--house-shadow);
|
||||
}
|
||||
|
||||
.house-statusbar p {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
|
||||
.house-statusbar button {
|
||||
flex: 0 0 auto;
|
||||
min-height: 36px;
|
||||
padding: 0.4rem 0.7rem;
|
||||
font-size: 0.84rem;
|
||||
}
|
||||
|
||||
.house-experience {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
|
||||
gap: 1rem;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.house-illustration,
|
||||
.house-panel,
|
||||
.house-directory {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
background: color-mix(in oklab, var(--surface) 84%, var(--house-plaster) 16%);
|
||||
box-shadow: 0 20px 50px var(--house-shadow);
|
||||
}
|
||||
|
||||
.house-illustration {
|
||||
position: relative;
|
||||
min-width: 0;
|
||||
padding: clamp(1rem, 3vw, 2rem);
|
||||
overflow: hidden;
|
||||
background:
|
||||
radial-gradient(circle at 14% 14%, rgba(255, 255, 255, 0.42) 0 2px, transparent 3px),
|
||||
linear-gradient(to bottom, color-mix(in oklab, var(--surface) 68%, var(--house-blue) 32%) 0 34%, color-mix(in oklab, var(--surface) 76%, var(--house-green) 24%) 34% 100%);
|
||||
}
|
||||
|
||||
.house-illustration::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: -8%;
|
||||
bottom: -10%;
|
||||
width: 42%;
|
||||
aspect-ratio: 1;
|
||||
border-radius: 50% 50% 8% 8%;
|
||||
background: color-mix(in oklab, var(--house-green) 78%, transparent);
|
||||
opacity: 0.45;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.house-roof {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
width: 82%;
|
||||
height: 85px;
|
||||
margin: 0 auto -2px;
|
||||
clip-path: polygon(50% 0, 100% 100%, 0 100%);
|
||||
background:
|
||||
repeating-linear-gradient(115deg, transparent 0 17px, rgba(255, 255, 255, 0.06) 18px 19px),
|
||||
linear-gradient(145deg, #5b3427, #351f1b);
|
||||
filter: drop-shadow(0 10px 10px rgba(30, 18, 12, 0.2));
|
||||
}
|
||||
|
||||
.house-chimney {
|
||||
position: absolute;
|
||||
right: 19%;
|
||||
top: 28px;
|
||||
width: 32px;
|
||||
height: 45px;
|
||||
background: #513127;
|
||||
}
|
||||
|
||||
.house-moon {
|
||||
position: absolute;
|
||||
top: 12px;
|
||||
left: 50%;
|
||||
color: #f6d98f;
|
||||
font-size: 1.25rem;
|
||||
transform: translateX(-50%);
|
||||
text-shadow: 0 0 14px rgba(246, 217, 143, 0.7);
|
||||
}
|
||||
|
||||
.house-shell {
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
max-width: 680px;
|
||||
margin: 0 auto;
|
||||
border: 8px solid var(--house-wood-dark);
|
||||
border-bottom-width: 12px;
|
||||
background: var(--house-wood-dark);
|
||||
box-shadow: 0 20px 35px rgba(35, 22, 14, 0.3);
|
||||
}
|
||||
|
||||
.house-floorplan {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||
grid-template-rows: minmax(105px, 0.75fr) repeat(2, minmax(128px, 1fr));
|
||||
gap: 5px;
|
||||
background: var(--house-wood-dark);
|
||||
}
|
||||
|
||||
.house-room {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-end;
|
||||
min-width: 0;
|
||||
min-height: 108px;
|
||||
overflow: hidden;
|
||||
border: 0;
|
||||
border-radius: 2px;
|
||||
padding: 0.75rem;
|
||||
background:
|
||||
linear-gradient(90deg, transparent 49%, rgba(82, 53, 33, 0.15) 50%, transparent 51%),
|
||||
repeating-linear-gradient(0deg, transparent 0 23px, rgba(82, 53, 33, 0.11) 24px 25px),
|
||||
var(--house-plaster);
|
||||
color: var(--house-ink);
|
||||
text-align: left;
|
||||
isolation: isolate;
|
||||
transition: filter 180ms ease, transform 180ms ease, box-shadow 180ms ease;
|
||||
}
|
||||
|
||||
.house-room::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
top: 14px;
|
||||
right: 14px;
|
||||
width: 34px;
|
||||
height: 46px;
|
||||
border: 4px solid color-mix(in oklab, var(--house-wood) 80%, transparent);
|
||||
border-bottom-width: 7px;
|
||||
background:
|
||||
linear-gradient(90deg, transparent 44%, rgba(67, 55, 44, 0.25) 45% 55%, transparent 56%),
|
||||
linear-gradient(0deg, transparent 44%, rgba(67, 55, 44, 0.25) 45% 55%, transparent 56%),
|
||||
color-mix(in oklab, var(--house-blue) 68%, #fff 32%);
|
||||
box-shadow: 0 0 18px rgba(244, 207, 125, 0.18);
|
||||
}
|
||||
|
||||
.house-room::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
inset: 0;
|
||||
background: radial-gradient(circle at 70% 25%, rgba(239, 190, 88, 0.55), transparent 42%);
|
||||
opacity: 0;
|
||||
transition: opacity 180ms ease;
|
||||
}
|
||||
|
||||
.house-room:hover,
|
||||
.house-room.is-selected {
|
||||
z-index: 2;
|
||||
background-color: #f1e2c1;
|
||||
color: var(--house-ink);
|
||||
transform: translateY(-2px);
|
||||
box-shadow: inset 0 0 0 3px var(--house-lamp), 0 5px 15px rgba(42, 27, 17, 0.28);
|
||||
}
|
||||
|
||||
.house-room:hover::after,
|
||||
.house-room.is-selected::after,
|
||||
.house-room.is-visited::after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.house-room.is-visited:not(.is-selected) {
|
||||
box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--house-green) 70%, transparent);
|
||||
}
|
||||
|
||||
.house-room.is-visited .house-room__name::after {
|
||||
content: " · lit";
|
||||
color: var(--house-green);
|
||||
font-size: 0.68rem;
|
||||
letter-spacing: 0.04em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.house-room:focus-visible,
|
||||
.house-secret-door:focus-visible {
|
||||
z-index: 4;
|
||||
outline: 4px solid color-mix(in oklab, var(--house-lamp) 82%, #fff);
|
||||
outline-offset: -5px;
|
||||
}
|
||||
|
||||
.house-room__object {
|
||||
position: absolute;
|
||||
left: 0.7rem;
|
||||
top: 0.55rem;
|
||||
color: color-mix(in oklab, var(--house-wood) 85%, var(--house-ink));
|
||||
font-size: clamp(1.35rem, 3vw, 2.1rem);
|
||||
line-height: 1;
|
||||
opacity: 0.88;
|
||||
}
|
||||
|
||||
.house-room__name,
|
||||
.house-room__hint {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.house-room__name {
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.house-room__hint {
|
||||
margin-top: 0.15rem;
|
||||
font-size: 0.72rem;
|
||||
opacity: 0.72;
|
||||
}
|
||||
|
||||
.house-room--attic {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 1;
|
||||
justify-content: center;
|
||||
padding-left: 2rem;
|
||||
background-color: #d7c39d;
|
||||
}
|
||||
|
||||
.house-room--attic::before {
|
||||
width: 54px;
|
||||
height: 32px;
|
||||
border-radius: 50% 50% 0 0;
|
||||
}
|
||||
|
||||
.house-room--study { grid-column: 1 / 3; grid-row: 2; }
|
||||
.house-room--library { grid-column: 3 / 5; grid-row: 2; }
|
||||
.house-room--foyer { grid-column: 5 / 7; grid-row: 2; background-color: #e5d3ae; }
|
||||
.house-room--kitchen { grid-column: 1 / 3; grid-row: 3; background-color: #dfcda9; }
|
||||
.house-room--workshop { grid-column: 3 / 5; grid-row: 3; background-color: #c8c3a5; }
|
||||
.house-room--playroom { grid-column: 5 / 7; grid-row: 3; background-color: #dbc3ac; }
|
||||
.house-room--garden {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 4;
|
||||
min-height: 105px;
|
||||
background:
|
||||
radial-gradient(circle at 15% 65%, #bd846f 0 5px, transparent 6px),
|
||||
radial-gradient(circle at 74% 50%, #dfb36d 0 4px, transparent 5px),
|
||||
linear-gradient(to bottom, #a9c3be 0 40%, #829260 41% 100%);
|
||||
}
|
||||
|
||||
.house-room--garden::before {
|
||||
top: 12px;
|
||||
right: 12%;
|
||||
width: 15px;
|
||||
height: 62px;
|
||||
border: 0;
|
||||
border-radius: 50% 50% 10% 10%;
|
||||
background: #4c633e;
|
||||
box-shadow: 10px -15px 0 8px #72835a, -9px -7px 0 6px #61784f;
|
||||
}
|
||||
|
||||
.house-foundation {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
height: 18px;
|
||||
gap: 2px;
|
||||
margin: 0 -8px -12px;
|
||||
background: #7d6d5c;
|
||||
}
|
||||
|
||||
.house-foundation span {
|
||||
border: 1px solid rgba(54, 39, 29, 0.32);
|
||||
}
|
||||
|
||||
.house-secret-wrap {
|
||||
position: relative;
|
||||
z-index: 4;
|
||||
min-height: 88px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
.house-secret-door[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.house-secret-door {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
grid-template-rows: auto auto;
|
||||
align-items: center;
|
||||
column-gap: 0.65rem;
|
||||
width: min(310px, 90%);
|
||||
min-height: 68px;
|
||||
border: 1px solid #2c2019;
|
||||
padding: 0.6rem 0.85rem;
|
||||
background:
|
||||
repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 15px),
|
||||
#3d2920;
|
||||
color: #f0d8ab;
|
||||
box-shadow: 0 9px 20px rgba(31, 20, 14, 0.35);
|
||||
animation: house-door-appears 700ms ease both;
|
||||
}
|
||||
|
||||
.house-secret-door > span {
|
||||
grid-row: 1 / 3;
|
||||
color: var(--house-lamp);
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.house-secret-door strong,
|
||||
.house-secret-door small {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.house-secret-door small {
|
||||
opacity: 0.72;
|
||||
}
|
||||
|
||||
.house-secret-door.is-selected,
|
||||
.house-secret-door:hover {
|
||||
background-color: #221813;
|
||||
color: #fff3d6;
|
||||
box-shadow: 0 0 0 2px var(--house-lamp), 0 9px 25px rgba(31, 20, 14, 0.5);
|
||||
}
|
||||
|
||||
.house-panel {
|
||||
position: relative;
|
||||
align-self: stretch;
|
||||
min-height: 610px;
|
||||
padding: clamp(1.2rem, 3vw, 2rem);
|
||||
overflow: hidden;
|
||||
background:
|
||||
repeating-linear-gradient(0deg, rgba(75, 52, 34, 0.025) 0 1px, transparent 1px 7px),
|
||||
color-mix(in oklab, var(--surface) 89%, var(--house-plaster) 11%);
|
||||
}
|
||||
|
||||
.house-panel::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: -28px;
|
||||
bottom: -36px;
|
||||
width: 125px;
|
||||
height: 125px;
|
||||
border: 14px solid color-mix(in oklab, var(--house-rug) 58%, transparent);
|
||||
border-radius: 50%;
|
||||
opacity: 0.15;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.house-panel__window {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-template-rows: repeat(2, 1fr);
|
||||
gap: 3px;
|
||||
width: 72px;
|
||||
height: 82px;
|
||||
margin: 0 0 1.5rem auto;
|
||||
border: 6px solid var(--house-wood);
|
||||
background: var(--house-wood);
|
||||
box-shadow: 0 8px 0 -4px var(--house-wood-dark), 0 0 30px rgba(231, 184, 90, 0.18);
|
||||
}
|
||||
|
||||
.house-panel__window span {
|
||||
background: linear-gradient(145deg, #9cb3b7, #f0cf89);
|
||||
}
|
||||
|
||||
.house-panel__eyebrow {
|
||||
margin: 0;
|
||||
color: var(--house-green);
|
||||
font-size: 0.76rem;
|
||||
font-weight: 900;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.house-panel h2 {
|
||||
margin: 0.2rem 0 0.65rem;
|
||||
font-size: clamp(1.6rem, 4vw, 2.25rem);
|
||||
}
|
||||
|
||||
.house-panel__description {
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.house-panel__caption {
|
||||
margin: 1rem 0 1.5rem;
|
||||
padding-left: 0.8rem;
|
||||
border-left: 3px solid var(--house-lamp);
|
||||
color: var(--muted);
|
||||
font-size: 0.9rem;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.house-shelves {
|
||||
display: grid;
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.house-shelves h3 {
|
||||
margin: 0 0 0.5rem;
|
||||
color: var(--house-wood);
|
||||
font-size: 0.72rem;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.house-link-list {
|
||||
display: grid;
|
||||
gap: 0.35rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.house-link-list li {
|
||||
border-bottom: 1px solid color-mix(in oklab, var(--border) 65%, transparent);
|
||||
}
|
||||
|
||||
.house-link-list a,
|
||||
.house-empty {
|
||||
display: block;
|
||||
padding: 0.48rem 0.15rem;
|
||||
}
|
||||
|
||||
.house-link-list a::after {
|
||||
content: " ↗";
|
||||
color: var(--house-lamp);
|
||||
opacity: 0;
|
||||
transition: opacity 130ms ease;
|
||||
}
|
||||
|
||||
.house-link-list a:hover::after,
|
||||
.house-link-list a:focus-visible::after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.house-empty {
|
||||
border-bottom: 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.88rem;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.house-directory {
|
||||
margin-top: 1rem;
|
||||
padding: 0.85rem 1rem;
|
||||
}
|
||||
|
||||
.house-directory summary {
|
||||
color: var(--muted);
|
||||
font-weight: 800;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.house-directory__grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 0.75rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.house-directory__grid section {
|
||||
padding: 0.75rem;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.house-directory__grid h2 {
|
||||
margin: 0 0 0.35rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.house-noscript {
|
||||
color: var(--muted);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@keyframes house-door-appears {
|
||||
from { opacity: 0; transform: translateY(10px) scale(0.96); }
|
||||
to { opacity: 1; transform: translateY(0) scale(1); }
|
||||
}
|
||||
|
||||
@media (max-width: 880px) {
|
||||
.house-experience {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.house-panel {
|
||||
min-height: auto;
|
||||
}
|
||||
|
||||
.house-panel__window {
|
||||
position: absolute;
|
||||
top: 1.25rem;
|
||||
right: 1.25rem;
|
||||
width: 54px;
|
||||
height: 62px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 620px) {
|
||||
.house-statusbar {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.house-roof,
|
||||
.house-foundation {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.house-shell {
|
||||
border-width: 5px;
|
||||
}
|
||||
|
||||
.house-floorplan {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: none;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.house-room,
|
||||
.house-room--attic,
|
||||
.house-room--study,
|
||||
.house-room--library,
|
||||
.house-room--foyer,
|
||||
.house-room--kitchen,
|
||||
.house-room--workshop,
|
||||
.house-room--playroom,
|
||||
.house-room--garden {
|
||||
grid-column: 1;
|
||||
grid-row: auto;
|
||||
min-height: 92px;
|
||||
padding-left: 4rem;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.house-room__object {
|
||||
left: 1rem;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.house-room::before {
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.house-room--garden::before {
|
||||
right: 18%;
|
||||
}
|
||||
|
||||
.house-panel__window {
|
||||
opacity: 0.45;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.house-room,
|
||||
.house-room::after,
|
||||
.house-link-list a::after,
|
||||
.house-secret-door {
|
||||
animation: none;
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user