From 75a7de2083026fddca93c1aea7321d2aeff89bbe Mon Sep 17 00:00:00 2001 From: Inhji Date: Mon, 11 Sep 2023 07:07:49 +0200 Subject: [PATCH 1/4] replace slate with neutral color --- assets/css/app.css | 14 +++++++------- assets/tailwind.config.js | 3 ++- lib/chiya_web/controllers/tag_html/index.html.heex | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index 06a928b..5faf4ea 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -16,7 +16,7 @@ } body { - @apply dark:bg-slate-800; + @apply dark:bg-neutral-800; } .stack > * + * { @@ -35,7 +35,7 @@ /* === SITE HEADER === */ #site-header { - @apply block px-3 py-6 bg-gradient-to-r from-slate-900 to-slate-950 text-white print:hidden; + @apply block px-3 py-6 bg-gradient-to-r from-neutral-900 to-neutral-950 text-white print:hidden; & nav ul { @apply flex; @@ -88,11 +88,11 @@ /* === PAGE HEADER === */ header.page-header { - @apply border-b border-slate-300 mb-6; + @apply border-b border-neutral-300 mb-6; } header.page-header h1 { - @apply text-3xl leading-loose font-bold text-slate-900; + @apply text-3xl leading-loose font-bold text-neutral-900; } header.page-header p { @@ -119,7 +119,7 @@ */ @layer components { .divider { - @apply flex items-center my-8 before:flex-1 after:flex-1 before:content-[''] after:content-[''] before:p-[0.5px] after:p-[0.5px] w-full mx-auto last:hidden before:bg-slate-500/25 after:bg-slate-500/25 before:mr-2 after:ml-2; + @apply flex items-center my-8 before:flex-1 after:flex-1 before:content-[''] after:content-[''] before:p-[0.5px] after:p-[0.5px] w-full mx-auto last:hidden before:bg-neutral-500/25 after:bg-neutral-500/25 before:mr-2 after:ml-2; } .dot { @@ -130,11 +130,11 @@ @apply flex justify-between mt-6; & .pagination-previous, & .pagination-next { - @apply block py-2 px-3 bg-slate-700 text-white rounded; + @apply block py-2 px-3 bg-neutral-700 text-white rounded; } & .pagination-previous.disabled, & .pagination-next.disabled { - @apply bg-slate-500; + @apply bg-neutral-500; } & .pagination-list { diff --git a/assets/tailwind.config.js b/assets/tailwind.config.js index a7f4ab7..139d6d9 100644 --- a/assets/tailwind.config.js +++ b/assets/tailwind.config.js @@ -17,7 +17,8 @@ module.exports = { container: { center: true }, extend: { colors: { - primary: colors.sky + primary: colors.sky, + neutral: colors.slate } } }, diff --git a/lib/chiya_web/controllers/tag_html/index.html.heex b/lib/chiya_web/controllers/tag_html/index.html.heex index a973bb2..d16959a 100644 --- a/lib/chiya_web/controllers/tag_html/index.html.heex +++ b/lib/chiya_web/controllers/tag_html/index.html.heex @@ -5,7 +5,7 @@
<%= for tag <- @tags do %> -
+

<%= tag.name %> From 838be53dec2703bdd9c0138948ff98696461a617 Mon Sep 17 00:00:00 2001 From: Inhji Date: Mon, 11 Sep 2023 07:08:56 +0200 Subject: [PATCH 2/4] apply prose to page-header --- assets/css/app.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index 5faf4ea..776cc57 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -88,11 +88,11 @@ /* === PAGE HEADER === */ header.page-header { - @apply border-b border-neutral-300 mb-6; + @apply border-b border-neutral-300 mb-6 prose max-w-none; } header.page-header h1 { - @apply text-3xl leading-loose font-bold text-neutral-900; + @apply text-3xl leading-loose font-bold; } header.page-header p { From 7f12b81abfc8d15ad2039e5e1a4e3e27142eaadd Mon Sep 17 00:00:00 2001 From: Inhji Date: Mon, 11 Sep 2023 07:13:37 +0200 Subject: [PATCH 3/4] add tag-bar styles --- assets/css/app.css | 18 ++++++++++++++++++ .../controllers/page_html/tag_bar.html.heex | 13 +++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index 776cc57..f37636c 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -126,6 +126,24 @@ @apply before:content-['ยท'] } + .tag-bar { + & .letter { + @apply capitalize border rounded font-sm px-2 py-1 inline-block mb-2; + } + + & li { + @apply mb-2; + } + + & a { + @apply border rounded font-sm px-2 py-1 inline-block mb-2 transition; + } + + & .count { + @apply text-xs font-mono rounded-full py-0.5 px-1 align-middle; + } + } + .pagination { @apply flex justify-between mt-6; diff --git a/lib/chiya_web/controllers/page_html/tag_bar.html.heex b/lib/chiya_web/controllers/page_html/tag_bar.html.heex index 21bd231..19a4141 100644 --- a/lib/chiya_web/controllers/page_html/tag_bar.html.heex +++ b/lib/chiya_web/controllers/page_html/tag_bar.html.heex @@ -1,17 +1,14 @@ -
    +
      <%= for {letter, tag_group} <- group_tags(@notes) do %> -
    • - +
    • + <%= letter %> <%= for tag <- tag_group do %> - + <%= tag.name %> - + <%= Enum.count(tag.notes) %> From 7d07996329b0af3d0234e29b30fef81f39f4bf02 Mon Sep 17 00:00:00 2001 From: Inhji Date: Mon, 11 Sep 2023 07:20:29 +0200 Subject: [PATCH 4/4] fix tag-bar colors --- assets/css/app.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index f37636c..88241fa 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -128,7 +128,7 @@ .tag-bar { & .letter { - @apply capitalize border rounded font-sm px-2 py-1 inline-block mb-2; + @apply text-neutral-900 dark:text-neutral-100 capitalize border rounded font-sm px-2 py-1 inline-block mb-2; } & li { @@ -136,11 +136,11 @@ } & a { - @apply border rounded font-sm px-2 py-1 inline-block mb-2 transition; + @apply text-neutral-900 dark:text-neutral-100 border rounded font-sm px-2 py-1 inline-block mb-2 transition; } & .count { - @apply text-xs font-mono rounded-full py-0.5 px-1 align-middle; + @apply text-sm font-mono rounded-full py-0.5 px-1 align-middle; } }