Skip to content

Commit c2571a1

Browse files
author
chenliangzihao
committed
chore: rm sth
1 parent b1618a5 commit c2571a1

File tree

3 files changed

+45
-41
lines changed

3 files changed

+45
-41
lines changed

src/components/PostCard.astro

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const coverWidth = '28%';
7272
</div>
7373

7474
<!-- word count and read time -->
75-
<div class="flex gap-4 text-sm text-black/30 transition dark:text-white/30">
75+
<!-- <div class="flex gap-4 text-sm text-black/30 transition dark:text-white/30">
7676
<div>
7777
{'0 Words'}
7878
{' ' + i18n(I18nKey.wordsCount)}
@@ -83,46 +83,50 @@ const coverWidth = '28%';
8383
{' ' + i18n(I18nKey.minutesCount)}
8484
</div>
8585
</div>
86-
</div>
86+
</div> -->
87+
88+
{
89+
hasCover && (
90+
<a
91+
href={url}
92+
aria-label={title}
93+
class:list={[
94+
'group',
95+
'mx-4 -mb-2 mt-4 max-h-[20vh] md:mx-0 md:mb-0 md:mt-0 md:max-h-none',
96+
'relative overflow-hidden rounded-xl active:scale-95 md:absolute md:bottom-3 md:right-3 md:top-3 md:w-[var(--coverWidth)]',
97+
]}
98+
>
99+
<div class="pointer-events-none absolute z-10 h-full w-full transition group-hover:bg-black/30 group-active:bg-black/50" />
100+
<div class="pointer-events-none absolute z-20 flex h-full w-full items-center justify-center">
101+
<Icon
102+
name="material-symbols:chevron-right-rounded"
103+
class="scale-50 text-5xl text-white opacity-0 transition group-hover:scale-100 group-hover:opacity-100"
104+
/>
105+
</div>
106+
<ImageWrapper src={image} alt="Cover Image of the Post" class="h-full w-full" />
107+
</a>
108+
)
109+
}
87110

88-
{
89-
hasCover && (
90-
<a
91-
href={url}
92-
aria-label={title}
93-
class:list={[
94-
'group',
95-
'mx-4 -mb-2 mt-4 max-h-[20vh] md:mx-0 md:mb-0 md:mt-0 md:max-h-none',
96-
'relative overflow-hidden rounded-xl active:scale-95 md:absolute md:bottom-3 md:right-3 md:top-3 md:w-[var(--coverWidth)]',
97-
]}
98-
>
99-
<div class="pointer-events-none absolute z-10 h-full w-full transition group-hover:bg-black/30 group-active:bg-black/50" />
100-
<div class="pointer-events-none absolute z-20 flex h-full w-full items-center justify-center">
111+
{
112+
!hasCover && (
113+
<a
114+
href={url}
115+
aria-label={title}
116+
class="btn-regular absolute bottom-3 right-3 top-3 !hidden w-[3.25rem] rounded-xl bg-[var(--enter-btn-bg)] hover:bg-[var(--enter-btn-bg-hover)] active:scale-95 active:bg-[var(--enter-btn-bg-active)] md:!flex"
117+
>
101118
<Icon
102119
name="material-symbols:chevron-right-rounded"
103-
class="scale-50 text-5xl text-white opacity-0 transition group-hover:scale-100 group-hover:opacity-100"
120+
class="mx-auto text-4xl text-[var(--primary)] transition"
104121
/>
105-
</div>
106-
<ImageWrapper src={image} alt="Cover Image of the Post" class="h-full w-full" />
107-
</a>
108-
)
109-
}
122+
</a>
123+
)
124+
}
125+
</div>
126+
<div
127+
class="mx-6 border-t-[1px] border-dashed border-black/10 transition last:border-t-0 dark:border-white/[0.15] md:hidden"
128+
>
129+
</div>
110130

111-
{
112-
!hasCover && (
113-
<a
114-
href={url}
115-
aria-label={title}
116-
class="btn-regular absolute bottom-3 right-3 top-3 !hidden w-[3.25rem] rounded-xl bg-[var(--enter-btn-bg)] hover:bg-[var(--enter-btn-bg-hover)] active:scale-95 active:bg-[var(--enter-btn-bg-active)] md:!flex"
117-
>
118-
<Icon name="material-symbols:chevron-right-rounded" class="mx-auto text-4xl text-[var(--primary)] transition" />
119-
</a>
120-
)
121-
}
131+
<style define:vars={{ coverWidth }}></style>
122132
</div>
123-
<div
124-
class="mx-6 border-t-[1px] border-dashed border-black/10 transition last:border-t-0 dark:border-white/[0.15] md:hidden"
125-
>
126-
</div>
127-
128-
<style define:vars={{ coverWidth }}></style>

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { LinkPreset } from './types/config';
33

44
export const siteConfig: SiteConfig = {
55
title: "ChlorineC's Blog",
6-
subtitle: 'Demo Site',
6+
subtitle: 'Coding With Passion',
77
lang: 'zh_CN', // 'en', 'zh_CN', 'zh_TW', 'ja', 'ko', 'es', 'th'
88
themeColor: {
99
hue: 250, // Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345

src/pages/posts/[...slug].astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const jsonLd = {
5555
<div class="relative mb-4 flex w-full overflow-hidden rounded-[var(--radius-large)]">
5656
<div id="post-container" class:list={['card-base relative z-10 w-full px-6 pb-4 pt-6 md:px-9', {}]}>
5757
<!-- word count and reading time -->
58-
<div class="onload-animation mb-3 flex flex-row gap-5 text-black/30 transition dark:text-white/30">
58+
<!-- <div class="onload-animation mb-3 flex flex-row gap-5 text-black/30 transition dark:text-white/30">
5959
<div class="flex flex-row items-center">
6060
<div
6161
class="mr-2 flex h-6 w-6 items-center justify-center rounded-md bg-black/5 text-black/50 transition dark:bg-white/10 dark:text-white/50"
@@ -78,7 +78,7 @@ const jsonLd = {
7878
{' ' + i18n(I18nKey.minutesCount)}
7979
</div>
8080
</div>
81-
</div>
81+
</div> -->
8282

8383
<!-- title -->
8484
<div class="onload-animation relative">

0 commit comments

Comments
 (0)