Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy to GitHub Pages

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install Dependencies
working-directory: ./website
run: npm install

- name: Build
working-directory: ./website
run: npm run build

- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./website/dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Dependencies
node_modules

# Lock files
package-lock.json
yarn.lock
pnpm-lock.yaml

# Build output
dist/

# Environment
.env
.env.local
.env.production

# IDE
.vscode/
.idea/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db

# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Cache
.cache/
.astro/
43 changes: 43 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# One Person Company Website

一人公司资源官网,基于视觉稿构建。

## 技术栈

- **框架**: Astro 4.x
- **样式**: Tailwind CSS 3.x
- **字体**: Playfair Display (标题) + DM Sans (正文)
- **图标**: Lucide Icons
- **部署**: GitHub Pages

## 快速开始

```bash
# 安装依赖
npm install

# 开发模式
npm run dev

# 构建生产版本
npm run build
```

## 域名

- **访问地址**: https://opc.weavefox.ai

## 设计原则

### 色彩
- **主色**: #a6311f (赤陶红) - 温暖有活力
- **背景**: #fff8f6 (暖白色) - 柔和舒适

### 字体
- **标题**: Playfair Display - 优雅衬线体
- **正文**: DM Sans - 现代无衬线

### 布局
- **内容最大宽度**: 1280px
- **大圆角**: 12px-40px,友好柔和
- **适当留白**: Section 间距 80px
12 changes: 12 additions & 0 deletions website/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from 'astro/config';
import tailwind from '@astrojs/tailwind';

export default defineConfig({
site: 'https://opc.weavefox.ai',
base: '/',
integrations: [tailwind()],
output: 'static',
build: {
format: 'file'
}
});
16 changes: 16 additions & 0 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "awesome-opc-site",
"type": "module",
"version": "1.0.0",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview"
},
"dependencies": {
"astro": "^4.16.0",
"@astrojs/tailwind": "^5.1.0",
"tailwindcss": "^3.4.0"
}
}
1 change: 1 addition & 0 deletions website/public/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# No Jekyll - Astro builds static files
1 change: 1 addition & 0 deletions website/public/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
opc.weavefox.ai
5 changes: 5 additions & 0 deletions website/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions website/public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions website/public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://opc.weavefox.ai/</loc>
<lastmod>2026-06-18</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://opc.weavefox.ai/policies.html</loc>
<lastmod>2026-06-18</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://opc.weavefox.ai/inspiration.html</loc>
<lastmod>2026-06-18</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://opc.weavefox.ai/tools.html</loc>
<lastmod>2026-06-18</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
41 changes: 41 additions & 0 deletions website/src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
const currentYear = new Date().getFullYear();
---

<footer class="bg-white border-t border-outline-variant py-20">
<div class="flex flex-col md:flex-row justify-between items-start w-full px-4 md:px-margin-desktop max-w-max-width mx-auto gap-12">
<div class="flex flex-col max-w-xs">
<div class="text-headline-md font-bold tracking-tighter text-primary mb-4">Awesome OPC</div>
<p class="text-body-md text-on-surface-variant mb-8">助力每一位有梦想的个人创业者,在数字时代构建属于自己的无限可能。</p>
<div class="flex space-x-4">
<a href="https://github.com/weavefox/awesome-opc" target="_blank" class="w-10 h-10 rounded-full border border-outline-variant flex items-center justify-center hover:bg-primary hover:text-on-primary transition-all">
<i data-lucide="github" class="text-[20px]"></i>
</a>
<a href="https://www.weavefox.cn/" target="_blank" class="w-10 h-10 rounded-full border border-outline-variant flex items-center justify-center hover:bg-primary hover:text-on-primary transition-all overflow-hidden">
<img src="https://mdn.alipayobjects.com/huamei_4qpv3u/afts/img/un80TpyIyHUAAAAAQGAAAAgAeocTAQFr/fmt.avif" alt="WeaveFox" class="w-6 h-6 object-contain" />
</a>
</div>
</div>
<div class="grid grid-cols-2 gap-12 lg:gap-24">
<div>
<h5 class="font-bold text-on-surface mb-6">社区</h5>
<ul class="space-y-4 text-label-md text-on-surface-variant">
<li><a href="https://www.weavefox.cn/" target="_blank" class="hover:text-primary transition-colors">Build in Public</a></li>
<li><a href="https://github.com/weavefox/awesome-opc" target="_blank" class="hover:text-primary transition-colors">贡献指南</a></li>
<li><a href="#" class="hover:text-primary transition-colors">路线图</a></li>
</ul>
</div>
<div>
<h5 class="font-bold text-on-surface mb-6">资源</h5>
<ul class="space-y-4 text-label-md text-on-surface-variant">
<li><a href="https://github.com/weavefox/awesome-opc" target="_blank" class="hover:text-primary transition-colors">GitHub</a></li>
<li><a href="https://www.weavefox.cn/" target="_blank" class="hover:text-primary transition-colors">WeaveFox</a></li>
<li><a href="#" class="hover:text-primary transition-colors">Discord</a></li>
</ul>
</div>
</div>
</div>
<div class="max-w-max-width mx-auto px-4 md:px-margin-desktop mt-20 pt-8 border-t border-outline-variant text-center">
<p class="text-label-sm font-medium text-on-surface-variant">&copy; {currentYear} Awesome OPC. Built with passion for creators everywhere.</p>
</div>
</footer>
123 changes: 123 additions & 0 deletions website/src/components/Navbar.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
interface Props {
currentPage?: 'home' | 'policies' | 'inspiration' | 'tools';
}

const { currentPage = 'home' } = Astro.props;

const navLinks = [
{ href: '/', label: '首页', key: 'home' },
{ href: '/policies.html', label: '政策', key: 'policies' },
{ href: '/inspiration.html', label: '灵感', key: 'inspiration' },
{ href: '/tools.html', label: '工具库', key: 'tools' }
];
---

<nav class="bg-white border-b border-outline-variant sticky top-0 z-50" id="navbar">
<div class="flex justify-between items-center w-full px-4 md:px-margin-desktop max-w-max-width mx-auto h-16">
<a href="/" class="flex items-center gap-3">
<img src="/logo.svg" alt="One Person Company" class="w-9 h-9" />
<span class="text-primary text-[20px] tracking-wide" style="font: var(--font-display); font-weight: 600;">One Person Company</span>
</a>

<!-- Desktop Navigation -->
<div class="hidden md:flex items-center space-x-10">
{navLinks.map(link => (
<a
class:list={[
'font-label-md text-label-md transition-all duration-200',
currentPage === link.key
? 'text-primary font-bold relative after:absolute after:bottom-[-4px] after:left-0 after:w-full after:h-0.5 after:bg-primary'
: 'text-on-surface-variant hover:text-primary'
]}
href={link.href}
>
{link.label}
</a>
))}
</div>

<div class="flex items-center space-x-4">
<div class="hidden lg:block relative">
<i data-lucide="search" class="absolute left-3 top-1/2 -translate-y-1/2 text-on-surface-variant text-[18px]"></i>
<input
class="pl-10 pr-4 py-2 bg-surface-container-low border-none rounded-full text-label-md focus:ring-2 focus:ring-primary/20 w-64 transition-all focus:bg-white"
placeholder="搜索资源..."
type="text"
/>
</div>

<a href="https://github.com/weavefox/awesome-opc" target="_blank" class="bg-primary text-on-primary px-5 py-2 rounded-full font-label-md text-label-md hover:shadow-layered transition-all active:scale-95">
Contribute
</a>

<!-- Mobile Menu Button -->
<button id="mobile-menu-btn" class="md:hidden p-2 text-on-surface-variant hover:text-primary transition-colors" aria-label="Toggle menu">
<i data-lucide="menu" class="text-[24px]"></i>
</button>
</div>
</div>

<!-- Mobile Menu -->
<div id="mobile-menu" class="hidden md:hidden bg-surface-container-lowest border-t border-outline-variant">
<div class="px-4 py-4 space-y-3">
{navLinks.map(link => (
<a
class:list={[
'block py-3 px-4 rounded-lg font-medium transition-all duration-200',
currentPage === link.key
? 'bg-primary/10 text-primary font-bold'
: 'text-on-surface-variant hover:bg-surface-container hover:text-primary'
]}
href={link.href}
>
{link.label}
</a>
))}
<a href="https://github.com/weavefox/awesome-opc" target="_blank" class="block text-center bg-primary text-on-primary px-6 py-3 rounded-full font-bold mt-4">
Contribute
</a>
</div>
</div>
</nav>

<style>
.sticky {
position: sticky;
}
</style>

<script>
// Mobile menu toggle
const menuBtn = document.getElementById('mobile-menu-btn');
const menu = document.getElementById('mobile-menu');

menuBtn?.addEventListener('click', () => {
menu?.classList.toggle('hidden');
const icon = menuBtn.querySelector('span');
if (icon) {
icon.textContent = menu?.classList.contains('hidden') ? 'menu' : 'close';
}
});

// Close menu when clicking a link
menu?.querySelectorAll('a').forEach(link => {
link.addEventListener('click', () => {
menu.classList.add('hidden');
const icon = menuBtn?.querySelector('span');
if (icon) icon.textContent = 'menu';
});
});

// Scroll effect
window.addEventListener('scroll', () => {
const nav = document.querySelector('nav');
if (window.scrollY > 20) {
nav?.classList.add('shadow-layered', 'bg-white/95');
nav?.classList.remove('bg-surface-container-lowest/80');
} else {
nav?.classList.remove('shadow-layered', 'bg-white/95');
nav?.classList.add('bg-surface-container-lowest/80');
}
});
</script>
1 change: 1 addition & 0 deletions website/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference path="../.astro/types.d.ts" />
Loading
Loading