-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
400 lines (373 loc) · 15.1 KB
/
index.html
File metadata and controls
400 lines (373 loc) · 15.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
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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
<!DOCTYPE html>
<html lang="el">
<head>
<meta charset="UTF-8">
<title>Modern Code Viewer - VSCode Style Menu & Notes</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Highlight.js – Atom One Dark Theme (για VSCode look) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/atom-one-dark.min.css">
<!-- Google Fonts για Roboto -->
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
<!-- Custom CSS για dark mode, menu, notes & inline code comments -->
<style>
/* Global resets */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background-color: #1e1e1e;
color: #d4d4d4;
font-family: 'Roboto', sans-serif;
padding-top: 80px; /* χώρος για το fixed menu */
scroll-behavior: smooth;
}
/* Custom minimal αλλά μοντέρνος scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #1e1e1e; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #555; }
html { scrollbar-width: thin; scrollbar-color: #444 #1e1e1e; }
/* Fixed Navigation Menu - Redesigned with logo left and menu right */
nav {
position: fixed;
top: 0;
left: 0;
width: 100%;
background: #252526;
padding: 10px 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
z-index: 1000;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #3c3c3c;
}
.logo {
font-size: 1.3rem;
font-weight: 700;
color: #00aaff;
text-decoration: none;
padding: 8px 15px;
border-radius: 15px;
background: rgba(0, 170, 255, 0.1);
transition: all 0.3s ease;
}
.logo:hover {
background: rgba(0, 170, 255, 0.3);
color: #ffffff;
transform: translateY(-2px);
}
nav ul {
list-style: none;
display: flex;
align-items: center;
gap: 15px;
}
nav ul li {
position: relative;
margin: 0;
}
nav ul li a {
text-decoration: none;
color: #b0b0b0;
font-size: 1rem;
font-weight: 500;
padding: 8px 15px;
border-radius: 15px;
transition: all 0.3s ease;
display: inline-block;
}
nav ul li a:hover {
color: #ffffff;
background: #3c3c3c;
transform: translateY(-2px);
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
nav ul li a.active {
color: #ffffff;
background: #007acc;
box-shadow: 0 2px 6px rgba(0, 122, 204, 0.3);
}
/* Dropdown Submenu - Enhanced hover design */
nav ul li:hover .submenu {
display: block;
}
.submenu {
display: none;
position: absolute;
top: 100%;
right: 0;
background: #2d2d2d;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
min-width: 200px;
z-index: 1001;
padding: 5px 0;
transition: opacity 0.2s ease, transform 0.2s ease;
opacity: 0;
transform: translateY(-10px);
}
nav ul li:hover .submenu {
opacity: 1;
transform: translateY(0);
}
.submenu li {
margin: 0;
}
.submenu li a {
display: block;
padding: 8px 20px;
color: #d4d4d4;
font-size: 0.95rem;
border-radius: 0;
transition: all 0.3s ease;
}
.submenu li a:hover {
background: linear-gradient(90deg, #2e7d32, #4caf50);
color: #ffffff;
padding-left: 25px;
box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}
/* Container */
.container {
max-width: 1000px;
margin: 0 auto;
padding: 20px;
}
/* Code Container styling */
.code-container {
background-color: #252526;
border: 1px solid #3c3c3c;
border-radius: 8px;
margin: 30px 0;
overflow: hidden;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.code-container:hover {
transform: translateY(-5px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}
.code-container h2 {
background: linear-gradient(90deg, #007acc, #005d9b);
color: #fff;
padding: 15px 20px;
font-size: 1.2rem;
font-weight: 600;
letter-spacing: 0.5px;
}
.code-container .note {
background: #005d9b;
color: #fff;
padding: 10px 15px;
font-size: 0.9rem;
border-left: 6px solid #fff;
}
.code-container pre {
padding: 20px;
overflow-x: auto;
font-size: 0.9rem;
}
pre code {
display: block;
white-space: pre-wrap;
word-wrap: break-word;
}
.hljs-comment, .hljs-quote {
color: #7daaff;
font-style: italic;
}
/* Toggle button styling */
.toggle-btn {
display: block;
width: 100%;
padding: 12px;
background-color: #333;
color: #d4d4d4;
border: none;
cursor: pointer;
font-size: 0.9rem;
text-align: center;
transition: background 0.3s, color 0.3s;
}
.toggle-btn:hover {
background-color: #3c3c3c;
color: #ffffff;
}
</style>
</head>
<body>
<!-- Navigation Menu with Logo on Left and Menu on Right -->
<nav>
<a href="#" class="logo">Modern Code Viewer</a>
<ul>
<li>
<a href="#">Plugins</a>
<ul class="submenu">
<li><a href="#section-js1">FolderManager.plugin.js</a></li>
<li><a href="#section-js2">Combined_safe_console.plugin.js</a></li>
<li><a href="#section-js3">Prezomenoi_OG.plugin.js</a></li>
<li><a href="#section-js4">allinone_update.plugin.js</a></li>
</ul>
</li>
<li>
<a href="#">Themes</a>
<ul class="submenu">
<li><a href="#section-css1">SimplethemeV3.theme.css</a></li>
<li><a href="#section-css2">OLD_WORKING_SimplethemeV3.theme.css</a></li>
<li><a href="#section-css3">SimplethemeV2.theme.css</a></li>
<li><a href="#section-css4">folder.theme.css</a></li>
<li><a href="#section-css5">prezomenoi.theme.css</a></li>
</ul>
</li>
</ul>
</nav>
<div class="container">
<!-- Section για CSS: SimplethemeV3.theme.css (truncate στις 66 γραμμές) -->
<div class="code-container" id="section-css1">
<h2>SimplethemeV3.theme.css UI</h2>
<div class="note">
Το αρχείο αυτό εμφανίζει τις πρώτες 66 γραμμές. Κάνε κλικ στο "Show More" για όλο το αρχείο.
</div>
<pre><code id="code-css1" class="language-css">/* Loading code... */</code></pre>
</div>
<!-- Section για CSS: OLD_WORKING_SimplethemeV3.theme.css (truncate στις 36 γραμμές) -->
<div class="code-container" id="section-css2">
<h2>OLD_WORKING_SimplethemeV3.theme.css UI</h2>
<div class="note">
Το αρχείο αυτό εμφανίζει τις πρώτες 36 γραμμές. Κάνε κλικ στο "Show More" για όλο το αρχείο.
</div>
<pre><code id="code-css2" class="language-css">/* Loading code... */</code></pre>
</div>
<!-- Section για CSS: SimplethemeV2.theme.css (truncate στις 83 γραμμές) -->
<div class="code-container" id="section-css3">
<h2>SimplethemeV2.theme.css UI</h2>
<div class="note">
Το αρχείο αυτό εμφανίζει τις πρώτες 83 γραμμές. Κάνε κλικ στο "Show More" για όλο το αρχείο.
</div>
<pre><code id="code-css3" class="language-css">/* Loading code... */</code></pre>
</div>
<!-- Section για CSS: folder.theme.css (truncate στις 50 γραμμές) -->
<div class="code-container" id="section-css4">
<h2>folder.theme.css UI</h2>
<div class="note">
Το αρχείο αυτό εμφανίζει τις πρώτες 50 γραμμές. Κάνε κλικ στο "Show More" για όλο το αρχείο.
</div>
<pre><code id="code-css4" class="language-css">/* Loading code... */</code></pre>
</div>
<!-- Section για CSS: prezomenoi.theme.css (truncate στις 50 γραμμές) -->
<div class="code-container" id="section-css5">
<h2>prezomenoi.theme.css UI</h2>
<div class="note">
Το αρχείο αυτό εμφανίζει τις πρώτες 50 γραμμές. Κάνε κλικ στο "Show More" για όλο το αρχείο.
</div>
<pre><code id="code-css5" class="language-css">/* Loading code... */</code></pre>
</div>
<!-- Section για JS: FolderManager.plugin.js (truncate στις 50 γραμμές) -->
<div class="code-container" id="section-js1">
<h2>FolderManager.plugin.js UI</h2>
<div class="note">
Το αρχείο αυτό εμφανίζει τις πρώτες 50 γραμμές. Κάνε κλικ στο "Show More" για όλο το αρχείο.
</div>
<pre><code id="code-js1" class="language-javascript">// Loading code...</code></pre>
</div>
<!-- Section για JS: Combined_safe_console.plugin.js (truncate στις 50 γραμμές) -->
<div class="code-container" id="section-js2">
<h2>Combined_safe_console.plugin.js UI</h2>
<div class="note">
Το αρχείο αυτό εμφανίζει τις πρώτες 50 γραμμές. Κάνε κλικ στο "Show More" για όλο το αρχείο.
</div>
<pre><code id="code-js2" class="language-javascript">// Loading code...</code></pre>
</div>
<!-- Section για JS: Prezomenoi_OG.plugin.js (truncate στις 50 γραμμές) -->
<div class="code-container" id="section-js3">
<h2>Prezomenoi_OG.plugin.js UI</h2>
<div class="note">
Το αρχείο αυτό εμφανίζει τις πρώτες 50 γραμμές. Κάνε κλικ στο "Show More" για όλο το αρχείο.
</div>
<pre><code id="code-js3" class="language-javascript">// Loading code...</code></pre>
</div>
<!-- Section για JS: allinone_update.plugin.js (truncate στις 50 γραμμές) -->
<div class="code-container" id="section-js4">
<h2>allinone_update.plugin.js UI</h2>
<div class="note">
Το αρχείο αυτό εμφανίζει τις πρώτες 50 γραμμές. Κάνε κλικ στο "Show More" για όλο το αρχείο.
</div>
<pre><code id="code-js4" class="language-javascript">// Loading code...</code></pre>
</div>
</div>
<!-- Highlight.js script -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
<!-- JavaScript για φόρτωση των αρχείων και toggle για truncated view -->
<script>
/**
* Φορτώνει κώδικα από το URL σε ένα element και, αν δοθεί, το περιορίζει σε truncateLines γραμμές.
* @param {string} url - Το URL του raw αρχείου.
* @param {string} elementId - Το ID του <code> στοιχείου όπου θα εμφανιστεί ο κώδικας.
* @param {string} languageClass - π.χ. 'language-css' ή 'language-javascript'
* @param {number} [truncateLines] - Ο αριθμός γραμμών που θα εμφανίζονται αρχικά.
*/
function loadCode(url, elementId, languageClass, truncateLines) {
fetch(url)
.then(response => {
if (!response.ok) throw new Error('Error fetching: ' + url);
return response.text();
})
.then(data => {
const codeElement = document.getElementById(elementId);
const originalCode = data;
const applyHighlight = () => hljs.highlightElement(codeElement);
if (truncateLines && originalCode.split('\n').length > truncateLines) {
const lines = originalCode.split('\n');
const truncatedCode = lines.slice(0, truncateLines).join('\n') + "\n...";
codeElement.textContent = truncatedCode;
applyHighlight();
// Δημιουργία toggle button για πλήρη προβολή
const btn = document.createElement("button");
btn.textContent = "Show More";
btn.className = "toggle-btn";
let isTruncated = true;
btn.addEventListener("click", function() {
if (isTruncated) {
codeElement.textContent = originalCode;
btn.textContent = "Show Less";
isTruncated = false;
} else {
codeElement.textContent = truncatedCode;
btn.textContent = "Show More";
isTruncated = true;
}
applyHighlight();
});
codeElement.parentNode.parentNode.appendChild(btn);
} else {
codeElement.textContent = originalCode;
applyHighlight();
}
})
.catch(error => {
document.getElementById(elementId).textContent = "Error loading code: " + error;
});
}
// URLs προς τα αρχεία στο GitHub
const urlCSS1 = "https://raw.githubusercontent.com/thomasthanos/1st-theme/main/Discord_DEV/Themes/SimplethemeV3.theme.css";
const urlCSS2 = "https://raw.githubusercontent.com/thomasthanos/1st-theme/main/Discord_DEV/Themes/OLD_WORKING_SimplethemeV3.theme.css";
const urlCSS3 = "https://raw.githubusercontent.com/thomasthanos/1st-theme/main/Discord_DEV/Themes/SimplethemeV2.theme.css";
const urlCSS4 = "https://raw.githubusercontent.com/thomasthanos/1st-theme/main/Discord_DEV/Themes/folder.theme.css";
const urlCSS5 = "https://raw.githubusercontent.com/thomasthanos/1st-theme/main/Discord_DEV/Themes/prezomenoi.theme.css";
const urlJS1 = "https://raw.githubusercontent.com/thomasthanos/1st-theme/main/Discord_DEV/Plugins/.FolderManager.plugin.js";
const urlJS2 = "https://raw.githubusercontent.com/thomasthanos/1st-theme/main/Discord_DEV/Plugins/.Combined_safe_console.plugin.js";
const urlJS3 = "https://raw.githubusercontent.com/thomasthanos/1st-theme/main/Discord_DEV/Plugins/.Prezomenoi_OG.plugin.js";
const urlJS4 = "https://raw.githubusercontent.com/thomasthanos/1st-theme/main/Discord_DEV/Plugins/.allinone_update.plugin.js";
// Φόρτωση CSS αρχείων με truncate
loadCode(urlCSS1, 'code-css1', 'language-css', 66);
loadCode(urlCSS2, 'code-css2', 'language-css', 36);
loadCode(urlCSS3, 'code-css3', 'language-css', 83);
loadCode(urlCSS4, 'code-css4', 'language-css', 50);
loadCode(urlCSS5, 'code-css5', 'language-css', 50);
// Φόρτωση JS αρχείων με truncate
loadCode(urlJS1, 'code-js1', 'language-javascript', 50);
loadCode(urlJS2, 'code-js2', 'language-javascript', 50);
loadCode(urlJS3, 'code-js3', 'language-javascript', 50);
loadCode(urlJS4, 'code-js4', 'language-javascript', 50);
</script>
</body>
</html>