Skip to content

Commit 0e6a850

Browse files
committed
Add landing page and update deployment workflow
1 parent 42af6b1 commit 0e6a850

File tree

2 files changed

+229
-7
lines changed

2 files changed

+229
-7
lines changed

.github/workflows/deploy-cookbook.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on:
44
branches:
55
- main
66
paths:
7-
- 'docs/cookbook/**'
7+
- 'docs/**'
88
- '.github/workflows/deploy-cookbook.yml'
99

1010
jobs:
1111
deploy:
1212
runs-on: ubuntu-latest
1313
permissions:
14-
contents: write # To push to gh-pages branch
14+
contents: write
1515
concurrency:
1616
group: ${{ github.workflow }}-${{ github.ref }}
1717
steps:
@@ -25,11 +25,20 @@ jobs:
2525
- name: Build Cookbook
2626
run: mdbook build docs/cookbook
2727

28+
- name: Prepare Deployment
29+
run: |
30+
mkdir deploy_root
31+
# Copy landing page to root
32+
cp -r docs/landing/* deploy_root/
33+
# Copy cookbook to subdirectory
34+
mkdir deploy_root/cookbook
35+
cp -r docs/cookbook/book/* deploy_root/cookbook/
36+
2837
- name: Deploy to GitHub Pages
2938
uses: peaceiris/actions-gh-pages@v3
3039
with:
31-
github_token: ${{ secrets.GH_PAGES_TOKEN }}
32-
publish_dir: ./docs/cookbook/book
33-
destination_dir: cookbook
34-
keep_files: true # Keep existing files in gh-pages if any (useful if main site is also there)
35-
commit_message: "Deploy cookbook: ${{ github.event.head_commit.message }}"
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
publish_dir: ./deploy_root
42+
destination_dir: ./
43+
keep_files: false # We want to overwrite the root to ensure clean state
44+
commit_message: "Deploy site + cookbook: ${{ github.event.head_commit.message }}"

docs/landing/index.html

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>RustAPI - High Performance Web Framework</title>
7+
<link rel="preconnect" href="https://fonts.googleapis.com">
8+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=JetBrains+Mono:wght@400;600&display=swap" rel="stylesheet">
10+
<style>
11+
:root {
12+
--bg-color: #0f172a;
13+
--text-color: #e2e8f0;
14+
--accent-primary: #06b6d4; /* Cyan */
15+
--accent-secondary: #8b5cf6; /* Violet */
16+
--glass-bg: rgba(30, 41, 59, 0.7);
17+
--border-color: rgba(148, 163, 184, 0.1);
18+
}
19+
20+
* {
21+
margin: 0;
22+
padding: 0;
23+
box-sizing: border-box;
24+
}
25+
26+
body {
27+
font-family: 'Inter', sans-serif;
28+
background-color: var(--bg-color);
29+
color: var(--text-color);
30+
line-height: 1.6;
31+
overflow-x: hidden;
32+
}
33+
34+
.container {
35+
max-width: 1200px;
36+
margin: 0 auto;
37+
padding: 0 2rem;
38+
}
39+
40+
/* Hero Section */
41+
.hero {
42+
min-height: 100vh;
43+
display: flex;
44+
flex-direction: column;
45+
justify-content: center;
46+
align-items: center;
47+
text-align: center;
48+
position: relative;
49+
}
50+
51+
.hero::before {
52+
content: '';
53+
position: absolute;
54+
top: 50%;
55+
left: 50%;
56+
transform: translate(-50%, -50%);
57+
width: 800px;
58+
height: 800px;
59+
background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
60+
pointer-events: none;
61+
z-index: -1;
62+
}
63+
64+
h1 {
65+
font-size: 4rem;
66+
font-weight: 800;
67+
margin-bottom: 1.5rem;
68+
background: linear-gradient(135deg, #e2e8f0 0%, #94a3b8 100%);
69+
-webkit-background-clip: text;
70+
-webkit-text-fill-color: transparent;
71+
letter-spacing: -0.02em;
72+
}
73+
74+
.gradient-text {
75+
background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
76+
-webkit-background-clip: text;
77+
-webkit-text-fill-color: transparent;
78+
}
79+
80+
.tagline {
81+
font-size: 1.25rem;
82+
color: #94a3b8;
83+
max-width: 600px;
84+
margin-bottom: 3rem;
85+
}
86+
87+
.cta-group {
88+
display: flex;
89+
gap: 1rem;
90+
}
91+
92+
.btn {
93+
padding: 1rem 2rem;
94+
border-radius: 99px;
95+
font-weight: 600;
96+
text-decoration: none;
97+
transition: all 0.2s ease;
98+
font-size: 1rem;
99+
}
100+
101+
.btn-primary {
102+
background: linear-gradient(135deg, var(--accent-primary) 0%, #0891b2 100%);
103+
color: #fff;
104+
box-shadow: 0 4px 20px -5px rgba(6, 182, 212, 0.4);
105+
}
106+
107+
.btn-primary:hover {
108+
transform: translateY(-2px);
109+
box-shadow: 0 8px 30px -5px rgba(6, 182, 212, 0.5);
110+
}
111+
112+
.btn-secondary {
113+
background: var(--glass-bg);
114+
color: var(--text-color);
115+
border: 1px solid var(--border-color);
116+
backdrop-filter: blur(10px);
117+
}
118+
119+
.btn-secondary:hover {
120+
background: rgba(30, 41, 59, 0.9);
121+
border-color: rgba(148, 163, 184, 0.3);
122+
transform: translateY(-2px);
123+
}
124+
125+
/* Features Grid */
126+
.features {
127+
display: grid;
128+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
129+
gap: 2rem;
130+
margin-top: 4rem;
131+
width: 100%;
132+
}
133+
134+
.feature-card {
135+
background: var(--glass-bg);
136+
border: 1px solid var(--border-color);
137+
padding: 2rem;
138+
border-radius: 1rem;
139+
text-align: left;
140+
transition: all 0.3s ease;
141+
}
142+
143+
.feature-card:hover {
144+
border-color: var(--accent-primary);
145+
transform: translateY(-5px);
146+
}
147+
148+
.feature-icon {
149+
font-family: 'JetBrains Mono', monospace;
150+
color: var(--accent-primary);
151+
font-size: 1.5rem;
152+
margin-bottom: 1rem;
153+
display: block;
154+
}
155+
156+
.feature-title {
157+
font-size: 1.25rem;
158+
font-weight: 600;
159+
margin-bottom: 0.5rem;
160+
color: #f1f5f9;
161+
}
162+
163+
.feature-desc {
164+
color: #94a3b8;
165+
font-size: 0.95rem;
166+
}
167+
168+
code {
169+
font-family: 'JetBrains Mono', monospace;
170+
background: rgba(15, 23, 42, 0.5);
171+
padding: 0.2em 0.4em;
172+
border-radius: 4px;
173+
font-size: 0.9em;
174+
color: var(--accent-primary);
175+
}
176+
</style>
177+
</head>
178+
<body>
179+
<div class="hero container">
180+
<h1>
181+
Build Faster,<br>
182+
<span class="gradient-text">Deploy Smarter.</span>
183+
</h1>
184+
<p class="tagline">
185+
RustAPI is a modern, opinionated framework for building scalable web services.
186+
Zero-cost abstractions, type-safe actions, and comprehensive tooling built-in.
187+
</p>
188+
189+
<div class="cta-group">
190+
<a href="cookbook/" class="btn btn-primary">Read the Cookbook</a>
191+
<a href="https://github.com/Tuntii/RustAPI" class="btn btn-secondary">View on GitHub</a>
192+
</div>
193+
194+
<div class="features">
195+
<div class="feature-card">
196+
<span class="feature-icon">Type::Safe</span>
197+
<h3 class="feature-title">Action Pattern</h3>
198+
<p class="feature-desc">Business logic is isolated into testable, atomic <code>Action</code> structs. Say goodbye to monolithic controllers.</p>
199+
</div>
200+
<div class="feature-card">
201+
<span class="feature-icon">Fn::Fast</span>
202+
<h3 class="feature-title">High Performance</h3>
203+
<p class="feature-desc">Built on Tokio and Hyper. Optimized for zero-allocation hotspots. Benchmarks included.</p>
204+
</div>
205+
<div class="feature-card">
206+
<span class="feature-icon">Mod::Robust</span>
207+
<h3 class="feature-title">Production Ready</h3>
208+
<p class="feature-desc">Includes built-in support for OpenTelemetry, Validation, and Clean Architecture principles.</p>
209+
</div>
210+
</div>
211+
</div>
212+
</body>
213+
</html>

0 commit comments

Comments
 (0)