add notes page w custom layout, separate css files

This commit is contained in:
yequari 2024-05-05 21:43:38 -07:00
parent c1e92e0a7d
commit 903fc49fd6
6 changed files with 46 additions and 3 deletions

View File

@ -26,12 +26,15 @@ menu:
- name: Projects - name: Projects
pageRef: /projects pageRef: /projects
weight: 30 weight: 30
- name: Notes
pageRef: /notes
weight: 40
- name: Now - name: Now
pageRef: /now pageRef: /now
weight: 40 weight: 50
- name: Links - name: Links
pageRef: /links pageRef: /links
weight: 50 weight: 60
social: social:
- name: yequari@retro.pizza - name: yequari@retro.pizza
params: params:

26
layouts/notes/list.html Normal file
View File

@ -0,0 +1,26 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
<section class="content posts h-feed hfeed notes-list">
{{ $taxonomy := "tags" }}
{{ $section := "notes" }}
{{ range $term, $weightedPages := index site.Taxonomies $taxonomy }}
{{ $termPage := site.GetPage (printf "%s/%s" $taxonomy $term) }}
{{ $termPages := where $weightedPages "Page.Section" $section }}
{{ $amount := $termPages.Len }}
{{ if gt $amount 0 }}
<section class="notes-tag">
<h2>{{ $termPage.LinkTitle }}</h2>
<ul>
{{ range sort $termPages "Page.Title" }}
<li>
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
</li>
{{ end }}
</ul>
</section>
{{ end }}
{{ end }}
</section>
{{ end }}

11
layouts/notes/single.html Normal file
View File

@ -0,0 +1,11 @@
{{ define "main" }}
<h1 class="p-name">{{ .Title }}</h1>
<section class="content">
<article class="h-entry">
{{ partial "tags.html" .}}
<div class="e-content">
{{ .Content }}
</div>
</article>
</section>
{{ end }}

View File

@ -0,0 +1,2 @@
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/custom.css">

View File

@ -0,0 +1 @@
<link rel="stylesheet" href="/css/main.css">

View File

@ -8,7 +8,7 @@
<meta property="og:description" content="{{ .Site.Params.About }}"> <meta property="og:description" content="{{ .Site.Params.About }}">
<meta property="og:image" content="{{ .Site.Params.OgImage }}"> <meta property="og:image" content="{{ .Site.Params.OgImage }}">
<title>{{ .Page.Title }}</title> <title>{{ .Page.Title }}</title>
<link rel="stylesheet" href="/css/main.css"> {{ partial "css.html" . }}
<link rel="icon" type="image/png" href="/favicon.png"> <link rel="icon" type="image/png" href="/favicon.png">
<link rel="webmention" href="{{ .Site.Params.Webmentions }}" /> <link rel="webmention" href="{{ .Site.Params.Webmentions }}" />
<link rel="pingback" href="{{ .Site.Params.Pingbacks }}" /> <link rel="pingback" href="{{ .Site.Params.Pingbacks }}" />