feat(website): redesign with hand-drawn aesthetic and update README logo

Overhaul the documentation site with a hand-drawn design system:
- Custom CSS with paper textures, wobbly borders, and sketchy shadows
- Hero section with dashed ring, sparkle decorations, and floating animation
- Card components with post-it accent colors and tape decorations
- Replace README logo with hero-style version (ring + sparkles + paper bg)
This commit is contained in:
Willie
2026-02-09 11:43:27 +08:00
parent ecabe20d0e
commit 380907b320
7 changed files with 1290 additions and 907 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 578 KiB

After

Width:  |  Height:  |  Size: 90 KiB

+96
View File
@@ -0,0 +1,96 @@
#!/bin/bash
# Capture Hero Logo
# Screenshots the website hero logo element and copies it to .github/assets/logo.png
#
# Usage:
# ./scripts/capture_hero.sh # auto-detect port or start dev server
# ./scripts/capture_hero.sh 3000 # use specific port
set -e
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
CYAN='\033[0;36m'
NC='\033[0m'
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
WEBSITE_DIR="$ROOT_DIR/website"
CAPTURE_SCRIPT="$WEBSITE_DIR/capture-hero.mjs"
OUTPUT="$WEBSITE_DIR/static/img/hero-logo.png"
TARGET="$ROOT_DIR/.github/assets/logo.png"
started_server=false
cleanup() {
if $started_server; then
echo -e "${YELLOW}Stopping dev server (pid $server_pid)...${NC}"
kill "$server_pid" 2>/dev/null || true
wait "$server_pid" 2>/dev/null || true
fi
}
trap cleanup EXIT
# Check if a port is serving the Docusaurus site (look for "skillshare" in response)
is_docusaurus() {
curl -s "http://localhost:$1" 2>/dev/null | grep -q "skillshare"
}
# --- 1. Detect or start dev server ---
if [ -n "$1" ]; then
PORT="$1"
echo -e "${CYAN}Using specified port: $PORT${NC}"
else
PORT=""
for p in 3002 3001 3000; do
if is_docusaurus "$p"; then
PORT=$p
echo -e "${CYAN}Detected Docusaurus on port $PORT${NC}"
break
fi
done
if [ -z "$PORT" ]; then
echo -e "${YELLOW}No Docusaurus dev server detected, starting one...${NC}"
cd "$WEBSITE_DIR"
npm start -- --port 3099 &>/dev/null &
server_pid=$!
started_server=true
PORT=3099
for i in $(seq 1 30); do
if is_docusaurus "$PORT"; then
break
fi
if [ "$i" -eq 30 ]; then
echo -e "${RED}Dev server failed to start within 30s${NC}"
exit 1
fi
sleep 1
done
echo -e "${GREEN}Dev server ready on port $PORT${NC}"
fi
fi
# --- 2. Ensure playwright is available ---
if ! node -e "require('playwright')" 2>/dev/null; then
echo -e "${YELLOW}Installing playwright...${NC}"
cd "$WEBSITE_DIR"
npm install --no-save playwright >/dev/null 2>&1
npx playwright install chromium >/dev/null 2>&1
echo -e "${GREEN}Playwright installed${NC}"
fi
# --- 3. Capture ---
echo -e "${CYAN}Capturing hero logo from localhost:$PORT ...${NC}"
cd "$WEBSITE_DIR"
PORT="$PORT" node "$CAPTURE_SCRIPT"
# --- 4. Copy to README logo ---
cp "$OUTPUT" "$TARGET"
echo -e "${GREEN}Copied to $TARGET${NC}"
# --- 5. Show result ---
size=$(wc -c < "$TARGET" | tr -d ' ')
echo -e "${GREEN}Done!${NC} $(( size / 1024 ))KB → .github/assets/logo.png"
+83
View File
@@ -0,0 +1,83 @@
import { chromium } from 'playwright';
import { fileURLToPath } from 'url';
import path from 'path';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const PORT = process.env.PORT || 3002;
async function main() {
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage({
viewport: { width: 1280, height: 900 },
deviceScaleFactor: 3,
});
await page.goto(`http://localhost:${PORT}`, { waitUntil: 'networkidle' });
await page.waitForTimeout(3000);
// Kill animations, force visibility — keep original backgrounds
await page.addStyleTag({
content: `
*, *::before, *::after {
animation: none !important;
transition: none !important;
}
`
});
await page.evaluate(() => {
const patterns = ['heroLogoSparkle', 'heroConnector', 'heroUnderline', 'heroTitle', 'heroSubtitle'];
document.querySelectorAll('*').forEach(el => {
const cls = el.className;
if (typeof cls === 'string') {
for (const p of patterns) {
if (cls.includes(p)) {
el.style.opacity = '1';
el.style.clipPath = 'none';
break;
}
}
}
});
});
const logoImg = page.locator('img[class*="heroLogo"]');
await logoImg.waitFor({ state: 'visible', timeout: 10000 });
const heroWrapper = logoImg.locator('..');
// Hide title/connector/underline so only logo + ring remain
await page.evaluate(() => {
const hidePatterns = ['heroConnector', 'heroTitle', 'heroUnderline', 'heroSubtitle'];
document.querySelectorAll('*').forEach(el => {
const cls = el.className;
if (typeof cls === 'string') {
for (const p of hidePatterns) {
if (cls.includes(p)) {
el.style.display = 'none';
break;
}
}
}
});
});
const wrapperBox = await heroWrapper.boundingBox();
// Ring: inset -18px. Shadow: translate(4px,4px) + inset -18px. Sparkles: ~14px outside.
const expand = 28;
const logoPath = path.join(__dirname, 'static', 'img', 'hero-logo.png');
await page.screenshot({
path: logoPath,
// Keep original paper-warm background (no omitBackground)
clip: {
x: Math.max(0, wrapperBox.x - expand),
y: Math.max(0, wrapperBox.y - expand),
width: wrapperBox.width + expand * 2,
height: wrapperBox.height + expand * 2,
},
});
console.log(`Saved: ${logoPath}`);
await browser.close();
}
main().catch(console.error);
+2 -2
View File
@@ -66,7 +66,7 @@ const config: Config = {
themeConfig: {
image: 'img/social-card.png',
colorMode: {
defaultMode: 'dark',
defaultMode: 'light',
respectPrefersColorScheme: false,
},
navbar: {
@@ -100,7 +100,7 @@ const config: Config = {
],
},
footer: {
style: 'dark',
style: 'light',
links: [
{
title: 'Documentation',
+523 -633
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+89 -9
View File
@@ -28,6 +28,32 @@ const INSTALL_COMMANDS: Record<InstallMethod, {command: string; label: string; i
},
};
// Slight random rotations for hand-drawn card feel
const CARD_ROTATIONS = [
'rotate(-0.8deg)',
'rotate(0.5deg)',
'rotate(-0.3deg)',
'rotate(0.7deg)',
'rotate(-0.5deg)',
'rotate(0.4deg)',
];
function WavyDivider({color = 'var(--color-muted-dark)'}: {color?: string}) {
return (
<div className={styles.wavyDivider} aria-hidden="true">
<svg viewBox="0 0 1200 40" preserveAspectRatio="none">
<path
d="M0,20 Q150,0 300,20 T600,20 T900,20 T1200,20"
fill="none"
stroke={color}
strokeWidth="2"
strokeDasharray="8,6"
/>
</svg>
</div>
);
}
function CopyButton({text}: {text: string}) {
const [copied, setCopied] = useState(false);
@@ -80,14 +106,59 @@ function HeroSection() {
return (
<header className={styles.hero}>
<div className="container">
<img
src="/img/logo.png"
alt="skillshare"
className={styles.heroLogo}
/>
<Heading as="h1" className={styles.heroTitle}>
One source of truth for AI CLI skills
</Heading>
{/* Logo + title group: acts as a cohesive visual unit */}
<div className={styles.heroGroup}>
<div className={styles.heroLogoWrapper}>
<div className={styles.heroLogoRing} aria-hidden="true" />
<div className={styles.heroLogoShadow} aria-hidden="true" />
<span className={styles.heroLogoSparkle} aria-hidden="true">*</span>
<span className={styles.heroLogoSparkle} aria-hidden="true">+</span>
<span className={styles.heroLogoSparkle} aria-hidden="true">*</span>
<img
src="/img/logo.png"
alt="skillshare"
className={styles.heroLogo}
/>
</div>
{/* Hand-drawn connector line between logo and title */}
<svg
className={styles.heroConnector}
viewBox="0 0 120 24"
aria-hidden="true"
>
<path
d="M60,2 C58,8 54,12 52,16 C50,20 56,20 60,22 C64,20 70,20 68,16 C66,12 62,8 60,2"
fill="none"
stroke="currentColor"
strokeWidth="1.5"
strokeDasharray="4,3"
strokeLinecap="round"
/>
</svg>
<Heading as="h1" className={styles.heroTitle}>
One source of truth for{' '}
<span className={styles.heroTitleAccent}>AI CLI skills</span>
</Heading>
{/* Hand-drawn underline beneath the title */}
<svg
className={styles.heroUnderline}
viewBox="0 0 400 12"
preserveAspectRatio="none"
aria-hidden="true"
>
<path
d="M8,8 C50,3 100,6 150,5 C200,4 250,7 300,5 C350,3 380,6 392,7"
fill="none"
stroke="currentColor"
strokeWidth="2.5"
strokeLinecap="round"
/>
</svg>
</div>
<p className={styles.heroSubtitle}>
Sync everywhere with one command. Claude Code, OpenCode, Cursor & 40+ more.
</p>
@@ -194,7 +265,11 @@ function WhySection() {
</p>
<div className={styles.whyGrid}>
{whyFeatures.map((item, idx) => (
<div key={idx} className={styles.whyCard}>
<div
key={idx}
className={styles.whyCard}
style={{transform: CARD_ROTATIONS[idx]}}
>
<div className={styles.whyIconWrapper}>
<item.Icon size={22} strokeWidth={1.5} />
</div>
@@ -215,6 +290,7 @@ function DemoSection() {
<section className={styles.demo}>
<div className="container">
<div className={styles.demoContainer}>
<div className={styles.tapeDecoration} aria-hidden="true" />
<img src="/img/demo.gif" alt="skillshare demo" />
</div>
</div>
@@ -287,10 +363,14 @@ export default function Home(): ReactNode {
description={siteConfig.tagline}
>
<HeroSection />
<WavyDivider />
<main>
<WhySection />
<WavyDivider />
<DemoSection />
<WavyDivider />
<UIHighlightsSection />
<WavyDivider />
<SupportedSection />
</main>
</Layout>