Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardKanshen committed Feb 27, 2024
0 parents commit e4b54c1
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 0 deletions.
58 changes: 58 additions & 0 deletions index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
hero {
background: black;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
perspective: 1000px;
}

heading {
color: white;
font-family: "Uni Sans CAPS";
font-weight: bold;
font-size: 128px;
}

subheading {
color: white;
font-family: "Uni Sans CAPS";
font-weight: normal;
font-size: 32px;
}

body {
margin: 0;
}

downloadbutton {
border-radius: 16px;
height: 75px;
width: 333px;
background: white;
color: black;
font-size: 24px;
font-family: 'Uni Sans CAPS';
font-weight: bold;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
transition: width 0.5s ease-in-out, background 0.5s ease-in-out, color 0.5s ease-in-out
}

downloadbutton[disabled] {
background: #666;
color: #333;
width: 275px;
};

a#downloadbutton {
all: unset;
text-decoration: none;
cursor: pointer;
top: 20px;
position: relative;
}
20 changes: 20 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>× deadforge ×</title>
<link rel="stylesheet" href="index.css">

<link rel="icon" type="image/x-icon" href="/images/logos/favicon.ico">
<link rel="stylesheet" href="/fonts/Uni Sans/stylesheet.css">
<link rel="stylesheet" href="/fonts/Montserrat/stylesheet.css">
</head>
<body>
<hero>
<heading>DeadForge</heading>
<subheading>A launcher by DeadCode</subheading>
<a id="downloadbutton"><downloadbutton disabled="">Download</downloadbutton></a>
</hero>
</body>
<script src="index.js"></script>
</html>
25 changes: 25 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const heading = document.querySelector('heading');
const subheading = document.querySelector('subheading');
const button = document.querySelector('downloadbutton');
const buttonlink = document.querySelector("a#downloadbutton")

document.addEventListener('mousemove', (e) => {
const offsetX = (window.innerWidth / 2 - e.clientX) * 0.05; // Adjust the factor to control the movement intensity
const offsetY = (window.innerHeight / 2 - e.clientY) * 0.05; // Adjust the factor to control the movement intensity

heading.style.transform = `translate(${offsetX}px, ${offsetY}px)`;
subheading.style.transform = `translate(${offsetX * 1.5}px, ${offsetY * 1.5}px)`; // Adjust the factor for faster movement
button.style.transform = `translate(${offsetX * 2}px, ${offsetY * 2}px)`;
});

var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var JS = JSON.parse(this.responseText);
button.textContent += " " + JS[0].tag_name;
buttonlink.setAttribute("href", JS[0].html_url);
button.removeAttribute("disabled");
}
};
xmlhttp.open("GET", "https://api.github.com/repos/DeadCodeGames/DeadForge-Launcher/releases", true);
xmlhttp.send();

0 comments on commit e4b54c1

Please sign in to comment.