reset
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
{{ define "main" }}
|
||||
<article class="about">
|
||||
<div class="about__banner">
|
||||
<div class="about__banner-inner container">
|
||||
{{ with .Site.Params.logo_image_full }}
|
||||
<img
|
||||
class="about__logo"
|
||||
src="{{ . | relURL }}"
|
||||
alt="{{ $.Site.Params.logo | default $.Site.Title }}"
|
||||
width="512"
|
||||
height="512"
|
||||
decoding="async"
|
||||
>
|
||||
{{ end }}
|
||||
<div class="about__intro">
|
||||
<h1 class="about__title">{{ .Title }}</h1>
|
||||
{{ with .Description }}
|
||||
<p class="about__lead">{{ . }}</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="about__body container container--narrow content">{{ .Content }}</div>
|
||||
<div class="about__cta-wrap container container--narrow">
|
||||
<a class="stage__cta" href="{{ "/posts/" | relURL }}">Open the build log</a>
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
@@ -1,11 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<html lang="{{ with .Site.Language.Locale }}{{ . }}{{ else }}en{{ end }}">
|
||||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body class="page">
|
||||
<a class="skip-link" href="#main">Skip to content</a>
|
||||
{{ partial "header.html" . }}
|
||||
<main class="page__main">
|
||||
<main id="main" class="page__main">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
{{ partial "footer.html" . }}
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
{{ define "main" }}
|
||||
<section class="section container">
|
||||
<header class="section__header">
|
||||
<p class="section__eyebrow">Index</p>
|
||||
<h1 class="section__title">{{ .Title }}</h1>
|
||||
{{ with .Content }}
|
||||
<div class="section__intro content">{{ . }}</div>
|
||||
{{ end }}
|
||||
</header>
|
||||
<ul class="post-list">
|
||||
<ol class="log__list">
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
<li class="post-list__item">
|
||||
{{ partial "post-card.html" . }}
|
||||
<li class="log__item">
|
||||
<a class="log__row" href="{{ .RelPermalink }}">
|
||||
<time class="log__date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "060102" }}</time>
|
||||
<span class="log__type">{{ with .Params.type }}{{ . }}{{ else }}note{{ end }}</span>
|
||||
<span class="log__name">{{ .Title }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</ol>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{ define "main" }}
|
||||
<article class="post container">
|
||||
<article class="post container container--narrow">
|
||||
<header class="post__header">
|
||||
<p class="post__meta">
|
||||
{{ with .Params.type }}<span class="post__type">{{ humanize . }}</span>{{ end }}
|
||||
@@ -10,8 +10,14 @@
|
||||
{{ with .Params.languages }}
|
||||
<p class="post__tags">{{ delimit . ", " }}</p>
|
||||
{{ end }}
|
||||
{{ with .Params.series }}
|
||||
<p class="post__series">Part of {{ . }}</p>
|
||||
{{ with .GetTerms "series" }}
|
||||
{{ range . }}
|
||||
<p class="post__series">Part of <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></p>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Params.series }}
|
||||
<p class="post__series">Part of <a href="{{ printf "/series/%s/" . | relURL }}">{{ replace . "-" " " | title }}</a></p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Params.video_url }}
|
||||
<figure class="post__video">
|
||||
@@ -29,5 +35,27 @@
|
||||
{{ end }}
|
||||
</header>
|
||||
<div class="post__body content">{{ .Content }}</div>
|
||||
|
||||
{{ with .Params.series }}
|
||||
{{ $seriesName := . }}
|
||||
{{ $siblings := where (where $.Site.RegularPages "Section" "eq" "posts") "Params.series" "eq" $seriesName }}
|
||||
{{ $sorted := $siblings.ByDate }}
|
||||
{{ if gt (len $sorted) 1 }}
|
||||
<nav class="series-nav" aria-label="More in this series">
|
||||
<p class="series-nav__label">In this series</p>
|
||||
<ol class="series-nav__list">
|
||||
{{ range $sorted }}
|
||||
<li class="series-nav__item{{ if eq $.RelPermalink .RelPermalink }} series-nav__item--current{{ end }}">
|
||||
{{ if eq $.RelPermalink .RelPermalink }}
|
||||
<span class="series-nav__current">{{ .Title }}</span>
|
||||
{{ else }}
|
||||
<a class="series-nav__link" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</nav>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
{{ define "main" }}
|
||||
<section class="section container">
|
||||
<header class="section__header">
|
||||
<p class="section__eyebrow">Series</p>
|
||||
<h1 class="section__title">Active builds</h1>
|
||||
<p class="section__intro">Prototype threads I’m writing while I build them.</p>
|
||||
</header>
|
||||
<div class="workbench__grid">
|
||||
{{ range .Pages }}
|
||||
<a class="workbench__cell" href="{{ .RelPermalink }}">
|
||||
<span class="workbench__count">{{ len .Pages }} {{ if eq (len .Pages) 1 }}log{{ else }}logs{{ end }}</span>
|
||||
<span class="workbench__name">{{ .LinkTitle }}</span>
|
||||
{{ with .Description }}
|
||||
<span class="workbench__desc">{{ . }}</span>
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,23 @@
|
||||
{{ define "main" }}
|
||||
<section class="section container">
|
||||
<header class="section__header">
|
||||
<p class="section__eyebrow">{{ if eq .Data.Singular "series" }}Series{{ else if eq .Data.Singular "tag" }}Tag{{ else }}{{ .Data.Singular | humanize }}{{ end }}</p>
|
||||
<h1 class="section__title">{{ .Title }}</h1>
|
||||
{{ with .Content }}
|
||||
<div class="section__intro content">{{ . }}</div>
|
||||
{{ end }}
|
||||
{{ with .Description }}
|
||||
{{ if not $.Content }}
|
||||
<p class="section__intro">{{ . }}</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</header>
|
||||
<ul class="post-list">
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
<li class="post-list__item">
|
||||
{{ partial "post-card.html" . }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -1,22 +1,86 @@
|
||||
{{ define "main" }}
|
||||
<section class="hero container">
|
||||
<p class="hero__eyebrow">{{ .Site.Params.tagline }}</p>
|
||||
<h1 class="hero__title">{{ .Title }}</h1>
|
||||
{{ with .Content }}
|
||||
<div class="hero__body content">{{ . }}</div>
|
||||
{{ $featuredHref := "/posts/" | relURL }}
|
||||
{{ with .Params.featured_series }}
|
||||
{{ $featuredHref = printf "/series/%s/" . | relURL }}
|
||||
{{ end }}
|
||||
{{ $hasSeries := gt (len .Site.Taxonomies.series) 0 }}
|
||||
{{ $posts := where .Site.RegularPages "Section" "eq" "posts" }}
|
||||
|
||||
<section class="stage{{ if not .Params.featured_image }} stage--plain{{ end }}">
|
||||
{{ with .Params.featured_image }}
|
||||
<div class="stage__plane" aria-hidden="true">
|
||||
<img
|
||||
class="stage__image"
|
||||
src="{{ . | relURL }}"
|
||||
alt=""
|
||||
width="960"
|
||||
height="639"
|
||||
loading="eager"
|
||||
decoding="async"
|
||||
>
|
||||
</div>
|
||||
<div class="stage__veil" aria-hidden="true"></div>
|
||||
{{ end }}
|
||||
</section>
|
||||
<section class="latest container">
|
||||
<header class="latest__header">
|
||||
<h2 class="latest__title">Latest</h2>
|
||||
<a class="latest__link" href="{{ "/posts/" | relURL }}">All posts →</a>
|
||||
</header>
|
||||
<ul class="post-list">
|
||||
{{ range where .Site.RegularPages "Section" "eq" "posts" | first 12 }}
|
||||
<li class="post-list__item">
|
||||
{{ partial "post-card.html" . }}
|
||||
</li>
|
||||
<div class="stage__slab container">
|
||||
<p class="stage__eyebrow">{{ .Site.Params.tagline }}</p>
|
||||
<h1 class="stage__title">{{ .Title }}</h1>
|
||||
{{ with .Content }}
|
||||
<div class="stage__body">{{ . }}</div>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<div class="stage__actions">
|
||||
{{ if or .Params.featured_series .Params.featured_label }}
|
||||
<a class="stage__cta" href="{{ $featuredHref }}">
|
||||
{{ with .Params.featured_label }}{{ . }}{{ else }}Enter series{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
<a class="stage__{{ if or $.Params.featured_series $.Params.featured_label }}ghost{{ else }}cta{{ end }}" href="{{ "/posts/" | relURL }}">Read the log</a>
|
||||
<a class="stage__ghost" href="{{ "/about/" | relURL }}">About</a>
|
||||
</div>
|
||||
{{ with .Params.featured_caption }}
|
||||
<p class="stage__caption">{{ . }}</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{{ if $hasSeries }}
|
||||
<section class="workbench container" aria-label="Active series">
|
||||
<header class="workbench__header">
|
||||
<h2 class="workbench__title">Active builds</h2>
|
||||
</header>
|
||||
<div class="workbench__grid">
|
||||
{{ range $term, $pages := .Site.Taxonomies.series }}
|
||||
{{ $termPage := $.Site.GetPage (printf "/series/%s" $term) }}
|
||||
<a class="workbench__cell" href="{{ with $termPage }}{{ .RelPermalink }}{{ else }}{{ printf "/series/%s/" $term | relURL }}{{ end }}">
|
||||
<span class="workbench__count">{{ len $pages }} {{ if eq (len $pages) 1 }}log{{ else }}logs{{ end }}</span>
|
||||
<span class="workbench__name">{{ with $termPage }}{{ .LinkTitle }}{{ else }}{{ replace $term "-" " " | title }}{{ end }}</span>
|
||||
{{ with $termPage }}
|
||||
{{ with .Description }}
|
||||
<span class="workbench__desc">{{ . }}</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ if gt (len $posts) 0 }}
|
||||
<section class="log container">
|
||||
<header class="log__header">
|
||||
<h2 class="log__title">Build log</h2>
|
||||
<a class="log__all" href="{{ "/posts/" | relURL }}">All entries →</a>
|
||||
</header>
|
||||
<ol class="log__list">
|
||||
{{ range first 12 $posts }}
|
||||
<li class="log__item">
|
||||
<a class="log__row" href="{{ .RelPermalink }}">
|
||||
<time class="log__date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "060102" }}</time>
|
||||
<span class="log__type">{{ with .Params.type }}{{ . }}{{ else }}note{{ end }}</span>
|
||||
<span class="log__name">{{ .Title }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&family=Pixelify+Sans:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
@@ -1,9 +1,14 @@
|
||||
<footer class="site-footer container">
|
||||
<div class="site-footer__inner">
|
||||
<footer class="site-footer">
|
||||
<div class="site-footer__inner container">
|
||||
<p class="site-footer__mark">{{ .Site.Params.logo | default .Site.Title }}</p>
|
||||
<p class="site-footer__tagline">{{ .Site.Params.tagline }}</p>
|
||||
<nav class="site-footer__nav" aria-label="Footer">
|
||||
<a class="site-footer__link" href="{{ "/posts/" | relURL }}">Posts</a>
|
||||
<a class="site-footer__link" href="{{ "/series/" | relURL }}">Series</a>
|
||||
<a class="site-footer__link" href="{{ "/about/" | relURL }}">About</a>
|
||||
{{ with .Site.Home.OutputFormats.Get "RSS" }}
|
||||
<a class="site-footer__link" href="{{ .RelPermalink }}">RSS</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
<p class="site-footer__copy">© {{ now.Year }} {{ .Site.Params.author }}</p>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,32 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} · {{ .Site.Title }}{{ end }}</title>
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
{{ $desc := .Description | default .Site.Params.description }}
|
||||
<meta name="description" content="{{ $desc }}">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
{{ $ogImage := .Site.Params.og_image | default "/images/og-default.png" }}
|
||||
{{ with .Params.featured_image }}{{ $ogImage = . }}{{ end }}
|
||||
{{ with .Params.images }}{{ with index . 0 }}{{ $ogImage = . }}{{ end }}{{ end }}
|
||||
<meta property="og:site_name" content="{{ .Site.Title }}">
|
||||
<meta property="og:title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }}{{ end }}">
|
||||
<meta property="og:description" content="{{ $desc }}">
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
<meta property="og:image" content="{{ $ogImage | absURL }}">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }}{{ end }}">
|
||||
<meta name="twitter:description" content="{{ $desc }}">
|
||||
<meta name="twitter:image" content="{{ $ogImage | absURL }}">
|
||||
|
||||
<link rel="icon" href="{{ "images/favicon.ico" | relURL }}" sizes="any">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ "images/favicon-32.png" | relURL }}">
|
||||
<link rel="apple-touch-icon" href="{{ "images/apple-touch-icon.png" | relURL }}">
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
<link rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" href="{{ .RelPermalink }}">
|
||||
{{ end }}
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||||
{{ partial "fonts.html" . }}
|
||||
<link rel="stylesheet" href="{{ "css/style.css" | relURL }}">
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<header class="site-header container">
|
||||
<a class="site-header__logo" href="{{ "/" | relURL }}">
|
||||
{{ with .Site.Params.logo_image }}
|
||||
<img class="site-header__logo-image" src="{{ . | relURL }}" alt="{{ $.Site.Params.logo | default $.Site.Title }}">
|
||||
{{ else }}
|
||||
{{ $.Site.Params.logo }}
|
||||
{{ end }}
|
||||
</a>
|
||||
<nav class="site-nav" aria-label="Main">
|
||||
<a class="site-nav__link{{ if eq .Section "posts" }} site-nav__link--active{{ end }}" href="{{ "/posts/" | relURL }}">Posts</a>
|
||||
<a class="site-nav__link{{ if and .IsPage (eq .File.BaseFileName "about") }} site-nav__link--active{{ end }}" href="{{ "/about/" | relURL }}">About</a>
|
||||
</nav>
|
||||
<header class="site-header">
|
||||
<div class="site-header__bar container">
|
||||
<a class="site-header__brand" href="{{ "/" | relURL }}">
|
||||
{{ with .Site.Params.logo_image }}
|
||||
<img class="site-header__logo-image" src="{{ . | relURL }}" alt="">
|
||||
{{ end }}
|
||||
<span class="site-header__wordmark">{{ .Site.Params.logo | default .Site.Title }}</span>
|
||||
</a>
|
||||
<nav class="site-nav" aria-label="Main">
|
||||
<a class="site-nav__link{{ if eq .Section "posts" }} site-nav__link--active{{ end }}" href="{{ "/posts/" | relURL }}">Posts</a>
|
||||
<a class="site-nav__link{{ if eq .Section "series" }} site-nav__link--active{{ end }}" href="{{ "/series/" | relURL }}">Series</a>
|
||||
<a class="site-nav__link{{ if and .IsPage (eq .File.BaseFileName "about") }} site-nav__link--active{{ end }}" href="{{ "/about/" | relURL }}">About</a>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -5,5 +5,16 @@
|
||||
</p>
|
||||
<h3 class="post-list__title">{{ .Title }}</h3>
|
||||
{{ with .Description }}<p class="post-list__excerpt">{{ . }}</p>{{ end }}
|
||||
{{ with .Params.series }}<p class="post-list__series">{{ . }}</p>{{ end }}
|
||||
</a>
|
||||
{{ $seriesTerms := .GetTerms "series" }}
|
||||
{{ if $seriesTerms }}
|
||||
{{ range $seriesTerms }}
|
||||
<p class="post-list__series">
|
||||
<a class="post-list__series-link" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ else if .Params.series }}
|
||||
<p class="post-list__series">
|
||||
<a class="post-list__series-link" href="{{ printf "/series/%s/" .Params.series | relURL }}">{{ replace .Params.series "-" " " | title }}</a>
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user