-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
107 lines (98 loc) · 3.36 KB
/
index.html
File metadata and controls
107 lines (98 loc) · 3.36 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Elden Lord Progress</title>
<meta name="description" content="Check your Elden Ring progression!" />
<link rel="icon" href="assets/img/favicon.ico" />
<link href="assets/css/styles.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="assets/js/index.js" defer></script>
</head>
<body>
<video autoplay loop muted class="background-video">
<source src="./assets/img/background.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
<div class="container">
<h1 class="title">Elden Ring Progress Tracker</h1>
<main id="formSection">
<div
class="upload-area"
id="uploadArea"
aria-label="Upload Area"
role="button"
tabindex="0"
>
<strong>Upload Elden Ring save file:</strong>
<label for="savefile" class="visually-hidden"
>Choose a save file</label
>
<input
type="file"
id="savefile"
accept=".sl2, .co2"
aria-describedby="fileDescription"
style="display: none"
/>
<p id="fileDescription">
(Usually located in
C:/Users/<i>yourName</i>/AppData/Roaming/EldenRing/<i>aNumber</i>/ER0000.sl2)
</p>
<span>Click here to select your file</span>
<div class="file-name" id="fileName"></div>
<div class="upload-feedback" id="uploadFeedback"></div>
</div>
<!-- Slot Selector -->
<div class="slot-selector" style="display: none" id="slot_select">
<select id="slotDropdown">
<option value="">Select a Slot</option>
<option value="1">Slot 1</option>
</select>
</div>
<!-- Calculate Button -->
<button
style="display: none"
type="button"
id="calculate"
onclick="start()"
>
Start
</button>
</main>
<div id="resultSection"></div>
</div>
<footer>
<div class="footer-text">
<p>
Made by
<a href="https://github.com/Falkern" target="_blank">FALKERN</a>
</p>
</div>
</footer>
<script>
const uploadArea = document.getElementById("uploadArea");
const fileInput = document.getElementById("savefile");
const fileNameDisplay = document.getElementById("fileName");
// Handle file selection via click
uploadArea.addEventListener("click", () => {
fileInput.click();
});
// Handle file selection
fileInput.addEventListener("change", () => {
handleFiles(fileInput.files);
});
// Function to handle file(s)
function handleFiles(files) {
if (files.length > 0) {
const fileName = files[0].name;
fileNameDisplay.textContent = fileName; // Display the file name
document.getElementById("slot_select").style.display = "block"; // Show slot select if needed
document.getElementById("calculate").style.display = "block"; // Show calculate button
} else {
fileNameDisplay.textContent = ""; // Clear display if no files
}
}
</script>
</body>
</html>