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;
|
||||
//Start building the page by calling data
|
||||
if (path_name === "/") build_event(0);
|
||||
if (path_name === "/" || path_name === "/release") build_event(1);
|
||||
if (path_name === "/" || path_name === "/activity") build_event(2);
|
||||
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 = "";
|
||||
/*
|
||||
<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
|
||||
|
||||
@@ -131,11 +193,12 @@ function pg_ctrl() {
|
||||
button.textContent = "•"; //• not ·
|
||||
pgctrl.appendChild(button);
|
||||
|
||||
if (pgctrl) button.addEventListener("click", function () {
|
||||
reset();
|
||||
slider_index = n;
|
||||
set();
|
||||
})
|
||||
if (pgctrl)
|
||||
button.addEventListener("click", function () {
|
||||
reset();
|
||||
slider_index = n;
|
||||
set();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
32
index.html
32
index.html
@@ -1,15 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>t404:null | Home</title>
|
||||
<meta name="description" 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" />
|
||||
<title>t404:null</title>
|
||||
<meta
|
||||
name="description"
|
||||
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" />
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/main.css" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/eruda"></script>
|
||||
<script>eruda.init();</script>
|
||||
|
||||
<script>
|
||||
eruda.init();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<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="carousel">
|
||||
<div class="slider-bg"></div>
|
||||
<div class="slider" id="pages">
|
||||
</div>
|
||||
<div class="slider" id="pages"></div>
|
||||
<div class="control">
|
||||
<span class="prev"><</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">
|
||||
<a href="/release">Releases (Click for more)</a>
|
||||
</h1>
|
||||
<div class="album-cards">
|
||||
</div>
|
||||
<div class="album-cards"></div>
|
||||
<hr />
|
||||
<h1 class="topic">
|
||||
<a href="/activity">Activities</a>
|
||||
</h1>
|
||||
<div class="half-image-cards">
|
||||
</div>
|
||||
<div class="half-image-cards"></div>
|
||||
</main>
|
||||
<script src="/assets/js/index.js" type="module"></script>
|
||||
<div class="footer">© t404:null 2021-2024 - All Rights Reserved</div>
|
||||
</body>
|
||||
|
||||
<script src="/assets/js/index.js" type="module"></script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user