- en.wiktionary entries via kaikki.org (meanings, IPA, transliteration, audio, etymology, synonyms) - ur./fa./ar.wiktionary dumps for meanings in each language (incl. more Urdu entry formats) - English->Urdu pivot table from Urdu entries' glosses and ur.wiktionary's English entries - dict-sync.ts: re-imports sources when upstream publishes new files, applies daily recent changes; run from deploy/sync.sh - lookups now read the database (2-7 ms) instead of calling Wikimedia live Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
158 lines
10 KiB
CSS
158 lines
10 KiB
CSS
/* Divan styles: Ganjoor's look (palette, gold pills, centred couplets with ✤), RTL, Naskh default. */
|
|
[hidden] { display: none !important; } /* layout rules (e.g. .site-header .wrap flex) must not unhide */
|
|
:root {
|
|
--bg: #fbf6ea; --paper: #fffdf7; --poem: #f6edd6; --inner: #f6efe3; --nested: #eee3d0;
|
|
--ink: #17130f; --muted: #635543; --lapis: #0d1d30; --gold: #b88828; --gold-light: #dfcd9f;
|
|
--gold-subtle: #f5edd8; --border: #b8a78c; --brand: #bf3f2a;
|
|
--font: 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', serif; --verse-lh: 2.1;
|
|
color-scheme: light;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
:root:not([data-theme='light']) {
|
|
--bg: #14120f; --paper: #181510; --poem: #1c1916; --inner: #242019; --nested: #2d2620;
|
|
--ink: #e7ded0; --muted: #9e9185; --lapis: #f0f6fc; --gold: #c9a050; --gold-light: #3a322b;
|
|
--gold-subtle: #2a2418; --border: #9b7332; --brand: #d4553a; color-scheme: dark;
|
|
}
|
|
}
|
|
:root[data-theme='dark'] {
|
|
--bg: #14120f; --paper: #181510; --poem: #1c1916; --inner: #242019; --nested: #2d2620;
|
|
--ink: #e7ded0; --muted: #9e9185; --lapis: #f0f6fc; --gold: #c9a050; --gold-light: #3a322b;
|
|
--gold-subtle: #2a2418; --border: #9b7332; --brand: #d4553a; color-scheme: dark;
|
|
}
|
|
:root.nastaliq { --font: 'Noto Nastaliq Urdu', 'Noto Naskh Arabic', serif; --verse-lh: 2.7; }
|
|
|
|
* { box-sizing: border-box; }
|
|
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.9; }
|
|
a { color: var(--lapis); text-decoration: none; }
|
|
a:hover { color: var(--brand); }
|
|
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
|
|
.muted { color: var(--muted); }
|
|
|
|
/* header: logo + search + toggles in a gold-bordered bar */
|
|
.site-header .wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 12px; }
|
|
.wordmark { font-family: 'Noto Nastaliq Urdu', serif; font-size: 2rem; line-height: 1.5; color: var(--brand); font-weight: 700; }
|
|
.search-form { flex: 1; min-width: 200px; display: flex; position: relative; }
|
|
.search-form input, .toggles button {
|
|
font: inherit; border: 1.5px solid var(--border); background: var(--inner); color: var(--ink); border-radius: 10px;
|
|
}
|
|
.search-form input { flex: 1; padding: 4px 14px; padding-inline-end: 76px; }
|
|
.search-form input:focus { outline: none; border-color: var(--gold); }
|
|
.toggles { display: flex; gap: 6px; }
|
|
.toggles button { padding: 2px 12px; cursor: pointer; font-size: .85rem; }
|
|
/* controls keep Naskh at normal height whatever reading font is chosen */
|
|
.search-form input, .toggles button { font-family: 'Noto Naskh Arabic', serif; line-height: 1.8; }
|
|
.toggles button:hover { border-color: var(--brand); }
|
|
|
|
main { padding: 16px 0 48px; }
|
|
h1, h2 { line-height: 1.6; margin: .2em 0 .4em; font-weight: 700; text-align: center; color: var(--lapis); }
|
|
h1 { font-size: 1.7rem; }
|
|
h1::after { content: ''; display: block; width: 140px; height: 2px; background: var(--brand); margin: 8px auto 0; }
|
|
|
|
/* Ganjoor's gold pill headings and links (.century / .part-title-block) */
|
|
.pill, .century h2, .card {
|
|
display: block; text-align: center; color: var(--lapis); background: var(--gold-subtle);
|
|
border: 1.5px solid var(--border); border-radius: 10px; padding: 4px 10px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, .08); transition: transform .2s, background .2s, border-color .2s;
|
|
}
|
|
.card:hover { background: var(--gold-light); border-color: var(--brand); transform: translateY(-1px); color: var(--lapis); }
|
|
.card small { color: var(--muted); margin-inline-start: 6px; }
|
|
.century { margin-top: 28px; }
|
|
.century h2 { font-size: 1rem; margin: 0 0 12px; }
|
|
.century h2::after { display: none; }
|
|
|
|
/* poet tiles (captions only, photos hidden for now) */
|
|
.poets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
|
|
.poet-card {
|
|
min-width: 120px; text-align: center; background: var(--paper); border: 1.5px solid var(--border);
|
|
border-radius: 999px; padding: 2px 14px; color: var(--ink); transition: transform .25s;
|
|
}
|
|
.poet-card:hover { transform: translateY(-3px); border-color: var(--brand); color: var(--ink); }
|
|
.poet-card small { display: block; color: var(--muted); font-size: .75rem; line-height: 1.4; }
|
|
.hero { text-align: center; }
|
|
.hero p { margin: 0; }
|
|
|
|
/* poet / category */
|
|
.intro { background: var(--paper); border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 18px; white-space: pre-line; text-align: justify; }
|
|
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 16px 0; }
|
|
.crumbs { text-align: center; font-size: .9rem; color: var(--muted); }
|
|
.crumbs a { color: var(--muted); }
|
|
.crumbs span + span::before { content: '»'; margin: 0 8px; }
|
|
.toc { list-style: none; padding: 0; margin: 16px auto; max-width: 700px; }
|
|
.toc li { border-bottom: 1px dashed var(--gold-light); }
|
|
.toc li a { display: block; padding: 6px 4px; text-align: center; }
|
|
|
|
/* poem: Ganjoor couplets (half-lines meet at the centre, ✤ after each) */
|
|
.poem { background: var(--poem); border: 1.5px solid var(--border); border-radius: 12px; padding: 20px clamp(12px, 3vw, 36px); margin: 16px 0; }
|
|
.couplet { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10%; margin: 0 0 6px; border-radius: 6px; font-size: 1.1rem; line-height: var(--verse-lh); }
|
|
.couplet:hover { background: linear-gradient(90deg, transparent, var(--gold-subtle) 15%, var(--gold-subtle) 85%, transparent); }
|
|
.couplet p { margin: 0; text-align: left; }
|
|
.couplet[data-mark]::before { content: attr(data-mark); grid-column: 1 / -1; justify-self: center; font-size: .72rem; line-height: 1.6; color: var(--brand); border: 1px solid var(--gold-light); border-radius: 999px; padding: 0 10px; margin-bottom: 2px; }
|
|
.takhallus { color: var(--brand); }
|
|
.radif { text-align: center; margin-top: -6px; }
|
|
.radif-head { text-align: center; font-size: 1.05rem; color: var(--brand); margin: 22px 0 4px; }
|
|
.couplet p + p { text-align: right; }
|
|
.couplet::after { content: '✤'; grid-column: 1 / -1; text-align: center; color: var(--brand); font-size: .72rem; opacity: .75; line-height: 1.2; }
|
|
.single { text-align: center; margin: 0 0 6px; font-size: 1.1rem; line-height: var(--verse-lh); }
|
|
.para { text-align: justify; margin: 0 0 12px; line-height: var(--verse-lh); }
|
|
@media (max-width: 760px) {
|
|
.couplet { grid-template-columns: 1fr; padding: 6px 0; border-bottom: 1px dashed var(--gold-light); }
|
|
.couplet p, .couplet p + p { text-align: center; }
|
|
.couplet::after { display: none; }
|
|
}
|
|
.poem-nav { display: flex; justify-content: space-between; }
|
|
.poem-nav a { border: 1.5px solid var(--border); background: var(--inner); border-radius: 10px; padding: 0 14px; }
|
|
.source { text-align: center; font-size: .85rem; color: var(--muted); }
|
|
|
|
/* search */
|
|
.result { border-bottom: 1px dashed var(--gold-light); padding: 8px 0; }
|
|
.result .snippet { display: block; color: var(--ink); margin-top: 4px; padding: 4px 12px; border-inline-start: 2px solid var(--gold-light); }
|
|
.result .snippet p { margin: 0; }
|
|
mark { background: var(--gold-subtle); color: inherit; border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -2px var(--gold); }
|
|
.hl-note { text-align: center; font-size: .85rem; }
|
|
.hint { text-align: center; font-size: .8rem; margin: 0; }
|
|
.pager { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
|
|
|
|
.site-footer { border-top: 1.5px solid var(--border); padding: 16px 0; font-size: .85rem; color: var(--muted); text-align: center; }
|
|
|
|
h1 + .muted { text-align: center; margin-top: 0; }
|
|
|
|
/* Urdu keyboard */
|
|
.in-box { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); display: flex; padding: 4px; border: 0; background: none; color: var(--muted, currentColor); opacity: .7; cursor: pointer; border-radius: 6px; }
|
|
#rom-toggle { inset-inline-end: 38px; font: 600 .95rem/1 'Noto Naskh Arabic', serif; }
|
|
.in-box:hover { opacity: 1; }
|
|
.in-box[aria-pressed='true'] { color: var(--brand); opacity: 1; }
|
|
.site-header .kb:not([hidden]) { display: block; padding-bottom: 10px; } /* not the header's flex row */
|
|
.kb div { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; }
|
|
.kb button {
|
|
font-family: 'Noto Naskh Arabic', serif; font-size: 1.1rem; min-width: 2.4em; padding: 2px 6px; cursor: pointer;
|
|
border: 1.5px solid var(--border); background: var(--paper); color: var(--ink); border-radius: 8px;
|
|
}
|
|
.kb button:hover { border-color: var(--brand); }
|
|
.kb .wide { min-width: 12em; }
|
|
.kb .fn { min-width: 3.4em; background: var(--inner); }
|
|
.kb .fn.on { border-color: var(--brand); color: var(--brand); }
|
|
|
|
/* word sidebar (Wiktionary): left side on wide screens, bottom sheet on phones */
|
|
.dict { position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 92vw); z-index: 20; overflow-y: auto; padding: 14px 18px 24px;
|
|
background: var(--paper); border-right: 1.5px solid var(--border); box-shadow: 4px 0 18px rgb(0 0 0 / .18); }
|
|
.dict h2 { font-size: 1.6rem; margin: 0 0 4px; color: var(--brand); text-align: start; }
|
|
.dict h2::after { display: none; }
|
|
.dict h3 { font-size: 1rem; margin: 14px 0 4px; padding-bottom: 2px; border-bottom: 1px dashed var(--gold-light); }
|
|
.dict ol { margin: 4px 0; padding-inline-start: 22px; }
|
|
.dict .en { font-family: system-ui, sans-serif; font-size: .88rem; line-height: 1.5; }
|
|
.dict ol.en { text-align: left; }
|
|
.dict .ipa { font-family: system-ui, sans-serif; font-size: .88rem; color: var(--muted); }
|
|
.dict .pron { margin: 2px 0; }
|
|
.dict .pos { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
|
|
.dict .note { font-size: .8rem; margin: 0; }
|
|
.dict .src { font-size: .78rem; margin-top: 18px; }
|
|
.dict .ety { text-align: left; color: var(--muted); font-size: .8rem; }
|
|
.dict-close { position: sticky; top: 0; float: left; border: 0; background: none; color: var(--muted); font-size: 1rem; cursor: pointer; }
|
|
.dict .play { border: 1px solid var(--border); background: var(--inner); border-radius: 8px; cursor: pointer; padding: 0 6px; }
|
|
/* wide screens: the page moves over instead of being covered */
|
|
@media (min-width: 1100px) { body.dict-open { padding-left: min(340px, 92vw); } }
|
|
.dict ol:not(.en) { list-style-type: urdu; }
|
|
@media (max-width: 700px) {
|
|
.dict { top: auto; right: 0; width: auto; max-height: 60vh; border-right: 0; border-top: 1.5px solid var(--border); border-radius: 14px 14px 0 0; }
|
|
}
|