Skip to content

Commit

Permalink
🛠️ Fix Card
Browse files Browse the repository at this point in the history
  • Loading branch information
EveSunMaple committed Aug 7, 2024
1 parent 3716730 commit 41585b1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 31 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,7 @@
- 修改了卡片样式
- 修改了链接样式
- 清理了原评论系统中不必要的代码

### Fix

- 修复了部分手机导航栏无法跳转的问题
33 changes: 17 additions & 16 deletions src/components/CategoryCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,22 @@ export async function getTagsWithCounts(): Promise<TagCount[]> {
const tagsWithCounts = await getTagsWithCounts();
---

<div
class="flex flex-wrap gap-2.5 bg-base-100 shadow-xl p-4 gap-4 w-full mb-8 overflow-auto no-card"
>
<div class="btn btn-sm btn-ghost no-animation w-full font-bold">
{infoTest.categoryCard}
<div class="bg-base-100 shadow-xl w-full mb-8 no-card">
<div class="p-4">
<div class="btn btn-sm btn-ghost no-animation w-full font-bold">
{infoTest.categoryCard}
</div>
</div>
<div class="flex flex-wrap gap-2.5 w-full p-4 max-h-[300px] overflow-auto">
{
tagsWithCounts.map(({ category, count }) => (
<span class="inline">
<a href={`/blog/categories/${category}`} class="btn btn-sm">
{category}
<div class="badge badge-accent">{count}</div>
</a>
</span>
))
}
</div>
{
tagsWithCounts.map(({ category, count }) => (
<span class="inline">
<a href={`/blog/categories/${category}`} class="btn btn-sm">
{category}
<div class="badge badge-accent">{count}</div>
</a>
</span>
))
}
</div>
<style></style>
32 changes: 17 additions & 15 deletions src/components/TagCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,22 @@ export async function getTagsWithCounts(): Promise<TagCount[]> {
const tagsWithCounts = await getTagsWithCounts();
---

<div
class="flex flex-wrap gap-2.5 bg-base-100 shadow-xl p-4 gap-4 w-full mb-8 overflow-auto no-card"
>
<div class="btn btn-sm btn-ghost no-animation w-full font-bold">
{infoTest.tagCard}
<div class="bg-base-100 shadow-xl w-full mb-8 no-card">
<div class="p-4">
<div class="btn btn-sm btn-ghost no-animation w-full font-bold">
{infoTest.tagCard}
</div>
</div>
<div class="flex flex-wrap gap-2.5 w-full p-4 max-h-[300px] overflow-auto">
{
tagsWithCounts.map(({ tag, count }) => (
<span class="inline">
<a href={`/blog/tag/${tag}`} class="btn btn-sm">
{tag}
<div class="badge badge-secondary">{count}</div>
</a>
</span>
))
}
</div>
{
tagsWithCounts.map(({ tag, count }) => (
<span class="inline">
<a href={`/blog/tag/${tag}`} class="btn btn-sm">
{tag}
<div class="badge badge-secondary">{count}</div>
</a>
</span>
))
}
</div>

0 comments on commit 41585b1

Please sign in to comment.