mirror of
https://github.com/RhenCloud/Cloud-Home.git
synced 2026-01-22 17:39:07 +08:00
在多个组件中将 `img` 标签替换为 `NuxtImg` 标签,提升图片加载的性能和优化。例如,在 `AboutSection.vue`、`FriendsSection.vue`、`HeroSection.vue`、`ProjectsSection.vue`、`SitesSection.vue` 和 `SkillsSection.vue` 中的图片标签。 refactor(app): 扩展 `nuxt.config.ts` 配置 扩展了 `nuxt.config.ts` 配置文件中的模块配置,添加了 `@nuxt/image` 和 `@nuxt/eslint` 模块。同时,优化了 `routeRules` 配置,以支持预渲染和增量静态生成。
33 lines
1.2 KiB
Vue
33 lines
1.2 KiB
Vue
<template>
|
|
<section class="card grid grid-cols-[120px_1fr] gap-4 items-center hover:shadow-lg-dark group">
|
|
<div class="relative">
|
|
<div
|
|
class="absolute inset-0 rounded-full bg-gradient-to-br from-primary/30 to-accent/20 blur-xl group-hover:blur-2xl transition-all duration-300 opacity-0 group-hover:opacity-100"
|
|
/>
|
|
<NuxtImg
|
|
class="relative w-30 h-30 rounded-full object-cover border-2 border-primary/40 shadow-md-dark bg-white transition-transform duration-300 group-hover:scale-105"
|
|
:src="profile.avatar"
|
|
alt="avatar"
|
|
loading="eager"
|
|
/>
|
|
</div>
|
|
<div class="overflow-hidden">
|
|
<h1 class="text-2xl font-bold">{{ profile.name }}</h1>
|
|
<p class="text-text-muted text-sm mt-1">{{ profile.title }}</p>
|
|
<p class="mt-2 line-clamp-2">{{ profile.bio }}</p>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<script setup>
|
|
import siteConfig from "../config/siteConfig";
|
|
|
|
const { profile } = defineProps({
|
|
profile: {
|
|
type: Object,
|
|
required: false,
|
|
default: () => siteConfig.profile || {},
|
|
},
|
|
});
|
|
</script>
|