Blame view

design-system/store-pc/MASTER.md 5.08 KB
58083915   “wangming”   对门店PC进行设计
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
  # Design System Master File
  
  > **LOGIC:** When building a specific page, first check `design-system/pages/[page-name].md`.
  > If that file exists, its rules **override** this Master file.
  > If not, strictly follow the rules below.
  
  ---
  
  **Project:** Store PC
  **Generated:** 2026-03-03 14:09:13
  **Category:** Smart Home/IoT Dashboard
  
  ---
  
  ## Global Rules
  
  ### Color Palette
  
  | Role | Hex | CSS Variable |
  |------|-----|--------------|
  | Primary | `#15803D` | `--color-primary` |
  | Secondary | `#22C55E` | `--color-secondary` |
  | CTA/Accent | `#0369A1` | `--color-cta` |
  | Background | `#F0FDF4` | `--color-background` |
  | Text | `#14532D` | `--color-text` |
  
  **Color Notes:** Pharmacy green + trust blue
  
  ### Typography
  
  - **Heading Font:** Fira Code
  - **Body Font:** Fira Sans
  - **Mood:** dashboard, data, analytics, code, technical, precise
  - **Google Fonts:** [Fira Code + Fira Sans](https://fonts.google.com/share?selection.family=Fira+Code:wght@400;500;600;700|Fira+Sans:wght@300;400;500;600;700)
  
  **CSS Import:**
  ```css
  @import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');
  ```
  
  ### Spacing Variables
  
  | Token | Value | Usage |
  |-------|-------|-------|
  | `--space-xs` | `4px` / `0.25rem` | Tight gaps |
  | `--space-sm` | `8px` / `0.5rem` | Icon gaps, inline spacing |
  | `--space-md` | `16px` / `1rem` | Standard padding |
  | `--space-lg` | `24px` / `1.5rem` | Section padding |
  | `--space-xl` | `32px` / `2rem` | Large gaps |
  | `--space-2xl` | `48px` / `3rem` | Section margins |
  | `--space-3xl` | `64px` / `4rem` | Hero padding |
  
  ### Shadow Depths
  
  | Level | Value | Usage |
  |-------|-------|-------|
  | `--shadow-sm` | `0 1px 2px rgba(0,0,0,0.05)` | Subtle lift |
  | `--shadow-md` | `0 4px 6px rgba(0,0,0,0.1)` | Cards, buttons |
  | `--shadow-lg` | `0 10px 15px rgba(0,0,0,0.1)` | Modals, dropdowns |
  | `--shadow-xl` | `0 20px 25px rgba(0,0,0,0.15)` | Hero images, featured cards |
  
  ---
  
  ## Component Specs
  
  ### Buttons
  
  ```css
  /* Primary Button */
  .btn-primary {
    background: #0369A1;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 200ms ease;
    cursor: pointer;
  }
  
  .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }
  
  /* Secondary Button */
  .btn-secondary {
    background: transparent;
    color: #15803D;
    border: 2px solid #15803D;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 200ms ease;
    cursor: pointer;
  }
  ```
  
  ### Cards
  
  ```css
  .card {
    background: #F0FDF4;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: all 200ms ease;
    cursor: pointer;
  }
  
  .card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
  }
  ```
  
  ### Inputs
  
  ```css
  .input {
    padding: 12px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 200ms ease;
  }
  
  .input:focus {
    border-color: #15803D;
    outline: none;
    box-shadow: 0 0 0 3px #15803D20;
  }
  ```
  
  ### Modals
  
  ```css
  .modal-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
  }
  
  .modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
  }
  ```
  
  ---
  
  ## Style Guidelines
  
  **Style:** Glassmorphism
  
  **Keywords:** Frosted glass, transparent, blurred background, layered, vibrant background, light source, depth, multi-layer
  
  **Best For:** Modern SaaS, financial dashboards, high-end corporate, lifestyle apps, modal overlays, navigation
  
  **Key Effects:** Backdrop blur (10-20px), subtle border (1px solid rgba white 0.2), light reflection, Z-depth
  
  ### Page Pattern
  
  **Pattern Name:** App Store Style Landing
  
  - **Conversion Strategy:** Show real screenshots. Include ratings (4.5+ stars). QR code for mobile. Platform-specific CTAs.
  - **CTA Placement:** Download buttons prominent (App Store + Play Store) throughout
  - **Section Order:** 1. Hero with device mockup, 2. Screenshots carousel, 3. Features with icons, 4. Reviews/ratings, 5. Download CTAs
  
  ---
  
  ## Anti-Patterns (Do NOT Use)
  
  - ❌ Slow updates
  - ❌ No automation
  
  ### Additional Forbidden Patterns
  
  -**Emojis as icons** — Use SVG icons (Heroicons, Lucide, Simple Icons)
  -**Missing cursor:pointer** — All clickable elements must have cursor:pointer
  -**Layout-shifting hovers** — Avoid scale transforms that shift layout
  -**Low contrast text** — Maintain 4.5:1 minimum contrast ratio
  -**Instant state changes** — Always use transitions (150-300ms)
  -**Invisible focus states** — Focus states must be visible for a11y
  
  ---
  
  ## Pre-Delivery Checklist
  
  Before delivering any UI code, verify:
  
  - [ ] No emojis used as icons (use SVG instead)
  - [ ] All icons from consistent icon set (Heroicons/Lucide)
  - [ ] `cursor-pointer` on all clickable elements
  - [ ] Hover states with smooth transitions (150-300ms)
  - [ ] Light mode: text contrast 4.5:1 minimum
  - [ ] Focus states visible for keyboard navigation
  - [ ] `prefers-reduced-motion` respected
  - [ ] Responsive: 375px, 768px, 1024px, 1440px
  - [ ] No content hidden behind fixed navbars
  - [ ] No horizontal scroll on mobile