minor fixes
This commit is contained in:
@ -34,6 +34,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<input type="text" class="searchbar" id="gamesearch" placeholder="Type here to search.." />
|
||||
<p id="gameCount">xx games loaded..</p>
|
||||
<p id="starredHeader">starred apps</p>
|
||||
<div id="starredgames">
|
||||
</div>
|
||||
|
||||
@ -22,6 +22,7 @@ body {
|
||||
margin: 0;
|
||||
border: none;
|
||||
font-family: "Mulish", serif;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
body {
|
||||
animation: 1s ease-out loadIn;
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
setBackground();
|
||||
fetch("/data/quotes.json")
|
||||
fetch("/quotes.json")
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
const randomQuote = data[Math.floor(Math.random() * data.length)];
|
||||
|
||||
@ -48,6 +48,7 @@ async function loadGames() {
|
||||
starEvent(e);
|
||||
});
|
||||
});
|
||||
document.getElementById("gameCount").innerText = `${data.length} apps loaded!`;
|
||||
document.getElementById("loadingMsg").style.display = "none";
|
||||
document.getElementById("allHeader").style.display = "block";
|
||||
starredGames = JSON.parse(localStorage.getItem("selenite.starred") || '[]');
|
||||
@ -58,7 +59,7 @@ async function loadGames() {
|
||||
let newElement = element.cloneNode(true);
|
||||
document.getElementById("starredgames").appendChild(newElement);
|
||||
newElement.addEventListener("click", ()=>{
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}`
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}&type=a`
|
||||
});
|
||||
});
|
||||
document.querySelectorAll("#starredgames #star").forEach((e) => {
|
||||
|
||||
@ -40,7 +40,7 @@ async function loadGames() {
|
||||
gamesElement.appendChild(newElement);
|
||||
elements.push(newElement);
|
||||
newElement.addEventListener("click", ()=>{
|
||||
location.href=`/loader.html?title=${encodeURIComponent(element.name)}&dir=${element.directory}&img=${element.image}`
|
||||
location.href=`/loader.html?title=${encodeURIComponent(element.name)}&dir=${element.directory}&img=${element.image}&type=g`
|
||||
});
|
||||
star.addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
@ -48,6 +48,7 @@ async function loadGames() {
|
||||
starEvent(e);
|
||||
});
|
||||
});
|
||||
document.getElementById("gameCount").innerText = `${data.length} games loaded!`;
|
||||
document.getElementById("loadingMsg").style.display = "none";
|
||||
document.getElementById("allHeader").style.display = "block";
|
||||
starredGames = JSON.parse(localStorage.getItem("selenite.starred") || '[]');
|
||||
@ -58,7 +59,7 @@ async function loadGames() {
|
||||
let newElement = element.cloneNode(true);
|
||||
document.getElementById("starredgames").appendChild(newElement);
|
||||
newElement.addEventListener("click", ()=>{
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}`
|
||||
location.href=`/loader.html?title=${newElement.childNodes[1].childNodes[0].innerText}&dir=${newElement.getAttribute("data-target")}&img=${newElement.getAttribute("data-image")}&type=g`
|
||||
});
|
||||
});
|
||||
document.querySelectorAll("#starredgames #star").forEach((e) => {
|
||||
|
||||
@ -23,7 +23,8 @@ function cursor() {
|
||||
cursor.style.backgroundColor = "var(--color-1)";
|
||||
cursor.style.position = "absolute";
|
||||
cursor.style.borderRadius = "100%";
|
||||
cursor.style.filter = "blur(60px)";
|
||||
cursor.style.filter = "blur(50px)";
|
||||
cursor.style.transitionDuration = "0s";
|
||||
cursor.style.opacity = "1";
|
||||
cursor.style.pointerEvents = "none";
|
||||
document.body.appendChild(cursor);
|
||||
|
||||
13
loader.html
13
loader.html
@ -21,14 +21,19 @@
|
||||
location.search.substr(1).split("&").forEach((e)=>{
|
||||
items[e.split("=")[0]] = e.split("=")[1]
|
||||
});
|
||||
document.getElementById("gameFrame").setAttribute("src", `/resources/semag/${items.dir}/index.html`);
|
||||
document.getElementById("gameImage").setAttribute("src", `/resources/semag/${items.dir}/${items.img}`);
|
||||
if(items.type == "g") {
|
||||
items.type = "semag";
|
||||
} else {
|
||||
items.type = "sppa";
|
||||
}
|
||||
document.getElementById("gameFrame").setAttribute("src", `/resources/${items.type}/${items.dir}/index.html`);
|
||||
document.getElementById("gameImage").setAttribute("src", `/resources/${items.type}/${items.dir}/${items.img}`);
|
||||
document.getElementById("gameName").innerText = decodeURIComponent(items.title);
|
||||
console.log(items);
|
||||
} else if(localStorage.getItem("selenite.lastGame")) {
|
||||
let game = JSON.parse(decodeURIComponent(atob(localStorage.getItem("selenite.lastGame"))));
|
||||
document.getElementById("gameFrame").setAttribute("src", `/resources/semag/${game[0]}/index.html`);
|
||||
document.getElementById("gameImage").setAttribute("src", `/resources/semag/${game[0]}/${decodeURIComponent(game[1])}`);
|
||||
document.getElementById("gameFrame").setAttribute("src", `/resources/${items.type}/${game[0]}/index.html`);
|
||||
document.getElementById("gameImage").setAttribute("src", `/resources/${items.type}/${game[0]}/${decodeURIComponent(game[1])}`);
|
||||
document.getElementById("gameName").innerText = game[2];
|
||||
}
|
||||
document.getElementById("fullscreen").addEventListener("click", () => {
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<input type="text" class="searchbar" id="gamesearch" placeholder="Type here to search.." />
|
||||
<p id="gameCount">xx games loaded..</p>
|
||||
<p id="starredHeader">starred games</p>
|
||||
<div id="starredgames">
|
||||
</div>
|
||||
|
||||
0
quotes.json
Normal file
0
quotes.json
Normal file
Reference in New Issue
Block a user