This repository has been archived by the owner on Nov 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAll.html
140 lines (119 loc) · 5.12 KB
/
All.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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="manifest" href="manifest.json">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AppCraft</title>
<style>
body {
background-color: #333; /* Dark background color */
color: #fff; /* Light text color */
font-family: Arial, sans-serif;
padding: 20px;
}
.container {
background-color: #444; /* Slightly lighter container background */
border-radius: 10px;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1 {
text-align: center;
}
.app {
display: flex;
flex-direction: column; /* Change to column layout */
align-items: center;
margin-top: 20px;
padding: 10px;
border: 1px solid #555; /* Darker border for app elements */
border-radius: 5px;
background-color: #555; /* Darker background for app elements */
}
.app img {
max-width: 100px;
max-height: 100px;
border-radius: 10px;
margin-right: 10px;
}
.download-button {
background-color: #044183; /* Blue color, you can change it to match your dark theme */
color: #fff; /* White text color */
border: none;
border-radius: 5px;
padding: 5px 10px;
cursor: pointer;
font-weight: bold;
margin-top: 10px; /* Add margin to separate it from app details */
}
.download-button:hover {
background-color: #022040; /* Darker blue color on hover */
}
.app-details {
margin-top: 10px; /* Add margin at the top of app details */
}
</style>
</head>
<body>
<div class="container">
<h1>AppCraft</h1>
<br>
<div id="appList"></div>
</div>
<script>
if ('standalone' in window.navigator && window.navigator.standalone) {
}
function loadApplerIni() {
fetch('Repos/All.ini')
.then(response => response.text())
.then(data => {
const appEntries = data.split('\n');
const appList = document.getElementById('appList');
appEntries.forEach((entry, index) => {
if (!entry.startsWith('//')) {
const appInfo = entry.split('|');
if (appInfo.length === 4) {
const appData = {
appName: appInfo[0].trim(),
downloadLink: appInfo[1].trim(),
appVersion: appInfo[2].trim(),
logoUrl: appInfo[3].trim()
};
const appElement = document.createElement('div');
appElement.classList.add('app');
const appIcon = document.createElement('img');
appIcon.src = appData.logoUrl;
appIcon.alt = appData.appName;
const appDetailsContainer = document.createElement('div');
appDetailsContainer.classList.add('app-details');
const appNameElement = document.createElement('h2');
appNameElement.textContent = appData.appName;
const appVersionElement = document.createElement('p');
appVersionElement.textContent = 'Version: ' + appData.appVersion;
const downloadButton = document.createElement('button');
downloadButton.classList.add('download-button');
downloadButton.textContent = 'Download';
// Add a click event handler to the download button
downloadButton.addEventListener('click', function () {
// Use the download link from appData
window.location.href = appData.downloadLink;
});
appElement.appendChild(appIcon);
appDetailsContainer.appendChild(appNameElement);
appDetailsContainer.appendChild(appVersionElement);
appElement.appendChild(appDetailsContainer);
appElement.appendChild(downloadButton);
appList.appendChild(appElement);
}
}
});
})
.catch(error => {
console.error('Error loading Appler.ini file:', error);
});
}
loadApplerIni();
</script>
</body>
</html>