File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,5 +34,9 @@ export function calculateSiteAge(startDate: string): string {
3434 * Get default highlight color using theme primary color
3535 */
3636export function getHighlightColor ( ) : string {
37- return 'hsl(var(--primary) / var(--un-text-opacity, 1))'
37+ return '#f6eac5'
38+ // 之前的代码使用 hsl(var(--primary) / var(--un-text-opacity, 1))
39+ // 这是使用 CSS 变量获取主题主色,并通过除法运算控制透明度
40+ // var(--un-text-opacity, 1) 是 UnoCSS 的透明度变量,默认值为 1(完全不透明)
41+ // 除法运算用于将 HSL 颜色值与透明度值结合,实现颜色透明度的动态控制
3842}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import PageLayout from '@/layouts/BaseLayout.astro'
66import { getBlogCollection } from ' astro-pure/server'
77import { getCurrentReading , getLatestPosts , getTotalWords } from ' @/components/shelf/utils'
88import { calculateSiteAge , getHighlightColor } from ' @/components/home/utils'
9- import avatarImage from ' @/assets/avatar_2 .png'
9+ import avatarImage from ' @/assets/home .png'
1010import config from ' @/site-config'
1111
1212const MAX_POSTS = 6
@@ -33,9 +33,9 @@ const highlightColor = getHighlightColor()
3333 { /* 左侧:头像 - 大尺寸 */ }
3434 <div class =' flex justify-center md:justify-start' >
3535 <div
36- class =' w-32 h-32 md:w-48 md:h-48 lg:w-56 lg:h-56 border border-border overflow-hidden bg-card rounded-lg shadow -lg'
36+ class =' w-32 h-32 md:w-48 md:h-48 lg:w-56 lg:h-56 overflow-hidden rounded-lg'
3737 >
38- <Image src ={ avatarImage } alt =' Avatar' class =' w-full h-full object-cover block' />
38+ <Image src ={ avatarImage } alt =' Avatar' class =' w-full h-full object-contain block' />
3939 </div >
4040 </div >
4141
You can’t perform that action at this time.
0 commit comments