mirror of
https://github.com/t404owo/t404null.git
synced 2025-12-12 18:08:47 +00:00
Added Release Page
This commit is contained in:
@@ -49,9 +49,71 @@ let highlights = [],
|
|||||||
|
|
||||||
let path_name = window.location.pathname;
|
let path_name = window.location.pathname;
|
||||||
//Start building the page by calling data
|
//Start building the page by calling data
|
||||||
if (path_name === "/") build_event(0);
|
let params = new URLSearchParams(location.search);
|
||||||
if (path_name === "/" || path_name === "/release") build_event(1);
|
if (!params.get("release")) {
|
||||||
if (path_name === "/" || path_name === "/activity") build_event(2);
|
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 = "";
|
||||||
|
/*
|
||||||
|
<div class="release-track" style="
|
||||||
|
background-image: url(https://cdn.glitch.global/f594d6b7-e72e-477c-b5cb-d71abbd39f44/oblitus-requiem.png);
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
">
|
||||||
|
<div class="text-box">
|
||||||
|
<h1 class="title">
|
||||||
|
<strong>Insert Title here</strong>
|
||||||
|
</h1>
|
||||||
|
(Raw Context here)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
*/
|
||||||
|
let id = params.get("release").replace(/^\//g, "");
|
||||||
|
console.log(id);
|
||||||
|
supabase
|
||||||
|
.from("events")
|
||||||
|
.select("title, context, bg_src")
|
||||||
|
.eq("event_id", id)
|
||||||
|
.then((d) => {
|
||||||
|
let res = d.data;
|
||||||
|
if (res !== null && res.length > 0) {
|
||||||
|
let _pg = document.createElement("div"),
|
||||||
|
_box = document.createElement("div"),
|
||||||
|
_h1 = document.createElement("h1"),
|
||||||
|
title = document.createElement("strong"),
|
||||||
|
data = res[0];
|
||||||
|
|
||||||
|
_pg.classList.add("release-track");
|
||||||
|
_pg.style =
|
||||||
|
"background-image: url(" +
|
||||||
|
data.bg_src +
|
||||||
|
");" +
|
||||||
|
"background-size: cover;" +
|
||||||
|
"background-position: center;";
|
||||||
|
|
||||||
|
_box.classList.add("text-box");
|
||||||
|
title.textContent = data.title;
|
||||||
|
|
||||||
|
|
||||||
|
main.appendChild(_pg);
|
||||||
|
_pg.appendChild(_box);
|
||||||
|
_box.appendChild(_h1);
|
||||||
|
_h1.appendChild(title);
|
||||||
|
_box.innerHTML+=data.context;
|
||||||
|
|
||||||
|
document.title = "t404:null | " + data.title;
|
||||||
|
} else {
|
||||||
|
main.innerHTML = "404";
|
||||||
|
document.title = "t404:null | Not Found";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// #region Slider section
|
// #region Slider section
|
||||||
|
|
||||||
@@ -130,12 +192,13 @@ function pg_ctrl() {
|
|||||||
let n = i;
|
let n = i;
|
||||||
button.textContent = "•"; //• not ·
|
button.textContent = "•"; //• not ·
|
||||||
pgctrl.appendChild(button);
|
pgctrl.appendChild(button);
|
||||||
|
|
||||||
if (pgctrl) button.addEventListener("click", function () {
|
if (pgctrl)
|
||||||
reset();
|
button.addEventListener("click", function () {
|
||||||
slider_index = n;
|
reset();
|
||||||
set();
|
slider_index = n;
|
||||||
})
|
set();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
34
index.html
34
index.html
@@ -1,15 +1,23 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>t404:null | Home</title>
|
<title>t404:null</title>
|
||||||
<meta name="description" content="Hello there! I'm t404:null (a.k.a t404owo).
|
<meta
|
||||||
I write/make/produce EDM music(DTM), and for every releases I'll post my music on this website. If you have any requests or questions, feel free contact me." />
|
name="description"
|
||||||
<link rel="icon" type="image/x-icon" href="https://cdn.glitch.global/2d9e31c1-a947-46cd-9fd2-8c92be70abe2/t404_null%20Icon.png" />
|
content="Hello there! I'm t404:null (a.k.a t404owo).
|
||||||
|
I write/make/produce EDM music(DTM), and for every releases I'll post my music on this website. If you have any requests or questions, feel free contact me."
|
||||||
|
/>
|
||||||
|
<link
|
||||||
|
rel="icon"
|
||||||
|
type="image/x-icon"
|
||||||
|
href="https://cdn.glitch.global/2d9e31c1-a947-46cd-9fd2-8c92be70abe2/t404_null%20Icon.png"
|
||||||
|
/>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="stylesheet" type="text/css" href="/assets/css/main.css" />
|
<link rel="stylesheet" type="text/css" href="/assets/css/main.css" />
|
||||||
<script src="https://cdn.jsdelivr.net/npm/eruda"></script>
|
<script src="https://cdn.jsdelivr.net/npm/eruda"></script>
|
||||||
<script>eruda.init();</script>
|
<script>
|
||||||
|
eruda.init();
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav>
|
<nav>
|
||||||
@@ -197,8 +205,7 @@ I write/make/produce EDM music(DTM), and for every releases I'll post my music o
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="carousel">
|
<div class="carousel">
|
||||||
<div class="slider-bg"></div>
|
<div class="slider-bg"></div>
|
||||||
<div class="slider" id="pages">
|
<div class="slider" id="pages"></div>
|
||||||
</div>
|
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<span class="prev"><</span>
|
<span class="prev"><</span>
|
||||||
<span class="next">></span>
|
<span class="next">></span>
|
||||||
@@ -212,16 +219,15 @@ I write/make/produce EDM music(DTM), and for every releases I'll post my music o
|
|||||||
<h1 class="topic">
|
<h1 class="topic">
|
||||||
<a href="/release">Releases (Click for more)</a>
|
<a href="/release">Releases (Click for more)</a>
|
||||||
</h1>
|
</h1>
|
||||||
<div class="album-cards">
|
<div class="album-cards"></div>
|
||||||
</div>
|
|
||||||
<hr />
|
<hr />
|
||||||
<h1 class="topic">
|
<h1 class="topic">
|
||||||
<a href="/activity">Activities</a>
|
<a href="/activity">Activities</a>
|
||||||
</h1>
|
</h1>
|
||||||
<div class="half-image-cards">
|
<div class="half-image-cards"></div>
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
<script src="/assets/js/index.js" type="module"></script>
|
|
||||||
<div class="footer">© t404:null 2021-2024 - All Rights Reserved</div>
|
<div class="footer">© t404:null 2021-2024 - All Rights Reserved</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
|
||||||
|
<script src="/assets/js/index.js" type="module"></script>
|
||||||
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user