Skip to content

Commit a5ba0f0

Browse files
committed
Website: Added features
1 parent dff6d84 commit a5ba0f0

File tree

7 files changed

+87
-10
lines changed

7 files changed

+87
-10
lines changed

docs/imgs/icons/file.png

708 Bytes
Loading

docs/imgs/icons/keyboard.png

417 Bytes
Loading

docs/imgs/icons/puzzle.png

796 Bytes
Loading

docs/imgs/icons/rocket.png

1.35 KB
Loading

docs/index.css

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
body {
1313
margin: 0;
14-
background: #f1f1f1;
14+
background: #f1f1f1;
1515
}
1616

1717
/* HEADER */
@@ -150,6 +150,12 @@ header .navbar .link:hover {
150150
margin-left: 0;
151151
}
152152

153+
.hero .size {
154+
opacity: 0.5;
155+
font: 14px "Inter";
156+
margin: 12px;
157+
}
158+
153159
/* MAIN */
154160

155161
main {
@@ -160,7 +166,7 @@ main {
160166
main .screenshot {
161167
filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.5));
162168
border-radius: 8px;
163-
margin-top: -20vw;
169+
margin-top: -21vw;
164170
background: #333;
165171
border: 2px solid rgba(0, 0, 0, 0.25);
166172
max-width: 100%;
@@ -171,6 +177,30 @@ main h2 {
171177
margin-top: 96px;
172178
}
173179

180+
main .features {
181+
display: flex;
182+
gap: 28px;
183+
margin: 16px auto 0 auto;
184+
justify-content: center;
185+
font: 16px "Inter";
186+
flex-wrap: wrap;
187+
}
188+
189+
main .features h4 {
190+
margin: 16px 0;
191+
color: #7a36b1;
192+
font: 20px "Inter";
193+
}
194+
195+
main .features .feature {
196+
padding: 32px;
197+
filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
198+
background: #fff;
199+
border-radius: 8px;
200+
border: 2px solid rgba(0, 0, 0, 0.25);
201+
width: 192px;
202+
}
203+
174204
main .whats-new {
175205
font: 16px "Inter";
176206
}
@@ -312,11 +342,19 @@ footer a:hover {
312342
display: none;
313343
}
314344

315-
main .screenshot {
316-
border-radius: 0;
317-
margin-left: -16px;
318-
margin-right: -16px;
319-
max-width: calc(100% + 28px);
345+
.hero .buttons {
346+
display: block;
347+
padding: 16px;
348+
}
349+
350+
.hero .buttons .button {
351+
width: 100%;
352+
box-sizing: border-box;
353+
margin: 8px 0;
354+
}
355+
356+
main .features .feature {
357+
width: 100%;
320358
}
321359

322360
footer {

docs/index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ <h3>Lightweight, versatile desktop image viewer for Windows</h3>
3838
<span>Download</span>
3939
<span class="version"></span>
4040
</div>
41+
<div class="size">3.8 MB</div>
4142
</a>
4243
<a href="https://github.com/ModuleArt/quick-picture-viewer">
4344
<div class="button">
@@ -59,6 +60,29 @@ <h3>Lightweight, versatile desktop image viewer for Windows</h3>
5960
</div>
6061
<main>
6162
<img class="screenshot" src="imgs/screenshots/main.png" />
63+
<h2>Features:</h2>
64+
<div class="features">
65+
<div class="feature">
66+
<img src="imgs/icons/rocket.png" />
67+
<h4>Lightweight</h4>
68+
<span>Small and fast but still have a bunch of features</span>
69+
</div>
70+
<div class="feature">
71+
<img src="imgs/icons/file.png" />
72+
<h4>20+ formats supported</h4>
73+
<span>Works great with GIF, SVG, WEBP, .ICO, BMP, DDS, TGA etc.</span>
74+
</div>
75+
<div class="feature">
76+
<img src="imgs/icons/puzzle.png" />
77+
<h4>Plugins ready</h4>
78+
<span>You can extend the functionality of the app using the built-in plugin manager</span>
79+
</div>
80+
<div class="feature">
81+
<img src="imgs/icons/keyboard.png" />
82+
<h4>Shortcuts</h4>
83+
<span>You will find a hotkey for any action</span>
84+
</div>
85+
</div>
6286
<h2>What's new:</h2>
6387
<div id="whats-new" class="whats-new">
6488
<a href="#" class="release-title"></a>

docs/js/index.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
$(document).ready(function () {
22
let converter = new showdown.Converter();
33

4-
$.getJSON("https://api.github.com/repos/ModuleArt/quick-picture-viewer/releases/latest").done(function (json) {
4+
$.getJSON("https://api.github.com/repos/ModuleArt/quick-picture-viewer/releases/latest").done(function(json) {
5+
6+
console.log(json);
57

68
// download link
79
let downloadLink = document.getElementById("download-link");
810
downloadLink.href = "https://github.com/ModuleArt/quick-picture-viewer/releases/download/" + json.tag_name + "/QuickPictureViewer-Setup.exe";
911
downloadLink.getElementsByClassName("version")[0].innerHTML = json.tag_name;
12+
downloadLink.getElementsByClassName("size")[0].innerHTML = "Win 7-10, " + formatBytes(json.assets[0].size);
1013

1114
// what's new
1215
let whatsNewLink = document.getElementById("whats-new").getElementsByClassName("release-title")[0];
@@ -16,10 +19,22 @@ $(document).ready(function () {
1619
day: '2-digit',
1720
month: '2-digit',
1821
year: 'numeric',
19-
})
22+
});
2023
document.getElementById("whats-new").getElementsByClassName("release-markdown")[0].innerHTML = converter.makeHtml(json.body);
2124

2225
// copyright year
2326
document.getElementById("copyright").innerHTML = "Copyright © " + new Date().getFullYear() + " Module Art";
2427
});
25-
});
28+
});
29+
30+
function formatBytes(bytes, decimals = 1) {
31+
if (bytes === 0) return '0 Bytes';
32+
33+
const k = 1024;
34+
const dm = decimals < 0 ? 0 : decimals;
35+
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
36+
37+
const i = Math.floor(Math.log(bytes) / Math.log(k));
38+
39+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
40+
}

0 commit comments

Comments
 (0)