feat: 首页新增「近期新功能」区块 — 8张亮点卡片(图标+新标签+一句话卖点)直达工具, 与品牌绿主题呼应
This commit is contained in:
1 parent
91cfb3b298
commit
6384c8f90b
1 file changed
+108
@@ -7,6 +7,18 @@ import ColoredCard from '../components/ColoredCard.vue';
|
||||
import ToolCard from '../components/ToolCard.vue';
|
||||
import { useToolStore } from '@/tools/tools.store';
|
||||
import { useRecentTools } from '@/composable/recent-tools';
|
||||
|
||||
// 近期新功能亮点(手动维护,新工具上线时加一条)
|
||||
const NEW_FEATURES = [
|
||||
{ path: '/seal-maker', icon: '🔴', name: '印章生成器', desc: '圆形公章一键生成,盖章到图片/PDF,支持骑缝章' },
|
||||
{ path: '/signature-pad', icon: '✍️', name: '手写签名', desc: '真实笔触模拟,透明 PNG,签合同一步到位' },
|
||||
{ path: '/text-to-image', icon: '🖼️', name: '文字生成图片', desc: '多行文字排版出图,字体颜色可调,2x/3x 高清' },
|
||||
{ path: '/zh-convert', icon: '🈶', name: '简繁体转换', desc: 'OpenCC 词典,词组级准确互转(台湾/香港标准)' },
|
||||
{ path: '/pinyin-converter', icon: '🀄', name: '汉字转拼音', desc: '多音字智能转换,全读音标注,三种声调风格' },
|
||||
{ path: '/video-tools', icon: '🎥', name: '视频工具箱', desc: '13 个 ffmpeg 工具:转码/压缩/水印/去水印/GIF' },
|
||||
{ path: '/audio-tools', icon: '🎙️', name: '音频工具', desc: '文字转音频、语音识别、声音克隆(部署中)' },
|
||||
{ path: '/user-center', icon: '👤', name: '用户中心', desc: '收藏/记录云端同步,换电脑登录即恢复,授权跟随账号' },
|
||||
];
|
||||
import { config } from '@/config';
|
||||
|
||||
const toolStore = useToolStore();
|
||||
@@ -41,6 +53,23 @@ function onUpdateFavoriteTools() {
|
||||
|
||||
<template>
|
||||
<div class="pt-50px">
|
||||
<!-- 近期新功能 -->
|
||||
<div class="nf-block">
|
||||
<div class="nf-head">
|
||||
<span class="nf-title">🆕 近期新功能</span>
|
||||
<span class="nf-sub">持续更新中,登录后数据云端同步、授权跟随账号</span>
|
||||
</div>
|
||||
<div class="nf-grid">
|
||||
<RouterLink v-for="f in NEW_FEATURES" :key="f.path" :to="f.path" class="nf-card">
|
||||
<span class="nf-icon">{{ f.icon }}</span>
|
||||
<span class="nf-body">
|
||||
<span class="nf-name">{{ f.name }} <em class="nf-badge">新</em></span>
|
||||
<span class="nf-desc">{{ f.desc }}</span>
|
||||
</span>
|
||||
</RouterLink>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-wrapper">
|
||||
<div class="grid grid-cols-1 gap-12px lg:grid-cols-3 md:grid-cols-3 sm:grid-cols-2 xl:grid-cols-4">
|
||||
<ColoredCard v-if="config.showBanner" :title="$t('home.follow.title')" :icon="IconHeart">
|
||||
@@ -114,6 +143,85 @@ function onUpdateFavoriteTools() {
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
.nf-block {
|
||||
margin-bottom: 20px;
|
||||
|
||||
.nf-head {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.nf-title {
|
||||
font-size: 17px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.nf-sub {
|
||||
font-size: 12px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.nf-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.nf-card {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: flex-start;
|
||||
border: 1px solid rgba(24, 160, 88, 0.3);
|
||||
background: linear-gradient(120deg, rgba(24, 160, 88, 0.05), rgba(24, 160, 88, 0.015));
|
||||
border-radius: 10px;
|
||||
padding: 10px 12px;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
transition: border-color 0.15s, transform 0.1s;
|
||||
|
||||
&:hover {
|
||||
border-color: #18a058;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.nf-icon {
|
||||
font-size: 20px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.nf-body {
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
|
||||
.nf-name {
|
||||
font-size: 13.5px;
|
||||
font-weight: 700;
|
||||
|
||||
.nf-badge {
|
||||
font-style: normal;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
color: #fff;
|
||||
background: #18a058;
|
||||
border-radius: 4px;
|
||||
padding: 0 5px;
|
||||
margin-left: 4px;
|
||||
vertical-align: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
.nf-desc {
|
||||
font-size: 11.5px;
|
||||
opacity: 0.6;
|
||||
line-height: 1.55;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.height-enter-active,
|
||||
.height-leave-active {
|
||||
transition: all 0.5s ease-in-out;
|
||||
|
||||
Reference in new issue
Block a user