From 045ad1512982debfd2e8d5c4ef3060d784dd44ec Mon Sep 17 00:00:00 2001 From: mostlime12195 Date: Thu, 19 Dec 2024 22:15:10 +0300 Subject: [PATCH] Version 0.4.0. PixiJS version updated to v6. Slight visible changes made to website design. Frontpage structure modified for experimentation. --- local.html => favourites.html | 0 footer.html | 14 +- genre.html => genres.html | 0 index.html | 270 +++++++------------ new.html => latest.html | 0 navbar.html | 6 +- hot.html => popular.html | 0 scripts/addbeatmaplist.js | 215 ++++++++------- scripts/downloader.js | 193 ++++++++------ scripts/launchgame.js | 4 +- scripts/lib/pixi.min.js | 7 +- scripts/overlay/break.js | 2 +- scripts/overlay/loading.js | 10 +- scripts/overlay/progress.js | 4 +- scripts/overlay/score.js | 24 -- scripts/overlay/volume.js | 4 +- scripts/playback.js | 2 +- style/main.css | 483 +++++++++++++++++++++++++--------- 18 files changed, 708 insertions(+), 530 deletions(-) rename local.html => favourites.html (100%) rename genre.html => genres.html (100%) rename new.html => latest.html (100%) rename hot.html => popular.html (100%) diff --git a/local.html b/favourites.html similarity index 100% rename from local.html rename to favourites.html diff --git a/footer.html b/footer.html index 693c70c..94f2df1 100644 --- a/footer.html +++ b/footer.html @@ -1,10 +1,10 @@ - + + \ No newline at end of file diff --git a/genre.html b/genres.html similarity index 100% rename from genre.html rename to genres.html diff --git a/index.html b/index.html index 8f0d761..29b7983 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,8 @@ WebOsu 2.0! - + @@ -57,39 +58,15 @@
-
+
+
+
+
Announcement: This site is still under development. If you encounter any issues, read the FAQ.

-
Get new random Beatmaps

Random Beatmaps

@@ -100,7 +77,7 @@

Random Beatmaps

Latest Beatmaps

- View more latest beatmaps + View more latest beatmaps
@@ -108,7 +85,7 @@

Latest Beatmaps

Favourited Beatmaps

- View more favourited beatmaps + View more favourited beatmaps
@@ -116,160 +93,105 @@

Favourited Beatmaps

- - -
-
- Scripts -
-
-
- Skin -
-
-
- Hitsounds -
-
-
- + +
+
+ Scripts +
+
+
+ Skin +
+
+
+ Hitsounds +
+
+
+ + + // fill list + let randstart = Math.floor(Math.random() * 20000); + addBeatmapList("https://api.sayobot.cn/beatmaplist?0=10&1=" + randstart + "&2=1&5=1", list, + function (t) { while (list.firstChild) list.removeChild(list.firstChild); return (t.modes & 1) != 0; }, 4); + } + genRandomList(); + // hot + addBeatmapList("https://api.sayobot.cn/beatmaplist?0=4&1=0&2=1&5=1", document.getElementById("beatmap-list-hot")); + // liked + if (window.localforage) { + window.localforage.getItem("likedsidset", function (err, val) { + if (err) { + document.getElementById("beatmap-list-liked").innerText = "Could not get liked beatmaps."; + return; + } + if (val && val.size) { + let listlike = document.getElementById("beatmap-list-liked"); + list = Array.from(val); + for (let i = 0; i < list.length && i < 4; ++i) + addBeatmapSid(list[i], listlike); + } + else { + document.getElementById("beatmap-list-liked").innerText = "Heart any beatmap to add them here."; + } + }); + } + else { + alert("localforage not supported") + } + diff --git a/new.html b/latest.html similarity index 100% rename from new.html rename to latest.html diff --git a/navbar.html b/navbar.html index 64d3b12..e206e8a 100644 --- a/navbar.html +++ b/navbar.html @@ -1,8 +1,8 @@