Skip to content

Commit 09f5d2a

Browse files
committed
update home
1 parent d8a6e29 commit 09f5d2a

File tree

10 files changed

+517
-243
lines changed

10 files changed

+517
-243
lines changed

assets/index-B3CVUd8b.js

Lines changed: 0 additions & 220 deletions
This file was deleted.

assets/index-C6ZJQ5UD.js

Lines changed: 212 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index-CAEEiGnh.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

assets/index-WJMByNKR.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@
9999
gtag("js", new Date());
100100
gtag("config", "G-1B67VYZMXF");
101101
</script>
102-
<script type="module" crossorigin src="/assets/index-B3CVUd8b.js"></script>
103-
<link rel="stylesheet" crossorigin href="/assets/index-CAEEiGnh.css">
102+
<script type="module" crossorigin src="/assets/index-C6ZJQ5UD.js"></script>
103+
<link rel="stylesheet" crossorigin href="/assets/index-WJMByNKR.css">
104104
<link rel="manifest" href="/manifest.webmanifest"></head>
105105

106106
<body>

sw.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
<script setup>
2+
defineProps({
3+
title: { type: String, default: "" },
4+
subtitle: { type: String, default: "" },
5+
items: { type: Array, default: () => [] },
6+
});
7+
8+
function getHref(item) {
9+
return item?.href || item?.to || "";
10+
}
11+
12+
function hasPreview(item) {
13+
return Boolean(item?.preview?.code || item?.preview?.lines?.length);
14+
}
15+
16+
function previewLines(item) {
17+
if (Array.isArray(item?.preview?.lines)) return item.preview.lines;
18+
const code = item?.preview?.code;
19+
if (typeof code === "string" && code.trim()) return code.split("\n");
20+
return [];
21+
}
22+
23+
function previewText(item) {
24+
const lines = previewLines(item);
25+
return (Array.isArray(lines) ? lines.join("\n") : "").replaceAll("\r", "");
26+
}
27+
28+
</script>
29+
30+
<template>
31+
<section class="batteries">
32+
<div class="container">
33+
<header class="head">
34+
<h2 class="title">{{ title }}</h2>
35+
<p v-if="subtitle" class="subtitle">{{ subtitle }}</p>
36+
</header>
37+
38+
<div class="grid">
39+
<article
40+
v-for="(item, idx) in (Array.isArray(items) ? items : [])"
41+
:key="item.title || idx"
42+
class="card"
43+
>
44+
<div class="card-top">
45+
<h3 class="card-title">{{ item.title }}</h3>
46+
<p v-if="item.text" class="card-text">{{ item.text }}</p>
47+
48+
<a
49+
v-if="getHref(item)"
50+
class="learn"
51+
:href="getHref(item)"
52+
:target="item.external ? '_blank' : null"
53+
:rel="item.external ? 'noreferrer' : null"
54+
>
55+
Learn more <span class="arrow"></span>
56+
</a>
57+
</div>
58+
59+
<div v-if="hasPreview(item)" class="preview">
60+
<div class="preview-head">
61+
<span class="dot dot-red"></span>
62+
<span class="dot dot-yellow"></span>
63+
<span class="dot dot-green"></span>
64+
65+
<span v-if="item.preview?.title" class="preview-title">
66+
{{ item.preview.title }}
67+
</span>
68+
</div>
69+
70+
<div class="preview-body">
71+
<pre class="preview-pre"><code class="preview-code">{{ previewText(item) }}</code></pre>
72+
</div>
73+
</div>
74+
</article>
75+
</div>
76+
</div>
77+
</section>
78+
</template>
79+
80+
<style scoped>
81+
/* Dark section like your site */
82+
.batteries{
83+
padding: 3.6rem 0;
84+
}
85+
86+
/* Important: do NOT redefine global .container behavior, just mimic it safely */
87+
.container{
88+
width: min(1120px, calc(100% - 48px));
89+
margin: 0 auto;
90+
}
91+
92+
.head{
93+
text-align: center;
94+
margin-bottom: 2.3rem;
95+
}
96+
97+
.title{
98+
margin: 0;
99+
font-size: 2.45rem;
100+
line-height: 1.08;
101+
letter-spacing: -0.03em;
102+
font-weight: 850;
103+
color: rgba(255,255,255,.96);
104+
}
105+
106+
.subtitle{
107+
margin: 0.95rem auto 0;
108+
max-width: 76ch;
109+
font-size: 1.05rem;
110+
line-height: 1.75;
111+
opacity: 0.82;
112+
color: rgba(226,232,240,.86);
113+
}
114+
115+
.grid{
116+
display: grid;
117+
grid-template-columns: repeat(2, minmax(0, 1fr));
118+
gap: 1.6rem;
119+
}
120+
121+
@media (max-width: 980px){
122+
.grid{
123+
grid-template-columns: 1fr;
124+
}
125+
}
126+
127+
/* Card = same language as hero code card */
128+
.card{
129+
border-radius: 16px;
130+
border: 1px solid rgba(148,163,184,.16);
131+
background: linear-gradient(180deg, rgba(2,6,23,.55), rgba(2,6,23,.38));
132+
box-shadow: 0 18px 46px rgba(0,0,0,.35);
133+
padding: 1.2rem 1.2rem 1.1rem;
134+
135+
display: flex;
136+
flex-direction: column;
137+
gap: 1rem;
138+
min-height: 290px;
139+
}
140+
141+
.card-title{
142+
margin: 0;
143+
font-size: 1.08rem;
144+
letter-spacing: -0.01em;
145+
font-weight: 850;
146+
color: rgba(255,255,255,.95);
147+
}
148+
149+
.card-text{
150+
margin: 0.55rem 0 0;
151+
line-height: 1.65;
152+
color: rgba(226,232,240,.82);
153+
}
154+
155+
.learn{
156+
display: inline-flex;
157+
align-items: center;
158+
gap: 0.25rem;
159+
margin-top: 0.75rem;
160+
font-weight: 750;
161+
text-decoration: none;
162+
color: rgba(34,197,154,.92);
163+
}
164+
.learn:hover{
165+
color: rgba(34,197,154,1);
166+
text-decoration: underline;
167+
}
168+
169+
.arrow{
170+
font-size: 1.05em;
171+
transform: translateY(-0.02em);
172+
}
173+
174+
/* Preview terminal */
175+
.preview{
176+
border-radius: 14px;
177+
border: 1px solid rgba(148,163,184,.14);
178+
background: rgba(2,6,23,.72);
179+
overflow: hidden;
180+
}
181+
182+
.preview-head{
183+
display: flex;
184+
align-items: center;
185+
gap: 0.45rem;
186+
padding: 10px 12px;
187+
background: linear-gradient(to bottom, rgba(2,6,23,.92), rgba(2,6,23,.72));
188+
border-bottom: 1px solid rgba(148,163,184,.14);
189+
}
190+
191+
.dot{
192+
width: 10px;
193+
height: 10px;
194+
border-radius: 999px;
195+
opacity: 0.95;
196+
}
197+
.dot-red{ background:#fb923c; }
198+
.dot-yellow{ background:#facc15; }
199+
.dot-green{ background:#22c55e; }
200+
201+
.preview-title{
202+
margin-left: 0.35rem;
203+
font-size: 0.84rem;
204+
color: rgba(226,232,240,.8);
205+
white-space: nowrap;
206+
overflow: hidden;
207+
text-overflow: ellipsis;
208+
}
209+
210+
.preview-body{
211+
padding: 12px 12px;
212+
}
213+
214+
.preview-pre{
215+
margin: 0;
216+
white-space: pre;
217+
overflow: auto;
218+
max-width: 100%;
219+
}
220+
221+
.preview-code{
222+
font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
223+
font-size: 0.86rem;
224+
line-height: 1.65;
225+
color: rgba(226,232,240,.9);
226+
}
227+
228+
/* Mobile */
229+
@media (max-width: 980px){
230+
.grid{
231+
grid-template-columns: 1fr;
232+
}
233+
234+
.title{
235+
font-size: 2.05rem;
236+
}
237+
238+
.card{
239+
min-height: 0;
240+
}
241+
}
242+
</style>
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
22
"repo": "vixcpp/vix",
3-
"fetched_at": "2026-02-08T09:26:34.572Z",
4-
"stars": 0,
5-
"forks": 0,
6-
"open_issues": 0,
7-
"watchers": 0,
8-
"fallback": true
3+
"fetched_at": "2026-02-08T17:48:27.482Z",
4+
"stars": 266,
5+
"forks": 22,
6+
"open_issues": 182,
7+
"watchers": 4
98
}

vix-site/src/data/home.js

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ i Hint: Ctrl+C to stop`,
105105
},
106106

107107
signals: {
108-
title: "Project signals",
109-
subtitle: "Live GitHub stats with safe fallback.",
108+
title: "Open-source project signals",
109+
subtitle:
110+
"Vix.cpp is an open-source project developed in the open.\n" +
111+
"These signals reflect real community activity and ongoing maintenance.",
110112
items: [
111113
{
112114
title: "Stars",
@@ -130,14 +132,54 @@ i Hint: Ctrl+C to stop`,
130132
},
131133

132134
batteries: {
133-
title: "What ships with Vix",
135+
title: "Batteries included",
136+
subtitle:
137+
"Vix ships a complete CLI workflow to create, build, develop, package, and verify C++ backend projects.",
134138
items: [
135-
{ title: "Native runtime", text: "Compiled C++ binaries. No VM. No GC." },
136139
{
137-
title: "HTTP + WebSocket",
138-
text: "One execution model for APIs and realtime.",
140+
title: "Project workflow",
141+
text: "Create projects and iterate fast with dev mode and one-command runs.",
142+
href: "/docs/cli",
143+
preview: {
144+
title: "project",
145+
lines: [
146+
"$ vix new api",
147+
"$ cd api && vix dev",
148+
"$ vix run server.cpp",
149+
],
150+
},
151+
},
152+
{
153+
title: "Packaging & verification",
154+
text: "Package builds and verify artifacts with a security-focused workflow.",
155+
href: "/docs/packaging",
156+
preview: {
157+
title: "pack + verify",
158+
lines: ["$ vix pack --version 1.0.0", "$ vix verify"],
159+
},
160+
},
161+
{
162+
title: "Modules system",
163+
text: "Opt-in modules to keep projects minimal and explicit.",
164+
href: "/docs/modules",
165+
preview: {
166+
title: "modules",
167+
lines: ["$ vix modules init", "$ vix modules add websocket"],
168+
},
169+
},
170+
{
171+
title: "Offline registry",
172+
text: "Sync once, search locally, and pin dependencies via vix.lock.",
173+
href: "/docs/registry",
174+
preview: {
175+
title: "registry",
176+
lines: [
177+
"$ vix registry sync",
178+
"$ vix search websocket",
179+
"$ vix deps",
180+
],
181+
},
139182
},
140-
{ title: "CLI workflow", text: "build, run, dev, pack, verify." },
141183
],
142184
},
143185

vix-site/src/pages/Home.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import Section from "@/components/Section.vue";
77
import CardGrid from "@/components/CardGrid.vue";
88
import CodeBlock from "@/components/CodeBlock.vue";
99
import SignalsGrid from "@/components/SignalsGrid.vue";
10+
import BatteriesIncluded from "@/components/BatteriesIncluded.vue";
1011
1112
import { getInitialGithubStats, refreshGithubStats } from "@/lib/githubStats";
1213
@@ -58,14 +59,12 @@ onMounted(async () => {
5859
</div>
5960
</section>
6061
61-
<Section
62+
<BatteriesIncluded
6263
v-if="HOME?.batteries"
6364
:title="HOME.batteries.title"
6465
:subtitle="HOME.batteries.subtitle"
65-
alt
66-
>
67-
<CardGrid :items="HOME.batteries.items || []" />
68-
</Section>
66+
:items="HOME.batteries.items || []"
67+
/>
6968
7069
<Section
7170
v-if="HOME?.getStarted"
@@ -130,7 +129,7 @@ onMounted(async () => {
130129
display: grid;
131130
grid-template-columns: minmax(320px, 560px) minmax(260px, 420px);
132131
gap: 3rem;
133-
align-items: start;
132+
align-items: center;
134133
}
135134
136135
.signals-left {

0 commit comments

Comments
 (0)