noitce + splash & one more stylechange..

This commit is contained in:
ed committed 2026-08-25 16:43:01 -04:00
1 parent 3c063987bf
commit df8e836862
4 files changed
+60 -34

No files matched your search

+4
View File
@@ -6,6 +6,10 @@ An [Obsidian](https://obsidian.md) vault published with [Quartz 5](https://quart
Live: [threadwell.edsabode.dev](https://threadwell.edsabode.dev) Live: [threadwell.edsabode.dev](https://threadwell.edsabode.dev)
This has only been around since Aug 22nd, 2026. If you have suggestions on how to render archive artifacts or maybe something better than the current techstack to wrangle the artifacts I'm open ears.
![preview](./preview.png)
## Post an issue for an inaccuracy ## Post an issue for an inaccuracy
I'll correct it. I'll correct it.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 603 KiB

+26 -15
View File
@@ -9,18 +9,29 @@
} }
} }
body.threadwell-wide .page > #quartz-body { body.threadwell-wide .page {
@media all and ($desktop) { max-width: none;
grid-template-columns: 0 minmax(0, 1fr) 0;
}
@media all and ($tablet) {
grid-template-columns: 0 minmax(0, 1fr);
}
} }
body.threadwell-wide .page > #quartz-body > .left, body.threadwell-wide .page > #quartz-body {
body.threadwell-wide .page > #quartz-body > .right { grid-template-columns: minmax(0, 1fr) !important;
display: none; grid-template-areas:
"grid-header"
"grid-center"
"grid-footer" !important;
}
body.threadwell-wide .sidebar.left,
body.threadwell-wide .sidebar.right {
display: none !important;
}
body.threadwell-wide .center,
body.threadwell-wide .center > article {
max-width: 46rem !important;
min-width: 0 !important;
width: 100% !important;
margin-inline: auto;
} }
article img { article img {
@@ -30,16 +41,16 @@ article img {
} }
.threadwell-wide-btn { .threadwell-wide-btn {
position: fixed; display: inline-block;
right: 1rem; margin: 0 0 0.75rem 0;
bottom: 1rem; padding: 0.25rem 0.6rem;
z-index: 40;
padding: 0.4rem 0.7rem;
border: 1px solid var(--gray); border: 1px solid var(--gray);
border-radius: 6px; border-radius: 6px;
background: var(--light); background: var(--light);
color: var(--dark); color: var(--dark);
cursor: pointer; cursor: pointer;
font: inherit;
font-size: 0.85rem;
} }
.threadwell-zoom { .threadwell-zoom {
+30 -19
View File
@@ -5,6 +5,10 @@
return document.querySelector("article"); return document.querySelector("article");
} }
function isWide() {
return document.body.classList.contains("threadwell-wide");
}
function setWide(on) { function setWide(on) {
document.body.classList.toggle("threadwell-wide", on); document.body.classList.toggle("threadwell-wide", on);
try { try {
@@ -15,30 +19,35 @@
const btn = document.getElementById("threadwell-wide"); const btn = document.getElementById("threadwell-wide");
if (btn) { if (btn) {
btn.setAttribute("aria-pressed", on ? "true" : "false"); btn.setAttribute("aria-pressed", on ? "true" : "false");
btn.textContent = on ? "Narrow" : "Wide"; btn.textContent = on ? "Show sidebars" : "Wide thread";
} }
} }
function addWideButton() { function placeButton() {
if (document.getElementById("threadwell-wide")) { let btn = document.getElementById("threadwell-wide");
return; if (!btn) {
btn = document.createElement("button");
btn.id = "threadwell-wide";
btn.type = "button";
btn.className = "threadwell-wide-btn";
btn.addEventListener("click", () => {
setWide(!isWide());
});
} }
const btn = document.createElement("button"); const host =
btn.id = "threadwell-wide"; document.querySelector(".center .page-header") ||
btn.type = "button"; document.querySelector(".center") ||
btn.className = "threadwell-wide-btn"; document.body;
btn.textContent = "Wide"; if (btn.parentElement !== host) {
btn.addEventListener("click", () => { host.prepend(btn);
setWide(!document.body.classList.contains("threadwell-wide")); }
}); let stored = "0";
document.body.appendChild(btn);
try { try {
if (localStorage.getItem(WIDE_KEY) === "1") { stored = localStorage.getItem(WIDE_KEY) || "0";
setWide(true);
}
} catch (_err) { } catch (_err) {
/* ignore */ stored = "0";
} }
setWide(stored === "1");
} }
function closeZoom() { function closeZoom() {
@@ -66,7 +75,8 @@
if (!(target instanceof HTMLImageElement)) { if (!(target instanceof HTMLImageElement)) {
return; return;
} }
if (!articleRoot() || !articleRoot().contains(target)) { const article = articleRoot();
if (!article || !article.contains(target)) {
return; return;
} }
if (target.closest("#threadwell-zoom")) { if (target.closest("#threadwell-zoom")) {
@@ -82,5 +92,6 @@
} }
}); });
document.addEventListener("click", onArticleClick); document.addEventListener("click", onArticleClick);
addWideButton(); document.addEventListener("nav", placeButton);
placeButton();
})(); })();