From 6de90310556f53cf037ce75b7eb438da1c627286 Mon Sep 17 00:00:00 2001 From: sloane <1699281+sloanelybutsurely@users.noreply.github.com> Date: Sat, 24 Feb 2024 19:31:09 -0500 Subject: [PATCH] better layout, add back dark mode --- assets/css/app.css | 14 +++++++++ lib/sloane_sh/layouts/helpers.ex | 2 +- lib/sloane_sh/layouts/partials.ex | 13 +++++--- priv/site/layouts/page.html.eex | 2 +- priv/site/layouts/post.html.eex | 2 +- priv/site/layouts/root.html.eex | 2 +- priv/site/pages/home.md | 12 ------- priv/site/pages/home.md.eex | 27 ++++++++++++++++ priv/site/pages/search.html | 15 ++++++--- priv/site/posts/2023-07-03-obsidianrc.md | 33 ++++++++++++++++++++ priv/site/posts/2023-12-28-in-review-2023.md | 19 +++++++++++ priv/site/posts/2024-02-16-test-post.md | 11 ------- 12 files changed, 117 insertions(+), 35 deletions(-) delete mode 100644 priv/site/pages/home.md create mode 100644 priv/site/pages/home.md.eex create mode 100644 priv/site/posts/2023-07-03-obsidianrc.md create mode 100644 priv/site/posts/2023-12-28-in-review-2023.md delete mode 100644 priv/site/posts/2024-02-16-test-post.md diff --git a/assets/css/app.css b/assets/css/app.css index 76fcadc..c7a0e25 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -1,3 +1,17 @@ @import "tailwindcss/base"; @import "tailwindcss/components"; @import "tailwindcss/utilities"; + +body { + --pagefind-ui-border-width: 1px; +} + +@media (prefers-color-scheme: dark) { + #search { + --pagefind-ui-primary: #eeeeee; + --pagefind-ui-text: #eeeeee; + --pagefind-ui-background: rgb(64, 64, 64); + --pagefind-ui-border: rgb(163, 163, 163); + --pagefind-ui-tag: #152028; + } +} diff --git a/lib/sloane_sh/layouts/helpers.ex b/lib/sloane_sh/layouts/helpers.ex index 04e9b37..8109509 100644 --- a/lib/sloane_sh/layouts/helpers.ex +++ b/lib/sloane_sh/layouts/helpers.ex @@ -14,7 +14,7 @@ defmodule SloaneSH.Layouts.Helpers do def sorted_post_attrs(%Context{} = ctx) do ctx.posts |> Enum.map(& &1.attrs) - |> Enum.sort_by(& &1[:date], &Date.compare/2) + |> Enum.sort_by(& &1[:date], {:desc, Date}) end def fmt_date(date) do diff --git a/lib/sloane_sh/layouts/partials.ex b/lib/sloane_sh/layouts/partials.ex index ad435c9..6e62216 100644 --- a/lib/sloane_sh/layouts/partials.ex +++ b/lib/sloane_sh/layouts/partials.ex @@ -9,10 +9,15 @@ defmodule SloaneSH.Layouts.Partials do :def, :header, ~S""" -
-
-

sloane.sh

-