Converted 'article' nomenclature to 'interview'
This commit is contained in:
@ -37,7 +37,7 @@
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
|
||||
<meta property="og:type" content="{{ if .IsPage }}interview{{ else }}website{{ end }}" />
|
||||
<meta property="og:url" content="{{ .Permalink }}" />
|
||||
<meta property="og:title" content="{{ $title }}" />
|
||||
<meta property="og:description" content="{{ $description }}" />
|
||||
@ -53,18 +53,18 @@
|
||||
<meta name="twitter:image" content="{{ . | absURL }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- Article Specific -->
|
||||
{{ if and .IsPage (eq .Type "articles") }}
|
||||
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" />
|
||||
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}" />
|
||||
<meta property="article:section" content="Oral History" />
|
||||
<!-- Interview Specific -->
|
||||
{{ if and .IsPage (eq .Type "interviews") }}
|
||||
<meta property="interview:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}" />
|
||||
<meta property="interview:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}" />
|
||||
<meta property="interview:section" content="Oral History" />
|
||||
{{ with .Params.topics }}
|
||||
{{ range . }}
|
||||
<meta property="article:tag" content="{{ . }}" />
|
||||
<meta property="interview:tag" content="{{ . }}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Author information using standard meta topics instead of article:author */}}
|
||||
{{/* Author information using standard meta topics instead of interview:author */}}
|
||||
{{ with .Params.narrator }}
|
||||
<meta name="author" content="{{ . }}" />
|
||||
{{ end }}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{{ define "main" }}
|
||||
<article class="single-default">
|
||||
<interview class="single-default">
|
||||
<header class="mb-8 wompum-container wompum-container--wide-gap aspect-3/1 md:aspect-4/1">
|
||||
<div class="wompum-grid" data-text="{{ .Params.wompum | default .Title }}" data-columns="7" data-rows="5"></div>
|
||||
</header>
|
||||
@ -15,5 +15,5 @@
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
</interview>
|
||||
{{ end }}
|
@ -5,7 +5,7 @@
|
||||
</header>
|
||||
<main class="flex flex-wrap container mx-auto justify-center">
|
||||
<ul class="flex flex-col md:gap-4 gap-16 w-full mb-16 mt-4">
|
||||
{{ partial "article-list.html" (dict "Pages" .Data.Pages) }}
|
||||
{{ partial "interview-list.html" (dict "Pages" .Data.Pages) }}
|
||||
</ul>
|
||||
|
||||
{{ if gt (len (index .Site.Taxonomies .Data.Singular)) 1 }}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<main class="flex flex-col md:flex-row gap-4 md:gap-8 lg:gap-16 justify-around mt-8 max-w-screen-xl mx-auto">
|
||||
<ul class="flex flex-col md:gap-4 gap-16 w-full mb-16">
|
||||
{{ partial "article-list.html" (dict "Pages" (where .Site.RegularPages "Section" "articles")) }}
|
||||
{{ partial "interview-list.html" (dict "Pages" (where .Site.RegularPages "Section" "interviews")) }}
|
||||
</ul>
|
||||
|
||||
<aside class="max-w-prose md:w-1/4 flex flex-col gap-8 mb-8">
|
||||
|
@ -1,8 +1,8 @@
|
||||
{{ define "main" }}
|
||||
|
||||
<article class="single-article">
|
||||
<interview class="single-interview">
|
||||
|
||||
<header class="mb-4 wompum-container wompum-container--wide-gap aspect-2/1 md:aspect-3/1">{{ partial "article-wompum.html" . }}</header>
|
||||
<header class="mb-4 wompum-container wompum-container--wide-gap aspect-2/1 md:aspect-3/1">{{ partial "interview-wompum.html" . }}</header>
|
||||
|
||||
<div class="flex md:flex-row flex-col gap-4 mt-4">
|
||||
<aside class="md:sticky md:top-24 md:h-screen lg:w-1/3 p-4 font-iosevka">
|
||||
@ -17,17 +17,17 @@
|
||||
) }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="md:block hidden">{{ partial "article-metadata.html" . }}</div>
|
||||
<div class="md:block hidden">{{ partial "interview-metadata.html" . }}</div>
|
||||
</aside>
|
||||
<div class="prose lg:prose-xl dark:prose-invert lg:w-2/3 p-4 mx-auto md:mx-0">
|
||||
<p class="font-bold text-4xl article-title article-title--single">{{ partial "article-title" . }}</p>
|
||||
<p class="font-bold text-4xl interview-title interview-title--single">{{ partial "interview-title" . }}</p>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<aside class="md:hidden block p-8 mt-8 border-t border-gray-200">{{ partial "article-metadata.html" . }}</aside>
|
||||
<aside class="md:hidden block p-8 mt-8 border-t border-gray-200">{{ partial "interview-metadata.html" . }}</aside>
|
||||
</div>
|
||||
</article>
|
||||
</interview>
|
||||
<aside class="max-w-screen-xl mx-auto">
|
||||
{{ partial "related-articles" (dict "page" . "topics" .Params.topics "limit" 3) }}
|
||||
{{ partial "related-interviews" (dict "page" . "topics" .Params.topics "limit" 3) }}
|
||||
</aside>
|
||||
<div class="text-center my-12"><a href="/">Go Home</a></div>
|
||||
{{ end }}
|
@ -1,3 +0,0 @@
|
||||
{{- if and .Params.narrator .Params.subject -}}
|
||||
<span class="article-title__narrator">{{- .Params.narrator }}</span> <span class="article-title__subject">{{ .Params.subject -}}</span>
|
||||
{{- end -}}
|
@ -6,7 +6,7 @@
|
||||
{{- end -}}
|
||||
<li class="group flex md:flex-row flex-col md:gap-4 gap-2 md:items-center">
|
||||
<div class="flex-1 min-w-0 flex gap-2 items-center h-full">
|
||||
<a class="wompum-container h-full aspect-7/2 md:aspect-auto" href="{{ $page.RelPermalink }}">{{ partial "article-wompum.html" $page }}</a>
|
||||
<a class="wompum-container h-full aspect-7/2 md:aspect-auto" href="{{ $page.RelPermalink }}">{{ partial "interview-wompum.html" $page }}</a>
|
||||
<time class="text-gray-800 dark:text-sand-500 font-iosevka w-12 flex-shrink-0" datetime="{{ $page.Date.Format "2006-01-02" }}">
|
||||
<p>{{ $page.Date.Format "Jan" }}</p>
|
||||
<p>{{ $page.Date.Format "02" }}</p>
|
||||
@ -14,7 +14,7 @@
|
||||
</time>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 md:w-3/5 flex-shrink-0 md:py-8">
|
||||
<a class="article-title article-title--list" href="{{ $page.RelPermalink }}">{{ partial "article-title" $page }}</a>
|
||||
<a class="interview-title interview-title--list" href="{{ $page.RelPermalink }}">{{ partial "interview-title" $page }}</a>
|
||||
{{ if $page.Params.location }}
|
||||
<p class="light:text-gray-800 dark:text-sand-100 italic">{{ $page.Params.location }}</p>
|
||||
{{ end }}
|
3
layouts/partials/interview-title.html
Normal file
3
layouts/partials/interview-title.html
Normal file
@ -0,0 +1,3 @@
|
||||
{{- if and .Params.narrator .Params.subject -}}
|
||||
<span class="interview-title__narrator">{{- .Params.narrator }}</span> <span class="interview-title__subject">{{ .Params.subject -}}</span>
|
||||
{{- end -}}
|
@ -1,4 +1,4 @@
|
||||
<div class="wompum-article-grid"
|
||||
<div class="wompum-interview-grid"
|
||||
data-metadata="{{ dict "narrator" .Params.narrator "subject" .Params.subject "facilitator" .Params.facilitator | jsonify }}"
|
||||
data-columns="7"
|
||||
data-rows="5">
|
@ -1,40 +0,0 @@
|
||||
{{- $topics := .topics -}}
|
||||
{{- $limit := default 3 .limit -}}
|
||||
{{- $currentPath := .page.RelPermalink -}}
|
||||
|
||||
{{- $related := where (where site.RegularPages "Type" "articles") "RelPermalink" "!=" $currentPath -}}
|
||||
{{- $matchingArticles := slice -}}
|
||||
|
||||
{{/* First try to find articles with matching topics */}}
|
||||
{{- range $related -}}
|
||||
{{- $matches := 0 -}}
|
||||
{{- range .Params.topics -}}
|
||||
{{- if in $topics . -}}
|
||||
{{- $matches = add $matches 1 -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if gt $matches 0 -}}
|
||||
{{- $matchingArticles = $matchingArticles | append (dict "page" . "matches" $matches) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* If we found matching articles, sort by number of matching topics */}}
|
||||
{{- $finalArticles := slice -}}
|
||||
{{- if gt (len $matchingArticles) 0 -}}
|
||||
{{- $finalArticles = first $limit (sort $matchingArticles "matches" "desc") -}}
|
||||
{{- else -}}
|
||||
{{/* Fallback to showing other articles sorted by date */}}
|
||||
{{- $finalArticles = first $limit (sort $related "Date" "desc") -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if gt (len $finalArticles) 0 -}}
|
||||
<div class="related-articles flex flex-wrap gap-4">
|
||||
<h2 class="title text-3xl font-bold">Related Articles</h2>
|
||||
<div class="wompum-container wompum-container--no-gap">
|
||||
<div class="wompum-grid" data-text="Related Articles" data-columns="8" data-rows="1"></div>
|
||||
</div>
|
||||
<ul class="flex flex-col gap-4 w-full">
|
||||
{{ partial "article-list" (dict "Pages" $finalArticles) }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end -}}
|
40
layouts/partials/related-interviews.html
Normal file
40
layouts/partials/related-interviews.html
Normal file
@ -0,0 +1,40 @@
|
||||
{{- $topics := .topics -}}
|
||||
{{- $limit := default 3 .limit -}}
|
||||
{{- $currentPath := .page.RelPermalink -}}
|
||||
|
||||
{{- $related := where (where site.RegularPages "Type" "interviews") "RelPermalink" "!=" $currentPath -}}
|
||||
{{- $matchingInterviews := slice -}}
|
||||
|
||||
{{/* First try to find interviews with matching topics */}}
|
||||
{{- range $related -}}
|
||||
{{- $matches := 0 -}}
|
||||
{{- range .Params.topics -}}
|
||||
{{- if in $topics . -}}
|
||||
{{- $matches = add $matches 1 -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if gt $matches 0 -}}
|
||||
{{- $matchingInterviews = $matchingInterviews | append (dict "page" . "matches" $matches) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* If we found matching interviews, sort by number of matching topics */}}
|
||||
{{- $finalInterviews := slice -}}
|
||||
{{- if gt (len $matchingInterviews) 0 -}}
|
||||
{{- $finalInterviews = first $limit (sort $matchingInterviews "matches" "desc") -}}
|
||||
{{- else -}}
|
||||
{{/* Fallback to showing other interviews sorted by date */}}
|
||||
{{- $finalInterviews = first $limit (sort $related "Date" "desc") -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if gt (len $finalInterviews) 0 -}}
|
||||
<div class="related-interviews flex flex-wrap gap-4">
|
||||
<h2 class="title text-3xl font-bold">Related Interviews</h2>
|
||||
<div class="wompum-container wompum-container--no-gap">
|
||||
<div class="wompum-grid" data-text="Related Interviews" data-columns="8" data-rows="1"></div>
|
||||
</div>
|
||||
<ul class="flex flex-col gap-4 w-full">
|
||||
{{ partial "interview-list" (dict "Pages" $finalInterviews) }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end -}}
|
Reference in New Issue
Block a user