💄 Minor style tweaks to improve consistency

pull/100/head
James Panther 2022-01-19 10:25:48 +11:00
parent ce75bc1179
commit 0f34dcfa05
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
11 changed files with 78 additions and 83 deletions

View File

@ -959,7 +959,7 @@ body a, body button {
.article-pagination a:hover .article-pagination-direction { .article-pagination a:hover .article-pagination-direction {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgba(var(--color-primary-700), var(--tw-text-opacity)); color: rgba(var(--color-primary-600), var(--tw-text-opacity));
} }
.dark .article-pagination a:hover .article-pagination-direction { .dark .article-pagination a:hover .article-pagination-direction {
@ -1449,20 +1449,12 @@ body a, body button {
left: 0px; left: 0px;
} }
.top-\[100vh\] { .top-\[110vh\] {
top: 100vh; top: 110vh;
} }
.right-0 { .bottom-\[-5\.5rem\] {
right: 0px; bottom: -5.5rem;
}
.bottom-16 {
bottom: 4rem;
}
.-bottom-4 {
bottom: -1rem;
} }
.top-\[calc\(100vh-5rem\)\] { .top-\[calc\(100vh-5rem\)\] {
@ -1859,11 +1851,6 @@ body a, body button {
border-color: rgba(var(--color-primary-400), var(--tw-border-opacity)); border-color: rgba(var(--color-primary-400), var(--tw-border-opacity));
} }
.border-neutral-700 {
--tw-border-opacity: 1;
border-color: rgba(var(--color-neutral-700), var(--tw-border-opacity));
}
.bg-neutral { .bg-neutral {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgba(var(--color-neutral), var(--tw-bg-opacity)); background-color: rgba(var(--color-neutral), var(--tw-bg-opacity));
@ -1969,16 +1956,16 @@ body a, body button {
padding-bottom: 2.5rem; padding-bottom: 2.5rem;
} }
.py-2 {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.py-6 { .py-6 {
padding-top: 1.5rem; padding-top: 1.5rem;
padding-bottom: 1.5rem; padding-bottom: 1.5rem;
} }
.py-2 {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.px-4 { .px-4 {
padding-left: 1rem; padding-left: 1rem;
padding-right: 1rem; padding-right: 1rem;
@ -2115,16 +2102,16 @@ body a, body button {
color: rgba(var(--color-primary-600), var(--tw-text-opacity)); color: rgba(var(--color-primary-600), var(--tw-text-opacity));
} }
.text-neutral-500 {
--tw-text-opacity: 1;
color: rgba(var(--color-neutral-500), var(--tw-text-opacity));
}
.text-neutral-700 { .text-neutral-700 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgba(var(--color-neutral-700), var(--tw-text-opacity)); color: rgba(var(--color-neutral-700), var(--tw-text-opacity));
} }
.text-neutral-500 {
--tw-text-opacity: 1;
color: rgba(var(--color-neutral-500), var(--tw-text-opacity));
}
.text-primary-500 { .text-primary-500 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgba(var(--color-primary-500), var(--tw-text-opacity)); color: rgba(var(--color-primary-500), var(--tw-text-opacity));
@ -2140,11 +2127,6 @@ body a, body button {
color: rgba(var(--color-primary-700), var(--tw-text-opacity)); color: rgba(var(--color-primary-700), var(--tw-text-opacity));
} }
.text-neutral-600 {
--tw-text-opacity: 1;
color: rgba(var(--color-neutral-600), var(--tw-text-opacity));
}
.text-primary-400 { .text-primary-400 {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgba(var(--color-primary-400), var(--tw-text-opacity)); color: rgba(var(--color-primary-400), var(--tw-text-opacity));
@ -2202,16 +2184,6 @@ body a, body button {
border-color: rgba(var(--color-primary-300), var(--tw-border-opacity)); border-color: rgba(var(--color-primary-300), var(--tw-border-opacity));
} }
.hover\:border-primary-400:hover {
--tw-border-opacity: 1;
border-color: rgba(var(--color-primary-400), var(--tw-border-opacity));
}
.hover\:border-primary-500:hover {
--tw-border-opacity: 1;
border-color: rgba(var(--color-primary-500), var(--tw-border-opacity));
}
.hover\:bg-primary-600:hover { .hover\:bg-primary-600:hover {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgba(var(--color-primary-600), var(--tw-bg-opacity)); background-color: rgba(var(--color-primary-600), var(--tw-bg-opacity));
@ -2232,9 +2204,9 @@ body a, body button {
background-color: rgba(var(--color-primary-500), var(--tw-bg-opacity)) !important; background-color: rgba(var(--color-primary-500), var(--tw-bg-opacity)) !important;
} }
.hover\:text-primary-500:hover { .hover\:text-primary-600:hover {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgba(var(--color-primary-500), var(--tw-text-opacity)); color: rgba(var(--color-primary-600), var(--tw-text-opacity));
} }
.hover\:text-primary-700:hover { .hover\:text-primary-700:hover {
@ -2242,14 +2214,9 @@ body a, body button {
color: rgba(var(--color-primary-700), var(--tw-text-opacity)); color: rgba(var(--color-primary-700), var(--tw-text-opacity));
} }
.hover\:text-primary-400:hover { .hover\:text-primary-500:hover {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgba(var(--color-primary-400), var(--tw-text-opacity)); color: rgba(var(--color-primary-500), var(--tw-text-opacity));
}
.hover\:text-neutral-600:hover {
--tw-text-opacity: 1;
color: rgba(var(--color-neutral-600), var(--tw-text-opacity));
} }
.hover\:text-neutral:hover { .hover\:text-neutral:hover {
@ -2307,6 +2274,10 @@ body a, body button {
outline-color: transparent; outline-color: transparent;
} }
[dir="ltr"] .ltr\:right-0 {
right: 0px;
}
[dir="ltr"] .ltr\:-left-6 { [dir="ltr"] .ltr\:-left-6 {
left: -1.5rem; left: -1.5rem;
} }
@ -2323,6 +2294,10 @@ body a, body button {
margin-left: 0.25rem; margin-left: 0.25rem;
} }
[dir="ltr"] .ltr\:mr-14 {
margin-right: 3.5rem;
}
[dir="ltr"] .ltr\:-ml-5 { [dir="ltr"] .ltr\:-ml-5 {
margin-left: -1.25rem; margin-left: -1.25rem;
} }
@ -2359,6 +2334,10 @@ body a, body button {
text-align: right; text-align: right;
} }
[dir="rtl"] .rtl\:left-0 {
left: 0px;
}
[dir="rtl"] .rtl\:-right-6 { [dir="rtl"] .rtl\:-right-6 {
right: -1.5rem; right: -1.5rem;
} }
@ -2375,6 +2354,10 @@ body a, body button {
margin-right: 0.25rem; margin-right: 0.25rem;
} }
[dir="rtl"] .rtl\:ml-14 {
margin-left: 3.5rem;
}
[dir="rtl"] .rtl\:-mr-5 { [dir="rtl"] .rtl\:-mr-5 {
margin-right: -1.25rem; margin-right: -1.25rem;
} }
@ -2477,6 +2460,10 @@ body a, body button {
background-color: rgba(var(--color-neutral-600), var(--tw-bg-opacity)); background-color: rgba(var(--color-neutral-600), var(--tw-bg-opacity));
} }
.dark .dark\:bg-neutral-800\/50 {
background-color: rgba(var(--color-neutral-800), 0.5);
}
.dark .dark\:bg-primary-400 { .dark .dark\:bg-primary-400 {
--tw-bg-opacity: 1; --tw-bg-opacity: 1;
background-color: rgba(var(--color-primary-400), var(--tw-bg-opacity)); background-color: rgba(var(--color-primary-400), var(--tw-bg-opacity));
@ -2561,11 +2548,6 @@ body a, body button {
color: rgba(var(--color-primary-400), var(--tw-text-opacity)); color: rgba(var(--color-primary-400), var(--tw-text-opacity));
} }
.dark .dark\:hover\:text-neutral-300:hover {
--tw-text-opacity: 1;
color: rgba(var(--color-neutral-300), var(--tw-text-opacity));
}
.dark .dark\:hover\:text-neutral-800:hover { .dark .dark\:hover\:text-neutral-800:hover {
--tw-text-opacity: 1; --tw-text-opacity: 1;
color: rgba(var(--color-neutral-800), var(--tw-text-opacity)); color: rgba(var(--color-neutral-800), var(--tw-text-opacity));

View File

@ -38,7 +38,7 @@ body button {
@apply underline decoration-primary-500; @apply underline decoration-primary-500;
} }
.article-pagination a:hover .article-pagination-direction { .article-pagination a:hover .article-pagination-direction {
@apply text-primary-700 dark:text-primary-400; @apply text-primary-600 dark:text-primary-400;
} }
/* RTL support */ /* RTL support */

View File

@ -7,12 +7,12 @@
colorScheme = "congo" colorScheme = "congo"
enableSearch = false enableSearch = false
# darkMode = "auto" darkMode = "auto"
# darkToggle = false
# logo = "img/logo.jpg" # logo = "img/logo.jpg"
# description = "My awesome website" # description = "My awesome website"
# mainSections = ["section1", "section2"] # mainSections = ["section1", "section2"]
# robots = "" # robots = ""
showDarkToggle = false
showScrollToTop = true showScrollToTop = true
[homepage] [homepage]

View File

@ -7,12 +7,12 @@
colorScheme = "congo" colorScheme = "congo"
enableSearch = true enableSearch = true
# darkMode = "auto" darkMode = "auto"
# darkToggle = false
# logo = "img/logo.jpg" # logo = "img/logo.jpg"
# description = "My awesome website" # description = "My awesome website"
mainSections = ["samples"] mainSections = ["samples"]
# robots = "" # robots = ""
showDarkToggle = false
showScrollToTop = true showScrollToTop = true
[homepage] [homepage]

View File

@ -24,23 +24,20 @@
> >
</div> </div>
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
<main id="main-content" class="relative grow"> <main id="main-content" class="relative">
{{- block "main" . }}{{- end }} {{- block "main" . }}{{- end }}
{{ if .Site.Params.showScrollToTop | default true }} {{ if and (.Site.Params.showScrollToTop | default true) (gt .WordCount 200) }}
<div <div
class="absolute top-[100vh] right-0 w-12 pointer-events-none {{ if .Params.showPagination | default (.Site.Params.article.showPagination | default true) }} class="absolute top-[110vh] ltr:right-0 rtl:left-0 w-12 pointer-events-none bottom-[-5.5rem]"
bottom-16
{{ else }}
-bottom-4
{{ end }}"
> >
<a <a
href="#the-top" href="#the-top"
class="w-12 h-12 sticky pointer-events-auto top-[calc(100vh-5rem)] text-neutral-500 bg-neutral/50 backdrop-blur rounded-full text-xl flex items-center justify-center hover:text-primary-500" class="w-12 h-12 sticky pointer-events-auto top-[calc(100vh-5rem)] bg-neutral/50 dark:bg-neutral-800/50 backdrop-blur rounded-full text-xl flex items-center justify-center text-neutral-700 dark:text-neutral hover:text-primary-600 dark:hover:text-primary-400"
aria-label="{{ i18n "nav.scroll_to_top_title" }}" aria-label="{{ i18n "nav.scroll_to_top_title" }}"
title="{{ i18n "nav.scroll_to_top_title" }}" title="{{ i18n "nav.scroll_to_top_title" }}"
>&uarr;</a
> >
&uarr;
</a>
</div> </div>
{{ end }} {{ end }}
</main> </main>

View File

@ -19,7 +19,7 @@
</div> </div>
</div> </div>
{{ end }} {{ end }}
<div class="max-w-prose"> <div class="overflow-auto max-w-prose">
{{ .Content | emojify }} {{ .Content | emojify }}
</div> </div>
</section> </section>

View File

@ -6,8 +6,14 @@
<span> <span>
{{ if .NextInSection }} {{ if .NextInSection }}
<a class="flex" href="{{ .NextInSection.RelPermalink }}"> <a class="flex" href="{{ .NextInSection.RelPermalink }}">
<span class="mr-3 ltr:inline rtl:hidden article-pagination-direction">&larr;</span> <span
<span class="ml-3 ltr:hidden rtl:inline article-pagination-direction">&rarr;</span> class="mr-3 ltr:inline rtl:hidden article-pagination-direction text-neutral-700 dark:text-neutral"
>&larr;</span
>
<span
class="ml-3 ltr:hidden rtl:inline article-pagination-direction text-neutral-700 dark:text-neutral"
>&rarr;</span
>
<span class="flex flex-col"> <span class="flex flex-col">
<span class="article-pagination-title mt-[0.1rem] leading-6" <span class="article-pagination-title mt-[0.1rem] leading-6"
>{{ .NextInSection.Title | emojify }}</span >{{ .NextInSection.Title | emojify }}</span
@ -34,8 +40,14 @@
{{ end }} {{ end }}
</span> </span>
</span> </span>
<span class="ml-3 ltr:inline rtl:hidden article-pagination-direction">&rarr;</span> <span
<span class="mr-3 ltr:hidden rtl:inline article-pagination-direction">&larr;</span> class="ml-3 ltr:inline rtl:hidden article-pagination-direction text-neutral-700 dark:text-neutral"
>&rarr;</span
>
<span
class="mr-3 ltr:hidden rtl:inline article-pagination-direction text-neutral-700 dark:text-neutral"
>&larr;</span
>
</a> </a>
{{ end }} {{ end }}
</span> </span>

View File

@ -40,18 +40,22 @@
{{ end }} {{ end }}
</div> </div>
{{/* Dark mode toggle */}} {{/* Dark mode toggle */}}
{{ if and (.Site.Params.darkToggle | default false) (eq (.Site.Params.darkMode | default "auto") "auto") }} {{ if and (.Site.Params.showDarkToggle | default false) (eq (.Site.Params.darkMode | default "auto") "auto") }}
<div class="text-sm cursor-pointer text-neutral-400 dark:text-neutral-500"> <div
class="text-sm cursor-pointer text-neutral-700 dark:text-neutral hover:text-primary-600 dark:hover:text-primary-400 {{ if .Site.Params.showScrollToTop | default true -}}
ltr:mr-14 rtl:ml-14
{{- end }}"
>
<button <button
id="dark-toggle" id="dark-toggle"
class="inline px-3 py-2 border rounded-md border-neutral-200 dark:hidden hover:text-primary-500 hover:border-primary-400" class="inline w-12 h-12 dark:hidden"
title="{{ i18n "footer.dark_appearance" }}" title="{{ i18n "footer.dark_appearance" }}"
> >
{{ partial "icon.html" "moon" }} {{ partial "icon.html" "moon" }}
</button> </button>
<button <button
id="light-toggle" id="light-toggle"
class="hidden px-3 py-2 border rounded-md cursor-pointer dark:inline border-neutral-700 hover:text-primary-400 hover:border-primary-500" class="hidden w-12 h-12 cursor-pointer dark:inline"
title="{{ i18n "footer.light_appearance" }}" title="{{ i18n "footer.light_appearance" }}"
> >
{{ partial "icon.html" "sun" }} {{ partial "icon.html" "sun" }}

View File

@ -48,7 +48,7 @@
> >
<button <button
id="search-button" id="search-button"
class="text-base hover:text-neutral-600 dark:hover:text-neutral-300" class="text-base hover:text-primary-600 dark:hover:text-primary-400"
title="{{ i18n "search.open_button_title" }}" title="{{ i18n "search.open_button_title" }}"
> >
{{ partial "icon.html" "search" }} {{ partial "icon.html" "search" }}

View File

@ -27,7 +27,7 @@
</form> </form>
<button <button
id="close-search-button" id="close-search-button"
class="flex items-center justify-center w-8 h-8 text-neutral-600" class="flex items-center justify-center w-8 h-8 text-neutral-700 dark:text-neutral hover:text-primary-600 dark:hover:text-primary-400"
title="{{ i18n "search.close_button_title" }}" title="{{ i18n "search.close_button_title" }}"
> >
{{ partial "icon.html" "times" }} {{ partial "icon.html" "times" }}

View File

@ -1,3 +1,3 @@
<div class="!mb-9 text-xl text-neutral-500 dark:text-neutral-400"> <div class="!mb-9 text-xl lead">
{{ .Inner | markdownify }} {{ .Inner | markdownify }}
</div> </div>