Skip to content

Commit

Permalink
Footer Redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
HEJOK254 committed Sep 3, 2024
1 parent 50e496a commit f8a1276
Show file tree
Hide file tree
Showing 4 changed files with 262 additions and 36 deletions.
54 changes: 36 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,43 @@
<p>Five nights at freddy's</p>
</main>
<footer>
<h3>This is a footer</h3>
<div class="mainContainer">
<div id="footerTitle">
<h1><span>I am a footer.</span></h1>
<p class="randomTextShort">Random Text</p>
</div>
<div class="contentContainer">
<div>
<h2>Contact me:</h2>
<p><a href="mailto:[email protected]">[email protected]</a></p>
</div>
<div>
<h2>Sitemap:</h2>
<p><a href="/sitemap.xml">hejok254.github.io/sitemap.xml</a></p>
</div>
</div>
</div>
<hr />
<p>It is very much useless at the moment</p>
<br />
<p>Trust me, there's nothing interesting here</p>
<a href="https://github.com/HEJOK254"
><img
src="/resources/images/logos/github-mark-white.svg"
title="My Github"
alt="GitHub logo"
class="footerLogo"
/></a>
<a href="https://github.com/HEJOK254"
><img
src="/resources/images/logos/discord-mark-white.svg"
title="My Discord"
alt="Discord logo"
class="footerLogo"
/></a>
<div class="bottomPanel">
<a href="https://github.com/HEJOK254" class="footerIcon">
<img
src="/resources/images/logos/github-mark-white.svg"
title="My Github"
alt="GitHub logo" />
</a>
<a href="https://dly.to/OTxm9NjIiVv" class="footerIcon">
<img
src="/resources/images/logos/daily-dev-white.svg"
title="My Daily.dev Profile (barely used)"
alt="Daily.dev logo" />
</a>
<a href="https://discord.gg/8qzctfPrBW" class="footerIcon">
<img
src="/resources/images/logos/discord-mark-white.svg"
title="GameBot Discord Server"
alt="Discord logo" />
</a>
</div>
</footer>
</body>
</html>
19 changes: 19 additions & 0 deletions resources/images/logos/daily-dev-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 77 additions & 5 deletions resources/scripts/random.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Credit: Takos c: (he came up with all those random strings)
const strings = [
const longStrings = [
"Hejok254 was here",
"I am a foot",
"I own an elbow!",
Expand Down Expand Up @@ -67,10 +67,82 @@ const strings = [
"69th message hehe", // Not really because I've removed some lmao
"dawg"
];
const shortStrings = [
"Hejok254 was here",
"I am a foot",
"I own an elbow!",
"Peter, the horse is here",
"you know what that means... F I S H",
"Le fish au chocolat",
"#CAOE68",
"awesome website moment",
"holy moly",
":)",
"Dash all day, dash all night",
"Im going to sleep",
"wake up",
"She garten on my banban til i opila bird",
"did you ever saw a so fast dog?",
"i love cp (creator points [gd])",
"Hejok69420 swag",
"Your home security is great... or is it?",
"yes",
"is water wet?",
"bowomp",
"*instert message here*",
"McDonald fries hit different",
"rtyhn mju.j8ikl",
"meow",
"https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"baller",
"i got that rgbtq keyboard",
":3",
"thats so awesome sauce",
"an apple a day keeps the doctor away",
"chroma core 2027",
"𝓯𝓻𝓮𝓪𝓴𝔂",
"fish jumpscare",
"MILF - Man I Love Frogs",
"come kiss me on my hot mouth, im feeling romantical",
"CAREFUL SPONGEBOB, CAREFUL SPONGEBOB, CAREFUL SPONGEBOB!!!",
"what the dog doing?",
"Everybody asks what the dog doing, but not how the dog doing :(",
"stop edging me like this lil bro",
"John H. Backlights",
"¯\\_(ツ)_/¯",
"chat, get his address",
"Takos reference",
">>>> TIDAL >>>>",
"<<<< WAVE <<<<",
"woah, a pipe bomb!",
"153.383.61.563",
"har har har har har har har har har har",
"KILLBOT",
"The banana spoke in riddles",
"Pidgeons are not real",
"The heavy is dead?!!",
"GOLF!",
"i love money",
"We need to cook jesse",
"oh damn it, the monkey escaped",
"LETS GO GAMBLING!",
"aw dang it",
"i cant stop winning!",
"michael jackson",
"bo'ohw'o'wo'er",
"help me",
"69th message hehe", // Not really because I've removed some lmao
"dawg"
];

const randomElements = document.querySelectorAll(".randomText");
const stringCount = strings.length;
const randomLongElements = document.querySelectorAll(".randomText");
const randomShortElements = document.querySelectorAll(".randomTextShort");
const longStringCount = longStrings.length;
const shortStringCount = longStrings.length;

randomElements.forEach((element) => {
element.innerHTML = strings[Math.floor(Math.random() * stringCount)];
randomLongElements.forEach((element) => {
element.innerHTML = longStrings[Math.floor(Math.random() * longStringCount)];
});
randomShortElements.forEach((element) => {
element.innerHTML = shortStrings[Math.floor(Math.random() * shortStringCount)];
});
143 changes: 130 additions & 13 deletions resources/styles/footer.css
Original file line number Diff line number Diff line change
@@ -1,29 +1,146 @@
:root {
--footer-title-size: 4rem;
--footer-mobile-title-size: 3.5rem;
--footer-small-title-size: 1.25rem;
--footer-icon-size: 2rem;
}

footer {
padding: 16px;
padding: 0;
bottom: 0;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
text-align: center;
text-align: left;
background-color: black;
overflow: hidden;

display: flex;
flex-direction: column;
align-items: center;

.mainContainer {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
align-items: flex-end;
box-sizing: border-box;
padding: 4rem;
width: 100%;

@media screen and (max-width: 791px) {
padding: 1rem;
}

div {
padding: 2rem;
padding-top: 1rem;
}

.contentContainer {
display: flex;
flex-direction: row;
flex-wrap: wrap;
padding: 0;
}

#footerTitle {
flex-grow: 1;

/* I have no idea how to make it scale properly lol */
.randomTextShort {
color: lightgray;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
max-width: 35vw;

@media screen and (max-width: 791px) {
max-width: 80vw;
}
}
}
}

h1 {
color: white;
font-size: var(--footer-title-size);
font-weight: 500;
margin: 0;
margin-bottom: 0.5rem;
padding: 0;

/* Shorten and scale down the title on mobile displays */
@media screen and (max-width: 791px) {
span {
display: none;
}
&::after {
content: "I'm a footer.";
font-size: var(--footer-mobile-title-size);
}
}
}

h2 {
color: white;
font-size: var(--footer-small-title-size);
font-weight: 400;
margin: 0;
margin-bottom: 0.1rem;
padding: 0;
}

p {
padding: 0;
margin: 0;
}

.bottomPanel {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
margin: 1rem;

* {
margin: 0 1rem;
padding: 0;
}
}
}

.footerIcon {
--accent-color: white;
img {
vertical-align: middle;
width: var(--footer-icon-size);
height: var(--footer-icon-size);
}
padding: 0;
margin: 0;
border: none;
}

footer hr {
background-color: aliceblue;
border: none;
border-radius: 2px;
height: 2px;
height: 1px;
width: 80%;
}

footer a.button {
background-color: #1e20ad;
padding: 8px;
border-radius: 8px;
color: aliceblue;
footer a {
--accent-color: lightgray;
color: var(--accent-color);
text-decoration: none;
}
border-bottom: 2px dotted lightgray;

/* Sick glow effect controlled by --accent-color */
@media (hover: hover) {
transition: all 0.8s ease;

.footerLogo {
width: 32px;
height: 32px;
padding: 8px;
&:hover {
filter: drop-shadow(0 0 0.75rem var(--accent-color));
}
}
}

0 comments on commit f8a1276

Please sign in to comment.