Skip to content

Commit 3fe561f

Browse files
Design: Quotation typographic quote poster layout (#304)
1 parent 5dcdf41 commit 3fe561f

2 files changed

Lines changed: 120 additions & 0 deletions

File tree

‎app.css‎

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3280,6 +3280,69 @@ footer a:hover { color: var(--accent-2); }
32803280
.tweet-actions { border-top-color: #333; }
32813281
}
32823282

3283+
3284+
/* ── Per-type bespoke: Quotation — typographic quote poster ── */
3285+
3286+
.card.quote-poster { background: #fff; border-color: rgba(0,0,0,.06); }
3287+
.card.quote-poster .hd.hidden { display: none; }
3288+
.card.quote-poster .bd { padding: 2.5rem 2rem 2rem; background: #fff; }
3289+
.card.quote-poster .bd::before { display: none; }
3290+
3291+
.quote-mark {
3292+
font-family: Georgia, "Times New Roman", serif;
3293+
font-size: 6rem;
3294+
line-height: 1;
3295+
color: var(--accent, #7c2d12);
3296+
opacity: .18;
3297+
margin-bottom: -.8rem;
3298+
user-select: none;
3299+
}
3300+
3301+
.quote-text {
3302+
font-family: Georgia, "Times New Roman", serif;
3303+
font-size: 1.4rem;
3304+
font-style: italic;
3305+
line-height: 1.6;
3306+
color: #1a1a1a;
3307+
margin: 0 0 1.4rem;
3308+
padding: 0;
3309+
border: none;
3310+
quotes: none;
3311+
}
3312+
3313+
.quote-attribution {
3314+
font-variant: small-caps;
3315+
font-size: .9rem;
3316+
letter-spacing: .04em;
3317+
color: #444;
3318+
margin-bottom: .3rem;
3319+
}
3320+
3321+
.quote-date {
3322+
font-size: .75rem;
3323+
color: #aaa;
3324+
margin-bottom: 1.4rem;
3325+
}
3326+
3327+
.quote-footnote {
3328+
font-size: .78rem;
3329+
line-height: 1.5;
3330+
color: #888;
3331+
border-top: 1px solid #eee;
3332+
padding-top: .8rem;
3333+
margin: 0;
3334+
}
3335+
3336+
/* Dark mode quote poster */
3337+
@media (prefers-color-scheme: dark) {
3338+
.card.quote-poster { background: #1c1c1e; border-color: rgba(255,255,255,.06); }
3339+
.card.quote-poster .bd { background: #1c1c1e; }
3340+
.quote-text { color: #e8e8e8; }
3341+
.quote-attribution { color: #aaa; }
3342+
.quote-date { color: #555; }
3343+
.quote-footnote { color: #666; border-top-color: #333; }
3344+
}
3345+
32833346
/* ──────────────────────────────────────────────
32843347
Responsive / Mobile — small-screen polish.
32853348
Stacks label/value grid, scales header,

‎app.js‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,6 +2211,63 @@
22112211
handled.add("articleBody"); handled.add("author"); handled.add("datePublished"); handled.add("url");
22122212
}
22132213

2214+
// ── QUOTATION (typographic quote poster) ──
2215+
if (cfg.type === "Quotation") {
2216+
const card = document.querySelector(".card");
2217+
if (card) card.classList.add("quote-poster");
2218+
2219+
// Hide normal header
2220+
const hd = document.querySelector(".hd");
2221+
if (hd) hd.classList.add("hidden");
2222+
2223+
// Remove generic hero if present
2224+
const heroMount = document.getElementById("hero-mount");
2225+
if (heroMount) heroMount.querySelector(".hero")?.remove();
2226+
2227+
// Huge opening quotation mark
2228+
const mark = document.createElement("div"); mark.className = "quote-mark";
2229+
mark.textContent = "\u201C";
2230+
view.appendChild(mark);
2231+
2232+
// The quotation text — large serif italic
2233+
const text = data["text"];
2234+
if (text) {
2235+
const q = document.createElement("blockquote"); q.className = "quote-text";
2236+
q.textContent = text;
2237+
view.appendChild(q);
2238+
}
2239+
2240+
// Attribution line: em-dash + author in small-caps
2241+
const authorRaw = data["author"];
2242+
const authorName = (typeof authorRaw === "object" && authorRaw !== null) ? (authorRaw.name || "") : (authorRaw || "");
2243+
if (authorName) {
2244+
const attr = document.createElement("div"); attr.className = "quote-attribution";
2245+
attr.textContent = "\u2014 " + authorName;
2246+
view.appendChild(attr);
2247+
}
2248+
2249+
// Subtle date below attribution
2250+
const dateCreated = data["dateCreated"];
2251+
if (dateCreated) {
2252+
const d = new Date(dateCreated);
2253+
const year = isNaN(d.getTime()) ? dateCreated : d.getFullYear().toString();
2254+
const dateEl = document.createElement("div"); dateEl.className = "quote-date";
2255+
dateEl.textContent = year;
2256+
view.appendChild(dateEl);
2257+
}
2258+
2259+
// Description as a small footnote
2260+
const desc = data["description"];
2261+
if (desc) {
2262+
const fn = document.createElement("p"); fn.className = "quote-footnote";
2263+
fn.textContent = desc;
2264+
view.appendChild(fn);
2265+
}
2266+
2267+
handled.add("name"); handled.add("image"); handled.add("description");
2268+
handled.add("text"); handled.add("author"); handled.add("dateCreated");
2269+
}
2270+
22142271
return handled;
22152272
}
22162273

0 commit comments

Comments
 (0)