-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocumentation.html
More file actions
294 lines (262 loc) · 8.96 KB
/
documentation.html
File metadata and controls
294 lines (262 loc) · 8.96 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="RepoAudit is an open-source tool for repository quality assessment and bug management.">
<meta name="keywords" content="RepoAudit, Repository Audit, Bug Report, Code Quality, Open Source">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>RepoAudit</title>
<!-- Optional Google Analytics -->
<link href="https://fonts.googleapis.com/css?family=Google+Sans|Noto+Sans|Castoro" rel="stylesheet">
<link rel="stylesheet" href="./static/css/bulma.min.css">
<link rel="stylesheet" href="./static/css/bulma-carousel.min.css">
<link rel="stylesheet" href="./static/css/bulma-slider.min.css">
<link rel="stylesheet" href="./static/css/fontawesome.all.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css">
<link rel="stylesheet" href="./static/css/index.css">
<link rel="icon" href="./static/images/favicon.svg">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script defer src="./static/js/fontawesome.all.min.js"></script>
<script src="./static/js/bulma-carousel.min.js"></script>
<script src="./static/js/bulma-slider.min.js"></script>
<script src="./static/js/index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<style>
/* Optional: reduce some whitespace for a more compact layout */
.hero .hero-body { padding: 2rem 1rem !important; }
.section { padding: 1.5rem 1rem !important; }
.container { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.box { padding: 1rem !important; margin-bottom: 1rem !important; }
/* Center content and adjust width */
.documentation-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 1.5rem;
}
/* Docs layout */
.docs-container {
display: flex;
gap: 2rem;
}
.sidebar {
width: 280px;
position: sticky;
top: 1rem;
height: calc(100vh - 2rem);
overflow-y: auto;
padding: 1rem;
background: #f5f5f5;
border-radius: 4px;
flex-shrink: 0;
}
.docs-content {
flex: 1;
min-width: 0;
max-width: 900px;
}
/* Sidebar menu styling */
.sidebar-menu {
list-style: none;
padding: 0;
}
.sidebar-menu li {
margin-bottom: 0.5rem;
}
.sidebar-menu > li > a {
font-weight: bold;
}
.sidebar-submenu {
list-style: none;
padding-left: 1rem;
margin-top: 0.5rem;
}
.sidebar-submenu .sidebar-submenu {
padding-left: 1rem;
}
/* Responsive adjustments */
@media screen and (max-width: 768px) {
.docs-container {
flex-direction: column;
}
.sidebar {
width: 100%;
position: static;
height: auto;
margin-bottom: 1rem;
}
.documentation-container {
padding: 0 1rem;
}
}
</style>
</head>
<body>
<!-- Navbar with additional links -->
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false" data-target="navMenu">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navMenu" class="navbar-menu">
<div class="navbar-start" style="flex-grow: 1; justify-content: center;">
<a class="navbar-item" href="index.html">
<span class="icon"><i class="fas fa-home"></i></span>
</a>
<a class="navbar-item" href="bugreports.html">Bug Reports</a>
<a class="navbar-item" href="documentation.html">Docs</a>
<a class="navbar-item" href="support.html">Support</a>
<a class="navbar-item" href="resources.html">Resources</a>
</div>
</div>
</nav>
<!-- Add this script block at the end of the document (before </body>) -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const navbarBurgers = document.querySelectorAll('.navbar-burger');
navbarBurgers.forEach(el => {
el.addEventListener('click', () => {
const targetId = el.dataset.target;
const target = document.getElementById(targetId);
el.classList.toggle('is-active');
target.classList.toggle('is-active');
});
});
});
</script>
<!-- Hero Section -->
<section class="hero">
<div class="hero-body">
<div class="container is-max-widescreen">
<div class="columns is-centered">
<div class="column has-text-centered">
<h1 class="title is-1">Docs</h1>
<div class="is-size-5" style="margin-top: 1rem;">
Check out the following docs to get started with RepoAudit.
</div>
<div class="is-size-6" style="margin-top: 1rem;">
You can also refer to the <a href="https://deepwiki.com/PurCL/RepoAudit" target="_blank">deepwiki page</a> of RepoAudit, which is generated by <a href="https://devin.ai/" target="_blank">Devin</a>.
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Documentation Section -->
<section class="section" id="documentation">
<div class="documentation-container">
<div class="docs-container">
<!-- Sidebar -->
<aside class="sidebar">
<nav id="table-of-contents">
<ul class="sidebar-menu"></ul>
</nav>
</aside>
<!-- Content -->
<div class="docs-content">
<div class="box">
<div id="user-guide-content" class="content"></div>
</div>
<div class="box">
<div id="architecture-content" class="content"></div>
</div>
<div class="box">
<div id="extension-content" class="content"></div>
</div>
</div>
</div>
</div>
</section>
<footer class="footer">
<div class="container">
<div class="content has-text-centered">
Template adapted from <a href="https://github.com/nerfies/nerfies.github.io" target="_blank">Nerfiese</a> by Keunhong Park et al.
</div>
</div>
</footer>
<!-- Navbar burger toggle script for mobile devices -->
<script>
document.addEventListener('DOMContentLoaded', () => {
const burger = document.querySelector('.navbar-burger');
const menu = document.getElementById(burger.dataset.target || "navMenu");
burger.addEventListener('click', () => {
burger.classList.toggle('is-active');
menu.classList.toggle('is-active');
});
});
</script>
<script>
// Load and render markdown files
async function loadMarkdown(file, elementId) {
try {
const response = await fetch(file);
const text = await response.text();
document.getElementById(elementId).innerHTML = marked.parse(text);
updateTableOfContents();
} catch (error) {
console.error(`Error loading ${file}:`, error);
}
}
// Generate table of contents
function updateTableOfContents() {
const toc = document.querySelector('.sidebar-menu');
toc.innerHTML = '';
const sections = [{
id: 'user-guide-content',
title: 'User Guide'
}, {
id: 'architecture-content',
title: 'Project Architecture'
}, {
id: 'extension-content',
title: 'How to Extend'
}];
sections.forEach(section => {
const content = document.getElementById(section.id);
if (!content) return;
// Create main section item
const sectionItem = document.createElement('li');
const sectionLink = document.createElement('a');
sectionLink.textContent = section.title;
sectionLink.href = `#${section.id}`;
sectionItem.appendChild(sectionLink);
// Create submenu for h2 headers
const submenu = document.createElement('ul');
submenu.className = 'sidebar-submenu';
// Only get h2 headers
const h2headers = content.querySelectorAll('h2');
h2headers.forEach(h2 => {
const id = h2.textContent.toLowerCase().replace(/[^a-z0-9]+/g, '-');
h2.id = id;
const item = document.createElement('li');
const link = document.createElement('a');
link.textContent = h2.textContent;
link.href = `#${id}`;
item.appendChild(link);
submenu.appendChild(item);
});
if (submenu.children.length > 0) {
sectionItem.appendChild(submenu);
}
toc.appendChild(sectionItem);
});
}
// Load all documentation
loadMarkdown('./static/docs/guide.md', 'user-guide-content');
loadMarkdown('./static/docs/architecture.md', 'architecture-content');
loadMarkdown('./static/docs/extension.md', 'extension-content');
// Smooth scroll for anchor links
document.addEventListener('click', (e) => {
if (e.target.tagName === 'A' && e.target.hash) {
e.preventDefault();
const element = document.querySelector(e.target.hash);
if (element) {
element.scrollIntoView({ behavior: 'smooth' });
}
}
});
</script>
</body>
</html>