slight visual changes and alphabetize games list

This commit is contained in:
Sky 2023-07-23 14:12:43 -04:00
parent 6ffbb519d1
commit 07f7bb12b7
4 changed files with 316 additions and 5 deletions

View File

@ -58,5 +58,290 @@
"name": "Adventure Capitalist", "name": "Adventure Capitalist",
"directory": "adventure-capitalist", "directory": "adventure-capitalist",
"image": "icon.png" "image": "icon.png"
},
{
"name": "Bloons TD 3",
"directory": "btd3",
"image": "icon.png"
},
{
"name": "Avalanche",
"directory": "avalanche",
"image": "icon.png"
},
{
"name": "Slope",
"directory": "Slope",
"image": "slope4.jpeg"
},
{
"name": "Cell Machine",
"directory": "cell-machine",
"image": "img/icon.png"
},
{
"name": "Run 2",
"directory": "run2",
"image": "icon.jpg"
},
{
"name": "Vex 5",
"directory": "vex5",
"image": "icon.png"
},
{
"name": "Vex 4",
"directory": "vex4",
"image": "vex4.png"
},
{
"name": "Vex 2",
"directory": "vex2",
"image": "icon.png"
},
{
"name": "Crossy Road",
"directory": "crossyroad",
"image": "chicken.png"
},
{
"name": "Wall Smash",
"directory": "wallsmash",
"image": "icon.png"
},
{
"name": "Death Run 3D",
"directory": "death-run-3d",
"image": "img/death.png"
},
{
"name": "Gun Mayhem 2",
"directory": "gunmayhem2",
"image": "icon.png"
},
{
"name": "CircloO",
"directory": "circloo",
"image": "icon.png"
},
{
"name": "Vex",
"directory": "vex",
"image": "icon.png"
},
{
"name": "Stack",
"directory": "stack",
"image": "icon.png"
},
{
"name": "xx142-b2.exe",
"directory": "xx142-b2.exe",
"image": "icon.png"
},
{
"name": "paper.io",
"directory": "paperio",
"image": "icon.png"
},
{
"name": "Chibi Knight",
"directory": "chibiknight",
"image": "icon.png"
},
{
"name": "1v1.lol",
"directory": "1v1lol",
"image": "splash.png"
},
{
"name": "Dino",
"directory": "dino",
"image": "icon.png"
},
{
"name": "Turbowarp Packager",
"directory": "turbowarp",
"image": "icon.png"
},
{
"name": "Tetris",
"directory": "tetris",
"image": "icon.png"
},
{
"name": "Geometry Dash",
"directory": "gd",
"image": "icon.png"
},
{
"name": "Sand Game",
"directory": "sand",
"image": "icon.png"
},
{
"name": "Dante",
"directory": "dante",
"image": "icon.png"
},
{
"name": "Wordle",
"directory": "wordle",
"image": "icon.png"
},
{
"name": "Offline Paradise",
"directory": "offlineparadise",
"image": "icon.png"
},
{
"name": "2048",
"directory": "2048",
"image": "icon.png"
},
{
"name": "Doodle Jump",
"directory": "doodlejump",
"image": "icon.png"
},
{
"name": "Weave Silk",
"directory": "weavesilk",
"image": "icon.png"
},
{
"name": "Super Meat Boy",
"directory": "supermeatboy",
"image": "icon.png"
},
{
"name": "Vex 6",
"directory": "vex6",
"image": "icon.png"
},
{
"name": "WebGL Fluid Sim",
"directory": "fluidsim",
"image": "icon.png"
},
{
"name": "Basketball Stars",
"directory": "basketball-stars",
"image": "icon.png"
},
{
"name": "osu!",
"directory": "osu",
"image": "icon.png"
},
{
"name": "Cookie Clicker",
"directory": "cookieclicker",
"image": "icon.png"
},
{
"name": "Superhot",
"directory": "superhot",
"image": "icon.png"
},
{
"name": "Super Mario 64",
"directory": "sm64",
"image": "icon.png"
},
{
"name": "Gun Mayhem Redux",
"directory": "gunmayhemredux",
"image": "icon.png"
},
{
"name": "I Wanna Be Thy Copy",
"directory": "iwbtc",
"image": "icon.png"
},
{
"name": "HexGL",
"directory": "hexgl",
"image": "icon_128.png"
},
{
"name": "Champion Island",
"directory": "championisland",
"image": "icon.png"
},
{
"name": "Learn to Fly",
"directory": "ltf",
"image": "icon.png"
},
{
"name": "Turbowarp Editor",
"directory": "turbowarp-editor",
"image": "icon.png"
},
{
"name": "Wordle Bot",
"directory": "wordlebot",
"image": "icon.png"
},
{
"name": "Cut The Rope",
"directory": "ctr",
"image": "icon.png"
},
{
"name": "Chess",
"directory": "chess",
"image": "icon.png"
},
{
"name": "Flappy Bird",
"directory": "flappybird",
"image": "icon.png"
},
{
"name": "Lows Adventures 2",
"directory": "lowsadventures2",
"image": "icon.png"
},
{
"name": "Drift Boss",
"directory": "drift-boss",
"image": "icon.png"
},
{
"name": "Fireboy Watergirl",
"directory": "fireboywatergirl",
"image": "icon.png"
},
{
"name": "Gun Mayhem",
"directory": "gunmayhem",
"image": "icon.png"
},
{
"name": "Duck Life 4",
"directory": "ducklife4",
"image": "icon.png"
},
{
"name": "Achievement Unlocked",
"directory": "achieveunlocked",
"image": "icon.png"
},
{
"name": "Achievement Unlocked 2",
"directory": "achieveunlocked2",
"image": "icon.png"
},
{
"name": "This Is The Only Level",
"directory": "thisistheonlylevel",
"image": "logo.png"
},
{
"name": "This Is The Only Level 2",
"directory": "thisistheonlylevel2",
"image": "icon.png"
} }
] ]

View File

@ -1,7 +1,8 @@
// https://s2.googleusercontent.com/s2/favicons?domain= // https://s2.googleusercontent.com/s2/favicons?domain=
function setCloakCookie() { function setCloakCookie() {
document.cookie = 'tabicon=https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=' + $('#webicon').val() + '&size=32'; url = cloakExceptions($('#webicon').val())
document.cookie = 'tabicon=https://s2.googleusercontent.com/s2/favicons?domain_url=' + url;
document.cookie = 'tabname=' + $('#webname').val(); document.cookie = 'tabname=' + $('#webname').val();
setCloak(); setCloak();
} }
@ -64,3 +65,11 @@ function getCookie(cname) {
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
setCloak(); setCloak();
}); });
function cloakExceptions(url) {
if (url.includes('harrisonburg.instructure.com') == true) {
console.log("success");
return "learn.canvas.net";
}
return url;
}

View File

@ -1,4 +1,5 @@
$.getJSON("/games.json", function (data) { $.getJSON("/games.json", function (data) {
data.sort(dynamicSort("name"));
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
$('#games').append( $('#games').append(
$('<div>').prop({ $('<div>').prop({
@ -26,3 +27,19 @@ $(document).ready(function() {
function redirectGame(dir) { function redirectGame(dir) {
window.location.href = window.location.origin + "/" + dir + "/index.html"; window.location.href = window.location.origin + "/" + dir + "/index.html";
} }
function dynamicSort(property) {
var sortOrder = 1;
if(property[0] === "-") {
sortOrder = -1;
property = property.substr(1);
}
return function (a,b) {
if(sortOrder == -1){
return b[property].localeCompare(a[property]);
}else{
return a[property].localeCompare(b[property]);
}
}
}

View File

@ -104,10 +104,10 @@ a:hover {
} }
body { body {
background: linear-gradient(45deg, rgba(36, 69, 128, 1) 0%, rgba(29, 20, 105, 1) 33%, rgba(36, 69, 128, 1) 66%, rgb(29, 20, 105) 100%); background: linear-gradient(45deg, rgba(36, 69, 128, 1) 0%, rgb(24, 17, 87) 33%, rgba(36, 69, 128, 1) 66%, rgb(24, 17, 87) 100%);
background-size: 400% 400%; background-size: 400% 400%;
animation: gradient 20s linear infinite; animation: gradient 30s linear infinite;
height: 100vh; height: 100%;
} }
@keyframes gradient { @keyframes gradient {