From 82f3f69af24538333cb35da8fc85bec258fbd995 Mon Sep 17 00:00:00 2001 From: st1020 Date: Mon, 23 Oct 2023 20:44:40 +0800 Subject: [PATCH] feat: adjust some styles --- static/app.css | 20 ++++++ static/main.css | 110 +++++++++++++++++++++--------- templates/archive.html | 2 +- templates/index.html | 2 +- templates/page.html | 14 ++-- templates/partials/header.html | 2 +- templates/partials/page_list.html | 2 +- templates/projects.html | 2 +- templates/taxonomy_list.html | 32 ++++----- 9 files changed, 122 insertions(+), 64 deletions(-) diff --git a/static/app.css b/static/app.css index c5ce305..13cbe30 100644 --- a/static/app.css +++ b/static/app.css @@ -70,4 +70,24 @@ .blur-header { @apply bg-black/10 backdrop-blur dark:bg-white/10; } + + .block-bg { + @apply bg-black/[3%] dark:bg-white/[8%]; + } + + .block-hover { + @apply hover:bg-black/[5%] dark:hover:bg-white/[11%]; + } + + .block-hover-mask { + @apply hover:bg-black/[2%] dark:hover:bg-white/[3%]; + } + + .primary-link { + @apply text-black no-underline hover:opacity-80 dark:text-white; + } + + .secondary-link { + @apply text-[var(--tw-prose-body)] no-underline hover:text-black dark:hover:text-white; + } } diff --git a/static/main.css b/static/main.css index aeefe1a..5573db5 100644 --- a/static/main.css +++ b/static/main.css @@ -1238,6 +1238,10 @@ body { margin-right: auto; } +.mt-1 { + margin-top: 0.25rem; +} + .mt-12 { margin-top: 3rem; } @@ -1254,6 +1258,10 @@ body { display: flex; } +.grid { + display: grid; +} + .aspect-square { aspect-ratio: 1 / 1; } @@ -1278,10 +1286,6 @@ body { min-height: 12rem; } -.min-h-\[18rem\] { - min-height: 18rem; -} - .min-h-\[3\.5rem\] { min-height: 3.5rem; } @@ -1322,10 +1326,6 @@ body { max-width: 56rem; } -.flex-auto { - flex: 1 1 auto; -} - .shrink-0 { flex-shrink: 0; } @@ -1338,6 +1338,10 @@ body { cursor: pointer; } +.grid-cols-1 { + grid-template-columns: repeat(1, minmax(0, 1fr)); +} + .flex-col { flex-direction: column; } @@ -1354,10 +1358,6 @@ body { align-items: center; } -.items-stretch { - align-items: stretch; -} - .justify-start { justify-content: flex-start; } @@ -1382,6 +1382,10 @@ body { gap: 0.625rem; } +.gap-4 { + gap: 1rem; +} + .gap-x-2 { -moz-column-gap: 0.5rem; column-gap: 0.5rem; @@ -1447,10 +1451,6 @@ body { background-color: rgb(0 0 0 / var(--tw-bg-opacity)); } -.bg-black\/\[3\%\] { - background-color: rgb(0 0 0 / 3%); -} - .bg-white { --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)); @@ -1460,10 +1460,6 @@ body { background-color: rgb(255 255 255 / 0.5); } -.bg-white\/80 { - background-color: rgb(255 255 255 / 0.8); -} - .p-1 { padding: 0.25rem; } @@ -1750,6 +1746,60 @@ article { background-color: rgb(255 255 255 / 0.1); } +.block-bg { + background-color: rgb(0 0 0 / 3%); +} + +:is(.dark .block-bg) { + background-color: rgb(255 255 255 / 8%); +} + +.block-hover:hover { + background-color: rgb(0 0 0 / 5%); +} + +:is(.dark .block-hover:hover) { + background-color: rgb(255 255 255 / 11%); +} + +.block-hover-mask:hover { + background-color: rgb(0 0 0 / 2%); +} + +:is(.dark .block-hover-mask:hover) { + background-color: rgb(255 255 255 / 3%); +} + +.primary-link { + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity)); + text-decoration-line: none; +} + +.primary-link:hover { + opacity: 0.8; +} + +:is(.dark .primary-link) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + +.secondary-link { + color: var(--tw-prose-body); + text-decoration-line: none; +} + +.secondary-link:hover { + --tw-text-opacity: 1; + color: rgb(0 0 0 / var(--tw-text-opacity)); +} + +:is(.dark .secondary-link:hover) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} + .\[background\:url\(\.\/icons\/theme\.svg\)_left_center\/cover_no-repeat\] { background: url(./icons/theme.svg) left center/cover no-repeat; } @@ -1801,10 +1851,6 @@ article { animation: spin 1s linear infinite; } -.hover\:bg-black\/\[2\%\]:hover { - background-color: rgb(0 0 0 / 2%); -} - .hover\:underline:hover { text-decoration-line: underline; } @@ -1823,10 +1869,6 @@ article { background-color: rgb(255 255 255 / 15%); } -:is(.dark .dark\:bg-white\/\[8\%\]) { - background-color: rgb(255 255 255 / 8%); -} - :is(.dark .dark\:text-black) { --tw-text-opacity: 1; color: rgb(0 0 0 / var(--tw-text-opacity)); @@ -1846,13 +1888,13 @@ article { background-position: right; } -:is(.dark .dark\:hover\:bg-white\/\[3\%\]:hover) { - background-color: rgb(255 255 255 / 3%); -} - @media (min-width: 768px) { - .md\:w-1\/2 { - width: 50%; + .md\:min-h-\[18rem\] { + min-height: 18rem; + } + + .md\:grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); } } diff --git a/templates/archive.html b/templates/archive.html index b0d3646..497ed26 100644 --- a/templates/archive.html +++ b/templates/archive.html @@ -13,7 +13,7 @@ {% for post in posts %}
  • - {{ post.title }} + {{ post.title }}
  • diff --git a/templates/index.html b/templates/index.html index da97600..c3acd8e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -36,7 +36,7 @@