-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c33550
commit 8a81d91
Showing
2 changed files
with
49 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,41 +10,43 @@ | |
</head> | ||
<body> | ||
<h1>VTP6</h1> | ||
<ul id="linklist"></ul> | ||
<script> | ||
const LIST_OF_LINKS = [ | ||
"Latin GCSE Page 1", | ||
"Latin GCSE Page 2", | ||
"Latin GCSE Page 3", | ||
"Latin GCSE Page 4", | ||
"Latin GCSE Page 5", | ||
"Latin GCSE Page 6", | ||
"", | ||
"Latin GCSE Eng To Lat Page 1", | ||
"Latin GCSE Eng To Lat Page 2", | ||
"", | ||
"Latin To GCSE Chapter 1", | ||
"Latin To GCSE Chapter 2", | ||
"Latin To GCSE Chapter 3", | ||
"Latin To GCSE Chapter 4", | ||
"Latin To GCSE Chapter 5", | ||
"Latin To GCSE Chapter 6", | ||
"", | ||
"Spanish GCSE Unit 1", | ||
"Spanish GCSE Unit 2", | ||
"Spanish GCSE Unit 3", | ||
"Spanish GCSE Unit 4", | ||
"Spanish GCSE Unit 5", | ||
"Spanish GCSE Unit 6", | ||
"Spanish GCSE Unit 7", | ||
"Spanish GCSE Unit 8", | ||
"Spanish GCSE Unit 9", | ||
"Spanish GCSE Unit 10", | ||
"Spanish GCSE Unit 11", | ||
"Spanish GCSE Unit 12", | ||
["Latin GCSE", [ | ||
"Page 1", | ||
"Page 2", | ||
"Page 3", | ||
"Page 4", | ||
"Page 5", | ||
"Page 6", | ||
"Eng To Lat Page 1", | ||
"Eng To Lat Page 2", | ||
]], | ||
["Latin To GCSE", [ | ||
"Chapter 1", | ||
"Chapter 2", | ||
"Chapter 3", | ||
"Chapter 4", | ||
"Chapter 5", | ||
"Chapter 6", | ||
]], | ||
["Spanish GCSE", [ | ||
"Unit 1", | ||
"Unit 2", | ||
"Unit 3", | ||
"Unit 4", | ||
"Unit 5", | ||
"Unit 6", | ||
"Unit 7", | ||
"Unit 8", | ||
"Unit 9", | ||
"Unit 10", | ||
"Unit 11", | ||
"Unit 12", | ||
]] | ||
]; // Link creation is automated | ||
</script> | ||
<script src="load.js"></script> | ||
<sub>© Rujul Nayak 2023 - <a href="mailto:[email protected]">Feedback</a></sub> | ||
<sub id="sub">© Rujul Nayak 2023 - <a href="mailto:[email protected]">Feedback</a></sub> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
// Load the links onto the main page | ||
|
||
const ll = document.getElementById("linklist"); | ||
const sub = document.getElementById("sub"); | ||
|
||
LIST_OF_LINKS.forEach(s => { | ||
if (s === "") { | ||
ll.appendChild(document.createElement("br")); | ||
} else { | ||
LIST_OF_LINKS.forEach(p => { | ||
let [a, b] = p; | ||
let det = document.createElement("details"); | ||
let sum = document.createElement("summary"); | ||
sum.innerHTML = a; | ||
det.appendChild(sum); | ||
let ul = document.createElement("ul"); | ||
b.forEach(s => { | ||
let newli = document.createElement("li"); | ||
newli.innerHTML = `<a href="./sets/` + s.replaceAll(" ", "") + `">` + s + `</a>`; | ||
ll.appendChild(newli); | ||
} | ||
newli.innerHTML = `<a href="./sets/` + (a + s).replaceAll(" ", "") + `">` + s + `</a>`; | ||
ul.appendChild(newli); | ||
}); | ||
det.appendChild(ul); | ||
document.body.insertBefore(det, sub); | ||
document.body.insertBefore(document.createElement("br"), sub); | ||
document.body.insertBefore(document.createElement("br"), sub); | ||
}); |