🎨 Code cleanup

This commit is contained in:
James Panther 2024-05-01 15:17:15 +10:00
parent 0561b834c8
commit 4b3038bb49
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
10 changed files with 50 additions and 44 deletions

View File

@ -606,7 +606,7 @@ video {
list-style-type: decimal; list-style-type: decimal;
margin-top: 1.25em; margin-top: 1.25em;
margin-bottom: 1.25em; margin-bottom: 1.25em;
padding-left: 1.625em; padding-inline-start: 1.625em;
} }
.prose :where(ol[type="A"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(ol[type="A"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
@ -649,7 +649,7 @@ video {
list-style-type: disc; list-style-type: disc;
margin-top: 1.25em; margin-top: 1.25em;
margin-bottom: 1.25em; margin-bottom: 1.25em;
padding-left: 1.625em; padding-inline-start: 1.625em;
} }
.prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *))::marker { .prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *))::marker {
@ -678,12 +678,12 @@ video {
font-weight: 500; font-weight: 500;
font-style: italic; font-style: italic;
color: var(--tw-prose-quotes); color: var(--tw-prose-quotes);
border-left-width: 0.25rem; border-inline-start-width: 0.25rem;
border-left-color: var(--tw-prose-quote-borders); border-inline-start-color: var(--tw-prose-quote-borders);
quotes: "\201C""\201D""\2018""\2019"; quotes: "\201C""\201D""\2018""\2019";
margin-top: 1.6em; margin-top: 1.6em;
margin-bottom: 1.6em; margin-bottom: 1.6em;
padding-left: 1em; padding-inline-start: 1em;
} }
.prose :where(blockquote p:first-of-type):not(:where([class~="not-prose"],[class~="not-prose"] *))::before { .prose :where(blockquote p:first-of-type):not(:where([class~="not-prose"],[class~="not-prose"] *))::before {
@ -773,9 +773,9 @@ video {
font-size: 0.9rem; font-size: 0.9rem;
border-radius: 0.25rem; border-radius: 0.25rem;
padding-top: 0.1875em; padding-top: 0.1875em;
padding-right: 0.375em; padding-inline-end: 0.375em;
padding-bottom: 0.1875em; padding-bottom: 0.1875em;
padding-left: 0.375em; padding-inline-start: 0.375em;
background-color: #e5e7eb; background-color: #e5e7eb;
padding: 0.1rem 0.4rem; padding: 0.1rem 0.4rem;
} }
@ -835,9 +835,9 @@ video {
margin-bottom: 1.7142857em; margin-bottom: 1.7142857em;
border-radius: 0.375rem; border-radius: 0.375rem;
padding-top: 0.8571429em; padding-top: 0.8571429em;
padding-right: 1.1428571em; padding-inline-end: 1.1428571em;
padding-bottom: 0.8571429em; padding-bottom: 0.8571429em;
padding-left: 1.1428571em; padding-inline-start: 1.1428571em;
} }
.prose :where(pre code):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(pre code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
@ -863,7 +863,7 @@ video {
.prose :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
width: 100%; width: 100%;
table-layout: auto; table-layout: auto;
text-align: left; text-align: start;
margin-top: 2em; margin-top: 2em;
margin-bottom: 2em; margin-bottom: 2em;
font-size: 0.875em; font-size: 0.875em;
@ -879,9 +879,9 @@ video {
color: var(--tw-prose-headings); color: var(--tw-prose-headings);
font-weight: 600; font-weight: 600;
vertical-align: bottom; vertical-align: bottom;
padding-right: 0.5714286em; padding-inline-end: 0.5714286em;
padding-bottom: 0.5714286em; padding-bottom: 0.5714286em;
padding-left: 0.5714286em; padding-inline-start: 0.5714286em;
} }
.prose :where(tbody tr):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(tbody tr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
@ -970,11 +970,11 @@ video {
} }
.prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
padding-left: 0.375em; padding-inline-start: 0.375em;
} }
.prose :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
padding-left: 0.375em; padding-inline-start: 0.375em;
} }
.prose :where(.prose > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(.prose > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
@ -982,19 +982,19 @@ video {
margin-bottom: 0.75em; margin-bottom: 0.75em;
} }
.prose :where(.prose > ul > li > *:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(.prose > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
margin-top: 1.25em; margin-top: 1.25em;
} }
.prose :where(.prose > ul > li > *:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(.prose > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
margin-bottom: 1.25em; margin-bottom: 1.25em;
} }
.prose :where(.prose > ol > li > *:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(.prose > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
margin-top: 1.25em; margin-top: 1.25em;
} }
.prose :where(.prose > ol > li > *:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(.prose > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
margin-bottom: 1.25em; margin-bottom: 1.25em;
} }
@ -1010,7 +1010,7 @@ video {
.prose :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
margin-top: 0.5em; margin-top: 0.5em;
padding-left: 1.625em; padding-inline-start: 1.625em;
} }
.prose :where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
@ -1030,26 +1030,26 @@ video {
} }
.prose :where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
padding-left: 0; padding-inline-start: 0;
} }
.prose :where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
padding-right: 0; padding-inline-end: 0;
} }
.prose :where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
padding-top: 0.5714286em; padding-top: 0.5714286em;
padding-right: 0.5714286em; padding-inline-end: 0.5714286em;
padding-bottom: 0.5714286em; padding-bottom: 0.5714286em;
padding-left: 0.5714286em; padding-inline-start: 0.5714286em;
} }
.prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
padding-left: 0; padding-inline-start: 0;
} }
.prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
padding-right: 0; padding-inline-end: 0;
} }
.prose :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) { .prose :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) {

View File

@ -11,7 +11,7 @@
/* Links */ /* Links */
.link { .link {
@apply text-white bg-primary-700 hover:brightness-90; @apply bg-primary-700 text-white hover:brightness-90;
} }
.link-amazon { .link-amazon {

View File

@ -1,5 +1,5 @@
<a <a
class="link link-{{ .Get 0 }} sm:px-24 min-w-full py-2 mb-3 text-lg rounded text-center" class="link link-{{ .Get 0 }} mb-3 min-w-full rounded py-2 text-center text-lg sm:px-24"
href="#" href="#"
onclick="navigator.clipboard.writeText({{ .Get 0 }})" onclick="navigator.clipboard.writeText({{ .Get 0 }})"
> >

View File

@ -1,8 +1,8 @@
<!DOCTYPE html> <!doctype html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en{{ end }}"> <html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en{{ end }}">
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
<body <body
class="flex flex-col h-screen px-6 m-auto text-lg leading-7 bg-neutral max-w-7xl text-neutral-900 dark:bg-neutral-800 dark:text-white sm:px-14 md:px-24 lg:px-32" class="bg-neutral m-auto flex h-screen max-w-7xl flex-col px-6 text-lg leading-7 text-neutral-900 sm:px-14 md:px-24 lg:px-32 dark:bg-neutral-800 dark:text-white"
> >
<main class="flex-grow">{{- block "main" . }}{{- end }}</main> <main class="flex-grow">{{- block "main" . }}{{- end }}</main>
{{- partial "footer.html" . -}} {{- partial "footer.html" . -}}

View File

@ -1,10 +1,10 @@
{{ define "main" }} {{ define "main" }}
<article class="flex flex-col items-center justify-center mt-10"> <article class="mt-10 flex flex-col items-center justify-center">
<nav class="place-self-start"> <nav class="place-self-start">
<a href="{{ "" | relURL }}" class="text-neutral-500">&larr; {{ i18n "nav.home" }}</a> <a href="{{ "" | relURL }}" class="text-neutral-500">&larr; {{ i18n "nav.home" }}</a>
</nav> </nav>
<header> <header>
<h1 class="mt-2 mb-6 text-4xl font-extrabold text-center text-neutral-800 dark:text-white"> <h1 class="mb-6 mt-2 text-center text-4xl font-extrabold text-neutral-800 dark:text-white">
{{ .Title | emojify }} {{ .Title | emojify }}
</h1> </h1>
</header> </header>

View File

@ -1,6 +1,6 @@
{{ define "main" }} {{ define "main" }}
<article class="flex flex-col items-center justify-center h-full mt-10 text-center"> <article class="mt-10 flex h-full flex-col items-center justify-center text-center">
<header class="flex flex-col items-center mb-3"> <header class="mb-3 flex flex-col items-center">
{{ with .Site.Params.Author.image }} {{ with .Site.Params.Author.image }}
{{ $src := . }} {{ $src := . }}
{{ $resource := "" }} {{ $resource := "" }}
@ -13,7 +13,7 @@
{{ $src = (.Fill "288x288").RelPermalink }} {{ $src = (.Fill "288x288").RelPermalink }}
{{ end }} {{ end }}
<img <img
class="mb-2 rounded-full h-36 w-36" class="mb-2 h-36 w-36 rounded-full"
width="144" width="144"
height="144" height="144"
alt="{{ $.Site.Params.Author.name | default "Author" }}" alt="{{ $.Site.Params.Author.name | default "Author" }}"
@ -29,11 +29,11 @@
</h2> </h2>
{{ end }} {{ end }}
{{ with .Content }} {{ with .Content }}
<section class="pt-5 prose dark:prose-invert">{{ . | emojify }}</section> <section class="prose pt-5 dark:prose-invert">{{ . | emojify }}</section>
{{ end }} {{ end }}
</header> </header>
{{ with .Site.Params.Author.links }} {{ with .Site.Params.Author.links }}
<div class="flex flex-col flex-wrap min-w-full mt-4 sm:min-w-0"> <div class="mt-4 flex min-w-full flex-col flex-wrap sm:min-w-0">
{{ range $links := . }} {{ range $links := . }}
{{ range $type, $data := $links }} {{ range $type, $data := $links }}
{{ $href := $data }} {{ $href := $data }}

View File

@ -1,10 +1,6 @@
{{ if hugo.IsProduction }} {{ if hugo.IsProduction }}
{{ with .Site.Params.fathomAnalytics.site }} {{ with .Site.Params.fathomAnalytics.site }}
{{ if isset $.Site.Params.fathomanalytics "domain" }} <script defer src="https://cdn.usefathom.com/script.js" data-site="{{ . }}"></script>
<script defer src="https://{{ $.Site.Params.fathomanalytics.domain }}/script.js" data-site="{{ . }}"></script>
{{ else }}
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ . }}"></script>
{{ end }}
{{ end }} {{ end }}
{{ template "_internal/google_analytics.html" . }} {{ template "_internal/google_analytics.html" . }}
{{ end }} {{ end }}

View File

@ -1,6 +1,6 @@
{{ $icon := resources.Get (print "icons/" . ".svg") }} {{ $icon := resources.Get (print "icons/" . ".svg") }}
{{ if $icon }} {{ if $icon }}
<span class="relative inline-block align-text-bottom icon"> <span class="icon relative inline-block align-text-bottom">
{{ $icon.Content | safeHTML }} {{ $icon.Content | safeHTML }}
</span> </span>
{{ end }} {{ end }}

View File

@ -1,4 +1,4 @@
<span class="relative inline-block align-text-bottom icon"> <span class="icon relative inline-block align-text-bottom">
{{ $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) }} {{ $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) }}
{{ if $icon }} {{ if $icon }}
{{ $icon.Content | safeHTML }} {{ $icon.Content | safeHTML }}

View File

@ -1 +1,11 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} {
"name": "Lynx",
"short_name": "Lynx",
"icons": [
{ "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" }
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}