refactor: improve code quality

This commit is contained in:
saicaca
2024-07-21 18:41:03 +08:00
parent 003c644146
commit 96223c0b5a
15 changed files with 38 additions and 60 deletions

View File

@@ -40,7 +40,7 @@ import { Icon } from 'astro-icon/components';
</style>
<script is:raw>
<script is:raw is:inline>
function backToTop() {
window.scroll({ top: 0, behavior: 'smooth' });
}

View File

@@ -64,7 +64,7 @@ const getPageUrl = (p: number) => {
{"disabled": page.url.prev == undefined}
]}
>
<Icon name="material-symbols:chevron-left-rounded" size="1.75rem"></Icon>
<Icon name="material-symbols:chevron-left-rounded" class="text-[1.75rem]"></Icon>
</a>
<div class="bg-[var(--card-bg)] flex flex-row rounded-lg items-center text-neutral-700 dark:text-neutral-300 font-bold">
{pages.map((p) => {
@@ -86,6 +86,6 @@ const getPageUrl = (p: number) => {
{"disabled": page.url.next == undefined}
]}
>
<Icon name="material-symbols:chevron-right-rounded" size="1.75rem"></Icon>
<Icon name="material-symbols:chevron-right-rounded" class="text-[1.75rem]"></Icon>
</a>
</div>