Skip to content

Commit d5d7770

Browse files
committed
update contents
1 parent 15c7551 commit d5d7770

25 files changed

Lines changed: 1576 additions & 432 deletions

Plan.md

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# Visual Differentiation Plan for Upstream Labs Website
2+
3+
## Goal
4+
Transform the website from standard AstroWind styling to a distinctive, gradient-rich design inspired by beijing2025 and origin2025 reference sites.
5+
6+
---
7+
8+
## Status: ✅ COMPLETE
9+
10+
All 6 phases of the visual differentiation plan have been successfully implemented.
11+
12+
---
13+
14+
## Key Changes Overview
15+
16+
| Area | Original State | Current State | Status |
17+
|------|--------------|--------------|--------|
18+
| Section Backgrounds | Repetitive `bg-blue-50` on 3 sections | 4 distinct multi-layered radial gradients | ✅ Complete |
19+
| Features Widget | Plain icon grid | Glassmorphism card grid (FeaturesCards) | ✅ Complete |
20+
| Stats Widget | Sparse horizontal layout | Elevated cards with gradient numbers | ✅ Complete |
21+
| Timeline/Steps | Basic vertical line | Gradient connector with pulsing markers | ✅ Complete |
22+
| Content Sections | Two identical layouts | Differentiated with unique treatments | ✅ Complete |
23+
24+
---
25+
26+
## Completed Work
27+
28+
### ✅ Phase 1: Section Background System
29+
30+
**File:** `src/assets/styles/tailwind.css`
31+
32+
Added 4 new gradient utility classes:
33+
34+
1. **`.section-bg-azure-glow`** - Blue top-left + aqua bottom-right ellipses (for Features, Steps)
35+
2. **`.section-bg-gold-accent`** - Gold top-right + blue bottom-left (for Content #1)
36+
3. **`.section-bg-aqua-flow`** - Aqua bottom-center + blue left (available, not currently used)
37+
4. **`.section-bg-tri-color`** - Three-way blue/gold/aqua gradient (for Stats)
38+
39+
Each utility uses multi-layered `radial-gradient()` with:
40+
- Opacity range: 0.06-0.15 (light mode), 0.10-0.20 (dark mode)
41+
- `::before` pseudo-element pattern
42+
- `pointer-events: none` for interaction passthrough
43+
44+
---
45+
46+
### ✅ Phase 2: Features Widget Upgrade
47+
48+
**New File:** `src/components/widgets/FeaturesCards.astro`
49+
50+
Created a card-based variant of Features that uses:
51+
- ItemGrid2 for card layout (3 columns)
52+
- Glassmorphism styling: `backdrop-blur-sm`, `bg-white/90 dark:bg-ink-800/80`
53+
- Elevated shadows: `shadow-[0_8px_30px_rgba(43,116,255,0.08)]`
54+
- Hover effect: `-translate-y-1` with shadow increase
55+
- Large border-radius: `rounded-2xl` (16px)
56+
57+
**Usage in index.astro:**
58+
Mission section now uses `<FeaturesCards>` with `section-bg-azure-glow` background.
59+
60+
---
61+
62+
### ✅ Phase 3: Stats Widget Enhancement
63+
64+
**File:** `src/components/widgets/Stats.astro`
65+
66+
Transformed from horizontal flex to card grid:
67+
- Individual stat cards with `rounded-[28px]` border-radius
68+
- Gradient numbers: `bg-gradient-to-r from-azure-500 to-aqua-500` with `bg-clip-text`
69+
- Icon badge: circular gradient background (`from-azure-500 to-aqua-500`)
70+
- Card hover effect with shadow elevation
71+
- Section background: `.section-bg-tri-color`
72+
73+
---
74+
75+
### ✅ Phase 4: Timeline Enhancement
76+
77+
**File:** `src/components/ui/Timeline.astro`
78+
79+
Enhanced the Steps widget connector:
80+
- Gradient vertical line with `.timeline-connector` class
81+
- Gradient connector: `linear-gradient(180deg, rgb(56 189 248), rgb(14 165 233))`
82+
- Marker styling: gradient background + white/dark border
83+
- Icons: gradient filled circles (`from-azure-500 to-aqua-500`)
84+
85+
---
86+
87+
### ✅ Phase 5: Content Section Differentiation
88+
89+
**File:** `src/pages/index.astro`
90+
91+
**Content #1 (Our Approach):**
92+
- Background: `.section-bg-gold-accent`
93+
- Decorative left border: `border-l-4 border-azure-500` on content slot
94+
95+
**Content #2:**
96+
- Not implemented - decided page flow was complete without it
97+
- `section-bg-aqua-flow` utility remains available for future use
98+
99+
---
100+
101+
### ✅ Phase 6: Tailwind Config Extensions
102+
103+
**File:** `tailwind.config.js`
104+
105+
Added design tokens:
106+
```javascript
107+
borderRadius: {
108+
'4xl': '28px',
109+
},
110+
boxShadow: {
111+
'elevated': '0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.06)',
112+
'elevated-lg': '0 30px 60px rgba(0, 0, 0, 0.12), 0 12px 24px rgba(0, 0, 0, 0.08)',
113+
},
114+
animation: {
115+
'pulse-slow': 'pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite',
116+
},
117+
```
118+
119+
---
120+
121+
## Current Section Background Mapping
122+
123+
| Section | Background Class | Status |
124+
|---------|-----------------|--------|
125+
| Hero | `hero-gradient` | ✅ Active |
126+
| Note | none | ✅ Active (clean break) |
127+
| Features/Mission | `section-bg-azure-glow` | ✅ Active |
128+
| Content #1 (Our Approach) | `section-bg-gold-accent` | ✅ Active |
129+
| Steps | `section-bg-azure-glow` | ✅ Active |
130+
| Features2/Programs | none | ✅ Active (cards provide interest) |
131+
| Stats | `section-bg-tri-color` | ✅ Active |
132+
| CallToAction | `cta-gradient` | ✅ Active |
133+
134+
---
135+
136+
## Additional Work Completed
137+
138+
### ✅ FAQ Migration to Dedicated Pages
139+
140+
**New Files:**
141+
- `src/pages/faq.astro` - English FAQ page
142+
- `src/pages/cn/faq.astro` - Chinese FAQ page
143+
144+
**Changes:**
145+
- Moved FAQs from homepage sections to dedicated pages for better UX
146+
- Added FAQ links to header navigation (under "About" dropdown)
147+
- Added FAQ links to footer (under "Company" section)
148+
- Removed FAQ widgets from `index.astro` and `cn/index.astro`
149+
- FAQ pages use Hero widget with `/images/hero-image.jpg`
150+
151+
---
152+
153+
## Modified Files Summary
154+
155+
| File | Changes |
156+
|------|---------|
157+
| `src/assets/styles/tailwind.css` | ✅ Added 4 section-bg-* utilities, timeline styles |
158+
| `tailwind.config.js` | ✅ Added borderRadius, boxShadow, animation tokens |
159+
| `src/components/widgets/FeaturesCards.astro` | ✅ NEW - Card-based features variant |
160+
| `src/components/widgets/Stats.astro` | ✅ Redesigned with gradient cards |
161+
| `src/components/ui/Timeline.astro` | ✅ Added gradient connector and markers |
162+
| `src/pages/index.astro` | ✅ Applied backgrounds, swapped Features, removed FAQs |
163+
| `src/pages/cn/index.astro` | ✅ Removed FAQs section |
164+
| `src/pages/faq.astro` | ✅ NEW - English FAQ page |
165+
| `src/pages/cn/faq.astro` | ✅ NEW - Chinese FAQ page |
166+
| `src/navigation.ts` | ✅ Added FAQ links to header and footer |
167+
168+
---
169+
170+
## Next Steps (Optional)
171+
172+
If needed, consider:
173+
1. Adding a second Content section with `section-bg-aqua-flow` background
174+
2. Creating additional language variations for FAQ pages
175+
3. Adding more FAQ items based on user inquiries
176+
4. Running `npm run check:eslint` and `npm run fix` for code quality

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,6 @@
6767
"typescript": "^5.8.3",
6868
"typescript-eslint": "^8.39.0",
6969
"unist-util-visit": "^5.0.0"
70-
}
70+
},
71+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
7172
}
4.46 KB
Loading

src/assets/favicons/favicon.ico

264 KB
Binary file not shown.

src/assets/favicons/favicon.svg

Lines changed: 33 additions & 9 deletions
Loading

src/assets/images/hero-image.jpg

515 KB
Loading

src/assets/images/hero-image.png

1.92 MB
Loading

src/components/Favicons.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ import appleTouchIcon from '~/assets/favicons/apple-touch-icon.png';
66

77
<link rel="shortcut icon" href={favIcon} />
88
<link rel="icon" type="image/svg+xml" href={favIconSvg.src} />
9-
<link rel="mask-icon" href={favIconSvg.src} color="#8D46E7" />
9+
<link rel="mask-icon" href={favIconSvg.src} color="#EFBF04" />
1010
<link rel="apple-touch-icon" sizes="180x180" href={appleTouchIcon.src} />

src/components/Logo.astro

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
---
2-
import { SITE } from 'astrowind:config';
2+
export interface Props {
3+
class?: string;
4+
}
5+
6+
const { class: className = '' } = Astro.props;
37
---
48

5-
<span
6-
class="self-center ml-2 rtl:ml-0 rtl:mr-2 text-2xl md:text-xl font-bold text-gray-900 whitespace-nowrap dark:text-white"
7-
>
8-
🚀 {SITE?.name}
9+
<span class:list={['flex items-center', className]}>
10+
<!-- Light mode logo -->
11+
<img
12+
src="/images/upstream/upstream-black-logo.svg"
13+
alt="Upstream Labs"
14+
class="h-8 w-auto dark:hidden"
15+
/>
16+
<!-- Dark mode logo -->
17+
<img
18+
src="/images/upstream/upstream-white-logo.svg"
19+
alt="Upstream Labs"
20+
class="h-8 w-auto hidden dark:block"
21+
/>
922
</span>
Lines changed: 38 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,56 @@
11
---
2-
import { Icon } from 'astro-icon/components';
3-
import { getLangFromUrl, getLocalizedPath, languages, stripLangFromPath } from '~/i18n';
2+
import { getLangFromUrl, stripLangFromPath, defaultLang } from '~/i18n';
43
54
export interface Props {
6-
showFlags?: boolean;
75
class?: string;
86
}
97
10-
const { showFlags = true, class: className = '' } = Astro.props;
8+
const { class: className = '' } = Astro.props;
119
1210
const currentLang = getLangFromUrl(Astro.url);
1311
const currentPath = stripLangFromPath(Astro.url.pathname);
1412
15-
// Generate language switch URLs
16-
const languageLinks = Object.entries(languages).map(([code, name]) => ({
17-
code,
18-
name,
19-
url: getLocalizedPath(currentPath, code),
20-
isCurrent: code === currentLang,
21-
}));
13+
// Determine switch target: if on English, go to Chinese; if on Chinese, go to English
14+
const isEnglish = currentLang === defaultLang;
15+
const switchLink = isEnglish ? `/cn${currentPath}` : currentPath;
16+
const switchText = isEnglish ? 'CN' : 'EN';
2217
---
2318

24-
<div class={`language-switcher ${className}`}>
25-
<div class="relative inline-block">
26-
<button
27-
type="button"
28-
class="flex items-center gap-2 px-3 py-2 text-sm font-medium text-default hover:text-link dark:hover:text-white rounded-lg hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"
29-
aria-label="Select language"
30-
id="language-switcher-button"
31-
>
32-
<Icon name="tabler:language" class="w-5 h-5" />
33-
<span>{languages[currentLang]}</span>
34-
<Icon name="tabler:chevron-down" class="w-4 h-4" />
35-
</button>
19+
<a
20+
href={switchLink}
21+
class:list={[
22+
'lang-switch',
23+
className,
24+
]}
25+
aria-label={isEnglish ? 'Switch to Chinese' : 'Switch to English'}
26+
>
27+
{switchText}
28+
</a>
3629

37-
<div
38-
class="language-dropdown hidden absolute right-0 mt-2 w-40 rounded-md shadow-lg bg-white dark:bg-gray-800 ring-1 ring-black ring-opacity-5 z-50"
39-
id="language-dropdown"
40-
>
41-
<div class="py-1" role="menu" aria-orientation="vertical">
42-
{
43-
languageLinks.map(({ code, name, url, isCurrent }) => (
44-
<a
45-
href={url}
46-
class={`block px-4 py-2 text-sm ${
47-
isCurrent
48-
? 'bg-gray-100 dark:bg-gray-700 text-link dark:text-white font-semibold'
49-
: 'text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700'
50-
}`}
51-
role="menuitem"
52-
>
53-
{showFlags && (
54-
<span class="mr-2">
55-
{code === 'en' ? '🇺🇸' : code === 'cn' ? '🇨🇳' : '🌐'}
56-
</span>
57-
)}
58-
{name}
59-
</a>
60-
))
61-
}
62-
</div>
63-
</div>
64-
</div>
65-
</div>
66-
67-
<script>
68-
// Toggle dropdown
69-
const button = document.getElementById('language-switcher-button');
70-
const dropdown = document.getElementById('language-dropdown');
71-
72-
button?.addEventListener('click', (e) => {
73-
e.stopPropagation();
74-
dropdown?.classList.toggle('hidden');
75-
});
30+
<style>
31+
.lang-switch {
32+
display: inline-flex;
33+
align-items: center;
34+
padding: 0.5rem 0.75rem;
35+
font-size: 0.875rem;
36+
font-weight: 600;
37+
color: var(--aw-color-text-default);
38+
text-decoration: none;
39+
border-radius: 0.5rem;
40+
transition: all 0.2s ease;
41+
}
7642

77-
// Close dropdown when clicking outside
78-
document.addEventListener('click', () => {
79-
dropdown?.classList.add('hidden');
80-
});
43+
.lang-switch:hover {
44+
color: var(--aw-color-primary);
45+
background-color: rgba(43, 116, 255, 0.08);
46+
}
8147

82-
// Prevent closing when clicking inside dropdown
83-
dropdown?.addEventListener('click', (e) => {
84-
e.stopPropagation();
85-
});
86-
</script>
48+
:global(.dark) .lang-switch {
49+
color: rgba(255, 255, 255, 0.9);
50+
}
8751

88-
<style>
89-
.language-dropdown {
90-
min-width: 10rem;
52+
:global(.dark) .lang-switch:hover {
53+
color: rgb(139, 210, 255);
54+
background-color: rgba(77, 142, 255, 0.15);
9155
}
9256
</style>

0 commit comments

Comments
 (0)