Repository navigation
Education lists: Pedagogies cards first and balanced phone logo bands on Educators' Corner #1267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LukasWallrich
wants to merge
6
commits into
rebrand-doors
Choose a base branch
from
hc/education-lists
base: rebrand-doors
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
33e8b56
Education lists: lead with Pedagogies cards and compact Educators' Co…
LukasWallrich d919a43
Address review feedback on Education lists
LukasWallrich 9dc93f5
Merge origin/rebrand-doors into hc/education-lists
LukasWallrich 7444fde
Clarify photo vs diagram branch and lead-card phone comment
LukasWallrich 0a55e8a
Keep list-items class on Pedagogies grid for directory width check
LukasWallrich c0784a9
Merge rebrand-doors into hc/education-lists
LukasWallrich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,74 @@ | ||
| {{- define "main" -}} | ||
| {{/* A section of articles: its introduction, then the articles newest first, a page at a time. */}} | ||
| {{ $pager := .Paginate .Data.Pages }} | ||
| <div class="wrap"> | ||
| <div class="article-layout article-layout-wide"> | ||
| <article class="reading"> | ||
| <header class="article-head"> | ||
| {{ partial "doors/crumbs" (dict "page" .) }} | ||
| <h1>{{ .Title }}</h1> | ||
| {{ with .Params.subtitle }}<p class="standfirst">{{ . | markdownify | emojify }}</p>{{ end }} | ||
| </header> | ||
| {{ with .Content }}<div class="article-style">{{ partial "doors/content" . }}</div>{{ end }} | ||
| <div class="list-items">{{ range $pager.Pages }}{{ partial "doors/list_item" . }}{{ end }}</div> | ||
| {{ partial "doors/pager" $pager }} | ||
| </article> | ||
| </div> | ||
| {{/* Pedagogies: FORRT's worked examples of principled teaching and mentoring. Leads immediately with the pedagogies | ||
| as Education-tinted cards (DESIGN.md §2, §4, §6), each showing its course preview, educator, summary and plain | ||
| links to its teaching materials. The background prose follows beside an invitation to contribute, so neither | ||
| pushes the pedagogies off the first screen nor leaves an empty column on desktop (§7). */}} | ||
| {{/* Keep Hugo's /pedagogies/page/1/ redirect stub matching the baseline section list. */}} | ||
| {{ $_ := .Paginator }} | ||
| {{ $pages := .Data.Pages.ByDate.Reverse }} | ||
| <div class="wrap news-page ec-page ped-page"> | ||
| <header class="article-head ped-head"> | ||
| {{ partial "doors/crumbs" (dict "page" .) }} | ||
| <h1>{{ .Title }}</h1> | ||
| {{ with .Params.subtitle }}<p class="standfirst">{{ . | markdownify | emojify }}</p>{{ end }} | ||
| {{ with resources.Get "images/doors/area-education.webp" }} | ||
| {{ $w := .Resize "440x webp q80" }} | ||
| <figure class="topic-plate-head ped-plate" aria-hidden="true"><img src="{{ $w.RelPermalink }}" width="{{ $w.Width }}" height="{{ $w.Height }}" alt=""></figure> | ||
| {{ end }} | ||
| </header> | ||
|
|
||
| <ul class="ped-grid list-items" role="list"> | ||
| {{ range $i, $p := $pages }} | ||
| {{ $link := $p.RelPermalink }}{{ $target := "" }} | ||
| {{ with $p.Params.external_link }}{{ $link = . }}{{ $target = ` target="_blank" rel="noopener"` }}{{ end }} | ||
| {{ $img := ($p.Resources.ByType "image").GetMatch "*featured*" }} | ||
| <li> | ||
| <article class="announcement-card ped-card"> | ||
| {{ with $img }} | ||
| {{ partial "doors/card_picture" (dict "img" . "large" false "lazy" (ge $i 4) "alt" $p.Params.image.alt_text "figures" true "whole" true) }} | ||
| {{ else }} | ||
| <div class="ac-thumb ac-panel ac-panel-edu ac-panel-door" aria-hidden="true"></div> | ||
| {{ end }} | ||
| <div class="ac-body"> | ||
| <h2><a class="ac-link" href="{{ $link }}"{{ $target | safeHTMLAttr }}>{{ $p.Title }}</a></h2> | ||
| {{ with $p.Params.subtitle }}<p class="ped-subtitle">{{ . | markdownify | emojify }}</p>{{ end }} | ||
| <p class="ec-meta">{{ with $p.Params.authors }}<span class="ec-authors">{{ partial "doors/author_links" . }}</span>{{ end }}{{ if $p.Params.date }}<time datetime="{{ $p.Date.Format "2006-01-02" }}">{{ $p.Date.Format "January 2006" }}</time>{{ end }}</p> | ||
| <p class="ped-summary">{{ if $p.Params.summary }}{{ $p.Params.summary | plainify | emojify }}{{ else if $p.Params.abstract }}{{ $p.Params.abstract | plainify | emojify }}{{ else }}{{ $p.Summary | plainify | emojify }}{{ end }}</p> | ||
| {{ with $p.Params.links }} | ||
| <div class="ped-materials"> | ||
| <span class="ped-materials-label">Materials:</span> | ||
| <ul class="ped-links" role="list"> | ||
| {{ range . }} | ||
| {{ $href := .url | htmlUnescape }} | ||
| {{ if not (or (hasPrefix $href "http://") (hasPrefix $href "https://") (hasPrefix $href "/")) }} | ||
| {{ $href = printf "%s%s" $p.RelPermalink $href }} | ||
| {{ end }} | ||
| {{ $away := or (hasPrefix $href "http://") (hasPrefix $href "https://") }} | ||
| <li><a href="{{ $href }}"{{ if $away }} target="_blank" rel="noopener"{{ end }}>{{ .name | strings.TrimSpace }}{{ if $away }} <i class="fas fa-external-link-alt" aria-hidden="true"></i><span class="visually-hidden"> (another website)</span>{{ end }}</a></li> | ||
| {{ end }} | ||
| </ul> | ||
| </div> | ||
| {{ end }} | ||
| </div> | ||
| </article> | ||
| </li> | ||
| {{ end }} | ||
| </ul> | ||
|
|
||
| {{ with .Content }} | ||
| <section class="ped-about" aria-labelledby="ped-about-h"> | ||
| <div class="ped-about-prose"> | ||
| <h2 id="ped-about-h">About FORRT Pedagogies</h2> | ||
| <div class="article-style">{{ partial "doors/content" . }}</div> | ||
| </div> | ||
| <aside class="ped-contribute" aria-label="Share your pedagogy"> | ||
| <div class="ec-write-card"> | ||
| <h3>Share a pedagogy</h3> | ||
| <p>Teach a course or module grounded in open and reproducible research? Help other educators adapt your approach.</p> | ||
| <a class="ec-write-link" href="{{ relref $ "/submit" }}">Submit your pedagogy</a> | ||
| </div> | ||
| </aside> | ||
| </section> | ||
| {{ end }} | ||
| </div> | ||
| {{- end -}} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.