Misc. updates & reorganization

This commit is contained in:
David Eisinger
2023-10-24 20:49:29 -04:00
parent 1ed0f8128e
commit bb65a3d80f
14 changed files with 93 additions and 26 deletions

View File

@@ -0,0 +1,5 @@
---
title: "Elsewhere"
---
Articles I've written in other places

View File

@@ -0,0 +1,3 @@
---
title: "Journal"
---

View File

@@ -16,6 +16,10 @@ body {
h1, h2, h3 { h1, h2, h3 {
font-size: 1em; font-size: 1em;
margin: 1em 0; margin: 1em 0;
span {
color: #aaa;
}
} }
h3 { h3 {
@@ -111,6 +115,11 @@ code {
img { img {
width: 100%; width: 100%;
height: auto; height: auto;
&.inline {
width: auto;
vertical-align: middle;
}
} }
.image-set { .image-set {

View File

@@ -1,6 +1,9 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head>
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
{{- block "head" . }}{{- end }}
</head>
<body> <body>
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
<div id="content"> <div id="content">

View File

@@ -2,7 +2,10 @@
<section> <section>
<hr> <hr>
<h3>#{{ .Title }}</h3> <h2>
<a href="/tags">Tags</a> <span>&gt;</span>
#{{ .Title }}
</h2>
<ul> <ul>
{{ range .RegularPages }} {{ range .RegularPages }}

View File

@@ -2,7 +2,7 @@
<section> <section>
<hr> <hr>
<h3>{{ .Title }}</h3> <h2>{{ .Title }}</h2>
<ul> <ul>
{{ range .Data.Terms.Alphabetical }} {{ range .Data.Terms.Alphabetical }}

View File

@@ -2,14 +2,20 @@
<section> <section>
<hr> <hr>
<h3>Elsewhere</h3> <h2>Elsewhere</h2>
{{ .Content }}
<ul> <ul>
{{ range (where .Site.RegularPages "Type" "in" "elsewhere") }} {{ range (where .Site.RegularPages "Type" "in" "elsewhere") }}
{{ $url := urls.Parse .Params.canonical_url }}
{{ $host := strings.Replace $url.Hostname "www." "" }}
<li> <li>
<a href="{{ .Permalink }}">{{ .Title }}</a> <a href="{{ .Permalink }}">{{ .Title }}</a>
{{ .Date | time.Format "(2006-01-02)" }} <span class="nowrap">
{{ if .Params.needs_review }}<b>NEEDS REVIEW</b>{{ end }} (<a href="{{ $url }}">{{ $host }}</a>, {{ .Date | time.Format "2006-01-02" }})
</span>
</li> </li>
{{ end }} {{ end }}
</ul> </ul>

View File

@@ -1,13 +1,21 @@
{{ define "head" }}
<link rel="canonical" href="{{ .Params.canonical_url }}">
{{ end }}
{{ define "main" }} {{ define "main" }}
{{ $url := urls.Parse .Params.canonical_url }} {{ $url := urls.Parse .Params.canonical_url }}
{{ $host := strings.Replace $url.Hostname "www." "" }}
<hr> <hr>
<h2>{{ .Title }}</h2> <h2>
<a href="/elsewhere">Elsewhere</a> <span>&gt;</span>
{{ .Title }}
</h2>
<h3> <h3>
Posted {{ .Date | time.Format "2006-01-02" }} Posted {{ .Date | time.Format "2006-01-02" }}
on <a href="{{ .Params.canonical_url }}">{{ $url.Hostname }}</a> on <a href="{{ .Params.canonical_url }}">{{ $host }}</a>
</h3> </h3>
{{ .Content }} {{ .Content }}

View File

@@ -9,7 +9,7 @@
</h3> </h3>
<ul> <ul>
{{ range (where .Site.RegularPages "Type" "in" "journal") }} {{ range first 5 (where .Site.RegularPages "Type" "in" "journal") }}
<li> <li>
<p> <p>
<a href="{{ .Permalink }}">{{ .Title }}</a> <a href="{{ .Permalink }}">{{ .Title }}</a>
@@ -22,5 +22,31 @@
</ul> </ul>
</section> </section>
<section>
<hr>
<h3>
<a href="/elsewhere">Elsewhere</a>
</h3>
<ul>
{{ range where (where .Site.RegularPages "Type" "in" "elsewhere") "Params.featured" "=" true }}
{{ $url := urls.Parse .Params.canonical_url }}
{{ $host := strings.Replace $url.Hostname "www." "" }}
<li>
<p>
<a href="{{ .Permalink }}">{{ .Title }}</a>
<span class="nowrap">
(<a href="{{ $url }}">{{ $host }}</a>, {{ .Date | time.Format "2006-01-02" }})
</span>
</p>
{{ .Summary }}
</li>
{{ end }}
</ul>
</section>
{{- partial "pinboard.html" . -}} {{- partial "pinboard.html" . -}}
{{ end }} {{ end }}

View File

@@ -2,7 +2,7 @@
<section> <section>
<hr> <hr>
<h3>Journal</h3> <h2>Journal</h2>
<ul> <ul>
{{ range (where .Site.RegularPages "Type" "in" "journal") }} {{ range (where .Site.RegularPages "Type" "in" "journal") }}

View File

@@ -1,7 +1,10 @@
{{ define "main" }} {{ define "main" }}
<hr> <hr>
<h2>{{ .Title }}</h2> <h2>
<a href="/journal">Journal</a> <span>&gt;</span>
{{ .Title }}
</h2>
<h3> <h3>
Posted {{ .Date | time.Format "2006-01-02" }} Posted {{ .Date | time.Format "2006-01-02" }}

View File

@@ -2,7 +2,7 @@
<section> <section>
<hr> <hr>
<h3>Notes</h3> <h2>Notes</h2>
<ul> <ul>
{{ range (where .Site.RegularPages.ByLastmod.Reverse "Type" "in" "notes") }} {{ range (where .Site.RegularPages.ByLastmod.Reverse "Type" "in" "notes") }}

View File

@@ -1,7 +1,10 @@
{{ define "main" }} {{ define "main" }}
<hr> <hr>
<h2>{{ .Title }}</h2> <h2>
<a href="/elsewhere">Notes</a> <span>&gt;</span>
{{ .Title }}
</h2>
{{ .Content }} {{ .Content }}

View File

@@ -1,4 +1,3 @@
<head>
<meta charset="utf-8"> <meta charset="utf-8">
<title> <title>
{{- if .Page.IsHome -}} {{- if .Page.IsHome -}}
@@ -10,4 +9,3 @@
{{ $css := resources.Get "css/style.scss" | toCSS | minify | fingerprint }} {{ $css := resources.Get "css/style.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}"> <link rel="stylesheet" href="{{ $css.RelPermalink }}">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
</head>