Skip to content

Commit 3609477

Browse files
committed
Organization landing page
0 parents  commit 3609477

File tree

1 file changed

+189
-0
lines changed

1 file changed

+189
-0
lines changed

index.html

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
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>Lux C++ - Open Source</title>
7+
<meta name="description" content="Open source projects from Lux C++">
8+
<link rel="preconnect" href="https://fonts.googleapis.com">
9+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
11+
<style>
12+
:root {
13+
--brand: #ef4444;
14+
--bg-primary: #0a0a0a;
15+
--bg-secondary: #141414;
16+
--bg-card: rgba(23, 23, 23, 0.5);
17+
--border: #262626;
18+
--text-primary: #fafafa;
19+
--text-secondary: #a3a3a3;
20+
--text-muted: #737373;
21+
}
22+
* { box-sizing: border-box; margin: 0; padding: 0; }
23+
body {
24+
font-family: 'Inter', -apple-system, sans-serif;
25+
background: var(--bg-primary);
26+
color: var(--text-primary);
27+
line-height: 1.6;
28+
min-height: 100vh;
29+
}
30+
.hero {
31+
position: relative;
32+
padding: 80px 24px 60px;
33+
text-align: center;
34+
overflow: hidden;
35+
}
36+
.hero::before {
37+
content: '';
38+
position: absolute;
39+
top: 0; left: 50%;
40+
transform: translateX(-50%);
41+
width: 800px; height: 600px;
42+
background: radial-gradient(ellipse at center, var(--brand) 0%, transparent 70%);
43+
opacity: 0.08;
44+
filter: blur(100px);
45+
pointer-events: none;
46+
}
47+
.hero-content { position: relative; max-width: 800px; margin: 0 auto; }
48+
.logo {
49+
width: 80px; height: 80px;
50+
margin: 0 auto 24px;
51+
background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 70%, white) 100%);
52+
border-radius: 20px;
53+
display: flex;
54+
align-items: center;
55+
justify-content: center;
56+
font-size: 36px;
57+
font-weight: 700;
58+
color: white;
59+
}
60+
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 700; margin-bottom: 16px; }
61+
h1 span { color: var(--text-secondary); }
62+
.subtitle { font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 32px; }
63+
.stats {
64+
display: flex;
65+
gap: 32px;
66+
justify-content: center;
67+
padding: 24px 0;
68+
border-top: 1px solid var(--border);
69+
border-bottom: 1px solid var(--border);
70+
margin: 32px 0;
71+
}
72+
.stat { text-align: center; }
73+
.stat-value { font-size: 2rem; font-weight: 700; }
74+
.stat-label { font-size: 14px; color: var(--text-muted); }
75+
main { max-width: 1200px; margin: 0 auto; padding: 0 24px 80px; }
76+
.section-title {
77+
font-size: 1.5rem;
78+
font-weight: 600;
79+
margin-bottom: 24px;
80+
display: flex;
81+
align-items: center;
82+
gap: 12px;
83+
}
84+
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
85+
.repos-grid {
86+
display: grid;
87+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
88+
gap: 12px;
89+
}
90+
.repo-card {
91+
display: block;
92+
padding: 16px;
93+
background: var(--bg-card);
94+
border: 1px solid var(--border);
95+
border-radius: 8px;
96+
text-decoration: none;
97+
color: inherit;
98+
transition: all 0.2s;
99+
}
100+
.repo-card:hover { border-color: var(--text-muted); }
101+
.repo-name { font-size: 15px; font-weight: 500; color: var(--brand); margin-bottom: 4px; }
102+
.repo-desc {
103+
font-size: 13px;
104+
color: var(--text-secondary);
105+
margin-bottom: 8px;
106+
display: -webkit-box;
107+
-webkit-line-clamp: 2;
108+
-webkit-box-orient: vertical;
109+
overflow: hidden;
110+
}
111+
.repo-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }
112+
.loading { text-align: center; padding: 48px; color: var(--text-muted); }
113+
.spinner {
114+
width: 32px; height: 32px;
115+
border: 3px solid var(--border);
116+
border-top-color: var(--brand);
117+
border-radius: 50%;
118+
animation: spin 1s linear infinite;
119+
margin: 0 auto 16px;
120+
}
121+
@keyframes spin { to { transform: rotate(360deg); } }
122+
footer {
123+
text-align: center;
124+
padding: 32px 24px;
125+
color: var(--text-muted);
126+
font-size: 14px;
127+
border-top: 1px solid var(--border);
128+
}
129+
footer a { color: var(--text-secondary); text-decoration: none; }
130+
footer a:hover { color: var(--brand); }
131+
</style>
132+
</head>
133+
<body>
134+
<header class="hero">
135+
<div class="hero-content">
136+
<div class="logo">L</div>
137+
<h1>Lux C++ <span>Open Source</span></h1>
138+
<p class="subtitle">C++ Libraries</p>
139+
<div class="stats">
140+
<div class="stat"><div class="stat-value" id="repo-count">--</div><div class="stat-label">Repositories</div></div>
141+
<div class="stat"><div class="stat-value" id="star-count">--</div><div class="stat-label">Stars</div></div>
142+
<div class="stat"><div class="stat-value" id="fork-count">--</div><div class="stat-label">Forks</div></div>
143+
</div>
144+
</div>
145+
</header>
146+
<main>
147+
<section>
148+
<h2 class="section-title">All Repositories</h2>
149+
<div class="repos-grid" id="repos-list">
150+
<div class="loading"><div class="spinner"></div><p>Loading repositories...</p></div>
151+
</div>
152+
</section>
153+
</main>
154+
<footer>
155+
<p><a href="https://github.com/luxcpp">GitHub</a></p>
156+
</footer>
157+
<script>
158+
const ORG = 'luxcpp';
159+
const API = `https://api.github.com/${ORG.includes('/') ? 'users' : 'orgs'}/${ORG}/repos?per_page=100&sort=updated`;
160+
async function fetchRepos() {
161+
try {
162+
const response = await fetch(API);
163+
const repos = await response.json();
164+
if (!Array.isArray(repos)) throw new Error('Invalid');
165+
const totalStars = repos.reduce((s, r) => s + (r.stargazers_count || 0), 0);
166+
const totalForks = repos.reduce((s, r) => s + (r.forks_count || 0), 0);
167+
document.getElementById('repo-count').textContent = repos.length;
168+
document.getElementById('star-count').textContent = totalStars > 1000 ? (totalStars/1000).toFixed(1)+'k' : totalStars;
169+
document.getElementById('fork-count').textContent = totalForks > 1000 ? (totalForks/1000).toFixed(1)+'k' : totalForks;
170+
const publicRepos = repos.filter(r => !r.fork && !r.archived).sort((a,b) => (b.stargazers_count||0) - (a.stargazers_count||0));
171+
document.getElementById('repos-list').innerHTML = publicRepos.map(repo => `
172+
<a href="${repo.html_url}" class="repo-card" target="_blank">
173+
<div class="repo-name">${repo.name}</div>
174+
<p class="repo-desc">${repo.description || 'No description'}</p>
175+
<div class="repo-meta">
176+
${repo.language ? `<span>${repo.language}</span>` : ''}
177+
<span>⭐ ${repo.stargazers_count || 0}</span>
178+
<span>🍴 ${repo.forks_count || 0}</span>
179+
</div>
180+
</a>
181+
`).join('');
182+
} catch (e) {
183+
document.getElementById('repos-list').innerHTML = '<p style="color:var(--text-muted);grid-column:1/-1;text-align:center;padding:24px;">Failed to load. <a href="https://github.com/luxcpp" style="color:var(--brand);">View on GitHub</a></p>';
184+
}
185+
}
186+
fetchRepos();
187+
</script>
188+
</body>
189+
</html>

0 commit comments

Comments
 (0)