From 4b3038bb491079b67baad7b368d75bb3216f0006 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 1 May 2024 15:17:15 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Code=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/compiled/main.css | 50 ++++++++++++------------ assets/css/main.css | 2 +- exampleSite/layouts/shortcodes/link.html | 2 +- layouts/_default/baseof.html | 4 +- layouts/_default/single.html | 4 +- layouts/index.html | 10 ++--- layouts/partials/analytics.html | 6 +-- layouts/partials/icon.html | 2 +- layouts/shortcodes/icon.html | 2 +- static/site.webmanifest | 12 +++++- 10 files changed, 50 insertions(+), 44 deletions(-) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 368eabc..ca349ca 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -606,7 +606,7 @@ video { list-style-type: decimal; margin-top: 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"] *)) { @@ -649,7 +649,7 @@ video { list-style-type: disc; margin-top: 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 { @@ -678,12 +678,12 @@ video { font-weight: 500; font-style: italic; color: var(--tw-prose-quotes); - border-left-width: 0.25rem; - border-left-color: var(--tw-prose-quote-borders); + border-inline-start-width: 0.25rem; + border-inline-start-color: var(--tw-prose-quote-borders); quotes: "\201C""\201D""\2018""\2019"; margin-top: 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 { @@ -773,9 +773,9 @@ video { font-size: 0.9rem; border-radius: 0.25rem; padding-top: 0.1875em; - padding-right: 0.375em; + padding-inline-end: 0.375em; padding-bottom: 0.1875em; - padding-left: 0.375em; + padding-inline-start: 0.375em; background-color: #e5e7eb; padding: 0.1rem 0.4rem; } @@ -835,9 +835,9 @@ video { margin-bottom: 1.7142857em; border-radius: 0.375rem; padding-top: 0.8571429em; - padding-right: 1.1428571em; + padding-inline-end: 1.1428571em; 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"] *)) { @@ -863,7 +863,7 @@ video { .prose :where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) { width: 100%; table-layout: auto; - text-align: left; + text-align: start; margin-top: 2em; margin-bottom: 2em; font-size: 0.875em; @@ -879,9 +879,9 @@ video { color: var(--tw-prose-headings); font-weight: 600; vertical-align: bottom; - padding-right: 0.5714286em; + padding-inline-end: 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"] *)) { @@ -970,11 +970,11 @@ video { } .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"] *)) { - padding-left: 0.375em; + padding-inline-start: 0.375em; } .prose :where(.prose > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) { @@ -982,19 +982,19 @@ video { 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; } -.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; } -.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; } -.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; } @@ -1010,7 +1010,7 @@ video { .prose :where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) { margin-top: 0.5em; - padding-left: 1.625em; + padding-inline-start: 1.625em; } .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"] *)) { - padding-left: 0; + padding-inline-start: 0; } .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"] *)) { padding-top: 0.5714286em; - padding-right: 0.5714286em; + padding-inline-end: 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"] *)) { - 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"] *)) { - padding-right: 0; + padding-inline-end: 0; } .prose :where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) { diff --git a/assets/css/main.css b/assets/css/main.css index 3cbb8c8..93ee71f 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -11,7 +11,7 @@ /* Links */ .link { - @apply text-white bg-primary-700 hover:brightness-90; + @apply bg-primary-700 text-white hover:brightness-90; } .link-amazon { diff --git a/exampleSite/layouts/shortcodes/link.html b/exampleSite/layouts/shortcodes/link.html index 09789bd..0636009 100644 --- a/exampleSite/layouts/shortcodes/link.html +++ b/exampleSite/layouts/shortcodes/link.html @@ -1,5 +1,5 @@ diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 1a34688..b49e7de 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,8 +1,8 @@ - + {{- partial "head.html" . -}}
{{- block "main" . }}{{- end }}
{{- partial "footer.html" . -}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 0a9a13f..71446d2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,10 +1,10 @@ {{ define "main" }} -
+
-

+

{{ .Title | emojify }}

diff --git a/layouts/index.html b/layouts/index.html index 0269dd8..a377e68 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,6 +1,6 @@ {{ define "main" }} -
-
+
+
{{ with .Site.Params.Author.image }} {{ $src := . }} {{ $resource := "" }} @@ -13,7 +13,7 @@ {{ $src = (.Fill "288x288").RelPermalink }} {{ end }} {{ $.Site.Params.Author.name | default {{ end }} {{ with .Content }} -
{{ . | emojify }}
+
{{ . | emojify }}
{{ end }}
{{ with .Site.Params.Author.links }} -
+
{{ range $links := . }} {{ range $type, $data := $links }} {{ $href := $data }} diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html index f8c7c2c..08236cb 100644 --- a/layouts/partials/analytics.html +++ b/layouts/partials/analytics.html @@ -1,10 +1,6 @@ {{ if hugo.IsProduction }} {{ with .Site.Params.fathomAnalytics.site }} - {{ if isset $.Site.Params.fathomanalytics "domain" }} - - {{ else }} - - {{ end }} + {{ end }} {{ template "_internal/google_analytics.html" . }} {{ end }} diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html index 831697a..828a4a8 100644 --- a/layouts/partials/icon.html +++ b/layouts/partials/icon.html @@ -1,6 +1,6 @@ {{ $icon := resources.Get (print "icons/" . ".svg") }} {{ if $icon }} - + {{ $icon.Content | safeHTML }} {{ end }} diff --git a/layouts/shortcodes/icon.html b/layouts/shortcodes/icon.html index 3afb45b..a59a3c9 100644 --- a/layouts/shortcodes/icon.html +++ b/layouts/shortcodes/icon.html @@ -1,4 +1,4 @@ - + {{ $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) }} {{ if $icon }} {{ $icon.Content | safeHTML }} diff --git a/static/site.webmanifest b/static/site.webmanifest index 45dc8a2..b297bd3 100755 --- a/static/site.webmanifest +++ b/static/site.webmanifest @@ -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"} \ No newline at end of file +{ + "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" +}