From dee863b5e0812f95db4caf367983864a74b63ccc Mon Sep 17 00:00:00 2001 From: Oscar Najera Date: Mon, 6 Jan 2025 01:05:02 +0100 Subject: translate posts listing --- assets/scss/input.css | 22 ++++++------ assets/scss/tailwind.css | 78 +++++++++++++++++++++++++++++++++++++----- layouts/404.html | 4 +-- layouts/_default/search.html | 2 +- layouts/_default/single.html | 2 +- layouts/index.html | 8 ++--- layouts/partials/metadata.html | 15 ++++---- layouts/partials/post.html | 28 ++++++++------- layouts/project/single.html | 2 +- 9 files changed, 111 insertions(+), 50 deletions(-) diff --git a/assets/scss/input.css b/assets/scss/input.css index f9bf4b2..6e02371 100644 --- a/assets/scss/input.css +++ b/assets/scss/input.css @@ -2,9 +2,8 @@ @tailwind components; @tailwind utilities; -/* HERO */ -#hero { - text-shadow: 2px 2px 3px black; +.baskerville { + font-family: baskerville, serif; } blockquote::before { @@ -18,18 +17,17 @@ blockquote::before { top: -15px; } -.baskerville { - font-family: baskerville, serif; -} -.w3-theme-border { - border-color: #79c753; -} - @layer base { blockquote { - @apply border-l-4 p-6 pb-1 mx-8 relative w3-theme-border baskerville; + @apply border-l-4 p-6 pb-1 mx-8 relative border-lime-500 baskerville; } blockquote p:last-of-type { - @apply text-center uppercase mt-4; + @apply text-center uppercase mt-4 tracking-wide; + } +} + +@layer components { + #hero { + text-shadow: 2px 2px 3px black; } } diff --git a/assets/scss/tailwind.css b/assets/scss/tailwind.css index d6b07ae..f6418e1 100644 --- a/assets/scss/tailwind.css +++ b/assets/scss/tailwind.css @@ -579,16 +579,22 @@ blockquote { margin-left: 2rem; margin-right: 2rem; border-left-width: 4px; + --tw-border-opacity: 1; + border-color: rgb(132 204 22 / var(--tw-border-opacity, 1)); padding: 1.5rem; padding-bottom: 0.25rem; font-family: baskerville, serif; - border-color: #79c753; } blockquote p:last-of-type { margin-top: 1rem; text-align: center; text-transform: uppercase; + letter-spacing: 0.025em; +} + +#hero { + text-shadow: 2px 2px 3px black; } .absolute { @@ -644,6 +650,11 @@ blockquote p:last-of-type { margin-bottom: 1rem; } +.my-6 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} + .ml-2 { margin-left: 0.5rem; } @@ -692,6 +703,16 @@ blockquote p:last-of-type { overflow: hidden; } +.border-y { + border-top-width: 1px; + border-bottom-width: 1px; +} + +.border-gray-200 { + --tw-border-opacity: 1; + border-color: rgb(229 231 235 / var(--tw-border-opacity, 1)); +} + .bg-black { --tw-bg-opacity: 1; background-color: rgb(0 0 0 / var(--tw-bg-opacity, 1)); @@ -728,6 +749,16 @@ blockquote p:last-of-type { padding-right: 0.5rem; } +.px-4 { + padding-left: 1rem; + padding-right: 1rem; +} + +.px-8 { + padding-left: 2rem; + padding-right: 2rem; +} + .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; @@ -743,6 +774,10 @@ blockquote p:last-of-type { padding-bottom: 0.5rem; } +.pb-2 { + padding-bottom: 0.5rem; +} + .pl-2 { padding-left: 0.5rem; } @@ -774,6 +809,11 @@ blockquote p:last-of-type { line-height: 1; } +.text-sm { + font-size: 0.875rem; + line-height: 1.25rem; +} + .font-bold { font-weight: 700; } @@ -786,15 +826,23 @@ blockquote p:last-of-type { line-height: 1.5; } +.text-lime-500 { + --tw-text-opacity: 1; + color: rgb(132 204 22 / var(--tw-text-opacity, 1)); +} + +.text-slate-900 { + --tw-text-opacity: 1; + color: rgb(15 23 42 / var(--tw-text-opacity, 1)); +} + .underline { -webkit-text-decoration-line: underline; text-decoration-line: underline; } -/* HERO */ - -#hero { - text-shadow: 2px 2px 3px black; +.baskerville { + font-family: baskerville, serif; } blockquote::before { @@ -808,10 +856,22 @@ blockquote::before { top: -15px; } -.baskerville { - font-family: baskerville, serif; +.odd\:bg-white:nth-child(odd) { + --tw-bg-opacity: 1; + background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1)); } -.w3-theme-border { - border-color: #79c753; +.even\:bg-gray-200:nth-child(even) { + --tw-bg-opacity: 1; + background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1)); +} + +@media (min-width: 768px) { + .md\:flex { + display: flex; + } + + .md\:shrink-0 { + flex-shrink: 0; + } } diff --git a/layouts/404.html b/layouts/404.html index 0e11279..2d722bb 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -10,7 +10,7 @@ {{ $query := where (where (where (where site.RegularPages.ByDate.Reverse "Title" "!=" "") "Kind" "in" (slice "page" "section")) "Params.private" "!=" true) "Permalink" "!=" "" }} {{ $count := len $query }} {{ if gt $count 0 }} -

{{ T "recent_pages" }}

+

{{ T "recent_pages" }}

{{ end }} -

+

{{ T "try_search" }}

diff --git a/layouts/_default/search.html b/layouts/_default/search.html index e297398..726ae68 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -29,7 +29,7 @@
-

+

diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 00132c3..66f67ea 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -5,7 +5,7 @@ {{ with .Params.subtitle }} -

{{ . }}

+

{{ . }}

{{ end }} {{ partial "meta_links.html" . }} diff --git a/layouts/index.html b/layouts/index.html index fd160ce..7f7b5dd 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -5,20 +5,20 @@ {{ define "main" }} {{ range (where .Pages "Type" "in" .Site.Params.mainSections).ByWeight }} {{ if gt (len .Pages) 0 }} -
+

{{ .Title }}

{{ range first 3 .Pages.ByPublishDate.Reverse }} {{ partial "post.html" . }} {{ end }} -
+ diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index 668ac20..8679be6 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -1,13 +1,13 @@ {{ $dateTime := .PublishDate.Format "2006-01-02" }} {{ $dateFormat := .Site.Params.dateFormat | default ":date_medium" }} -
+
{{ T "author_by" }} — {{ range .Params.authors }} {{ $name := . }} {{ $path := printf "/%s/%s" "authors" ( $name | urlize ) }} {{ with $.GetPage $path }} {{ if isset .Params "name" }} - + {{- default $name .Params.name -}} {{ else }} @@ -30,17 +30,18 @@ {{ end }} {{ if eq .Section "post" }} - | {{ .ReadingTime }} + | + {{ .ReadingTime }} {{ i18n "minute_read" }} {{ end }} {{ with .GetTerms "tags" }} | - + {{ range . }} - + {{- .Title -}} {{ end }} @@ -48,11 +49,11 @@ {{ with .GetTerms "categories" }} | - + {{ range . }} - + {{- .Title -}} {{ end }} diff --git a/layouts/partials/post.html b/layouts/partials/post.html index 637381b..a7e62ef 100644 --- a/layouts/partials/post.html +++ b/layouts/partials/post.html @@ -1,7 +1,7 @@ -
+
{{ partial "meta_links.html" . }} - -
+ +
{{ $image := "" }} {{ if (.Resources.ByType "image").GetMatch "featured*" }} {{ $image = (.Resources.ByType "image").GetMatch "*featured*" }} @@ -9,24 +9,26 @@ {{ $image = resources.Get (index .Params.images 0) }} {{ end }} {{ with $image }} -
+
{{ end }} -

{{ .Title }}

-
diff --git a/layouts/project/single.html b/layouts/project/single.html index c48a2cf..a177a10 100644 --- a/layouts/project/single.html +++ b/layouts/project/single.html @@ -5,7 +5,7 @@ {{ with .Params.subtitle }} -

{{ . }}

+

{{ . }}

{{ end }} {{ partial "meta_links.html" . }} -- cgit v1.2.3