Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 100 additions & 3 deletions assets/css/doors/article.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ main:lang(ar) .article-layout .article-style,main:lang(ar) .article-layout .arti
.resource-lang{flex-basis:100%}
/* A resource entry: the entry, then its details card, then Previous and Next. On a desktop the card
sits in the left column beside both; the second row takes any extra height of a long card. */
.article-layout .resource-kind{margin:0 0 12px;max-width:60ch;font-size:16px;font-weight:600;color:var(--soft)}
.article-layout .byline-more{display:inline}
.article-layout .byline-more>summary{display:inline-block;margin-inline-start:.3em;color:var(--link);font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.article-layout .byline-more>summary:hover{color:var(--ink)}
Expand All @@ -185,8 +184,6 @@ main:lang(ar) .article-layout .article-style,main:lang(ar) .article-layout .arti
}
@media(max-width:1000px){
.article-layout-resource .article-card{order:0}
.article-layout-resource .article-card .resource-type{display:none}
.article-layout-resource .article-card .resource-type+dd+dt{margin-top:0}
.article-layout .byline-more>summary{min-height:44px;display:inline-flex;align-items:center}
}
.article-layout .article-tags{margin:0 0 18px}
Expand Down Expand Up @@ -1228,3 +1225,103 @@ html:has(.list-filter-section){scroll-padding-top:calc(var(--list-filter-bar,0px
.outcome-board.is-seen .outcome-tile .outcome-bricks i{animation-play-state:running}
}
@keyframes outcome-brick{from{opacity:0;transform:scale(.2)}}

/* A paragraph of nothing but pictures in an article (doors/reading): as wide as the text, a pair side by side
at one height, each no wider than its file. A picture wider than its share of the text links to its full size. Square corners,
so a frame drawn in the picture is not clipped. On a phone the pictures stack. */
.article-layout .article-style p.img-row{display:flex;gap:12px;align-items:flex-start;max-width:28.4em;margin:28px 0}
.article-layout .article-style .img-pair-item{flex:calc(var(--w) / var(--h)) 1 0;min-width:0;max-width:calc(var(--w) * 1px)}
.article-layout .article-style .img-row img{display:block;width:100%;height:auto}
.article-layout .article-style a.img-full{display:block;cursor:zoom-in}
.article-layout .article-style a.img-full:hover img{filter:brightness(.94)}
.article-layout .article-style a.img-full:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
/* On a wide screen a figure runs past the text into the empty band on its right, to the page's edge. */
@media(min-width:1241px){.article-layout:has(>.article-card):not(.article-layout-callouts,.article-layout-wide) .article-style p.img-row{width:min(calc(50vw + 138px),826px);max-width:none;gap:16px}
}
@media(max-width:560px){.article-layout .article-style p.img-row{flex-direction:column}
.article-layout .article-style .img-pair-item{flex:none;max-width:100%}
}

/* An editor's note after an article: its label bold and the note at body weight, a size down, under a short rule. */
.article-layout .article-style .editors-note{max-width:calc(28.4em * 18 / 17);margin:0 0 16px;font-size:17px;line-height:1.55}
.article-layout .article-style hr:has(+ .editors-note,+ br + .editors-note){width:96px;margin:36px 0 18px;border:0;border-top:3px solid var(--edu)}

/* An education article by one author with a photo (doors/article_header): on a phone or tablet the byline is a band
on education's pale ground, in place of the side card at the end; on a wide screen the card has photo and name. */
.article-layout .byline-portrait :is(.byline-photo,.network-icon,.byline-role,.byline-bio){display:none}
@media(max-width:1000px){.article-layout .byline-portrait{display:grid;grid-template-columns:96px minmax(0,1fr);gap:2px 16px;align-items:center;margin-top:20px;padding:22px 18px 16px;background:var(--edu-bg);border-radius:var(--r-large);box-shadow:inset 0 6px 0 var(--edu)}
.article-layout .byline-portrait>*{grid-column:2}
.article-layout .byline-portrait .byline-photo{display:block;grid-column:1;grid-row:1/span 3;width:96px;height:96px;border-radius:50%;object-fit:cover;box-shadow:0 0 0 3px #fff}
.article-layout .byline-portrait .byline-authors{font:500 21px/1.2 var(--display)}
.article-layout .byline-portrait .byline-role{display:block;font-size:15px;line-height:1.4}
.article-layout .byline-portrait .byline-bio{display:block;grid-column:1/-1;margin-top:10px;font-size:15px;line-height:1.45}
.article-layout .byline-portrait :is(.byline-role,.byline-bio) p{margin:0}
.article-layout .byline-portrait .network-icon{display:flex;gap:0;margin:2px 0 0 -10px;padding:0;list-style:none}
.article-layout .byline-portrait .network-icon li{margin:0}
.article-layout .byline-portrait .network-icon a{display:flex;align-items:center;justify-content:center;width:44px;height:44px;color:var(--link);font-size:17px}
.article-layout:has(.byline-portrait) .article-card{display:none}
}
.article-layout .article-card-edu .card-authors>li:only-child{grid-template-columns:minmax(0,1fr)}
.article-layout .article-card-edu .card-authors>li:only-child>img.card-author-portrait{grid-row:auto;width:100%;height:auto;aspect-ratio:184/220;margin:0 0 12px;border-radius:var(--r-small);object-fit:cover}
.article-layout .article-card-edu .card-authors>li:only-child>div>*{grid-column:1}
.article-layout .article-card-edu .card-authors>li:only-child .card-author-name{font-size:22px}

/* A newsletter post (doors/newsletter_post): the issue as one large brick in its year's colour, as on the archive,
with the issues around it beside it, outlined in their years' colours. */
.nl-post{padding:32px 0 48px}
.nl-post .crumbs{margin-bottom:26px}
.nl-post .nla-brick-1{--tone:var(--brick1)}.nl-post .nla-brick-2{--tone:var(--brick2)}.nl-post .nla-brick-3{--tone:var(--brick3)}.nl-post .nla-brick-4{--tone:var(--brick4)}
.nl-post-grid{display:grid;grid-template-columns:minmax(0,700px) 280px;gap:56px;justify-content:center;align-items:start}
.nl-post>.crumbs{max-width:1036px;margin-inline:auto}
.nl-issue{position:relative;margin-top:12px;padding:30px 40px 40px;background:var(--tone);border-radius:3px;box-shadow:inset 0 -10px 0 rgb(0 0 0/.24);color:#fff;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.nl-issue::before{content:"";position:absolute;left:22px;right:22px;top:-12px;height:12px;background:linear-gradient(90deg,transparent 8px,var(--tone) 8px 40px,transparent 40px) left top/48px 12px space no-repeat;border-radius:3px 3px 0 0}
.nl-issue h1{margin:0 0 22px;color:#fff;font-weight:var(--display-weight);line-height:1}
.nl-issue-name{display:block;margin-bottom:14px;font:600 19px/1.3 var(--text)}
.nl-issue-month{display:block;font:var(--display-weight) clamp(46px,5.4vw,76px)/1 var(--display);letter-spacing:-.015em}
.nl-issue-body{font-size:19px;line-height:1.55}
.nl-issue-body p{max-width:30em;margin:0 0 16px}
.nl-issue-body strong{font-weight:700;color:#fff}
.nl-issue-body a:not(.post-brick){color:#fff;text-decoration:underline;text-underline-offset:3px}
.nl-issue-body .post-action{margin:26px 0 0}
.nl-issue .post-brick{display:inline-flex;align-items:center;min-height:52px;padding:0 26px;background:#fff;border-radius:999px;color:var(--ink);font:700 19px/1.2 var(--text);text-decoration:none}
.nl-issue .post-brick::after{content:"\2192" / "";margin-inline-start:10px}
.nl-issue .post-brick:hover{text-decoration:underline;text-underline-offset:4px}
.nl-issue .post-brick:focus-visible{outline:3px solid #fff;outline-offset:3px}
.nl-issue-foot{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin-top:22px}
.nl-issue-sent{margin:0;font-size:16px}
.nl-issue .share-link{margin:0}
.nl-issue .copy-link{min-height:44px;padding:0;background:none;border:0;color:#fff;font:600 16px/1.3 var(--text);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.nl-issue .copy-link:hover{text-decoration-thickness:2px}
.nl-issue .copy-link:focus-visible{outline:3px solid #fff;outline-offset:3px}
.nl-around{padding-top:12px}
.nl-around h2{margin:0 0 14px;font-size:24px;line-height:1.15}
.nl-year{display:grid;grid-template-columns:56px minmax(0,1fr);gap:8px;align-items:start;margin:0 0 10px}
.nl-year h3{margin:0;padding-top:10px;font-size:20px;line-height:1.2}
.nl-year ol{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:0;padding:0;list-style:none}
.nl-year li{min-width:0;margin:0}
.nl-year a,.nl-here{display:flex;align-items:flex-end;box-sizing:border-box;min-width:0;overflow-wrap:anywhere;min-height:48px;height:100%;padding:8px 12px 10px;border-radius:3px;font:500 19px/1.1 var(--display)}
.nl-year a{background:#fff;border:2px solid var(--tone);box-shadow:inset 0 -4px 0 var(--tone);color:var(--tone);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.nl-year a:hover{color:var(--ink)}
.nl-year a:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
.nl-here{flex-direction:column;align-items:flex-start;justify-content:flex-end;background:var(--tone);box-shadow:inset 0 -4px 0 rgb(0 0 0/.24);color:#fff}
.nl-here small{font:600 15px/1.2 var(--text)}
.nl-all{margin:12px 0 0}
.nl-all a{display:inline-block;padding:11px 0;font-weight:600;color:var(--link);text-decoration:underline;text-underline-offset:3px}
.nl-all a::after{content:"\2192";margin-inline-start:6px;text-decoration:none}
@media(max-width:1000px){.nl-post-grid{grid-template-columns:minmax(0,640px);gap:36px}
.nl-post>.crumbs{max-width:640px}
.nl-year ol{grid-template-columns:repeat(auto-fill,minmax(118px,1fr))}
}
@media(max-width:760px){.nl-post{padding:20px 0 28px}
.nl-issue{padding:24px 20px 30px}
.nl-issue::before{left:12px;right:12px}
.nl-issue-body{font-size:17px}
.nl-issue .post-brick{font-size:18px}
}

/* An Educators' Corner essay's short opening paragraph is a step larger, as its lead (doors/reading), and its
standfirst keeps to the text's width. */
.article-type-educators-corner .article-style p.lead{max-width:25.6em;font-size:20px;line-height:1.55}
.article-type-educators-corner .standfirst{max-width:22.2em}
@media(max-width:760px){.article-type-educators-corner .article-style p.lead{font-size:19px}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ draft: false
image:
#caption: "Photo by Andrea Piacquadio from [Pexels](https://www.pexels.com/photo/happy-ethnic-woman-sitting-at-table-with-laptop-3769021/)"
focal_point: "Center"
preview_only: false
preview_only: true

# Projects (optional).
# Associate this post with one or more of your projects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ draft: false
image:
#caption: "Photo by Andrea Piacquadio from [Pexels](https://www.pexels.com/photo/happy-ethnic-woman-sitting-at-table-with-laptop-3769021/)"
focal_point: "Center"
preview_only: false
preview_only: true

# Projects (optional).
# Associate this post with one or more of your projects.
Expand Down
2 changes: 1 addition & 1 deletion content/educators-corner/016-reviewer-zero/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ draft: false
image:
caption: "Reviewer Zero"
focal_point: "Center"
preview_only: false
preview_only: true

# Projects (optional).
# Associate this post with one or more of your projects.
Expand Down
8 changes: 6 additions & 2 deletions layouts/_default/_markup/render-link.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
{{- /* A Hugo Markdown render hook to parse links, opening external links in new tabs. Trimmed so no whitespace is emitted before the link. */ -}}
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if or (strings.HasPrefix .Destination "http://") (strings.HasPrefix .Destination "https://") (strings.HasPrefix .Destination "//") }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
{{- /* Markdown links, opening other sites in new tabs; a link to forrt.org itself (site.Params.doors.host, with or
without www.) stays in the tab, as in booklet_contents. Overrides the theme's hook, whose comment line left a
line break before every link: rendered as a space, it split "(" from a link that follows it. */ -}}
{{- $host := strings.TrimPrefix "www." (urls.Parse .Destination).Host -}}
{{- $away := and $host (ne $host site.Params.doors.host) -}}
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if $away }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
16 changes: 15 additions & 1 deletion layouts/partials/doors/article_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,22 @@
{{ $heading := .Params.heading_title | default .Title }}
{{ if .Params.hide_title }}<h1 class="sr-only">{{ $heading }}</h1>{{ else }}<h1>{{ $heading }}</h1>{{ end }}
{{ with .Params.subtitle }}<p class="standfirst">{{ . | markdownify | emojify }}</p>{{ end }}
<div class="byline">
{{/* An education article by one author with a photo: on a phone or tablet the byline is a band on education's pale
ground with the photo, name, links and date, and the side card, which has them on a wide screen, is left out
there (article.css). */}}
{{ $profile := false }}{{ $photo := false }}
{{ if and (eq (len (.Params.authors | default slice)) 1) (in (slice "educators-corner" "pedagogies") .Type) }}
{{ with partialCached "doors/author_profile" (index .Params.authors 0) (index .Params.authors 0) }}{{ $profile = . }}{{ $photo = (.Resources.ByType "image").GetMatch "*avatar*" }}{{ end }}
{{ end }}
<div class="byline{{ if $photo }} byline-portrait{{ end }}">
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Resolved
{{ with $photo }}<img class="byline-photo" src="{{ (.Fill "192x192 Center webp q80").RelPermalink }}" width="96" height="96" alt="">{{ end }}
{{ with .Params.authors }}<span class="byline-authors">{{ partial "page_metadata_authors" $page }}</span>{{ end }}
{{ if $photo }}
{{/* The card's role and bio come too, as the card is left out on these screens. */}}
{{ with $profile.Params.role }}<span class="byline-role">{{ . | markdownify | emojify }}</span>{{ end }}
{{ if $profile.Params.social }}{{ partial "social_links" $profile }}{{ end }}
{{ with $profile.Params.bio }}<span class="byline-bio">{{ . | markdownify | emojify }}</span>{{ end }}
{{ end }}
{{/* The side card carries the date on a wide screen; on a narrow one it would come after the article. */}}
{{ if and (in (slice "post" "educators-corner" "pedagogies") .Type) (not .Date.IsZero) }}<time class="byline-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2 January 2006" }}</time>{{ end }}
{{ if and (eq .Type "post") (ge .ReadingTime 3) }}<span class="byline-time">{{ .ReadingTime }} {{ i18n "minute_read" }}</span>{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/doors/author_links.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/* Author names, comma-separated, each linked to its profile where one exists, as page_metadata_authors does.
Input: a slice of names as written in a page's `authors`. */}}
{{- range $i, $raw := . -}}
{{- $profile := site.GetPage (printf "/authors/%s" (urlize $raw)) -}}
{{- $profile := partialCached "doors/author_profile" $raw $raw -}}
{{- if gt $i 0 }}, {{ end -}}
{{- $name := $raw -}}{{- with $profile -}}{{- with .Params.name -}}{{- $name = . -}}{{- end -}}{{- end -}}
{{- if and $profile $profile.Params.name (site.Params.link_authors | default true) -}}
Expand Down
16 changes: 16 additions & 0 deletions layouts/partials/doors/author_profile.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{/* The profile page (/authors/<slug>/) for a name as written in a page's `authors`, or false. The slug is usually the
name made into a URL; a title such as "Dr." in front, or a profile whose folder differs from the credited name
("Patrick Forscher" at patrick-s-forscher), is found by the profile's own name. Call it with partialCached and
the name as the key. */}}
{{ $raw := . }}
{{ $found := site.GetPage (printf "/authors/%s" (urlize $raw)) }}
{{ if not $found }}
{{ $plain := replaceRE `(?i)^(dr|prof|professor)\.?\s+` "" (trim $raw " ") }}
{{ $found = site.GetPage (printf "/authors/%s" (urlize $plain)) }}
{{ if not $found }}
{{ with site.GetPage "/authors" }}{{ range .Sections }}
{{ if and (not $found) (eq (lower (.Params.name | default .Title)) (lower $plain)) }}{{ $found = . }}{{ end }}
{{ end }}{{ end }}
{{ end }}
{{ end }}
{{ return $found }}
62 changes: 62 additions & 0 deletions layouts/partials/doors/newsletter_post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/* A newsletter post (doors/reading): the issue as one large brick in its year's colour, as on the archive
(/newsletters/, one brick colour to a year, DESIGN.md §4), holding the title, what is in the issue, the link to
read it and when it was sent. Beside it, or below it on a phone, the issues around it by year and month, oldest
first, outlined in their years' colours, with this one solid and unlinked. FORRT sends every issue, so the
page names no author. Input: dict "page" and "body", the post's text with its link made a brick (doors/reading). */}}
{{ $p := .page }}
{{ $tone := add (mod $p.Date.Year 4) 1 }}
{{/* "FORRT Newsletter — January 2026": the name above, the month large. */}}
{{ $parts := split $p.Title " — " }}
{{ $name := "" }}{{ $issue := $p.Title }}
{{ if eq (len $parts) 2 }}{{ $name = index $parts 0 }}{{ $issue = index $parts 1 }}{{ end }}
{{ $issues := slice }}
{{ range (where site.RegularPages "Section" "post").ByDate }}
{{ if in (.Params.categories | default slice) "Newsletter" }}{{ $issues = $issues | append . }}{{ end }}
{{ end }}
{{ $here := 0 }}
{{ range $i, $q := $issues }}{{ if eq $q.RelPermalink $p.RelPermalink }}{{ $here = $i }}{{ end }}{{ end }}
{{/* Up to eight issues: three before this one where there are, the rest after. */}}
{{ $count := len $issues }}
{{ $start := cond (gt $here 3) (sub $here 3) 0 }}
{{ if gt (add $start 8) $count }}{{ $start = cond (gt $count 8) (sub $count 8) 0 }}{{ end }}
{{ $shown := first 8 (after $start $issues) }}
{{ $years := slice }}
{{ range $shown }}{{ $years = $years | append .Date.Year }}{{ end }}
<div class="wrap">
<article class="nl-post">
<nav class="crumbs" aria-label="Breadcrumb">
<a href="{{ "" | relLangURL }}">Home</a>
{{ with $p.Parent }}<span aria-hidden="true">/</span> <a href="{{ .RelPermalink }}">{{ index (partialCached "doors/menu_labels" . "menu-labels") (strings.Trim .Path "/") | default .LinkTitle }}</a>{{ end }}
<span aria-hidden="true">/</span> <span aria-current="page">{{ $p.LinkTitle }}</span>
</nav>
<div class="nl-post-grid">
<section class="nl-issue nla-brick-{{ $tone }}" aria-labelledby="nl-issue-title">
<h1 id="nl-issue-title">{{ with $name }}<span class="nl-issue-name">{{ . }}</span> {{ end }}<span class="nl-issue-month">{{ $issue }}</span></h1>
<div class="nl-issue-body">{{ .body }}</div>
<div class="nl-issue-foot">
<p class="nl-issue-sent">Sent <time datetime="{{ $p.Date.Format "2006-01-02" }}">{{ $p.Date.Format "2 January 2006" }}</time></p>
<p class="share-link"><button class="copy-link" type="button" data-copy-link="{{ $p.Permalink }}">Copy link</button> <span role="status"></span></p>
</div>
</section>
<nav class="nl-around" aria-labelledby="nl-around-title">
<h2 id="nl-around-title">Newsletter issues</h2>
{{ range $year := uniq $years }}
<div class="nl-year nla-brick-{{ add (mod $year 4) 1 }}">
<h3>{{ $year }}</h3>
<ol>
{{ range $i, $q := $shown }}{{ if eq $q.Date.Year $year }}
{{ $at := add $start $i }}
{{ if eq $at $here }}
<li class="nl-here" aria-current="page"><small>This issue</small>{{ $q.Date.Format "January" }}<span class="sr-only"> {{ $year }}</span></li>
{{ else }}
<li><a href="{{ $q.RelPermalink }}"{{ if eq $at (sub $here 1) }} rel="prev"{{ else if eq $at (add $here 1) }} rel="next"{{ end }}>{{ $q.Date.Format "January" }}<span class="sr-only"> {{ $year }}</span></a></li>
{{ end }}
{{ end }}{{ end }}
</ol>
</div>
{{ end }}
{{ with site.GetPage "/newsletters" }}<p class="nl-all"><a href="{{ .RelPermalink }}">All newsletters and sign-up</a></p>{{ end }}
</nav>
</div>
</article>
</div>
Loading
Loading