-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
94 lines (81 loc) · 2.07 KB
/
Copy pathindex.html
File metadata and controls
94 lines (81 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>FastSubAlpha Projects</title>
<style>
body {
font-family: system-ui, sans-serif;
background: #0b0d10;
color: #e5e9f0;
padding: 2rem;
max-width: 900px;
margin: auto;
}
h1 {
margin-bottom: 1rem;
font-size: 1.8rem;
color: #3fa9f5;
}
#projects {
margin-top: 1.5rem;
}
.project {
background: #11141c;
padding: 1rem;
border-radius: 8px;
margin-bottom: 0.7rem;
border: 1px solid #262c3a;
}
.project a {
color: #3fa9f5;
font-size: 1.2rem;
text-decoration: none;
}
.project a:hover {
text-decoration: underline;
}
.desc {
color: #9da5b4;
font-size: 0.9rem;
margin-top: 0.3rem;
}
</style>
</head>
<body>
<h1>FastSubAlpha Projects</h1>
<p>Automatically listing all public GitHub repositories.</p>
<div id="projects">Loading projects...</div>
<script>
async function loadRepos() {
const container = document.getElementById("projects");
try {
const response = await fetch("https://api.github.com/users/fastsubalpha/repos");
const repos = await response.json();
container.innerHTML = "";
repos.forEach(repo => {
// Skip forks if you want
if (repo.fork) return;
const div = document.createElement("div");
div.className = "project";
const link = document.createElement("a");
link.href = repo.homepage && repo.homepage !== ""
? repo.homepage
: `https://fastsubalpha.github.io/${repo.name}/`;
link.textContent = repo.name;
const desc = document.createElement("div");
desc.className = "desc";
desc.textContent = repo.description || "No description provided.";
div.appendChild(link);
div.appendChild(desc);
container.appendChild(div);
});
} catch (err) {
container.innerHTML = "Failed to load repositories.";
console.error(err);
}
}
loadRepos();
</script>
</body>
</html>