diff --git a/assets/css/doors/glossary.css b/assets/css/doors/glossary.css index b56598c5680..a79217e36fc 100644 --- a/assets/css/doors/glossary.css +++ b/assets/css/doors/glossary.css @@ -236,16 +236,37 @@ main:lang(ar) .glossary-layout .article-style .term-references{direction:ltr;pad .glossary-layout .article-foot .post-nav-item>a p{margin:2px 0 0;color:var(--link);font:600 18px/1.3 var(--text)} .glossary-layout .article-foot .post-nav-item p.post-nav-def{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:6px 0 0;font-size:15px;color:var(--ink)} @media(max-width:560px){.glossary-layout .article-foot .post-nav{grid-template-columns:1fr}.glossary-layout .article-foot .post-nav-next:only-child{grid-column:1}} -/* The reference list: the hub's panel and letters, with each reference a row in a hanging indent and the terms - that cite it underneath. */ +/* The reference list: one reference per row so surnames align along a single scan edge, with an adjacent "Cited in" + column on wide screens so the glossary links occupy a predictable rail without empty dead space. */ .glossary-references .term-group ul.references-list{display:block;max-width:none;margin:0;padding:0} -.glossary-references .term-group ul.references-list>li{max-width:29em;margin:0;padding:12px 0 12px 1.5em;text-indent:-1.5em;background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;line-height:1.5} +.glossary-references .term-group ul.references-list>li{max-width:none;margin:0;padding:14px 0;background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;line-height:1.52} .glossary-references .term-group ul.references-list>li:hover{border-color:var(--line)} +.glossary-references .reference-apa{max-width:34em;padding-inline-start:1.5em;text-indent:-1.5em;line-height:1.6} .glossary-references .reference-apa a{color:var(--link);text-decoration:underline;text-underline-offset:3px;overflow-wrap:anywhere} -.glossary-references .reference-cited{display:block;margin:6px 0 0;text-indent:0;font-size:16px;color:var(--soft)} +.glossary-references .ref-authors-toggle{display:inline-block;min-height:24px;line-height:1.45;padding:0;margin:0;background:none;border:0;border-radius:0;font-size:15px;text-decoration:underline;text-underline-offset:2px} +.glossary-references .ref-authors-toggle:hover{color:var(--ink)} +.glossary-references .reference-cited{display:block;margin:8px 0 0;padding:6px 12px;text-indent:0;background:var(--edu-bg);border-radius:var(--r-small);font-size:15px;line-height:1.45;color:var(--ink)} +.glossary-references .reference-cited-label{font-weight:600;color:var(--edu);margin-inline-end:4px} .glossary-references .reference-cited a{color:var(--link);font-weight:600;text-decoration:underline;text-underline-offset:3px} .glossary-references .reference-cited .term-en{display:none} -.glossary-references .standfirst{max-width:30em} +@media(min-width:1180px){ + .glossary-references .term-group ul.references-list>li{display:grid;grid-template-columns:minmax(0,34em) minmax(240px,1fr);column-gap:32px;align-items:start} + .glossary-references .reference-cited{margin:0;padding:7px 14px} + .glossary-references .reference-cited-label{display:block;margin:0 0 2px;font-size:14px} +} +.glossary-references .standfirst{max-width:34em} +.glossary-references .standfirst a{color:var(--link);font-weight:600;text-decoration:underline;text-underline-offset:3px} +.glossary-ref-scope{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0 0} +.glossary-ref-scope[hidden]{display:none} +.glossary-ref-scope button{min-height:44px;padding:6px 12px;background:#fff;border:1.5px solid var(--edu);border-radius:999px;color:var(--ink);font:600 15px/1.2 var(--text);cursor:pointer} +.glossary-ref-scope button[aria-pressed="true"]{background:var(--edu);color:#fff} +.glossary-references .glossary-letters a.is-current,.glossary-references .glossary-letters a[aria-current]{background:var(--edu);color:#fff} +@media(max-width:760px){ + /* Only the search row pins on phones (DESIGN.md §9); the scope buttons scroll away with the letters. */ + .glossary-references .glossary-ref-scope{margin:8px 0 2px} + .glossary-references .term-group ul.references-list>li{padding:12px 0} + .glossary-references .reference-apa{padding-inline-start:1.25em;text-indent:-1.25em} +} /* A term page's related terms take the reading width: one related term is one wide card, more share the row. The start of each definition keeps to the reading measure inside a wide card (DESIGN.md §7). */ .glossary-layout .article-style .term-cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))} diff --git a/assets/css/doors/inner.css b/assets/css/doors/inner.css index b10183b2426..36380577f93 100644 --- a/assets/css/doors/inner.css +++ b/assets/css/doors/inner.css @@ -61,3 +61,56 @@ ul.network-icon a:hover{color:var(--ink)} /* The plug-in's second-button margin and the 140 px minimum would overflow a 320 px screen. */ .cc-window.cc-window .cc-compliance .cc-btn{flex:1 1 0;min-width:0;margin:0;padding:9px 12px} } + +/* 404 page (layouts/404.html): castle hero with site search and four area doors. */ +.nf-page{padding:36px 0 56px} +.nf-hero{display:grid;grid-template-columns:minmax(0,580px) minmax(260px,340px);gap:14px 56px;align-items:start;margin:0 0 40px} +.nf-hero-head{display:contents} +.nf-hero h1{grid-column:1;margin:0;font-size:clamp(40px,4.8vw,62px);line-height:1.04} +.nf-lede{grid-column:1;max-width:34em;margin:0;font-size:19px;line-height:1.5;color:var(--soft)} +.nf-hero-actions{grid-column:1;margin-top:4px} +.nf-castle{grid-column:2;grid-row:1/span 3;align-self:start;margin:0;padding:22px 24px 10px;background:var(--edu-bg);border-radius:999px 999px var(--r-large) var(--r-large)} +.nf-castle img{display:block;width:100%;height:auto;max-height:240px;object-fit:contain;margin:0 auto} +.nf-search{max-width:540px;margin:0 0 14px;padding:18px 20px;background:var(--surface);border-radius:var(--r-large)} +.nf-search label{display:block;margin:0 0 8px;font:700 16px/1.3 var(--text);color:var(--ink)} +.nf-search-row{display:flex;gap:10px;align-items:center} +.nf-search-row input{flex:1 1 auto;min-width:0;min-height:44px;padding:8px 16px;background:#fff;border:1.5px solid var(--ink);border-radius:999px;font:400 17px/1.3 var(--text);color:var(--ink)} +.nf-search-row .btn{flex:none;min-height:44px;padding:8px 20px;border-radius:999px;font-weight:700} +.nf-home-row{margin:0} +.nf-home-row .btn{display:inline-flex;align-items:center;min-height:44px} +.nf-doors h2{margin:0 0 18px;font:var(--display-weight) clamp(26px,2.4vw,32px)/1.15 var(--display)} +.nf-mobile-areas{display:none} +.nf-area-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px} +.nf-area,.nf-area-edu{--tone:var(--edu);--bg:var(--edu-bg)} +.nf-area{padding:20px 20px 22px;background:var(--bg);border-top:4px solid var(--tone);border-radius:var(--r-large)} +.nf-area-res{--tone:var(--res);--bg:var(--res-bg)} +.nf-area-jus{--tone:var(--jus);--bg:var(--jus-bg)} +.nf-area-com{--tone:var(--com);--bg:var(--com-bg)} +.nf-area-plate{display:inline-flex;align-items:flex-end;justify-content:center;width:64px;height:56px;margin:0 0 10px} +.nf-area-plate img{display:block;width:100%;height:100%;object-fit:contain} +.nf-area h3{margin:0 0 10px;font:var(--display-weight) 22px/1.2 var(--display);color:var(--tone)} +.nf-area ul{margin:0;padding:0;list-style:none;display:grid;gap:2px} +.nf-area li{margin:0} +.nf-area a{display:inline-flex;align-items:center;min-height:38px;color:var(--ink);font:600 16px/1.35 var(--text);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--tone) 55%,transparent);text-underline-offset:3px} +.nf-area a:hover{color:var(--tone);text-decoration-color:currentColor} +.nf-report{margin:32px 0 0;padding-top:18px;border-top:1px solid var(--line);font-size:16px;line-height:1.5;color:var(--soft)} +.nf-report a{color:var(--link);font-weight:600;text-decoration:underline;text-underline-offset:3px} +@media(max-width:1080px){.nf-area-grid{grid-template-columns:repeat(2,minmax(0,1fr))}} +@media(max-width:760px){ + .nf-page{padding:20px 0 36px} + .nf-hero{display:block;margin-bottom:24px} + .nf-hero-head{display:block;margin-bottom:16px} + .nf-hero-head h1{margin:0 0 8px;font-size:36px} + .nf-castle{display:none} + .nf-lede{font-size:17px} + .nf-search{padding:14px 16px} + .nf-search-row{flex-wrap:wrap} + .nf-search-row .btn{width:100%} + .nf-doors h2{margin:0 0 12px;font-size:22px} + .nf-area-grid{display:none} + .nf-mobile-areas{display:grid;gap:8px;margin:0;padding:0;list-style:none} + .nf-mobile-areas a{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:10px 16px;background:var(--bg);border-inline-start:4px solid var(--tone);border-radius:var(--r-small);color:var(--ink);font:600 17px/1.3 var(--text);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--tone) 55%,transparent);text-underline-offset:3px} + .nf-mobile-areas a:hover{color:var(--tone);text-decoration-color:currentColor} + .nf-mobile-areas .nf-arrow{color:var(--tone);font-weight:700} + .nf-report{margin-top:24px} +} diff --git a/content/glossary/_build_references.py b/content/glossary/_build_references.py index 0b3a5a7c58c..5cba59d602b 100644 --- a/content/glossary/_build_references.py +++ b/content/glossary/_build_references.py @@ -2,7 +2,7 @@ The dynamic glossary resolves per-term references from apa_lookup.json (built by bibtex_to_apa/bibtex_to_apa.js from the "Glossary BibTex" Google Doc). The public -"List of References" is rendered from the same file by +"Glossary references" page is rendered from the same file by layouts/partials/doors/glossary_references.html, so the two stay in sync; this script writes only the page's front matter and introduction. Run it after apa_lookup.json is regenerated: @@ -42,7 +42,7 @@ out_path = os.path.join(script_dir, "references", "index.md") HEADER = """--- -title: List of References +title: Glossary references --- You can find the list of all references that were used to create the Glossary. diff --git a/layouts/404.html b/layouts/404.html index 3ec12e1409b..4da4a7c02ca 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -87,26 +87,92 @@ })(); -
-
-
-

Page not found

-
-

That page can't be found. If you reached it through a broken link, tell us at info@forrt.org or contact Lukas Wallrich on the FORRT Slack.

-

Useful pages

-
-
+
+ {{ with resources.Get "images/doors/area-community.webp" }}{{ $w := .Resize "180x webp q80" }}{{ end }} +

Community & Sustainability

+ +
+
+ + +

Reached this page through a broken link? Tell us at info@forrt.org or contact Lukas Wallrich on the FORRT Slack.

+ {{- end -}} diff --git a/layouts/partials/doors/glossary_references.html b/layouts/partials/doors/glossary_references.html index 0a798c0ff78..42875a8b1ec 100644 --- a/layouts/partials/doors/glossary_references.html +++ b/layouts/partials/doors/glossary_references.html @@ -1,8 +1,8 @@ -{{/* The glossary's reference list (/glossary/references/), laid out as the glossary hub: a search and the letters in - a panel beside the title, then every reference A to Z under large letters, each with the English terms that - cite it. The references come from apa_lookup.json (citations/keys removes duplicates) and the terms from their - own pages, so the list does not depend on the page body, which data-processing.yml ships from main. - site.js runs the search and the letters as on the hub. Input: the page. */}} +{{/* The glossary's reference list (/glossary/references/), laid out as the glossary hub: a search, filter and A–Z + letters in a pale Education panel beside the title, then every reference A to Z under large sticky letters in two + readable columns on wide screens, each with the English terms that cite it. The references come from apa_lookup.json + (citations/keys removes duplicates) and the terms from their own pages, so the list does not depend on the page + body, which data-processing.yml ships from main. Input: the page. */}} {{ $keys := partialCached "citations/keys" . "bibliography-keys" }} {{/* The English terms citing each reference, keyed by the reference's md5. */}} {{ $cited := newScratch }} @@ -11,9 +11,12 @@ {{ range .Params.references }}{{ if . }}{{ $cited.Add (md5 .) (slice $term) }}{{ end }}{{ end }} {{ end }} {{ $items := slice }} +{{ $citedCount := 0 }} {{ range $apa, $key := $keys }} {{ $sk := $apa | plainify | htmlUnescape | replaceRE `^[^\p{L}\p{N}]+` "" | lower }} - {{ $items = $items | append (dict "apa" $apa "key" $key "sk" $sk) }} + {{ $terms := $cited.Get (md5 $apa) }} + {{ if $terms }}{{ $citedCount = add $citedCount 1 }}{{ end }} + {{ $items = $items | append (dict "apa" $apa "key" $key "sk" $sk "cited" (gt (len ($terms | default slice)) 0) "terms" $terms) }} {{ end }} {{/* Grouped by first letter, accents set aside, as the collated sort already files Ö with O. */}} {{ $groups := slice }}{{ $current := "" }}{{ $members := slice }} @@ -35,15 +38,19 @@ (/glossary/ redirects), so the trail leads to the English glossary, which these references serve. */}}

{{ .Title }}

-

Every source used to write the glossary, A to Z, with links to the English terms that cite it, where the glossary records them.

+

Sources behind the FORRT Glossary, A to Z, with links to the English terms that cite them. Browse the English glossary.

- +

+ @@ -54,9 +61,9 @@

{{ .Title }}

{{ .letter }}

@@ -66,3 +73,51 @@

{{ .letter }}

+