diff --git a/assets/js/index.js b/assets/js/index.js
index 35ecf6e..649da09 100644
--- a/assets/js/index.js
+++ b/assets/js/index.js
@@ -1,13 +1,18 @@
+//Carousel
let next = document.querySelector(".next");
let prev = document.querySelector(".prev");
let pages = document.getElementById("pages");
-let pgctrl = [document.querySelector(".pgctrl")];
+let pgctrl = document.querySelector(".pgctrl");
let slider = document.querySelector(".slider");
let carousel = document.querySelector(".carousel");
let bg = document.querySelector(".slider-bg");
+//Album-cards
+let album_cards = document.querySelector(".album-cards");
+
+//The Database call.
import { createClient } from "https://cdn.jsdelivr.net/npm/@supabase/supabase-js/+esm";
const supabaseUrl = "https://owbamcqdmqetrgcznxva.supabase.co";
@@ -18,24 +23,7 @@ const supabaseKey =
//the moment you notice you need an API endpoint.
const supabase = createClient(supabaseUrl, supabaseKey);
-//prototype
-let img = [
- "https://cdn.glitch.com/f6cb427c-2cdb-4693-bc00-9d3e2991008c%2FScreenshot%20(36).png?v=1633031087464",
- "https://cdn.glitch.global/f594d6b7-e72e-477c-b5cb-d71abbd39f44/oblitus-requiem.png?v=1717353087051",
- "https://cdn.glitch.global/2d9e31c1-a947-46cd-9fd2-8c92be70abe2/A_Lake_With_Endless_Stars.png",
- ],
- pg = ["/", "release/Oblitus_Requiem", "release/A_Lake_With_Endless_Stars"],
- title = [
- "This page is still under construction.",
- "Oblitus Requiem \\\\Against the Forsaken Legacy//",
- "A Lake With Endless Stars",
- ],
- desc = [
- "The page is still under development. In cases, this page will change after reload or after a few days and a reload.",
- '"Even if you don\'t remember me now, I will bring the you I once knew back from them."',
- '"Under the coruscating night sky, gaze into the kaleidoscopic waters..."',
- ];
-
+//the elements for the carousel
if (!document) console.log("press f");
if (!next) console.log("Class next missing.");
if (!prev) console.log("Class prev missing.");
@@ -45,117 +33,187 @@ if (!carousel) console.log("Class carousel missing.");
let slider_index = 0;
let touchstartX = 0;
let touchendX = 0;
+let highlights = [],
+ releases = [],
+ activities = [],
+ default_highlights = [
+ {
+ img_url:
+ "https://cdn.glitch.com/f6cb427c-2cdb-4693-bc00-9d3e2991008c%2FScreenshot%20(36).png?v=1633031087464",
+ url: "/",
+ title: "This page is still under construction.",
+ preview:
+ "The page is still under development. In cases, this page will change after reload or after a few days and a reload.",
+ },
+ ];
-//create pages and add buttons
-init_page();
-pg_ctrl();
-
-pgctrl.push(document.querySelectorAll(".pgctrl li"));
-if (pgctrl[1])
- pgctrl[1].forEach((m, n) =>
- m.addEventListener("click", function () {
- reset();
- slider_index = n;
- set();
- })
- );
-
-//refresh
-reset();
-set();
-
-
-let highlights, releases, activities;
-
-async function fetch_highlights() {
- let { data, error } = await supabase
+let path_name = window.location.pathname;
+//Start building the page by calling data
+let params = new URLSearchParams(location.search);
+if (!params.get("release")) {
+ if (path_name === "/") {
+ document.title = "t404:null | Home";
+ build_event(0);
+ }
+ if (path_name === "/" || path_name === "/release") build_event(1);
+ if (path_name === "/" || path_name === "/activity") build_event(2);
+} else {
+ let main = document.querySelector("main");
+ main.innerHTML = "";
+ /*
+