diff options
Diffstat (limited to 'themes/simple/layouts/_default')
| -rw-r--r-- | themes/simple/layouts/_default/_markup/render-image.html | 11 | ||||
| -rw-r--r-- | themes/simple/layouts/_default/baseof.html | 14 | ||||
| -rw-r--r-- | themes/simple/layouts/_default/index.json | 5 | ||||
| -rw-r--r-- | themes/simple/layouts/_default/index.xml | 27 | ||||
| -rw-r--r-- | themes/simple/layouts/_default/list.html | 48 | ||||
| -rw-r--r-- | themes/simple/layouts/_default/notes.html | 101 | ||||
| -rw-r--r-- | themes/simple/layouts/_default/single.html | 61 |
7 files changed, 0 insertions, 267 deletions
diff --git a/themes/simple/layouts/_default/_markup/render-image.html b/themes/simple/layouts/_default/_markup/render-image.html deleted file mode 100644 index d3df1fd..0000000 --- a/themes/simple/layouts/_default/_markup/render-image.html +++ /dev/null | |||
| @@ -1,11 +0,0 @@ | |||
| 1 | {{ $cachebuster := delimit (shuffle (split (md5 "6fab11c6669976d759d2992eff1dd5be") "" )) "" }} | ||
| 2 | |||
| 3 | <figure> | ||
| 4 | <a href="{{ .Destination }}" target="_blank"> | ||
| 5 | <img | ||
| 6 | loading="lazy" | ||
| 7 | src="{{ .Destination }}?v={{ $cachebuster }}" | ||
| 8 | alt="{{ .Text }}" title="{{ .Text }}"> | ||
| 9 | </a> | ||
| 10 | <figcaption>{{ .Text }}</figcaption> | ||
| 11 | </figure> | ||
diff --git a/themes/simple/layouts/_default/baseof.html b/themes/simple/layouts/_default/baseof.html deleted file mode 100644 index 79c7684..0000000 --- a/themes/simple/layouts/_default/baseof.html +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | <!DOCTYPE html> | ||
| 2 | <html lang="en"> | ||
| 3 | |||
| 4 | {{ partial "head.html" . }} | ||
| 5 | |||
| 6 | <body> | ||
| 7 | {{ partial "navigation.html" . }} | ||
| 8 | <div id="content"> | ||
| 9 | {{ block "main" . }}{{ end }} | ||
| 10 | </div> | ||
| 11 | {{ partial "footer.html" . }} | ||
| 12 | </body> | ||
| 13 | |||
| 14 | </html> \ No newline at end of file | ||
diff --git a/themes/simple/layouts/_default/index.json b/themes/simple/layouts/_default/index.json deleted file mode 100644 index b8f3786..0000000 --- a/themes/simple/layouts/_default/index.json +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | {{- $.Scratch.Add "index" slice -}} | ||
| 2 | {{- range .Site.RegularPages -}} | ||
| 3 | {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "type" .Type "permalink" .RelPermalink "summary" .Summary) -}} | ||
| 4 | {{- end -}} | ||
| 5 | {{- $.Scratch.Get "index" | jsonify -}} | ||
diff --git a/themes/simple/layouts/_default/index.xml b/themes/simple/layouts/_default/index.xml deleted file mode 100644 index 1f29133..0000000 --- a/themes/simple/layouts/_default/index.xml +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom"> | ||
| 2 | |||
| 3 | <channel> | ||
| 4 | |||
| 5 | <title>{{ .Site.Author.name }}'s Blog</title> | ||
| 6 | <link>{{ .Permalink }}</link> | ||
| 7 | <description>{{ .Site.Params.description }}</description> | ||
| 8 | <language>en-us</language> | ||
| 9 | |||
| 10 | {{ range (where .Site.RegularPages "Section" "posts") }} | ||
| 11 | <item> | ||
| 12 | |||
| 13 | <title>{{ .Title }}</title> | ||
| 14 | <link>{{ .Permalink }}</link> | ||
| 15 | <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> | ||
| 16 | {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} | ||
| 17 | <guid>{{ .Permalink }}</guid> | ||
| 18 | |||
| 19 | <description>{{ "<![CDATA[" | safeHTML }} {{ .Summary }}]]></description> | ||
| 20 | <content:encoded>{{ "<![CDATA[" | safeHTML }} {{ .Content }}]]></content:encoded> | ||
| 21 | |||
| 22 | </item> | ||
| 23 | {{end}} | ||
| 24 | |||
| 25 | </channel> | ||
| 26 | |||
| 27 | </rss> | ||
diff --git a/themes/simple/layouts/_default/list.html b/themes/simple/layouts/_default/list.html deleted file mode 100644 index 6362b0f..0000000 --- a/themes/simple/layouts/_default/list.html +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | {{ define "main" }} | ||
| 2 | <main role="main" class="container-blog mx-auto px-6 md:p-0"> | ||
| 3 | |||
| 4 | <!-- Search modal and results --> | ||
| 5 | {{ partial "search.html" . }} | ||
| 6 | |||
| 7 | <!-- Notes CTA --> | ||
| 8 | <a class="flex items-center gap-2 w-full bg-yellow-200 hover:cursor-pointer rounded mb-8 p-4" href="/notes.html"> | ||
| 9 | <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="hidden lg:block w-6 h-6"> | ||
| 10 | <path stroke-linecap="round" stroke-linejoin="round" d="M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25" /> | ||
| 11 | </svg> | ||
| 12 | <p>For interesting <span span class="italic font-medium">notes</span> and | ||
| 13 | small <span class="italic font-medium">experiments</span> I usually partake | ||
| 14 | in, check the <span class="font-medium">Notes page</span>.</p> | ||
| 15 | </a> | ||
| 16 | |||
| 17 | <h1 class="text-2xl font-bold mb-6">Blog posts</h1> | ||
| 18 | |||
| 19 | <!-- List of all blog posts --> | ||
| 20 | <nav itemscope itemtype="https://schema.org/SiteNavigationElement" class="mb-12" role="feed"> | ||
| 21 | <meta itemprop="name" content="Article list"> | ||
| 22 | {{ range (where .Site.RegularPages "Section" "posts") }} | ||
| 23 | <div> | ||
| 24 | <article class="mb-5" itemscope itemtype="http://schema.org/Article"> | ||
| 25 | <time class="block text-gray-400 font-medium text-xs mb-1">{{ .Date.Format "Monday Jan 2, 2006" }}</time> | ||
| 26 | <a href="/{{ .Params.url }}" itemprop="url" class="underline" rel="bookmark noopener" aria-label="Opens URL"> | ||
| 27 | {{ if .Params.draft }} | ||
| 28 | <span class="bg-orange-600 text-white px-1.5">Draft</span> | ||
| 29 | {{ end }} | ||
| 30 | {{.Title}} | ||
| 31 | </a> | ||
| 32 | </article> | ||
| 33 | </div> | ||
| 34 | {{ end }} | ||
| 35 | </nav> | ||
| 36 | |||
| 37 | <hr class="border-2 border-gray-100 mb-10"> | ||
| 38 | |||
| 39 | <!-- Projects I work on --> | ||
| 40 | {{ partial "side-projects.html" . }} | ||
| 41 | |||
| 42 | <hr class="border-2 border-gray-100 mb-10"> | ||
| 43 | |||
| 44 | <!-- Openring --> | ||
| 45 | {{ partial "openring.html" . }} | ||
| 46 | |||
| 47 | </main> | ||
| 48 | {{ end }} | ||
diff --git a/themes/simple/layouts/_default/notes.html b/themes/simple/layouts/_default/notes.html deleted file mode 100644 index f624814..0000000 --- a/themes/simple/layouts/_default/notes.html +++ /dev/null | |||
| @@ -1,101 +0,0 @@ | |||
| 1 | {{ define "main" }} | ||
| 2 | <main role="main" class="container-blog mx-auto px-6 md:p-0"> | ||
| 3 | |||
| 4 | <!-- Search modal and results --> | ||
| 5 | {{ partial "search.html" . }} | ||
| 6 | |||
| 7 | <section class="mb-6"> | ||
| 8 | <h1 class="text-2xl font-bold mb-2">Notes, notes and notes</h1> | ||
| 9 | <p class="text-gray-600 italic"> | ||
| 10 | Notes about things I learn, things I do, things I want to remember, | ||
| 11 | but never do. You can subscribe to this | ||
| 12 | <a href="/notes/index.xml" class="underline">RSS feed</a> | ||
| 13 | which contains only the notes without the blog posts. | ||
| 14 | </p> | ||
| 15 | </section> | ||
| 16 | |||
| 17 | <hr class="border-2 border-gray-100 mb-8"> | ||
| 18 | |||
| 19 | <!-- Dropdown selector to jump to note --> | ||
| 20 | <select id="jump-to-note" class="px-3 py-2 rounded mb-2 bg-gray-100 w-full md:w-auto"> | ||
| 21 | <option>Jump to note</option> | ||
| 22 | </select> | ||
| 23 | |||
| 24 | <!-- List all unique tags --> | ||
| 25 | <nav itemscope itemtype="https://schema.org/SiteNavigationElement" class="mt-6 mb-10" role="feed"> | ||
| 26 | <meta itemprop="name" content="Tag list"> | ||
| 27 | <section> | ||
| 28 | <ul class="flex flex-wrap gap-2"> | ||
| 29 | {{ range .Site.Taxonomies.tags }} | ||
| 30 | <li> | ||
| 31 | <a href="{{ .Page.Permalink }}" class="inline-block px-3 py-1 rounded bg-gray-100 hover:bg-yellow-200"> | ||
| 32 | {{ .Page.Title }} | ||
| 33 | </a> | ||
| 34 | </li> | ||
| 35 | {{ end }} | ||
| 36 | </ul> | ||
| 37 | </section> | ||
| 38 | </nav> | ||
| 39 | |||
| 40 | <!-- List of all notes --> | ||
| 41 | <nav itemscope itemtype="https://schema.org/SiteNavigationElement" class="mb-12" role="feed"> | ||
| 42 | <meta itemprop="name" content="Article list"> | ||
| 43 | <section> | ||
| 44 | {{ range (where .Site.RegularPages "Section" "notes") }} | ||
| 45 | <div class="mb-10"> | ||
| 46 | <article class="mb-5 single note" itemscope itemtype="http://schema.org/Article"> | ||
| 47 | <a href="/{{ .Params.url }}"> | ||
| 48 | <h2 class="text-xl font-medium notes-heading">{{.Title}}</h2> | ||
| 49 | </a> | ||
| 50 | <p class="text-gray-600 _italic text-sm flex flex-col md:flex-row gap-1"> | ||
| 51 | <time datetime="{{ .Date.Format "2006-01-02" }}" itemprop="datePublished"> | ||
| 52 | {{ .Date.Format "Monday Jan 2, 2006" }} | ||
| 53 | </time> | ||
| 54 | |||
| 55 | {{ if .Params.tags }} | ||
| 56 | <span class="hidden md:inline-block"> | ||
| 57 | <span>with tags</span> | ||
| 58 | <span class="inline-flex flex-row gap-1"> | ||
| 59 | <span>(</span> | ||
| 60 | {{ range .Params.tags }} | ||
| 61 | <a href="/tags/{{ . | urlize }}.html">{{ . }}</a> | ||
| 62 | {{ end }} | ||
| 63 | <span>)</span> | ||
| 64 | </span> | ||
| 65 | </span> | ||
| 66 | {{ end }} | ||
| 67 | <div class="content"> | ||
| 68 | {{ .Content | safeHTML }} | ||
| 69 | </div> | ||
| 70 | </article> | ||
| 71 | </div> | ||
| 72 | {{ end }} | ||
| 73 | </section> | ||
| 74 | </nav> | ||
| 75 | |||
| 76 | <script> | ||
| 77 | try { | ||
| 78 | const notes = document.querySelectorAll('h2'); | ||
| 79 | const select = document.querySelector('#jump-to-note'); | ||
| 80 | |||
| 81 | notes.forEach(note => { | ||
| 82 | const id = note.innerText.toLowerCase().replace(/ /g, '-').replace(/[^\w-]+/g, ''); | ||
| 83 | note.id = id; | ||
| 84 | note.innerHTML = `<a href="#${id}"></a>${note.innerHTML}`; | ||
| 85 | |||
| 86 | const option = document.createElement('option'); | ||
| 87 | option.value = id; | ||
| 88 | option.innerText = note.innerText; | ||
| 89 | select.appendChild(option); | ||
| 90 | |||
| 91 | select.addEventListener('change', () => { | ||
| 92 | window.location.hash = select.value; | ||
| 93 | }); | ||
| 94 | }); | ||
| 95 | } catch (error) { | ||
| 96 | console.error(error); | ||
| 97 | } | ||
| 98 | </script> | ||
| 99 | |||
| 100 | </main> | ||
| 101 | {{ end }} | ||
diff --git a/themes/simple/layouts/_default/single.html b/themes/simple/layouts/_default/single.html deleted file mode 100644 index 095ff25..0000000 --- a/themes/simple/layouts/_default/single.html +++ /dev/null | |||
| @@ -1,61 +0,0 @@ | |||
| 1 | {{ define "main" }} | ||
| 2 | <main role="main" class="container-blog mx-auto px-6 md:p-0"> | ||
| 3 | |||
| 4 | <!-- Search modal and results --> | ||
| 5 | {{ partial "search.html" . }} | ||
| 6 | |||
| 7 | <!-- Single article --> | ||
| 8 | <article itemtype="http://schema.org/Article" class="single mb-12"> | ||
| 9 | <header class="mb-6"> | ||
| 10 | <h1 itemtype="headline" class="text-4xl font-bold mb-4 leading-1 md:leading-2">{{ .Title }}</h1> | ||
| 11 | |||
| 12 | {{ if not (eq .Type "pages") }} | ||
| 13 | <time class="text-gray-400 font-medium text-sm">Published on {{ .Date.Format "Monday Jan 2, 2006" }}</time> | ||
| 14 | {{ end }} | ||
| 15 | </header> | ||
| 16 | |||
| 17 | {{ if not .Params.hidetoc }} | ||
| 18 | <div> | ||
| 19 | {{ if ge (len .TableOfContents) 100 }} | ||
| 20 | <p class="font-semibold">Table of contents</p> | ||
| 21 | <div>{{ .TableOfContents }}</div> | ||
| 22 | {{ end }} | ||
| 23 | </div> | ||
| 24 | {{ end }} | ||
| 25 | |||
| 26 | <div class="leading-relaxed content"> | ||
| 27 | {{.Content}} | ||
| 28 | </div> | ||
| 29 | </article> | ||
| 30 | |||
| 31 | {{ if not (eq .Type "pages") }} | ||
| 32 | <hr class="border-2 border-gray-100 mb-10" /> | ||
| 33 | {{ end }} | ||
| 34 | |||
| 35 | <!-- Comment, contact --> | ||
| 36 | {{ if not (eq .Type "pages") }} | ||
| 37 | <section class="mb-10"> | ||
| 38 | {{ partial "comments.html" . }} | ||
| 39 | </section> | ||
| 40 | {{ end }} | ||
| 41 | |||
| 42 | {{ if not (eq .Type "pages") }} | ||
| 43 | <hr class="border-2 border-gray-100 mb-10" /> | ||
| 44 | {{ end }} | ||
| 45 | |||
| 46 | <!-- Read more --> | ||
| 47 | {{ if not (eq .Type "pages") }} | ||
| 48 | {{ partial "read-more.html" . }} | ||
| 49 | {{ end }} | ||
| 50 | |||
| 51 | {{ if in .Type "posts" }} | ||
| 52 | <hr class="border-2 border-gray-100 mb-10"> | ||
| 53 | {{ end }} | ||
| 54 | |||
| 55 | <!-- Openring --> | ||
| 56 | {{ if in .Type "posts" }} | ||
| 57 | {{ partial "openring.html" . }} | ||
| 58 | {{ end }} | ||
| 59 | |||
| 60 | </main> | ||
| 61 | {{ end }} | ||
