From 1f9246e8db66a1875511355125c2994ebc73fc0f Mon Sep 17 00:00:00 2001 From: Robert Prehn <3952444+prehnRA@users.noreply.github.com> Date: Thu, 9 Jan 2025 19:03:39 -0600 Subject: [PATCH] fix: Remove assets from priv/static and put them under site/static --- assets/css/app.css | 17 ++++++++++------- assets/tailwind.config.js | 2 +- lib/pre_dot_hn.ex | 17 ++++++++--------- lib/pre_dot_hn/static.ex | 15 +++++++++++++++ .../fonts/iAWriterDuoV-Italic-subset.ttf | Bin .../static/fonts/iAWriterDuoV-Italic.ttf | Bin .../static/fonts/iAWriterDuoV-subset.ttf | Bin {priv => site}/static/fonts/iAWriterDuoV.ttf | Bin .../fonts/iAWriterMonoV-Italic-subset.ttf | Bin .../static/fonts/iAWriterMonoV-Italic.ttf | Bin .../static/fonts/iAWriterMonoV-subset.ttf | Bin {priv => site}/static/fonts/iAWriterMonoV.ttf | Bin site/static/images/el-problema-pixel.png | Bin 0 -> 21124 bytes {priv => site}/static/images/pre_dot_hn.png | Bin {priv => site}/static/keybase.txt | 0 {priv => site}/static/robots.txt | 0 16 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 lib/pre_dot_hn/static.ex rename {priv => site}/static/fonts/iAWriterDuoV-Italic-subset.ttf (100%) rename {priv => site}/static/fonts/iAWriterDuoV-Italic.ttf (100%) rename {priv => site}/static/fonts/iAWriterDuoV-subset.ttf (100%) rename {priv => site}/static/fonts/iAWriterDuoV.ttf (100%) rename {priv => site}/static/fonts/iAWriterMonoV-Italic-subset.ttf (100%) rename {priv => site}/static/fonts/iAWriterMonoV-Italic.ttf (100%) rename {priv => site}/static/fonts/iAWriterMonoV-subset.ttf (100%) rename {priv => site}/static/fonts/iAWriterMonoV.ttf (100%) create mode 100755 site/static/images/el-problema-pixel.png rename {priv => site}/static/images/pre_dot_hn.png (100%) rename {priv => site}/static/keybase.txt (100%) rename {priv => site}/static/robots.txt (100%) diff --git a/assets/css/app.css b/assets/css/app.css index dae7647..13e4707 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -12,6 +12,9 @@ html { --line-trim: -0.6666666666666667px; font-size: var(--font-size); line-height: var(--line-height); + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; } .container { @@ -22,15 +25,11 @@ a { @apply text-blue; } -nav a { - @apply text-dark; -} - .box { --tw-border-opacity: 1; border-color: rgb(181 190 255 / var(--tw-border-opacity)); border: 2px solid; - margin: 12px 5px; + margin: 0 5px; padding: 12px 5px; padding-left: 29px; padding-right: 29px; @@ -45,8 +44,12 @@ p { margin-bottom: var(--vspace); } -a:hover { - @apply bg-light text-dark; +a:hover, a.current { + @apply bg-light text-dark border-light; +} + +a.current { + border: 0; } ul>li { diff --git a/assets/tailwind.config.js b/assets/tailwind.config.js index 6c5b89e..8e35a1a 100644 --- a/assets/tailwind.config.js +++ b/assets/tailwind.config.js @@ -10,7 +10,7 @@ module.exports = { colors: { transparent: 'transparent', current: 'currentColor', - dark: 'rgb(15, 24, 1)', + dark: 'rgb(7, 12, 0)', red: 'rgb(207, 23, 44)', green: 'rgb(25, 114, 13)', yellow: 'rgb(217, 196, 38)', diff --git a/lib/pre_dot_hn.ex b/lib/pre_dot_hn.ex index 72a9b6e..8107768 100644 --- a/lib/pre_dot_hn.ex +++ b/lib/pre_dot_hn.ex @@ -60,6 +60,7 @@ defmodule PreDotHn do index = make_index(posts) PreDotHn.LinkLog.run() + PreDotHn.Static.run() Enum.map([index | posts], &write_page/1) end @@ -212,7 +213,7 @@ defmodule PreDotHn do - <.menu /> + <.menu slug={@slug} /> <%= render_slot(@inner_block) %> @@ -221,13 +222,11 @@ defmodule PreDotHn do def menu(assigns) do ~H""" -