diff options
Diffstat (limited to 'themes/simple')
25 files changed, 0 insertions, 982 deletions
diff --git a/themes/simple/LICENSE b/themes/simple/LICENSE deleted file mode 100644 index 90c27d7..0000000 --- a/themes/simple/LICENSE +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | The MIT License (MIT) | ||
| 2 | |||
| 3 | Copyright (c) 2022 Mitja Felicijan | ||
| 4 | |||
| 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
| 6 | this software and associated documentation files (the "Software"), to deal in | ||
| 7 | the Software without restriction, including without limitation the rights to | ||
| 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
| 9 | the Software, and to permit persons to whom the Software is furnished to do so, | ||
| 10 | subject to the following conditions: | ||
| 11 | |||
| 12 | The above copyright notice and this permission notice shall be included in all | ||
| 13 | copies or substantial portions of the Software. | ||
| 14 | |||
| 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
| 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
| 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
| 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
| 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
diff --git a/themes/simple/archetypes/default.md b/themes/simple/archetypes/default.md deleted file mode 100644 index ac36e06..0000000 --- a/themes/simple/archetypes/default.md +++ /dev/null | |||
| @@ -1,2 +0,0 @@ | |||
| 1 | +++ | ||
| 2 | +++ | ||
diff --git a/themes/simple/layouts/404.html b/themes/simple/layouts/404.html deleted file mode 100644 index e69de29..0000000 --- a/themes/simple/layouts/404.html +++ /dev/null | |||
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 }} | ||
diff --git a/themes/simple/layouts/partials/comments.html b/themes/simple/layouts/partials/comments.html deleted file mode 100644 index 50c28ca..0000000 --- a/themes/simple/layouts/partials/comments.html +++ /dev/null | |||
| @@ -1,9 +0,0 @@ | |||
| 1 | <section class="comments"> | ||
| 2 | <h2 class="text-xl font-bold mb-2">Want to comment or have something to add?</h2> | ||
| 3 | |||
| 4 | <p class="mb-10"> | ||
| 5 | You can write me an email at | ||
| 6 | <a href="mailto:m@mitjafelicijan.com" class="underline-offset-2 underline">m@mitjafelicijan.com</a> or catch up with me | ||
| 7 | <a href="https://telegram.me/mitjafelicijan" target="_blank" class="underline-offset-2 underline">on Telegram</a>. | ||
| 8 | </p> | ||
| 9 | </section> | ||
diff --git a/themes/simple/layouts/partials/footer.html b/themes/simple/layouts/partials/footer.html deleted file mode 100644 index 8367f21..0000000 --- a/themes/simple/layouts/partials/footer.html +++ /dev/null | |||
| @@ -1,62 +0,0 @@ | |||
| 1 | <footer class="container-blog mx-auto px-6 md:p-0 text-gray-400 text-sm"> | ||
| 2 | <hr class="border-2 border-gray-100 my-12"> | ||
| 3 | <p class="pb-16"> | ||
| 4 | This website does not track you. | ||
| 5 | Content is made available under the <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" | ||
| 6 | rel="noreferrer" class="underline-offset-2 underline hover:text-gray-800">CC BY 4.0 | ||
| 7 | license</a> unless specified otherwise. | ||
| 8 | Blog feed is available as <a href="/index.xml" target="_blank" | ||
| 9 | class="underline-offset-2 underline hover:text-gray-800">RSS feed</a>. | ||
| 10 | </p> | ||
| 11 | </footer> | ||
| 12 | |||
| 13 | <!-- Fathom - beautiful, simple website analytics --> | ||
| 14 | <script src="https://cdn.usefathom.com/script.js" data-site="XHQARKXP" defer></script> | ||
| 15 | |||
| 16 | {{ if ne .IsHome true }} | ||
| 17 | <!-- KaTeX math library --> | ||
| 18 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.css" | ||
| 19 | integrity="sha384-RZU/ijkSsFbcmivfdRBQDtwuwVqK7GMOw6IMvKyeWL2K5UAlyp6WonmB8m7Jd0Hn" crossorigin="anonymous"> | ||
| 20 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/katex.min.js" | ||
| 21 | integrity="sha384-pK1WpvzWVBQiP0/GjnvRxV4mOb0oxFuyRxJlk6vVw146n3egcN5C925NCP7a7BY8" crossorigin="anonymous"></script> | ||
| 22 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.13/dist/contrib/auto-render.min.js" | ||
| 23 | integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous" | ||
| 24 | onload="renderMathInElement(document.body);"></script> | ||
| 25 | {{ end }} | ||
| 26 | |||
| 27 | {{ if ne .IsHome true }} | ||
| 28 | <!-- Lazy loading of iframes --> | ||
| 29 | <script> | ||
| 30 | window.addEventListener('load', () => { | ||
| 31 | const iframes = document.querySelectorAll('.ll-iframe'); | ||
| 32 | |||
| 33 | if (iframes) { | ||
| 34 | iframes.forEach(iframe => { | ||
| 35 | iframe.addEventListener('click', (evt) => { | ||
| 36 | // If there are no elements yet in the target element add iframe. | ||
| 37 | if (!evt.target.dataset.alreadyLoaded) { | ||
| 38 | // Setting this element as already loaded so it doesn't | ||
| 39 | // attempt to load it again. | ||
| 40 | evt.target.dataset.alreadyLoaded = true; | ||
| 41 | |||
| 42 | // Clearing up all existing elements inside of the target one. | ||
| 43 | evt.target.innerHTML = ''; | ||
| 44 | evt.target.classList.add('empty'); | ||
| 45 | evt.target.classList.add('border-0'); | ||
| 46 | |||
| 47 | // Creating iframe DOM element. | ||
| 48 | const iframeElement = document.createElement('iframe'); | ||
| 49 | iframeElement.classList.add('w-full'); | ||
| 50 | iframeElement.classList.add('h-full'); | ||
| 51 | iframeElement.classList.add('rounded'); | ||
| 52 | iframeElement.src = evt.target.dataset.src; | ||
| 53 | |||
| 54 | // Appending iframe as a child of current element. | ||
| 55 | evt.target.appendChild(iframeElement); | ||
| 56 | } | ||
| 57 | }); | ||
| 58 | }); | ||
| 59 | } | ||
| 60 | }); | ||
| 61 | </script> | ||
| 62 | {{ end }} \ No newline at end of file | ||
diff --git a/themes/simple/layouts/partials/head.html b/themes/simple/layouts/partials/head.html deleted file mode 100644 index fc481fc..0000000 --- a/themes/simple/layouts/partials/head.html +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | {{ $cachebuster := delimit (shuffle (split (md5 "6fab11c6669976d759d2992eff1dd5be") "" )) "" }} | ||
| 2 | |||
| 3 | <meta charset="UTF-8"> | ||
| 4 | <meta name="theme-color" content="#ffffff"> | ||
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| 6 | |||
| 7 | <link rel="alternate" type="application/rss+xml" href="/index.xml" title="{{ .Site.Author.name }}"> | ||
| 8 | <link rel="alternate" type="application/rss+xml" href="/notes/index.xml" title="{{ .Site.Author.name }} - Notes"> | ||
| 9 | |||
| 10 | <link rel="stylesheet" href="/general/index.css?v={{ $cachebuster }}"> | ||
| 11 | |||
| 12 | <link href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL69vf8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv76+/8LBwQkAAAAAAAAAAAAAAAC+vb3/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL+9vf/Bv78JAAAAAAAAAAAAAAAAu7q6/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7ubr/vr29CAAAAAAAAAAAy8nJAZ6foP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnqGj/6GipAoAAAAAHLjU/xcXHf/BwsL/I8XY/yPK3v8XGiD/IbjL/yPF2f8XGiD/Fxkf/yLF2f8gnK3/Fxog/62ztv8fwNf/FRcd/x271v8mz93/GRsi/xkXHf8p097/GiIp/xobIv8p0t3/KdPe/xocIv8fYmr/KNPe/xoZH/8aHCL/J87c/xy81/8VFxz/IsPZ/8zS0/8XGiD/Ir/R/yPH2/8XGiD/Fxkf/yPH2/8dd4T/GBog/yPJ3f8jyNr/uru9/xcUGv8cudb/EhITDKi5vRKlvMP/RUpOERwcHRAdOj4QHTk8EBwdHRAdNTgQHTo/EBwcHRAcHB0QSGduEKW4vf+koqQfHzg+EBqz0ewSFRv7EyMr/xq51vsTERb7ExUb+xq41fsau9j7ExUb+xiPp/sZudb7ExUb+xMVG/sZuNX/GKvI/BIUGfMdvdn/IrfL/xcaIP8n1eb/J9Dh/xkcIf8ZGR7/J8/f/xxCSv8ZGyH/J9Dg/ybQ4P8ZHCL/FSQs/yPK3/8UExj/GE1b/ybS5P8ZGB7/Ghwj/ynW5P8p2Ob/Ghwi/yWrtv8p1eH/Ghwi/xocIv8p1uT/J8XT/xkcIv8m1un/Hb7d/xUYH/8hzOr/HtHu/xcaIf8XGB//I8vi/xgxOv8XGSD/I8rg/yPK4P8XGiD/GUFL/yPP6f8SERj/Fhkh/x3A4f8AAAAAJ2f9/ydr//8mZPH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlYu38J2v//ydo/f8AAAAAAAAAAAd8/fkFqf//Iob8sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMY39awWr//8FfP3/AAAAAAAAAAAFm/7/SfD//wR+/f8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOB/f9B7v//BaX+/wAAAAAAAAAAQ878SAyZ/v9n1v4KAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADu9v8DDJb+/z3N/XgAAAAA3/sAAN/7AADf+wAA3/sAAAAAAAAAAAAAAAAAAN/7AAAAAAAAAAAAAAAAAAAAAAAAj/EAAI/5AACP8QAA3/sAAA==" rel="icon" type="image/x-icon" /> | ||
| 13 | |||
| 14 | <title>{{ .Title }}</title> | ||
| 15 | <meta name="description" content="{{ .Site.Params.description }}" /> | ||
| 16 | |||
| 17 | <meta property="og:type" content="article"> | ||
| 18 | <meta property="og:title" content="{{ .Title }}"> | ||
| 19 | <meta property="og:description" content="{{ if .Summary }}{{ .Summary }}{{ else }}{{ .Site.Params.Description }}{{ end }}"> | ||
| 20 | <meta property="og:url" content="https://mitjafelicijan.com/{{ .Params.url }}"> | ||
| 21 | <meta property="og:image" content="https://mitjafelicijan.com/general/og-big.jpg?v={{ $cachebuster }}"> | ||
diff --git a/themes/simple/layouts/partials/navigation.html b/themes/simple/layouts/partials/navigation.html deleted file mode 100644 index 73ae0ce..0000000 --- a/themes/simple/layouts/partials/navigation.html +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | <div class="container-blog mx-auto px-6 md:p-0"> | ||
| 2 | <header class="flex py-4 mt-4 mb-8 flex-col md:flex-row items-center "> | ||
| 3 | <div class="flex-grow mb-2 md:mb-0"> | ||
| 4 | <a href="/" itemprop="url" class="text-xl font-semibold hover:underline">Mitja Felicijan</a> | ||
| 5 | </div> | ||
| 6 | |||
| 7 | <nav itemscope itemtype="http://schema.org/SiteNavigationElement" class="flex items-center gap-1" role="toolbar"> | ||
| 8 | <meta itemprop="name" content="Main Menu"> | ||
| 9 | |||
| 10 | <!-- Search button --> | ||
| 11 | <span class="hidden lg:block"> | ||
| 12 | <span class="search-button flex gap-2 items-center text-gray-500 bg-gray-100 hover:bg-gray-200 rounded px-2 py-1 text-xs cursor-pointer mr-2 hidden" onclick="showSearchModal()"> | ||
| 13 | <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="4" stroke="currentColor" class="w-3 h-3"> | ||
| 14 | <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" /> | ||
| 15 | </svg> | ||
| 16 | <span class="search-button-text font-bold"></span> | ||
| 17 | </span> | ||
| 18 | </span> | ||
| 19 | |||
| 20 | <a href="/notes.html" class="font-medium px-2 hover:bg-yellow-200 rounded">Notes</a> | ||
| 21 | <a href="https://telegram.me/mitjafelicijan" target="_blank" rel="noopener nofollow" itemprop="url" class="font-medium px-2 hover:bg-yellow-200 rounded">Telegram</a> | ||
| 22 | <a href="https://git.mitjafelicijan.com" target="_blank" rel="noopener nofollow" itemprop="url" class="font-medium px-2 hover:bg-yellow-200 rounded">Git</a> | ||
| 23 | <a href="https://files.mitjafelicijan.com" target="_blank" rel="noopener nofollow" itemprop="url" class="font-medium px-2 hover:bg-yellow-200 rounded hidden md:block">Files</a> | ||
| 24 | <a href="/mitjafelicijan.pgp.pub.txt" itemprop="url" class="font-medium px-2 hover:bg-yellow-200 rounded">PGP</a> | ||
| 25 | <a href="/curriculum-vitae.html" class="font-medium px-2 hover:bg-yellow-200 rounded">CV</a> | ||
| 26 | <a href="/index.xml" itemprop="url" class="font-medium px-2 hover:bg-yellow-200 rounded hidden md:block">RSS</a> | ||
| 27 | </nav> | ||
| 28 | </header> | ||
| 29 | </div> | ||
diff --git a/themes/simple/layouts/partials/read-more.html b/themes/simple/layouts/partials/read-more.html deleted file mode 100644 index 9de1554..0000000 --- a/themes/simple/layouts/partials/read-more.html +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | <section> | ||
| 2 | <h2 class="text-2xl font-bold mb-6">Read more from this site</h2> | ||
| 3 | <nav itemscope itemtype="https://schema.org/SiteNavigationElement" class="mb-12"> | ||
| 4 | <meta itemprop="name" content="Article list"> | ||
| 5 | <nav class="flex flex-col gap-4"> | ||
| 6 | {{ $randomPosts := shuffle (where .Site.RegularPages "Type" "posts") | first 5 }} | ||
| 7 | {{ range $randomPosts }} | ||
| 8 | <div> | ||
| 9 | <time class="block text-gray-400 font-medium text-xs">{{ .Date.Format "Mon Jan 2, 2006" }}</time> | ||
| 10 | <a href="/{{ .Params.url }}" itemprop="url" class="block underline font-medium mb-1">{{ .Title }}</a> | ||
| 11 | <p class="text-gray-600 text-sm">{{ .Summary }}</p> | ||
| 12 | </div> | ||
| 13 | {{ end }} | ||
| 14 | </nav> | ||
| 15 | </nav> | ||
| 16 | </section> | ||
diff --git a/themes/simple/layouts/partials/search.html b/themes/simple/layouts/partials/search.html deleted file mode 100644 index f157f03..0000000 --- a/themes/simple/layouts/partials/search.html +++ /dev/null | |||
| @@ -1,191 +0,0 @@ | |||
| 1 | {{ $cachebuster := delimit (shuffle (split (md5 "6fab11c6669976d759d2992eff1dd5be") "" )) "" }} | ||
| 2 | |||
| 3 | <section class="search-modal mb-10 hidden"> | ||
| 4 | <input class="bg-gray-100 w-full px-3 py-2 rounded outline-none" type="search" placeholder="Search here..."> | ||
| 5 | <section class="results bg-white border border-gray-200 shadow-md p-2 flex flex-col gap-2 rounded mt-4 hidden"></section> | ||
| 6 | </section> | ||
| 7 | |||
| 8 | <script src="https://unpkg.com/lunr/lunr.js"></script> | ||
| 9 | <script> | ||
| 10 | (async function() { | ||
| 11 | const debounceDelay = 700; | ||
| 12 | const maxSearchResults = 10; | ||
| 13 | |||
| 14 | // Fetch search index generated by Hugo. | ||
| 15 | const req = await fetch('/index.json?v={{ $cachebuster }}'); | ||
| 16 | window.searchDocuments = await req.json(); | ||
| 17 | |||
| 18 | window.searchIndex = lunr(function() { | ||
| 19 | this.ref('permalink'); | ||
| 20 | this.field('title', { boost: 20 }); | ||
| 21 | this.field('tags', { boost: 10 }); | ||
| 22 | this.field('summary', { boost: 1 }); | ||
| 23 | |||
| 24 | window.searchDocuments.forEach(function(doc) { | ||
| 25 | this.add(doc); | ||
| 26 | }, this); | ||
| 27 | |||
| 28 | console.log('Search index processed...'); | ||
| 29 | }) | ||
| 30 | |||
| 31 | // Connect DOM and search the index. | ||
| 32 | let cachedSearchTerm = null; | ||
| 33 | const searchModal = document.querySelector('.search-modal'); | ||
| 34 | const searchInput = document.querySelector('.search-modal input'); | ||
| 35 | const searchResults = document.querySelector('.search-modal .results'); | ||
| 36 | |||
| 37 | // Display search modal. | ||
| 38 | window.showSearchModal = function() { | ||
| 39 | searchModal.classList.remove('hidden'); | ||
| 40 | searchInput.focus(); | ||
| 41 | } | ||
| 42 | |||
| 43 | // Detect OS and sets proper search button text. | ||
| 44 | const searchButtonElement = document.querySelector('.search-button'); | ||
| 45 | const searchButtonTextElement = document.querySelector('.search-button-text'); | ||
| 46 | if (searchButtonElement) { | ||
| 47 | let searchButtonText = 'Ctrl+K'; | ||
| 48 | if (navigator.platform.toUpperCase().indexOf('MAC') >= 0) { | ||
| 49 | searchButtonText = '⌘+K'; | ||
| 50 | } | ||
| 51 | searchButtonTextElement.innerText = searchButtonText; | ||
| 52 | searchButtonElement.classList.remove('hidden'); | ||
| 53 | } | ||
| 54 | |||
| 55 | // On keyboard shortcut shows search modal. | ||
| 56 | let currentSearchResultsSectionIndex = -1; | ||
| 57 | const itemHoverClass = 'bg-gray-100'; | ||
| 58 | document.addEventListener('keydown', function(event) { | ||
| 59 | // Handles macOS CMD+k. | ||
| 60 | if ((event.ctrlKey || event.metaKey) && event.key === 'k') { | ||
| 61 | event.preventDefault(); | ||
| 62 | showSearchModal(); | ||
| 63 | } | ||
| 64 | |||
| 65 | // Handles Windows/Linux Ctrl+k. | ||
| 66 | if (event.ctrlKey && event.key === 'k') { | ||
| 67 | event.preventDefault(); | ||
| 68 | showSearchModal(); | ||
| 69 | } | ||
| 70 | |||
| 71 | |||
| 72 | // If ESC is pressed when the input is empty close the search modal. | ||
| 73 | if (event.key === 'Escape' || event.key === 'Esc') { | ||
| 74 | if (searchInput.value.length == 0) { | ||
| 75 | if (!searchModal.classList.contains('hidden')) { | ||
| 76 | cachedSearchTerm = null; | ||
| 77 | searchModal.classList.add('hidden'); | ||
| 78 | searchResults.innerText = ''; | ||
| 79 | if (!searchResults.classList.contains('hidden')) { | ||
| 80 | searchResults.classList.add('hidden'); | ||
| 81 | } | ||
| 82 | } | ||
| 83 | } else { | ||
| 84 | const listItems = searchResults.querySelectorAll('a'); | ||
| 85 | listItems.forEach(el => el.classList.remove(itemHoverClass)); | ||
| 86 | currentSearchResultsSectionIndex = -1; | ||
| 87 | searchInput.focus(); | ||
| 88 | } | ||
| 89 | } | ||
| 90 | |||
| 91 | |||
| 92 | // Arrow UP/DOWN movement through search results. | ||
| 93 | if (event.key === 'ArrowUp') { | ||
| 94 | if (!searchResults.classList.contains('hidden')) { | ||
| 95 | event.preventDefault(); | ||
| 96 | |||
| 97 | const listItems = searchResults.querySelectorAll('a'); | ||
| 98 | listItems.forEach(el => el.classList.remove(itemHoverClass)); | ||
| 99 | currentSearchResultsSectionIndex--; | ||
| 100 | |||
| 101 | if (!listItems[currentSearchResultsSectionIndex]) { | ||
| 102 | currentSearchResultsSectionIndex = -1; | ||
| 103 | searchInput.focus(); | ||
| 104 | } | ||
| 105 | |||
| 106 | if (currentSearchResultsSectionIndex != -1) { | ||
| 107 | listItems[currentSearchResultsSectionIndex].classList.add(itemHoverClass); | ||
| 108 | listItems[currentSearchResultsSectionIndex].focus(); | ||
| 109 | } | ||
| 110 | } | ||
| 111 | } | ||
| 112 | if (event.key === 'ArrowDown') { | ||
| 113 | if (!searchResults.classList.contains('hidden')) { | ||
| 114 | event.preventDefault(); | ||
| 115 | |||
| 116 | const listItems = searchResults.querySelectorAll('a'); | ||
| 117 | listItems.forEach(el => el.classList.remove(itemHoverClass)); | ||
| 118 | currentSearchResultsSectionIndex++; | ||
| 119 | |||
| 120 | if (!listItems[currentSearchResultsSectionIndex]) { | ||
| 121 | currentSearchResultsSectionIndex = 0; | ||
| 122 | } | ||
| 123 | |||
| 124 | if (currentSearchResultsSectionIndex != -1) { | ||
| 125 | listItems[currentSearchResultsSectionIndex].classList.add(itemHoverClass); | ||
| 126 | listItems[currentSearchResultsSectionIndex].focus(); | ||
| 127 | } | ||
| 128 | } | ||
| 129 | } | ||
| 130 | |||
| 131 | }); | ||
| 132 | |||
| 133 | // Debounce magic. | ||
| 134 | function debounce(func, delay) { | ||
| 135 | let timerId; | ||
| 136 | return function (...args) { | ||
| 137 | clearTimeout(timerId); | ||
| 138 | timerId = setTimeout(() => { | ||
| 139 | func.apply(this, args); | ||
| 140 | }, delay); | ||
| 141 | }; | ||
| 142 | } | ||
| 143 | |||
| 144 | // Do the actual search. | ||
| 145 | searchInput.addEventListener('keyup', debounce((evt)=> { | ||
| 146 | const query = evt.target.value.trim().toLowerCase(); | ||
| 147 | if (query.length && query != cachedSearchTerm) { | ||
| 148 | const results = searchIndex.search(`*${query}*`); | ||
| 149 | |||
| 150 | if (results.length == 0) { | ||
| 151 | if (!searchResults.classList.contains('hidden')) { | ||
| 152 | searchResults.classList.add('hidden'); | ||
| 153 | } | ||
| 154 | } else { | ||
| 155 | searchResults.innerText = ''; | ||
| 156 | searchResults.classList.remove('hidden'); | ||
| 157 | cachedSearchTerm = query; | ||
| 158 | |||
| 159 | results.slice(0, maxSearchResults).forEach(resultItem => { | ||
| 160 | const item = window.searchDocuments.find(doc => doc.permalink === resultItem.ref); | ||
| 161 | |||
| 162 | const link = document.createElement('a'); | ||
| 163 | link.href = item.permalink; | ||
| 164 | link.classList.add('hover:bg-gray-100', 'cursor-pointer', 'py-2', 'px-3', 'rounded'); | ||
| 165 | |||
| 166 | const title = document.createElement('div'); | ||
| 167 | title.classList.add('text-gray-800', 'font-medium'); | ||
| 168 | title.innerHTML = item.title; | ||
| 169 | link.appendChild(title); | ||
| 170 | |||
| 171 | const meta = document.createElement('div'); | ||
| 172 | meta.classList.add('text-gray-500', 'flex', 'items-center', 'gap-2'); | ||
| 173 | |||
| 174 | const section = document.createElement('span'); | ||
| 175 | section.classList.add('uppercase', 'text-xs', 'font-medium', 'bg-gray-200', 'px-1', 'rounded') | ||
| 176 | section.innerText = item.type; | ||
| 177 | meta.appendChild(section); | ||
| 178 | |||
| 179 | const summary = document.createElement('span'); | ||
| 180 | const summaryText = item.summary.length > 80 ? `${item.summary.substring(0, 80)}...` : item.summary; | ||
| 181 | summary.innerHTML = summaryText; | ||
| 182 | meta.appendChild(summary); | ||
| 183 | |||
| 184 | link.appendChild(meta); | ||
| 185 | searchResults.appendChild(link); | ||
| 186 | }); | ||
| 187 | } | ||
| 188 | } | ||
| 189 | }, debounceDelay)); | ||
| 190 | })(); | ||
| 191 | </script> | ||
diff --git a/themes/simple/layouts/partials/side-projects.html b/themes/simple/layouts/partials/side-projects.html deleted file mode 100644 index 462ff45..0000000 --- a/themes/simple/layouts/partials/side-projects.html +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | <section class="mb-12"> | ||
| 2 | <h2 class="text-2xl font-bold mb-6">Side projects I work/worked on</h2> | ||
| 3 | |||
| 4 | <nav class="flex flex-col gap-4 md:gap-0 md:border w-full mb-4"> | ||
| 5 | <a href="https://git.mitjafelicijan.com/cord.h.git/" target="_blank" rel="noopener nofollow" class="block md:p-3 md:hover:bg-yellow-200 md:border-b"> | ||
| 6 | <span class="block md:inline-block md:w-40 underline">cord.h</span> | ||
| 7 | <span>Small C library for handling strings</span> | ||
| 8 | </a> | ||
| 9 | <a href="https://git.mitjafelicijan.com/mprogress.git/" target="_blank" rel="noopener nofollow" class="block md:p-3 md:hover:bg-yellow-200 md:border-b"> | ||
| 10 | <span class="block md:block md:inline-block md:w-40 underline">mprogress</span> | ||
| 11 | <span>Tiny utility that displays progress bar in terminal</span> | ||
| 12 | </a> | ||
| 13 | <a href="https://git.mitjafelicijan.com/journalctl-proxy.git/" target="_blank" rel="noopener nofollow" class="block md:p-3 md:hover:bg-yellow-200 md:border-b"> | ||
| 14 | <span class="block md:inline-block md:w-40 underline">journalctl-proxy</span> | ||
| 15 | <span>Exposes your systemd logs to web via web interface</span> | ||
| 16 | </a> | ||
| 17 | <a href="https://git.mitjafelicijan.com/redis-marshal.git/" target="_blank" rel="noopener nofollow" class="block md:p-3 md:hover:bg-yellow-200 md:border-b"> | ||
| 18 | <span class="block md:inline-block md:w-40 underline">redis-marshal</span> | ||
| 19 | <span>Lightweight Redis data exploration tool</span> | ||
| 20 | </a> | ||
| 21 | <a href="https://git.mitjafelicijan.com/dna-encoding.git/" target="_blank" rel="noopener nofollow" class="block md:p-3 md:hover:bg-yellow-200 md:border-b"> | ||
| 22 | <span class="block md:inline-block md:w-40 underline">dna-encoding</span> | ||
| 23 | <span>Tools for encoding files to DNA sequence</span> | ||
| 24 | </a> | ||
| 25 | <a href="https://git.mitjafelicijan.com/vertex.git/" target="_blank" rel="noopener nofollow" class="block md:p-3 md:hover:bg-yellow-200 md:border-b"> | ||
| 26 | <span class="block md:inline-block md:w-40 underline">vertex</span> | ||
| 27 | <span>Create mock API's and add basic logic to simplify prototyping</span> | ||
| 28 | </a> | ||
| 29 | <a href="https://git.mitjafelicijan.com/scarecrow.git/" target="_blank" rel="noopener nofollow" class="block md:hover:bg-yellow-200 md:p-3"> | ||
| 30 | <span class="block md:inline-block md:w-40 underline">scarecrow</span> | ||
| 31 | <span>Minimal configuration reverse proxy</span> | ||
| 32 | </a> | ||
| 33 | </nav> | ||
| 34 | |||
| 35 | <p class="text-gray-500 italic">* For more projects, check out | ||
| 36 | my <a href="https://git.mitjafelicijan.com/" class="underline">Git | ||
| 37 | server</a>. Most of the projects there are probably work in progress and | ||
| 38 | should be considered as such.</p> | ||
| 39 | |||
| 40 | </section> | ||
diff --git a/themes/simple/layouts/section/section.json b/themes/simple/layouts/section/section.json deleted file mode 100644 index b8f3786..0000000 --- a/themes/simple/layouts/section/section.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/section/section.xml b/themes/simple/layouts/section/section.xml deleted file mode 100644 index 889cf08..0000000 --- a/themes/simple/layouts/section/section.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 Notes</title> | ||
| 6 | <link>{{ .Permalink }}</link> | ||
| 7 | <description>{{ .Site.Params.description }}</description> | ||
| 8 | <language>en-us</language> | ||
| 9 | |||
| 10 | {{ range (where .Site.RegularPages "Section" "notes") }} | ||
| 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/tags/list.html b/themes/simple/layouts/tags/list.html deleted file mode 100644 index bd3bd57..0000000 --- a/themes/simple/layouts/tags/list.html +++ /dev/null | |||
| @@ -1,91 +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 italic"> | ||
| 9 | <span class="blue">{{ .Title }}</span> | ||
| 10 | <span>//</span> | ||
| 11 | <span>notes</span> | ||
| 12 | <span>//</span> | ||
| 13 | <span class="text-sm">{{ len .Pages }} of them</span> | ||
| 14 | </h1> | ||
| 15 | <p class="text-gray-600 italic"> | ||
| 16 | Notes about things I learn, things I do, things I want to remember, | ||
| 17 | but never do. You can subscribe to this | ||
| 18 | <a href="/notes.xml" class="underline">RSS feed</a> | ||
| 19 | which contains only the notes without the blog posts. | ||
| 20 | </p> | ||
| 21 | </section> | ||
| 22 | |||
| 23 | <hr class="border-2 border-gray-100 mb-8"> | ||
| 24 | |||
| 25 | <!-- Dropdown selector to jump to note --> | ||
| 26 | <select id="jump-to-note" class="px-3 py-2 rounded mb-2 bg-gray-100 w-full md:w-auto"> | ||
| 27 | <option>Jump to note</option> | ||
| 28 | </select> | ||
| 29 | |||
| 30 | <!-- List of all notes --> | ||
| 31 | <nav itemscope itemtype="https://schema.org/SiteNavigationElement" class="mb-12" role="feed"> | ||
| 32 | <meta itemprop="name" content="Article list"> | ||
| 33 | <section> | ||
| 34 | {{ range .Pages }} | ||
| 35 | <div class="mb-10"> | ||
| 36 | <article class="mb-5 single note" itemscope itemtype="http://schema.org/Article"> | ||
| 37 | <a href="/{{ .Params.url }}"> | ||
| 38 | <h2 class="text-xl font-medium notes-heading">{{.Title}}</h2> | ||
| 39 | </a> | ||
| 40 | <p class="text-gray-600 _italic text-sm flex flex-col md:flex-row gap-1"> | ||
| 41 | <time datetime="{{ .Date.Format "2006-01-02" }}" itemprop="datePublished"> | ||
| 42 | {{ .Date.Format "Monday Jan 2, 2006" }} | ||
| 43 | </time> | ||
| 44 | |||
| 45 | {{ if .Params.tags }} | ||
| 46 | <span class="hidden md:inline-block"> | ||
| 47 | <span>with tags</span> | ||
| 48 | <span class="inline-flex flex-row gap-1"> | ||
| 49 | <span>(</span> | ||
| 50 | {{ range .Params.tags }} | ||
| 51 | <a href="/tags/{{ . | urlize }}.html">{{ . }}</a> | ||
| 52 | {{ end }} | ||
| 53 | <span>)</span> | ||
| 54 | </span> | ||
| 55 | </span> | ||
| 56 | {{ end }} | ||
| 57 | <div class="content"> | ||
| 58 | {{ .Content | safeHTML }} | ||
| 59 | </div> | ||
| 60 | </article> | ||
| 61 | </div> | ||
| 62 | {{ end }} | ||
| 63 | </section> | ||
| 64 | </nav> | ||
| 65 | |||
| 66 | <script> | ||
| 67 | try { | ||
| 68 | const notes = document.querySelectorAll('h2'); | ||
| 69 | const select = document.querySelector('#jump-to-note'); | ||
| 70 | |||
| 71 | notes.forEach(note => { | ||
| 72 | const id = note.innerText.toLowerCase().replace(/ /g, '-').replace(/[^\w-]+/g, ''); | ||
| 73 | note.id = id; | ||
| 74 | note.innerHTML = `<a href="#${id}"></a>${note.innerHTML}`; | ||
| 75 | |||
| 76 | const option = document.createElement('option'); | ||
| 77 | option.value = id; | ||
| 78 | option.innerText = note.innerText; | ||
| 79 | select.appendChild(option); | ||
| 80 | |||
| 81 | select.addEventListener('change', () => { | ||
| 82 | window.location.hash = select.value; | ||
| 83 | }); | ||
| 84 | }); | ||
| 85 | } catch (error) { | ||
| 86 | console.error(error); | ||
| 87 | } | ||
| 88 | </script> | ||
| 89 | |||
| 90 | </main> | ||
| 91 | {{ end }} | ||
diff --git a/themes/simple/openring/openring.html b/themes/simple/openring/openring.html deleted file mode 100644 index 2ed2a86..0000000 --- a/themes/simple/openring/openring.html +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | <section class="mb-10"> | ||
| 2 | <h2 class="text-2xl font-bold mb-6">Articles from blogs I follow around the net</h2> | ||
| 3 | |||
| 4 | <section class="grid md:grid-cols-2 gap-10"> | ||
| 5 | {{ range .Articles }} | ||
| 6 | <article class="flex flex-col gap-1"> | ||
| 7 | <a href="{{ .Link }}" target="_blank" rel="noopener" class="font-medium rounded underline">{{ .Title }}</a> | ||
| 8 | <p class="text-sm text-gray-600">{{ .Summary }}</p> | ||
| 9 | <div class="text-gray-500 font-medium text-xs"> | ||
| 10 | Via <a href="{{ .SourceLink }}" class="underline">{{ .SourceTitle }}</a> | ||
| 11 | on {{ .Date | datef "January 2, 2006" }} | ||
| 12 | </div> | ||
| 13 | </article> | ||
| 14 | {{ end }} | ||
| 15 | </section> | ||
| 16 | |||
| 17 | <p class="text-sm text-gray-500"> | ||
| 18 | <a href="https://git.sr.ht/~sircmpwn/openring" class="no-underline hover:underline">Generated with openring.</a> | ||
| 19 | </p> | ||
| 20 | </section> | ||
diff --git a/themes/simple/static/css/.gitkeep b/themes/simple/static/css/.gitkeep deleted file mode 100755 index e69de29..0000000 --- a/themes/simple/static/css/.gitkeep +++ /dev/null | |||
diff --git a/themes/simple/static/css/tailwind.css b/themes/simple/static/css/tailwind.css deleted file mode 100644 index 9de02d7..0000000 --- a/themes/simple/static/css/tailwind.css +++ /dev/null | |||
| @@ -1,166 +0,0 @@ | |||
| 1 | @tailwind base; | ||
| 2 | @tailwind components; | ||
| 3 | @tailwind utilities; | ||
| 4 | |||
| 5 | * { cursor: url(/general/9front-cursor.png), auto; } | ||
| 6 | |||
| 7 | /* Container */ | ||
| 8 | .container-blog { | ||
| 9 | max-width: 740px; | ||
| 10 | } | ||
| 11 | |||
| 12 | /* User text selection */ | ||
| 13 | ::selection { | ||
| 14 | @apply bg-yellow-200 text-black; | ||
| 15 | } | ||
| 16 | |||
| 17 | ::-moz-selection { | ||
| 18 | @apply bg-yellow-200 text-black; | ||
| 19 | } | ||
| 20 | |||
| 21 | /* Helpers */ | ||
| 22 | |||
| 23 | a:hover { | ||
| 24 | color: blue; | ||
| 25 | } | ||
| 26 | |||
| 27 | .blue { | ||
| 28 | color: blue; | ||
| 29 | } | ||
| 30 | |||
| 31 | /* Headings */ | ||
| 32 | article.single h2 { | ||
| 33 | @apply text-2xl font-bold mb-8 mt-8 leading-tight; | ||
| 34 | } | ||
| 35 | |||
| 36 | article.single.note h2 { | ||
| 37 | @apply text-2xl font-bold mb-1 mt-8 leading-tight; | ||
| 38 | } | ||
| 39 | |||
| 40 | article.single h3 { | ||
| 41 | @apply text-xl font-bold mb-4 mt-8 leading-tight; | ||
| 42 | } | ||
| 43 | |||
| 44 | article.single h4 { | ||
| 45 | @apply text-lg font-bold mb-4 mt-8 leading-tight; | ||
| 46 | } | ||
| 47 | |||
| 48 | /* Paragraph */ | ||
| 49 | article.single p { | ||
| 50 | @apply mb-5; | ||
| 51 | } | ||
| 52 | |||
| 53 | /* Links */ | ||
| 54 | article.single a { | ||
| 55 | @apply underline-offset-2 underline; | ||
| 56 | } | ||
| 57 | |||
| 58 | /* Blockquote */ | ||
| 59 | article.single .content blockquote { | ||
| 60 | background-image: url('/general/alert-light.svg'); | ||
| 61 | background-size: 30px 30px; | ||
| 62 | background-repeat: no-repeat; | ||
| 63 | background-position: 0 5px; | ||
| 64 | @apply pl-12 my-8; | ||
| 65 | } | ||
| 66 | |||
| 67 | article.single .content blockquote p { | ||
| 68 | @apply mb-2; | ||
| 69 | } | ||
| 70 | |||
| 71 | /* Media: Images, audio, video */ | ||
| 72 | article.single figure { | ||
| 73 | @apply my-8; | ||
| 74 | } | ||
| 75 | |||
| 76 | article.single figure figcaption { | ||
| 77 | @apply text-center italic mt-1; | ||
| 78 | } | ||
| 79 | |||
| 80 | article.single img { | ||
| 81 | @apply rounded w-full !bg-gray-50; | ||
| 82 | |||
| 83 | image-rendering: crisp-edges; | ||
| 84 | image-rendering: -webkit-optimize-contrast; | ||
| 85 | } | ||
| 86 | |||
| 87 | article.single video { | ||
| 88 | @apply rounded w-full !bg-gray-50; | ||
| 89 | } | ||
| 90 | |||
| 91 | article.single audio { | ||
| 92 | @apply w-full mb-6; | ||
| 93 | } | ||
| 94 | |||
| 95 | /* Code */ | ||
| 96 | article.single code { | ||
| 97 | @apply bg-yellow-200 rounded px-2 py-1 text-xs font-medium; | ||
| 98 | } | ||
| 99 | |||
| 100 | article.single.note code { | ||
| 101 | @apply bg-gray-100 rounded px-2 py-1 text-xs font-medium; | ||
| 102 | } | ||
| 103 | |||
| 104 | article.single pre { | ||
| 105 | @apply !bg-gray-50 rounded text-xs p-4 mb-6 overflow-x-auto; | ||
| 106 | } | ||
| 107 | |||
| 108 | article.single pre code, | ||
| 109 | article.single.note pre code { | ||
| 110 | background: unset; | ||
| 111 | padding: unset; | ||
| 112 | @apply leading-relaxed; | ||
| 113 | } | ||
| 114 | |||
| 115 | /* Tables */ | ||
| 116 | article.single table { | ||
| 117 | @apply w-full border border-black border-collapse mb-4; | ||
| 118 | } | ||
| 119 | |||
| 120 | article.single table tr, | ||
| 121 | article.single table td, | ||
| 122 | article.single table th { | ||
| 123 | @apply px-4 py-2 border text-left; | ||
| 124 | } | ||
| 125 | |||
| 126 | /* Unordered list */ | ||
| 127 | article.single .content ul { | ||
| 128 | @apply list-disc pl-6 md:pl-10 mb-6; | ||
| 129 | } | ||
| 130 | |||
| 131 | /* Ordered list */ | ||
| 132 | article.single .content ol { | ||
| 133 | @apply list-decimal pl-8 md:pl-10 mb-6; | ||
| 134 | } | ||
| 135 | |||
| 136 | /* Table of contents */ | ||
| 137 | article.single #TableOfContents { | ||
| 138 | @apply mb-10 ml-4 leading-relaxed; | ||
| 139 | } | ||
| 140 | article.single #TableOfContents ul { | ||
| 141 | @apply list-decimal pl-4 md:pl-6; | ||
| 142 | } | ||
| 143 | |||
| 144 | /* Lists */ | ||
| 145 | article.single .content ul ul { | ||
| 146 | margin-bottom: auto; | ||
| 147 | } | ||
| 148 | |||
| 149 | /* Katex */ | ||
| 150 | article.single .katex-display { | ||
| 151 | @apply my-10; | ||
| 152 | } | ||
| 153 | |||
| 154 | /* Lazy loading of iframes */ | ||
| 155 | article.single .ll-iframe { | ||
| 156 | @apply bg-gray-100 rounded; | ||
| 157 | } | ||
| 158 | |||
| 159 | article.single .ll-iframe::before { | ||
| 160 | @apply h-full flex border-2 border-gray-300 rounded justify-center items-center font-medium text-sm cursor-pointer animate-pulse; | ||
| 161 | content: 'Click here to load resource…'; | ||
| 162 | } | ||
| 163 | |||
| 164 | article.single .ll-iframe.empty::before { | ||
| 165 | content: none; | ||
| 166 | } | ||
diff --git a/themes/simple/static/js/.gitkeep b/themes/simple/static/js/.gitkeep deleted file mode 100755 index e69de29..0000000 --- a/themes/simple/static/js/.gitkeep +++ /dev/null | |||
diff --git a/themes/simple/theme.toml b/themes/simple/theme.toml deleted file mode 100644 index bf6fd7f..0000000 --- a/themes/simple/theme.toml +++ /dev/null | |||
| @@ -1,16 +0,0 @@ | |||
| 1 | # theme.toml template for a Hugo theme | ||
| 2 | # See https://github.com/gohugoio/hugoThemes#themetoml for an example | ||
| 3 | |||
| 4 | name = "Simple" | ||
| 5 | license = "MIT" | ||
| 6 | licenselink = "https://github.com/mitjafelicijan/hugo-simple/blob/master/LICENSE" | ||
| 7 | description = "Simlistic theme" | ||
| 8 | homepage = "http://mitjafelicijan.com/" | ||
| 9 | tags = [] | ||
| 10 | features = [] | ||
| 11 | min_version = "0.41.0" | ||
| 12 | |||
| 13 | [author] | ||
| 14 | name = "Mitja Felicijan" | ||
| 15 | homepage = "https://mitjafelicijan.com" | ||
| 16 | |||
