Skip to content

Commit 305b2d7

Browse files
committed
Add initial HTML, CSS, and SVG files for kPad text editor
1 parent 03163a3 commit 305b2d7

File tree

3 files changed

+83
-0
lines changed

3 files changed

+83
-0
lines changed

index.html

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>kpad: lightweight text editor</title>
7+
<link rel="stylesheet" href="style.css">
8+
</head>
9+
<body>
10+
<h1>kPad</h1>
11+
<p><i>a feature-packed text editor while still <15 MB</i></p>
12+
<img id="version-badge" src="https://img.shields.io/badge/version-loading-lightgrey?style=for-the-badge" alt="version">
13+
<p>supports <b>plugins</b>, <b>URL opening protocols</b>, <b>auto-updating</b>!</p>
14+
<a href="https://github.com/maxhatei2/kPad"><img alt="Static Badge" src="https://img.shields.io/badge/github repo-click me-blue"></a>
15+
16+
<h3>direct download links:</h3>
17+
<div>
18+
<img src="pkg_icon.svg" alt="pkg icon" width="20">
19+
<a href="https://github.com/maxhatei2/kPad/releases/latest/download/kPad-mac_arm64.zip">download mac  silicon</a>
20+
</div>
21+
<div>
22+
<img src="pkg_icon.svg" alt="pkg icon" width="20">
23+
<a href="https://github.com/maxhatei2/kPad/releases/latest/download/kPad-mac_x86_64.zip">download mac  intel</a>
24+
</div>
25+
<div>
26+
<img src="pkg_icon.svg" alt="pkg icon" width="20">
27+
<a href="https://github.com/maxhatei2/kPad/releases/latest/download/kPad-Windows_x86_64.zip">download windows x64</a>
28+
</div>
29+
<p>^ all of the above ^ are automatically the latest release.</p>
30+
31+
<p>for more info, look at the github repo and <a href="https://github.com/maxhatei2/kPad/wiki">wiki</a>.</p>
32+
33+
<footer>
34+
<p id="kpad-version">made by maxhatei2 | </p>
35+
</footer>
36+
<script>
37+
fetch('https://raw.githubusercontent.com/maxhatei2/kPad/refs/heads/main/.kv')
38+
.then(response => response.text())
39+
.then(version => {
40+
document.getElementById('kpad-version').textContent = "made by maxhatei2 | version " + version.trim();
41+
})
42+
.catch(err => {
43+
console.error('failed to load version:', err);
44+
document.getElementById('kpad-version').textContent = 'made by maxhatei2 | version: unknown';
45+
});
46+
fetch('https://raw.githubusercontent.com/maxhatei2/kPad/refs/heads/main/.kv')
47+
.then(res => res.text())
48+
.then(version => {
49+
version = version.trim(); // remove whitespace
50+
// update shields.io badge url
51+
const badgeUrl = `https://img.shields.io/badge/version-${version}-orange?style=for-the-badge`;
52+
document.getElementById('version-badge').src = badgeUrl;
53+
})
54+
.catch(err => {
55+
console.error('failed to fetch kPad version', err);
56+
document.getElementById('version-badge').src = 'https://img.shields.io/badge/version-unknown-lightgrey?style=for-the-badge';
57+
});
58+
</script>
59+
</body>
60+
</html>

pkg_icon.svg

Lines changed: 1 addition & 0 deletions
Loading

style.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
body {
2+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
3+
color: white;
4+
background-color: rgb(29, 29, 29);
5+
}
6+
7+
footer p {
8+
display: flex;
9+
justify-content: center;
10+
}
11+
12+
a {
13+
color: orange;
14+
}
15+
16+
code {
17+
padding: 2px 4px; /* inner spacing */
18+
background-color: rgb(49, 49, 49); /* light gray background */
19+
border-radius: 3px; /* slightly rounded corners */
20+
font-family: monospace; /* monospace font */
21+
font-size: 0.95em;
22+
}

0 commit comments

Comments
 (0)