-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
279 lines (258 loc) · 14.3 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="KotOS">
<meta property="og:url" content="https://kot-org.github.io/">
<meta property="og:description" content="Kot is nothing more than Operating System running on x86-64. And you already know that, but we're making to turn Kot more than just something.">
<meta property="og:image" content="https://kot-org.github.io/assets/img/kot-laptop.png">
<link rel="shortcut icon" href="./assets/img/kot-logo.png" type="image/x-icon">
<link rel="stylesheet" href="./assets/css/style.min.css">
<link rel="stylesheet" href="./assets/css/components.min.css">
<link rel="stylesheet" href="./assets/css/routes/home.min.css">
<script async defer src="https://buttons.github.io/buttons.js"></script>
<meta name="google-site-verification" content="p11DYNLjlmDi2t5F5R2KZlvY5Mc2pVyaRofzut5i-Hs" />
<title>KotOS</title>
</head>
<body>
<noscript>
<style>
main, #he-e1 {
display: none;
}
</style>
<div style="position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center;">
You need to enable JavaScript to run this app.
</div>
</noscript>
<!-- HEADER -->
<div id="he-e1">
<div id="he-e1e1">
<div id="he-e1e1-e1">
<div id="header-logo"></div>
</div>
</div>
</div>
<!-- END HEADER -->
<!-- MAIN -->
<main>
<!-- Main section -->
<section class="home-sect" style="height: calc(100vh - 100px);">
<div id="hse-e1" class="-hse">
<div>
<div id="hse-e1e1">
<div id="hse-e1e1-img">
<div></div>
</div>
</div>
<div id="hse-e1e2">
<div id="hse-e1e2-e1">
<span>KotOS</span>
</div>
<div id="hse-e1e2-e2">
<span>Kot is nothing more than an Operating System running on x86-64. And you already know that, but we're making to turn Kot more than just something.</span>
</div>
<div id="hse-e1e2-e3">
<span class="-hov-effect" onclick="window.open('https://github.com/kot-org/Kot/releases', '_blank')">Download the latest release</span>
</div>
<div id="hse-e1e2-e4">
<a class="github-button" href="https://github.com/kot-org/Kot" data-color-scheme="no-preference: dark_dimmed; light: dark_dimmed; dark: dark_dimmed;" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star kot-org/Kot on GitHub">Star</a>
</div>
</div>
</div>
</div>
<div style="position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); filter: drop-shadow(0 0 5px #a32e5f);" id="-indscro">
<svg xmlns="http://www.w3.org/2000/svg" style="height: 40px; width: 40px; transform: rotate(90deg); fill: #dedede;" viewBox="0 0 256 256" xml:space="preserve">
<g style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;" transform="translate(1.4065934065934016 1.4065934065934016) scale(2.81 2.81)">
<path d="M 24.25 90 c -0.896 0 -1.792 -0.342 -2.475 -1.025 c -1.367 -1.366 -1.367 -3.583 0 -4.949 L 60.8 45 L 21.775 5.975 c -1.367 -1.367 -1.367 -3.583 0 -4.95 c 1.367 -1.366 3.583 -1.366 4.95 0 l 41.5 41.5 c 1.367 1.366 1.367 3.583 0 4.949 l -41.5 41.5 C 26.042 89.658 25.146 90 24.25 90 z" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill-rule: nonzero; opacity: 1;" transform=" matrix(1 0 0 1 0 0) " stroke-linecap="round"/>
</g>
</svg>
</div>
</section>
<!-- End main section -->
<!-- Drivers/Services section -->
<section class="home-sect">
<div id="hse-e1a" class="-hse">
</div>
</section>
<!-- End Drivers/Services section -->
<!-- Commits section -->
<section class="home-sect">
<div id="hse-e2" class="-hse">
<div>
<!-- Last commit -->
<div id="hse-e2e1">
<div id="hse-e2e1-e1">
<span class="-hov-effect" onclick="window.open('https://github.com/kot-org/Kot/commits', '_blank')" style="font-size: 32px; font-weight: 700; color: #dedede; cursor: pointer;">Last commit</span>
</div>
<div id="hse-e2e1-e2" class="-hov-effect">
<div id="hse-e2e1-e2-e1">
</div>
</div>
</div>
<!-- End last commit -->
<!-- Commits timeline -->
<div id="hse-e2e2">
<div id="hse-e2e2-e1">
<span class="-hov-effect" style="font-size: 32px; font-weight: 700; color: #dedede; cursor: pointer;">Commits timeline</span>
</div>
<div id="hse-e2e2-e2">
<span id="info_commits_timeline" style="color: #c2c2c2; font-size: 15px; font-weight: 600;"></span>
<div style="position: relative; height: 65px;">
<div id="commits_progress" style="display: flex; justify-content: space-between; margin-top: 20px; height: 4px; background-color: #303030; align-items: center;"></div>
</div>
</div>
</div>
<!-- End commits timeline -->
</div>
</div>
</section>
<!-- End commits section -->
<!-- Open source section -->
<section class="home-sect" style="background: linear-gradient(160deg, rgb(87,67,155) 0%, rgb(129,63,133) 55%, rgb(180, 82, 120) 100%);">
<div id="hse-e3" class="-hse">
<div class='hse-ee1'>
<div class='hse-ee1-e1'>
<div class='hse-ee1-title'>
<span>Open source</span>
</div>
<div class='hse-ee1-desc'>
<span>Kot is an open source project that anyone can understand how it works. You want to contribute? Join us!</span>
</div>
</div>
<div class='hse-ee1-e2'>
<div class="hse-ee1-img">
<img src="./assets/img/openSource.png" alt="Open source icon">
</div>
</div>
</div>
</div>
</section>
<!-- End open source section -->
<!-- GitHub section -->
<section class="home-sect">
<div id="hse-e4" class="-hse">
<div class='hse-ee1'>
<div class='hse-ee1-e1'>
<div class="hse-ee1-img">
<img src="./assets/img/githubLogo.png" alt="Open source icon">
</div>
</div>
<div class='hse-ee1-e2'>
<div class='hse-ee1-title'>
<span>Join the project!</span>
</div>
<div class='hse-ee1-desc'>
<span>Kot is available on <a href="https://github.com/kot-org/Kot" target="_blank">GitHub</a>. You can join the effort.</span>
</div>
</div>
</div>
</div>
</section>
<!-- End GitHub section -->
<!-- Contributors section -->
<section class="home-sect">
<div id="hse-e5" class="-hse">
<div class='hse-ee1'>
<div class='hse-ee1-e2' style="text-align: center; padding: 0; width: 100%;">
<div class='hse-ee1-title'>
<span>Thanks to</span>
</div>
<div class='hse-ee1-desc' style="max-width: none;">
<span>all contributors for helping us in this project.</span>
</div>
<div class='hse-ee1-descImg' onclick="window.open('https://github.com/kot-org/Kot/contributors', '_blank')">
<span>Click to view contributors</span>
<div></div>
</div>
</div>
</div>
</div>
</section>
<!-- End contributors section -->
<!-- FOOTER -->
<footer>
<img src="./assets/img/kot-logo-mini.png" alt="Kot logo">
<span>Copyright © <script>document.write(new Date().getFullYear())</script> Kot organization.</span>
<span>All rights reserved.</span>
</footer>
<!-- END FOOTER -->
</main>
<!-- END MAIN -->
<script>
async function GetRepoInfo(info) {
const res = await fetch(`https://api.github.com/repos/kot-org/Kot/${info}`, {
method: "GET"
})
return await res.json()
}
function displayCommitsTimeline(commits, number) {
let commit_last_day = 0
const _commits = commits.sort((a, b) => {
if(new Date(a.commit.author.date).getDate() < new Date(b.commit.author.date).getDate()) {
return -1;
}
if(new Date(a.commit.author.date).getDate() > new Date(b.commit.author.date).getDate()) {
return 1;
}
return 0;
}), /* Du plus petit au plus grand */
monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
document.getElementById('commits_progress').innerHTML = ""
document.getElementById('info_commits_timeline').innerText = `Commits this month (${monthNames[new Date().getMonth()]})`
for(let i = 0; i < number; i++) {
if(new Date(_commits[i].commit.author.date).getMonth()+1 == new Date().getMonth()+1) {
document.getElementById('commits_progress').innerHTML +=
`<div onclick="window.open('${_commits[i].html_url}', '_blank')" id="commitProg-${new Date(_commits[i].commit.author.date).getDate()}" class="-hov-effect" style="display: flex; justify-content: center; background-color: #555555; width: 12px; height: 12px; border-radius: 50px; border: 2px solid #929292; cursor: pointer;"></div>`
if(new Date(_commits[i].commit.author.date).getDate() > commit_last_day) { /* Quand le jour n'est plus le même (ajoute le jour) */
document.getElementById('commitProg-'+new Date(_commits[i].commit.author.date).getDate()).innerHTML =
`<div style="height: 70px; width: 2px; background-color: #555555;">
<div style="position: relative; height: 100%; display: flex; justify-content: center;">
<div title="${new Date(_commits[i].commit.author.date)}" style="user-select: none; cursor: pointer; font-size: 14px; font-weight: 600; position: absolute; bottom: 0; background-color: #333333; padding: 7px; width: 20px; text-align: center; border-radius: 50px;">${new Date(_commits[i].commit.author.date).getDate()}</div>
</div>
</div>`
}
commit_last_day = new Date(_commits[i].commit.author.date).getDate()
}
}
}
/* Commits */
let commits
(async () => {
commits = await GetRepoInfo('commits')
const last_commit = commits[0]
/* On affiche la ligne du temps des commits */
if(window.matchMedia('(max-width: 500px)').matches) {
displayCommitsTimeline(commits, 5)
} else {
displayCommitsTimeline(commits, 10)
}
document.getElementById('hse-e2e1-e2-e1').innerHTML =
`<div style="padding: 20px; display: flex; align-items: center;" onclick="window.open('${last_commit.html_url}', '_blank')">
<div>
<img style="width: 60px; border-radius: 10px; background-color: #444444; padding: 2px; vertical-align: middle;" src="${last_commit.author.avatar_url}" alt="Profile picture of ${last_commit.author.login}">
</div>
<div style="margin-left: 20px;">
<div style="color: #cacaca; font-size: 19px; font-weight: 600;">
<span>${last_commit.author.login}</span> • <span>${new Date(last_commit.commit.author.date).toLocaleString()}</span>
</div>
<div style="color: #dedede; margin-top: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 150px;">
<span style="text-decoration: underline;">Click to view</span>
</div>
</div>
</div>`
})()
/* Quand la fenetre est en dessous de 400px de largeur, on diminue le nombre de commits à afficher */
window.matchMedia('(max-width: 500px)').onchange = (e) => {
if(e.matches) {
displayCommitsTimeline(commits, 5)
} else {
displayCommitsTimeline(commits, 10)
}
}
/* End commits */
</script>
</body>
</html>