-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
65 lines (59 loc) · 2.39 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>iClocked</title>
<link rel="stylesheet" href="styles.css">
<link rel="manifest" href="manifest.json">
<link rel="icon" href="icons/icon-192x192.png">
</head>
<body>
<div class="header">
<div class="title-background">
<h1>iClocked</h1>
<p>The best place to find watchfaces for your Apple Watch.</p>
</div>
</div>
<div class="container">
<div class="grid" id="watchface-grid">
<!-- Content will be generated by JavaScript -->
</div>
</div>
<script>
fetch('watchfaces.json')
.then(response => response.json())
.then(data => {
const grid = document.getElementById('watchface-grid');
data.forEach(watchface => {
const watchfaceDiv = document.createElement('div');
watchfaceDiv.className = 'watchface';
const img = document.createElement('img');
img.src = watchface.image;
img.alt = 'Watchface';
const buttonsDiv = document.createElement('div');
buttonsDiv.className = 'buttons';
const viewLink = document.createElement('a');
viewLink.href = watchface.view_link;
viewLink.className = 'install';
viewLink.textContent = 'View';
const sourceLink = document.createElement('a');
sourceLink.href = watchface.source_link;
sourceLink.className = 'source';
sourceLink.textContent = 'Source';
buttonsDiv.appendChild(viewLink);
buttonsDiv.appendChild(sourceLink);
watchfaceDiv.appendChild(img);
watchfaceDiv.appendChild(buttonsDiv);
grid.appendChild(watchfaceDiv);
});
});
</script>
<section><center><br>
<p>iClocked - 2024 - All right reserved</p>
<p>Watchfaces source : Pinterest</p>
<p>iClocked is licensed under GNU/GPLv3</p>
<p>Made with ♥️ by enzo_zsh</p>
</section></center></br>
</body>
</html>