Browse Source

Rework info that surrounds board

master
NGnius (Graham) 3 years ago
parent
commit
5f59bc30c6
2 changed files with 10 additions and 2 deletions
  1. +5
    -0
      site/board/board.js
  2. +5
    -2
      site/board/index.html

+ 5
- 0
site/board/board.js View File

@@ -4,6 +4,7 @@ let test_url = "http://localhost:1337/load?board=main-test&count=15&start=0";

let default_args = "?board=main-test&count=50&start=0";
let always_args = "&count=50&start=0";
let leaderboard_name_set = false;

function build_board() {
let leaderboard = document.getElementById("leaderboard");
@@ -29,6 +30,10 @@ function build_board() {
(result) => {
leaderboard.removeChild(errEntry)
for (entry of result.Items) {
if (!leaderboard_name_set) {
leaderboard_name_set = true;
document.getElementById("leaderboard-name").innerText = entry.BoardName + " (id: " + entry.BoardID + ")";
}
let newEntry = build_entry(entry);
// end
leaderboard.appendChild(newEntry);


+ 5
- 2
site/board/index.html View File

@@ -19,8 +19,8 @@
<script src="board.js"></script>
</head>
<body onload="build_board()">
<h1>Welcome to the Exmods leaderboard</h1>
<h3>I don't know how but they found me</h3>
<h1>High Scores</h1>
<h3 id="leaderboard-name"></h3>
<div id="leaderboard-container" class="board-container">
<div id="leaderboard" class="board">
<div id="entry0" class="board-entry">
@@ -30,5 +30,8 @@
</div>
</div>
</div>
<footer>
Scores from <a href="https://git.exmods.org/NGnius/leadercraft">Leadercraft</a> by <a href="https://twitter.com/NGniusness">NGnius</a>|<a href="https://git.exmods.org/ExMods/html-site">Site Repository</a>|<a href="https://exmods.org">Home</a>|<a href="https://discord.gg/2CtWzZT">Discord</a>|<a href="https://twitter.com/GamecraftMods">Twitter</a>
</footer>
</body>
</html>

Loading…
Cancel
Save