initial commit

This commit is contained in:
Drew
2025-02-10 16:38:53 -07:00
commit 1317913e3a
19 changed files with 2651 additions and 0 deletions

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>
{{ .Title }}
</title>
<meta name="description" content="{{ .Description }}" />
{{/* styles */}}
{{ $options := dict "inlineImports" true }}
{{ $styles := resources.Get "css/styles.css" }}
{{ $styles = $styles | resources.PostCSS $options }}
{{ if hugo.IsProduction }}
{{ $styles = $styles | minify | fingerprint | resources.PostProcess }}
{{ end }}
<link href="{{ $styles.RelPermalink }}" rel="stylesheet" />
</head>
<body class="">
{{ partial "header.html" . }}
<div class="container px-4 lg:mx-auto my-10">
{{ block "main" . }}{{ end }}
</div>
</body>
</html>

View File

@ -0,0 +1,12 @@
{{ define "main" }}
<h1 class="text-2xl font-bold">{{ .Title }}</h1>
<ul class="mt-4 space-y-4">
{{ range .Pages }}
<li>
<a href="{{ .RelPermalink }}" class="text-lg font-semibold hover:underline">
{{ .Title }}
</a>
</li>
{{ end }}
</ul>
{{ end }}

View File

@ -0,0 +1,17 @@
{{ define "main" }}
<article class="flex flex-col lg:flex-row-reverse">
<header class="lg:sticky lg:top-0 lg:h-screen lg:overflow-y-auto lg:w-1/3 p-4">
<h1 class="font-bold">{{ .Title }}</h1>
<p><strong>Date:</strong> <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time></p>
<p><strong>Narrator:</strong> {{ .Params.narrator }}</p>
<p><strong>Facilitator:</strong> {{ .Params.facilitator }}</p>
<p><strong>Subject:</strong> {{ .Params.subject }}</p>
<p><strong>Tags:</strong> {{ partial "tags.html" . }}</p>
</header>
<div class="prose lg:prose-xl lg:w-2/3 p-4">
<p class="font-bold text-4xl">{{ .Title }}</p>
{{ .Content }}
</div>
</article>
{{ end }}

View File

@ -0,0 +1,14 @@
{{ define "main" }}
<h1 class="text-2xl font-bold">Topic: {{ .Title }}</h1>
<ul class="mt-4 space-y-4">
{{ range .Data.Pages }}
<li class="border-l border-gray-300 pl-4">
<p class="text-xs text-gray-800"><time datetime="{{ .Date.Format " 2006-01-02" }}">{{ .Date.Format "January 2, 2006"
}}</time></p>
<a class="font-bold hover:text-green-900 underline" href="{{ .RelPermalink }}">{{ .Title }}</a>
<p class="text-sm">{{ .Params.summary }}</p>
{{ partial "tags.html" .}}
</li>
{{ end }}
</ul>
{{ end }}

21
layouts/index.html Normal file
View File

@ -0,0 +1,21 @@
{{ define "main" }}
<main>
<h1 class="text-4xl font-bold">Protocol Oral History Project</h1>
<ul class="flex flex-col gap-4 my-4">
{{ range where .Site.RegularPages "Section" "oral-histories" }}
<li class="border-l border-gray-300 pl-4">
<p class="text-xs text-gray-800"><time datetime="{{ .Date.Format " 2006-01-02" }}">{{ .Date.Format "January 2, 2006" }}</time></p>
<a class="font-bold hover:text-green-900 underline" href="{{ .RelPermalink }}">{{ .Title }}</a>
<p class="text-sm">{{ .Params.summary }}</p>
{{ partial "tags.html" .}}
</li>
{{ end }}
</ul>
<article class="prose lg:prose-xl">
<h2 class="text-4xl">{{ .Title }}</h2>
{{ .Content }}
</article>
</main>
{{ end }}

View File

@ -0,0 +1,13 @@
<!-- basic header partial in hugo with just home and about -->
<header class="p-4">
<nav>
<ul class="flex gap-4">
<li>
<a href="/" class="hover:text-blue-700">Home</a>
</li>
<li>
<a href="/about" class="hover:text-blue-700">About</a>
</li>
</ul>
</nav>
</header>

View File

@ -0,0 +1,10 @@
{{- if .Params.tags }}
<div class="flex flex-wrap gap-2 my-2 text-xs">
{{- range .Params.tags }}
<a href="{{ "tags/" | relURL }}{{ . | urlize }}"
class="px-3 py-1 bg-green-100 hover:bg-green-300 rounded no-underline">
{{ . }}
</a>
{{- end }}
</div>
{{- end }}

12
layouts/tags/lists.html Normal file
View File

@ -0,0 +1,12 @@
{{ define "main" }}
<h1 class="text-2xl font-bold">Topic: {{ .Title }}</h1>
<ul class="mt-4 space-y-4">
{{ range .Pages }}
<li>
<a href="{{ .RelPermalink }}" class="text-lg font-semibold hover:underline">
{{ .Title }}
</a>
</li>
{{ end }}
</ul>
{{ end }}