Browse Source

feat: 添加产品文档,更新样式和组件,优化卡片动画效果

beauty
npmrun 4 weeks ago
parent
commit
86fe7de029
  1. 36
      PRODUCT.md
  2. 22
      app/assets/css/main.css
  3. 18
      app/components/index/WaterfallCard.vue
  4. 28
      app/components/index/WaterfallImageCard.vue
  5. 12
      app/components/index/WaterfallPortfolioCard.vue
  6. 19
      app/components/index/WaterfallProjectCard.vue
  7. 37
      app/components/index/WaterfallTextCard.vue
  8. 94
      app/pages/index/index.vue

36
PRODUCT.md

@ -0,0 +1,36 @@
# Product
## Register
brand
## Users
个人用户在此策展和收藏灵感内容(图片、文字、项目),通过瀑布流浏览发现美学作品。同时也面向潜在客户或雇主,作为个人作品集的展示窗口——设计本身就是能力证明。
## Product Purpose
一个个人灵感策展与作品展示平台。核心体验是浏览:用户在精心编排的视觉流中发现内容。设计在此不是装饰,是内容本身——前卫的视觉表达直接传达创作者的能力和品味。
## Brand Personality
大胆、实验性、前卫。像一个独立设计师的作品集站点——强烈个性,不按模板出牌。拒绝安全的设计选择,愿意为视觉冲击力承担风险。字体、色彩、布局都是表达态度的工具,不是中性的容器。
参考方向:独立设计师作品集(Tobias van Schneider、Malika Favre 等),反传统编辑美学。
## Anti-references
- 冷淡极简:纯黑白、瑞士国际主义风格、无色彩无温度的克制
- 典型 SaaS 模板:蓝紫渐变 hero、玻璃卡片、大数字加小标签的 metrics 模式
- 任何看起来像 "AI 生成的 landing page" 的东西
## Design Principles
- **设计即内容**:视觉不是包装,视觉是信息本身。每个设计决策都在说 "这是谁做的"
- **宁可冒险也不平庸**:大胆的选择好过安全的平均。出格比无聊更接近目标
- **内容优先,但不中立**:框架服务于内容,但框架本身也有态度。排版、间距、色彩都有自己的声音
- **意外与连贯并存**:每个区域可以有自己的视觉世界,但整体仍是同一个声音
## Accessibility & Inclusion
基础 WCAG AA 在长期计划中。当前阶段实验性优先,视觉探索不受限于合规要求。后续迭代再补。

22
app/assets/css/main.css

@ -1,4 +1,5 @@
@import "tailwindcss";
@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&display=swap');
@theme {
--color-canvas: #faf9f5;
@ -16,6 +17,10 @@
--color-muted-soft: #8e8b82;
--color-hairline: #e6dfd8;
--color-hairline-soft: #ebe6df;
--color-on-dark: #faf9f5;
--color-on-primary: #ffffff;
--color-accent-teal: #5db8a6;
--color-accent-amber: #e8a55a;
}
body {
@ -28,6 +33,23 @@ body {
--ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
--ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
--font-display: "Abril Fatface", "Times New Roman", Georgia, Garamond, serif;
--font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.noise-texture {
position: relative;
}
.noise-texture::before {
content: "";
position: absolute;
inset: 0;
opacity: 0.025;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
background-size: 128px 128px;
pointer-events: none;
z-index: 0;
}
@media (prefers-reduced-motion: reduce) {

18
app/components/index/WaterfallCard.vue

@ -1,5 +1,5 @@
<script setup lang="ts">
const props = defineProps<{
defineProps<{
image: string
title: string
description: string
@ -20,7 +20,7 @@ function onImgError() {
</script>
<template>
<div class="card" :style="{ aspectRatio: props.aspectRatio }">
<div class="card" :style="{ aspectRatio }">
<div class="img-placeholder" :class="{ loaded: imgLoaded }" />
<img
v-if="!imgFailed"
@ -49,12 +49,12 @@ function onImgError() {
border-radius: 12px;
background: var(--color-surface-card);
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.card:hover {
transform: translateY(-3px);
box-shadow: 0 8px 30px rgba(20, 20, 19, 0.07);
transform: translateY(-5px) scale(1.01);
box-shadow: 0 16px 48px rgba(20, 20, 19, 0.12);
}
.img-placeholder {
@ -116,12 +116,12 @@ function onImgError() {
.card-text h3 {
color: #fff;
font-family: "Times New Roman", Georgia, serif;
font-size: 17px;
font-family: var(--font-display);
font-size: 18px;
font-weight: 400;
line-height: 1.35;
line-height: 1.3;
margin: 0 0 5px;
letter-spacing: -0.2px;
letter-spacing: -0.01em;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

28
app/components/index/WaterfallImageCard.vue

@ -34,6 +34,9 @@ function onImgError() {
<div v-if="imgFailed" class="img-fallback">
<span class="fallback-icon">&#128247;</span>
</div>
<div class="card-label">
<span>{{ title }}</span>
</div>
</div>
</template>
@ -43,12 +46,15 @@ function onImgError() {
border-radius: 12px;
background: var(--color-surface-card);
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
transition: transform 0.4s var(--ease-out-expo);
}
.card:hover {
transform: translateY(-3px);
box-shadow: 0 8px 30px rgba(20, 20, 19, 0.07);
transform: scale(1.015);
}
.card:hover .card-label {
opacity: 1;
}
.img-placeholder {
@ -83,6 +89,22 @@ function onImgError() {
opacity: 1;
}
.card-label {
position: absolute;
bottom: 12px;
right: 12px;
background: var(--color-surface-dark);
color: var(--color-on-dark);
font-size: 12px;
font-weight: 500;
padding: 6px 12px;
border-radius: 6px;
letter-spacing: 0.03em;
opacity: 0;
transition: opacity 0.3s ease;
z-index: 2;
}
.img-fallback {
position: absolute;
inset: 0;

12
app/components/index/WaterfallPortfolioCard.vue

@ -56,12 +56,12 @@ const totalImages = computed(() => props.images.length)
border-radius: 12px;
background: var(--color-surface-card);
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.card:hover {
transform: translateY(-3px);
box-shadow: 0 8px 30px rgba(20, 20, 19, 0.07);
transform: translateY(-5px) scale(1.01);
box-shadow: 0 16px 48px rgba(20, 20, 19, 0.12);
}
.img-grid {
@ -131,12 +131,12 @@ const totalImages = computed(() => props.images.length)
.overlay h3 {
color: #fff;
font-family: "Times New Roman", Georgia, serif;
font-size: 16px;
font-family: var(--font-display);
font-size: 18px;
font-weight: 400;
line-height: 1.3;
margin: 0 0 4px;
letter-spacing: -0.2px;
letter-spacing: -0.01em;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

19
app/components/index/WaterfallProjectCard.vue

@ -53,12 +53,12 @@ function onImgError() {
border-radius: 12px;
background: var(--color-surface-card);
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.card:hover {
transform: translateY(-3px);
box-shadow: 0 8px 30px rgba(20, 20, 19, 0.07);
transform: translateY(-5px) scale(1.01);
box-shadow: 0 16px 48px rgba(20, 20, 19, 0.12);
}
.img-placeholder {
@ -134,12 +134,12 @@ function onImgError() {
.card-body h3 {
color: #fff;
font-family: "Times New Roman", Georgia, serif;
font-size: 17px;
font-family: var(--font-display);
font-size: 18px;
font-weight: 400;
line-height: 1.3;
margin: 0 0 5px;
letter-spacing: -0.2px;
letter-spacing: -0.01em;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
@ -162,11 +162,10 @@ function onImgError() {
font-size: 11.5px;
font-weight: 400;
color: rgba(255, 255, 255, 0.82);
background: rgba(255, 255, 255, 0.12);
border: 1px solid rgba(255, 255, 255, 0.15);
padding: 4px 10px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.18);
padding: 3px 10px;
border-radius: 9999px;
line-height: 1.3;
backdrop-filter: blur(4px);
}
</style>

37
app/components/index/WaterfallTextCard.vue

@ -9,7 +9,7 @@ defineProps<{
<template>
<div class="card">
<div class="card-inner">
<div class="accent-bar" />
<span class="card-number" aria-hidden="true">&#9670;</span>
<h3>{{ title }}</h3>
<p>{{ description }}</p>
</div>
@ -19,43 +19,44 @@ defineProps<{
<style scoped>
.card {
border-radius: 12px;
background: linear-gradient(145deg, #efe9de 0%, #e8e0d2 40%, #f5f0e8 100%);
background: linear-gradient(155deg, #e8e0d2 0%, #f5f0e8 30%, #efe9de 60%, #e8e0d2 100%);
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
transition: transform 0.45s var(--ease-out-expo), box-shadow 0.45s var(--ease-out-expo);
display: flex;
align-items: flex-start;
border: 1px solid var(--color-hairline-soft);
}
.card:hover {
transform: translateY(-3px);
box-shadow: 0 8px 30px rgba(20, 20, 19, 0.07);
transform: translateY(-4px) scale(1.008);
box-shadow: 0 12px 40px rgba(20, 20, 19, 0.1);
}
.card-inner {
padding: 28px 24px;
padding: 32px 28px;
}
.accent-bar {
width: 28px;
height: 3px;
background: var(--color-primary);
border-radius: 2px;
margin-bottom: 16px;
.card-number {
display: block;
font-size: 13px;
color: var(--color-primary);
opacity: 0.7;
margin-bottom: 18px;
}
.card-inner h3 {
color: var(--color-ink);
font-family: "Times New Roman", Georgia, serif;
font-size: 18px;
font-family: var(--font-display);
font-size: 20px;
font-weight: 400;
line-height: 1.3;
margin: 0 0 10px;
letter-spacing: -0.3px;
line-height: 1.25;
margin: 0 0 12px;
letter-spacing: -0.01em;
}
.card-inner p {
color: var(--color-muted);
font-size: 13.5px;
font-size: 14px;
font-weight: 400;
line-height: 1.75;
margin: 0;

94
app/pages/index/index.vue

@ -153,7 +153,7 @@ watch(sentinel, (el) => {
<template v-for="(item, ri) in col" :key="item.id">
<div
class="card-reveal"
:style="{ '--enter-delay': `${ci * 60 + ri * 40}ms` }"
:style="{ '--enter-delay': `${ci * 80 + ri * 60}ms` }"
>
<IndexWaterfallCard
v-if="item.type === 'image-text'"
@ -218,29 +218,42 @@ watch(sentinel, (el) => {
padding: 0 24px;
}
/* ── Header: cream canvas, coral type ── */
.page-header {
text-align: center;
padding: 72px 0 56px;
padding: clamp(64px, 10vw, 108px) 0 clamp(20px, 3vw, 32px);
animation: header-reveal 0.8s var(--ease-out-expo) both;
}
@keyframes header-reveal {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.page-header h1 {
font-family: "Times New Roman", Georgia, Garamond, serif;
font-size: 48px;
font-family: var(--font-display);
font-size: clamp(64px, 10vw, 132px);
font-weight: 400;
color: var(--color-ink);
margin: 0 0 10px;
letter-spacing: -1px;
line-height: 1.1;
animation: fade-slide-up 0.7s var(--ease-out-expo) both;
color: var(--color-primary);
margin: 0;
line-height: 0.88;
letter-spacing: -0.02em;
}
.subtitle {
color: var(--color-muted);
font-size: 16px;
font-size: clamp(16px, 2vw, 20px);
font-weight: 400;
margin: 0;
margin: clamp(14px, 2.5vw, 24px) 0 0;
letter-spacing: 0.06em;
animation: fade-slide-up 0.7s var(--ease-out-expo) both;
animation-delay: 120ms;
animation-delay: 200ms;
}
@keyframes fade-slide-up {
@ -254,21 +267,7 @@ watch(sentinel, (el) => {
}
}
.card-reveal {
animation: card-enter 0.55s var(--ease-out-expo) both;
animation-delay: var(--enter-delay, 0ms);
}
@keyframes card-enter {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* ── Masonry ── */
.masonry {
display: flex;
@ -284,11 +283,31 @@ watch(sentinel, (el) => {
gap: 20px;
}
/* ── Card reveal ── */
.card-reveal {
animation: card-enter 0.65s var(--ease-out-expo) both;
animation-delay: var(--enter-delay, 0ms);
}
@keyframes card-enter {
from {
opacity: 0;
transform: translateY(24px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* ── Sentinel ── */
.sentinel {
display: flex;
justify-content: center;
align-items: center;
padding: 48px 0 80px;
padding: 56px 0 96px;
min-height: 60px;
}
@ -320,4 +339,21 @@ watch(sentinel, (el) => {
0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
50% { opacity: 0.8; transform: scaleY(1); }
}
/* ── Responsive ── */
@media (max-width: 768px) {
.home {
padding: 0 16px;
}
.page-header {
margin: 16px 0 40px;
padding: 40px 24px;
}
.page-header h1 {
font-size: clamp(40px, 12vw, 64px);
}
}
</style>

Loading…
Cancel
Save