-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
68 lines (60 loc) · 2.7 KB
/
Copy pathindex.html
File metadata and controls
68 lines (60 loc) · 2.7 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Star Resonance GitHub Projects</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<script defer>
async function loadProjects() {
const username = "asgharkapk";
const projectContainer = document.getElementById("projects");
projectContainer.innerHTML = "<p class='text-gray-400'>Loading projects...</p>";
try {
const response = await fetch(`https://api.github.com/users/${username}/repos?per_page=100`);
const repos = await response.json();
// Filter only Star Resonance–related repos
const filtered = repos.filter(r =>
/^(star-resonance|resonance-|bpsr-)/i.test(r.name)
);
if (filtered.length === 0) {
projectContainer.innerHTML = "<p class='text-gray-400'>No matching projects found.</p>";
return;
}
projectContainer.innerHTML = filtered
.map(repo => `
<div class="bg-gray-800 p-6 rounded-2xl shadow-lg hover:shadow-blue-400 transition">
<h2 class="text-2xl font-semibold text-blue-300 mb-2">
<a href="${repo.html_url}" target="_blank">${repo.name}</a>
</h2>
<p class="text-gray-300 mb-3">${repo.description || "No description provided."}</p>
<ul class="text-sm text-gray-400 list-disc list-inside">
<li>⭐ Stars: ${repo.stargazers_count}</li>
<li>🔄 Updated: ${new Date(repo.updated_at).toLocaleDateString()}</li>
<li>📦 Language: ${repo.language || "N/A"}</li>
</ul>
</div>
`)
.join("");
} catch (error) {
console.error(error);
projectContainer.innerHTML = "<p class='text-red-400'>Failed to load projects.</p>";
}
}
document.addEventListener("DOMContentLoaded", loadProjects);
</script>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen flex flex-col">
<header class="text-center py-10 bg-gray-800 shadow-lg">
<h1 class="text-4xl font-bold text-blue-400">Star Resonance GitHub Projects</h1>
<p class="text-gray-400 mt-2">Automatically updated from GitHub</p>
</header>
<main class="flex-grow max-w-5xl mx-auto px-4 py-8 grid gap-6 md:grid-cols-2" id="projects">
<!-- Projects will load here -->
</main>
<footer class="text-center py-6 text-gray-500 border-t border-gray-700">
© 2025 Star Resonance Projects · Maintained by
<a href="https://github.com/asgharkapk" class="text-blue-400 hover:underline">@asgharkapk</a>
</footer>
</body>
</html>