-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
146 lines (129 loc) · 4.38 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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<link rel="icon" type="image/svg+xml" href="./imgs/icons/armian-tux-logo.svg">
<link rel="stylesheet" href="./css/icons.css">
<link rel="stylesheet" href="./css/theme.css">
<style>
body::-webkit-scrollbar-track {
background-color: #ccc;
}
body::-webkit-scrollbar-thumb {
background-color: #ddd;
border: 2px solid #ccc;
}
body a,body button {
color: rgb(174, 255, 173);
}
body a:hover,body button:hover {
color: #0f0;
}
</style>
</head>
<body>
<div id="container">
<div id="window" class="window" style="display: none;">
<div class="window-decoration">
<button class="reset"><i class="fa-regular fa-window-restore"></i></button>
<button class="close"><i class="fa fa-times"></i></button>
</div>
<div class="window-content">
<iframe id="iframe" src="" style="border:0; width:100%; height:100%;"></iframe>
</div>
</div>
<span class="container">
<button id="toggleButton" style="width:64px;height:64px;margin: 0;">
<i class="fa-brands fa-linux fa-3x"></i>
</button>
</span>
<div id="tasks" class="parent cell space">
<div class="search-block">
<div class="search-form">
<input id="userInput" type="text" placeholder="Search..." />
<button>Search</button>
</div>
</div>
<span>
<hr>
</span>
<div id="site-links-content" class="menuDiv"></div>
<span>
<hr>
</span>
<div id="supporters-content" class=""></div>
<div id="start-settings" class="settings row">
<button id="power" class="fullscreen"><i class="fa fa-power-off"></i></button>
<button id="light-switch"><i class="fas fa-moon"></i></button>
<button id="back-button"><i class="fas fa-arrow-left"></i></button>
<button id="forward-button"><i class="fas fa-arrow-right"></i></button>
<button id="refresh-button"><i class="fas fa-sync-alt"></i></button>
<button id="tearran-switch" class="hide"><i class="fas fa-moon"></i></button>
</div>
</div>
<span class="iconContainerWrapper">
<div id="iconContainer" class="iconContainer"></div>
<div id="contributors-content" class="iconContainer"></div>
</span>
</div>
</div>
<script src="./js/start.here.button.js"></script>
<script src="./js/window.buttons.js"></script>
<script src="./js/tech.sys.tray.js"></script>
<script>
window.onload = function() {
closeWindow();
openWindow();
resetWindow();
var currentImageIndex = 0;
var desktopItems = [];
// Load JSON file
fetch('./data/start.here.json')
.then(response => response.json())
.then(data => {
// Change iframe sources
changeIframeSrc(data.content, "site-links-content");
changeIframeSrc(data.contributors, "contributors-content");
changeIframeSrc(data.Supporters, "supporters-content");
// Set desktop items and change background image
desktopItems = data.desktop;
changeBackgroundImage();
// Then change the background image every 60 seconds
setInterval(changeBackgroundImage, 60000);
// Add desktop icons
changeIframeSrc(data.desktop, "iconContainer");
});
function changeBackgroundImage() {
if (desktopItems.length > 0) {
document.body.style.backgroundImage = 'url(' + desktopItems[currentImageIndex].imgs + ')';
currentImageIndex = (currentImageIndex + 1) % desktopItems.length;
}
}
function addDesktopIcons() {
// Assuming you have a container for the icons
var iconContainer = document.getElementById('iconContainer');
desktopItems.forEach(item => {
changeIframeSrc(item, "iconContainer");
});
}
}
document.getElementById('light-switch').addEventListener('click', function() {
var body = document.body;
if (body.classList.contains('light-mode')) {
body.classList.remove('light-mode');
} else {
body.classList.add('light-mode');
}
});
document.getElementById('back-button').addEventListener('click', function() {
window.history.back();
});
document.getElementById('forward-button').addEventListener('click', function() {
window.history.forward();
});
document.getElementById('refresh-button').addEventListener('click', function() {
location.reload();
});
</script>
</body>
</html>