Skip to content

Commit

Permalink
refactor(PostCard): ♻️ pC 端时支持点击 tag 跳转
Browse files Browse the repository at this point in the history
  • Loading branch information
ivestszheng committed May 19, 2024
1 parent fb7813f commit 6ab6621
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/.vitepress/PostCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ function gotoPost(url) {
></p>
<div class="flex justify-between items-center text-xs">
<div v-text="date"></div>
<div class="flex">
<div
<div class="flex space-x-1">
<a
v-for="(tag, i) in tags"
v-text="tag"
class="bg-[var(--vp-c-bg-alt)] px-2 py-1"
:class="{ 'ml-2': i !== 0 }"
></div>
:href="`/pages/tags?tag=${tag}`"
@click.stop
class="bg-[var(--vp-c-bg-alt)] px-2 py-1 pointer-events-none md:pointer-events-auto md:hover:text-[var(--vp-c-brand)]"
></a>
</div>
</div>
</div>
Expand Down

0 comments on commit 6ab6621

Please sign in to comment.