diff --git a/assets/css/article.css b/assets/css/article.css index 8e3ab546b4e..b1648207a40 100644 --- a/assets/css/article.css +++ b/assets/css/article.css @@ -1272,3 +1272,43 @@ 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 (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:var(--measure);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:not(.img-row-text){width:min(calc(50vw + 130px),818px);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(var(--measure) * 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 Educators' Corner article by one author with a photo (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;text-decoration:none} +.article-layout:has(.byline-portrait) .article-card{display:none} +} +.article-layout .article-card-edu .card-authors>li:has(>.card-author-portrait){grid-template-columns:minmax(0,1fr)} +.article-layout .article-card-edu .card-authors>li>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:has(>.card-author-portrait)>div>*{grid-column:1} +.article-layout .article-card-edu .card-authors>li:has(>.card-author-portrait) .card-author-name{font-size:22px} diff --git a/content/educators-corner/001-Representation-HeatherUrry/index.md b/content/educators-corner/001-Representation-HeatherUrry/index.md index 70d7cdf5730..d2a7c1230dc 100644 --- a/content/educators-corner/001-Representation-HeatherUrry/index.md +++ b/content/educators-corner/001-Representation-HeatherUrry/index.md @@ -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. diff --git a/content/educators-corner/011-intersectionality-open-science/index.md b/content/educators-corner/011-intersectionality-open-science/index.md index 8297fbe5310..f1723736205 100644 --- a/content/educators-corner/011-intersectionality-open-science/index.md +++ b/content/educators-corner/011-intersectionality-open-science/index.md @@ -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. diff --git a/content/educators-corner/016-reviewer-zero/index.md b/content/educators-corner/016-reviewer-zero/index.md index c9d6330a56e..912baff19ee 100644 --- a/content/educators-corner/016-reviewer-zero/index.md +++ b/content/educators-corner/016-reviewer-zero/index.md @@ -20,6 +20,9 @@ image: focal_point: "Center" preview_only: false +# Pictures that stay at the width of the text on wide screens. +text_width_figures: ["tweet_rz.webp"] + # Projects (optional). # Associate this post with one or more of your projects. # Simply enter your project's folder or file name without extension. diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 64bb2557952..edb55a84d19 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -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. */ -}} -{{ .Text | safeHTML }} \ No newline at end of file +{{- /* 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) -}} +{{ .Text | safeHTML }} \ No newline at end of file diff --git a/layouts/partials/article_header.html b/layouts/partials/article_header.html index 3c17af0c97e..ac18e600d7a 100644 --- a/layouts/partials/article_header.html +++ b/layouts/partials/article_header.html @@ -29,8 +29,22 @@ {{ $heading := .Params.heading_title | default .Title }} {{ if .Params.hide_title }}
{{ . | markdownify | emojify }}
{{ end }} -