Repository navigation
Expand file tree
/
Copy pathexplore.html
More file actions
128 lines (113 loc) · 5.1 KB
/
Copy pathexplore.html
File metadata and controls
128 lines (113 loc) · 5.1 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Explore by Topic — XAYTHEON</title>
<link rel="icon" href="assets/favicon.svg" type="image/svg+xml">
<link rel="stylesheet" href="style.css" />
<!-- D3.js: the library that draws the interactive force-directed graph -->
<script src="https://cdn.jsdelivr.net/npm/d3@7/dist/d3.min.js"></script>
</head>
<body class="eightgon-page">
<div class="content">
<!-- Navigation Bar -->
<nav class="navbar">
<div class="nav-container">
<a class="logo" href="index.html" aria-label="Back to Home">
<img class="logo-img" src="assets/logo/thelogo.png" alt="XAYTHEON logo" />
</a>
<ul class="nav-menu">
<li><a class="nav-link" href="index.html">Home</a></li>
<li><a class="nav-link" href="github.html">GitHub Dashboard</a></li>
<li><a class="nav-link" href="community.html">Community Highlights</a></li>
<li><a class="nav-link" href="contributions.html">Contributions</a></li>
</ul>
<button id="theme-toggle" class="btn btn-primary" style="margin:0px !important"></button>
</div>
</nav>
<!-- Explore Section -->
<section class="github-section">
<div class="container">
<h2 class="section-title">Explore by Topic</h2>
<!-- Search form -->
<form id="explore-form" class="github-form" autocomplete="off" style="margin-bottom: 16px;">
<div class="field-group" style="grid-column: span 4;">
<label for="ex-base-topic">Base Topic</label>
<input id="ex-base-topic" type="text" placeholder="e.g. threejs" value="threejs" />
</div>
<div class="field-group" style="grid-column: span 4;">
<label for="ex-language">Language</label>
<select id="ex-language">
<option value="">Any</option>
<option>JavaScript</option>
<option>TypeScript</option>
<option>Python</option>
<option>Go</option>
<option>Rust</option>
<option>Java</option>
<option>C#</option>
<option>C++</option>
</select>
</div>
<div class="field-group" style="grid-column: span 4;">
<label for="ex-limit">Repos to sample</label>
<input id="ex-limit" type="number" min="10" max="100" value="50" />
</div>
<button class="btn btn-primary" type="submit">Explore</button>
<button class="btn btn-outline" type="button" id="ex-clear">Clear</button>
<div id="ex-status" class="github-status" aria-live="polite"></div>
</form>
<!-- Graph card -->
<div class="card" style="grid-column: 1 / -1;">
<div class="card-header"><h3>Topic Map</h3></div>
<div class="card-body">
<!-- The SVG inside here is where D3 draws the graph -->
<div id="graph-wrap" style="width: 100%; height: 560px; position: relative; border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden;">
<svg id="graph" width="100%" height="100%"></svg>
<!-- Legend: explains what the colours mean -->
<div id="graph-legend" class="graph-legend">
<div><span style="display:inline-block; width:10px; height:10px; background:#0ea5e9; border-radius:50%; margin-right:6px;"></span>Topic (click to expand)</div>
<div style="margin-top:4px;"><span style="display:inline-block; width:10px; height:10px; background:#111827; border-radius:50%; margin-right:6px;"></span>Repo (click to open)</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="container">
<div class="footer-content">
<div class="footer-brand">
<span class="logo-text">XAYTHEON</span>
<p>Empowering the next generation of innovators</p>
</div>
</div>
<div class="footer-bottom">
<p>© 2025 XAYTHEON. All rights reserved.</p>
</div>
</div>
</footer>
</div>
<script src="explore.js"></script>
<script>
const toggleBtn = document.getElementById('theme-toggle');
const savedTheme = localStorage.getItem('theme') ||
(window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
document.documentElement.setAttribute('data-theme', savedTheme);
updateButtonLabel(savedTheme);
toggleBtn.addEventListener('click', () => {
const currentTheme = document.documentElement.getAttribute('data-theme');
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
document.documentElement.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
updateButtonLabel(newTheme);
console.log(currentTheme);
});
function updateButtonLabel(theme) {
toggleBtn.innerHTML = theme === 'dark' ? '☀️' : '🌙';
}
</script>
</body>
</html>