-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
78 lines (65 loc) · 2.58 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
<!DOCTYPE html>
<html lang="en">
<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">
<title>NadirCSS</title>
<link rel="stylesheet" href="nadir.css">
</head>
<body>
<div class="navbar-column">
<nav>
<h1>NadirCSS</h1>
</nav>
<button onclick="location.href = 'docs'">
<span translate="no" class="material-symbols-rounded">description</span>
Documentation
</button>
</div>
<div id="showcase" class="column" style="height: 25vh; width: 50vh;"></div>
<h1>An ultraminimalist dark mode CSS library</h1>
<div class="card column">
<div class="text-center">
<h1 translate="no" style="font-size: 5rem;" class="material-symbols-rounded">license</h1>
<h1>GPL 3.0</h1>
<p>This is free and open-source software. You can contribute to the source code below.</p>
</div>
</div>
<div id="about-card" class="card column" style="opacity: 0; pointer-events: none;">
<div class="text-center">
<h1 id="version">Loading...</h1>
<p id="whats-new"></p>
</div>
<div class="row">
<button id="about1" onclick="window.open('https://linfindel.github.io', '_blank')" class="about">
<span translate="no" class="material-symbols-rounded">home</span>
More projects
</button>
<button id="about2" onclick="window.open('https://www.github.com/linfindel/nadircss', '_blank')" class="about">
<span translate="no" class="material-symbols-rounded">code</span>
Source code
</button>
</div>
</div>
<script>
const username = 'linfindel';
const repo = 'nadircss';
fetch(`https://api.github.com/repos/${username}/${repo}/commits?per_page=1`)
.then(response => {
const totalCount = response.headers.get('Link').match(/page=(\d+)>; rel="last"/)[1] / 100;
return response.json().then(data => {
const latestCommitMessage = data[0].commit.message;
console.log(`Total commit count: ${totalCount}`);
console.log(`Latest commit message: ${latestCommitMessage}`);
document.getElementById("version").innerText = `Version ${totalCount.toFixed(2)} Release Notes`;
document.getElementById("whats-new").innerText = latestCommitMessage;
document.getElementById("about-card").style.opacity = "1";
document.getElementById("about-card").style.pointerEvents = "all";
});
})
.catch(error => console.error('Error fetching data:', error));
</script>
<script src="showcase.js"></script>
</body>
</html>