1
0
Fork 0

refine single nav ux

This commit is contained in:
nanxiaobei 2022-12-27 03:19:25 +08:00
parent f3341060c8
commit 44128f7320
2 changed files with 21 additions and 3 deletions

View file

@ -1369,6 +1369,10 @@ body {
border-radius: 0.5rem; border-radius: 0.5rem;
} }
.rounded-md {
border-radius: 0.375rem;
}
.border-\[0\.5px\] { .border-\[0\.5px\] {
border-width: 0.5px; border-width: 0.5px;
} }
@ -1397,6 +1401,14 @@ body {
padding: 1.5rem; padding: 1.5rem;
} }
.p-1\.5 {
padding: 0.375rem;
}
.p-1 {
padding: 0.25rem;
}
.px-8 { .px-8 {
padding-left: 2rem; padding-left: 2rem;
padding-right: 2rem; padding-right: 2rem;
@ -1632,6 +1644,10 @@ article blockquote {
animation: spin 1s linear infinite; animation: spin 1s linear infinite;
} }
.hover\:bg-black\/\[2\%\]:hover {
background-color: rgb(0 0 0 / 2%);
}
.dark .dark\:bg-white\/80 { .dark .dark\:bg-white\/80 {
background-color: rgb(255 255 255 / 0.8); background-color: rgb(255 255 255 / 0.8);
} }

View file

@ -35,17 +35,19 @@
<!-- Post Nav --> <!-- Post Nav -->
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}<!----> {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}<!---->
{{ if and (gt (len $pages) 1) (in $pages . ) }} {{ if and (gt (len $pages) 1) (in $pages . ) }}
<nav class="mt-24 flex rounded-lg bg-black/[3%] text-lg dark:bg-white/[8%]"> <nav
class="mt-24 flex rounded-lg bg-black/[3%] p-1.5 text-lg dark:bg-white/[8%]"
>
{{ with $pages.Next . }} {{ with $pages.Next . }}
<a <a
class="flex w-1/2 items-center p-6 pr-3 no-underline" class="flex w-1/2 items-center rounded-md p-6 pr-3 no-underline hover:bg-black/[2%]"
href="{{ .Permalink }}" href="{{ .Permalink }}"
><span class="mr-1.5"></span><span>{{ .Name }}</span></a ><span class="mr-1.5"></span><span>{{ .Name }}</span></a
> >
{{ end }}<!----> {{ end }}<!---->
{{ with $pages.Prev . }} {{ with $pages.Prev . }}
<a <a
class="ml-auto flex w-1/2 items-center justify-end p-6 pl-3 no-underline" class="ml-auto flex w-1/2 items-center justify-end rounded-md p-6 pl-3 no-underline hover:bg-black/[2%]"
href="{{ .Permalink }}" href="{{ .Permalink }}"
><span>{{ .Name }}</span><span class="ml-1.5"></span></a ><span>{{ .Name }}</span><span class="ml-1.5"></span></a
> >