Skip to content

Commit

Permalink
🎨 Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jpanther committed May 1, 2024
1 parent 0561b83 commit 4b3038b
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 44 deletions.
50 changes: 25 additions & 25 deletions assets/css/compiled/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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"] *)) {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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"] *)) {
Expand All @@ -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;
Expand All @@ -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"] *)) {
Expand Down Expand Up @@ -970,31 +970,31 @@ 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"] *)) {
margin-top: 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;
}

.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;
}

Expand All @@ -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"] *)) {
Expand All @@ -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"] *)) {
Expand Down
2 changes: 1 addition & 1 deletion assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/layouts/shortcodes/link.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<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="#"
onclick="navigator.clipboard.writeText({{ .Get 0 }})"
>
Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<!doctype html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en{{ end }}">
{{- partial "head.html" . -}}
<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>
{{- partial "footer.html" . -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{ 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">
<a href="{{ "" | relURL }}" class="text-neutral-500">&larr; {{ i18n "nav.home" }}</a>
</nav>
<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 }}
</h1>
</header>
Expand Down
10 changes: 5 additions & 5 deletions layouts/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ define "main" }}
<article class="flex flex-col items-center justify-center h-full mt-10 text-center">
<header class="flex flex-col items-center mb-3">
<article class="mt-10 flex h-full flex-col items-center justify-center text-center">
<header class="mb-3 flex flex-col items-center">
{{ with .Site.Params.Author.image }}
{{ $src := . }}
{{ $resource := "" }}
Expand All @@ -13,7 +13,7 @@
{{ $src = (.Fill "288x288").RelPermalink }}
{{ end }}
<img
class="mb-2 rounded-full h-36 w-36"
class="mb-2 h-36 w-36 rounded-full"
width="144"
height="144"
alt="{{ $.Site.Params.Author.name | default "Author" }}"
Expand All @@ -29,11 +29,11 @@ <h2 class="text-xl text-neutral-500 dark:text-neutral-400">
</h2>
{{ end }}
{{ with .Content }}
<section class="pt-5 prose dark:prose-invert">{{ . | emojify }}</section>
<section class="prose pt-5 dark:prose-invert">{{ . | emojify }}</section>
{{ end }}
</header>
{{ 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 $type, $data := $links }}
{{ $href := $data }}
Expand Down
6 changes: 1 addition & 5 deletions layouts/partials/analytics.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
{{ if hugo.IsProduction }}
{{ with .Site.Params.fathomAnalytics.site }}
{{ if isset $.Site.Params.fathomanalytics "domain" }}
<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 }}
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ . }}"></script>
{{ end }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
2 changes: 1 addition & 1 deletion layouts/partials/icon.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ $icon := resources.Get (print "icons/" . ".svg") }}
{{ if $icon }}
<span class="relative inline-block align-text-bottom icon">
<span class="icon relative inline-block align-text-bottom">
{{ $icon.Content | safeHTML }}
</span>
{{ end }}
2 changes: 1 addition & 1 deletion layouts/shortcodes/icon.html
Original file line number Diff line number Diff line change
@@ -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)) }}
{{ if $icon }}
{{ $icon.Content | safeHTML }}
Expand Down
12 changes: 11 additions & 1 deletion static/site.webmanifest
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 4b3038b

Please sign in to comment.