Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update home page #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea/
Binary file added public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 17 additions & 31 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,25 @@
<html>
<head>
<meta charset="UTF-8" />
<style>
body {
margin: 0;
background: rgb(39, 0, 71);
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

canvas {
background-color: white;
}
button {
padding: 10px 20px;
font-size: x-large;
width: 80%;
height: 20%;
background-color: rgb(0, 128, 128);
color: rgb(218, 165, 32);
border: none;
cursor: pointer;
font-weight: bold;
}

.title {
color: white;
}
</style>
<link rel="stylesheet" href="style.css" />
<title>Thetawave</title>
<link rel="icon" href="favicon.png" type="image/x-icon" />
</head>

<body>
<button id="buttonToTriggerGame" type="button" onClick="location.href='/thetawave'">Click to Play Thetawave!</button>
<div class="screen scanlines">
<div class="flexbox hcenter screen-content">
<div id="logo-container" class="hcenter">
<img src="logo.gif" width="800" alt="logo"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<img src="logo.gif" width="800" alt="logo"/>
<img src="https://assets.thetawave.metalmancy.tech/promo/thetawave_logo_animated.gif" width="800" alt="logo"/>

I put this thing in S3, since we have used it a couple of times (probably better than google drive). Depending on how i set up CORS, we may need to do a little redirect in "dev_netlify.toml" and "prod_netlify.toml" to route "/logo.gif" to "https://assets.thetawave.metalmancy.tech/promo/thetawave_logo_animated.gif"

</div>
<div id="link-container" class="flexbox hcenter">
<div class="hdiv"></div>
<a href="/thetawave">Play</a>
<div class="hdiv"></div>
<a href="https://github.com/thetawavegame" target="_blank">Source Code</a>
<div class="hdiv"></div>
</div>
</div>
</div>
</body>
</html>
Binary file added public/logo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
153 changes: 153 additions & 0 deletions public/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
@import url('https://fonts.googleapis.com/css2?family=VT323');

:root {
--bgColorDark: #1b0733;
--bgColor: #200d48;
--bgColorLight: #2e206b;
--primaryColor: #fd145a;
--primaryGradient: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, var(--primaryColor) 50%, rgba(0, 0, 0, 0) 100%);
}

::selection {
background-color: var(--primaryColor);
color: var(--bgColor);
}

* {
font-family: 'VT323', serif;
color: var(--primaryColor);
}

html, body {
margin: 0;
padding: 0;
min-height: 100%;
width: 100%;
}

body {
background: radial-gradient(
circle,
var(--bgColorLight) 0%,
var(--bgColor) 50%,
var(--bgColorDark) 100%
) center;
animation: glow 4s ease-in-out infinite alternate;
font-family: 'VT323', serif;
}

a {
outline: none;
font-size: 3rem;
width: 100%;
text-decoration: none;
text-align: center;
line-height: 4rem;
}

a:active, a:focus, a:hover {
background: var(--primaryGradient);
color: var(--bgColor);
animation: glitch 0.3s cubic-bezier(0.5, 1, 0.5, 1) both;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is such a neat trick. A good CSS lesson for the day :)

transform-origin: 0 50%;
}

.hdiv {
height: 3px;
background: var(--primaryGradient);
width: 100%;
display: block;
}

.screen {
box-shadow: inset 0 0 18rem black, inset 0 0 12rem black, inset 0 0 6rem black;
position: absolute;
height: 100%;
width: 100%;
pointer-events: none;
display: block;
overflow: auto;
}

.screen-content {
width: 100%;
min-height: 100%;
position: absolute;
z-index: -1;
pointer-events: auto;
}

.scanlines {
position: absolute;
background: linear-gradient(
to bottom,
rgba(0, 0, 0, 0.2) 0%,
rgba(128, 128, 128, 0.2) 50%,
rgba(0, 0, 0, 0.2) 100%
);
background-size: 100% 6px;
animation: move-scanlines 60s linear infinite;
}

.flexbox {
display: flex;
flex-direction: column;
}

.hcenter {
align-items: center;
}

.vcenter {
text-align: center;
}

#logo-container {
padding-top: 6rem;
padding-bottom: 2rem;
display: flex;
}

#link-container {
width: 600px;
padding-bottom: 6rem;
}

@keyframes move-scanlines {
0% {
background-position: 0 0;
}
100% {
background-position: 0 100%;
}
}

@keyframes glow {
0% {
background-size: 120% 120%;
}
100% {
background-size: 80% 80%;
}
}

@keyframes glitch {
0% {
transform: translate(0);
}
20% {
transform: translate(-5px, 5px);
}
40% {
transform: translate(-5px, -5px);
}
60% {
transform: translate(5px, 5px);
}
80% {
transform: translate(5px, -5px);
}
100% {
transform: translate(0);
}
}