新版官网模板
This commit is contained in:
58
app/components/home/SectionHeader.vue
Normal file
58
app/components/home/SectionHeader.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="section-header">
|
||||
<div class="header-left">
|
||||
<span class="icon">{{ icon }}</span>
|
||||
<h2 class="title">{{ title }}</h2>
|
||||
</div>
|
||||
<NuxtLink v-if="moreLink" :to="moreLink" class="more-link">
|
||||
查看更多 ›
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
defineProps<{
|
||||
title: string
|
||||
icon?: string
|
||||
moreLink?: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 24px;
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 3px solid #1e3a5f;
|
||||
}
|
||||
|
||||
.header-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: #1e3a5f;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.more-link {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
text-decoration: none;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.more-link:hover {
|
||||
color: #1e3a5f;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user