Merge pull request #1 from gmemstr/redesign

Redesign
This commit is contained in:
Gabriel Simmer 2019-03-24 21:54:54 -07:00 committed by GitHub
commit a8d9313b73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 197 additions and 173 deletions

View file

@ -1,3 +1,9 @@
# GabrielSimmer.com # GabrielSimmer.com
A port of the Nintendo Switch's interface to HTML :) ## Rewrite goals
- [x] Cleaner, original interface
- [x] Scaling, breakpoints
- [x] More dynamic
- [ ] Easier to maintain
- [x] No fancy frameworks

48
assets/app.js Normal file
View file

@ -0,0 +1,48 @@
const carousel = document.getElementById("carousel");
let projects = [];
window.onload = getProjects;
/**
* Pick random project and place it in the carousel.
*/
function carouselProjectPicker() {
let pointer = Math.round(Math.random() * 10 % projects.length) - 1;
if (pointer < 0) pointer = 1;
// Create initial anchor element.
let project = projects[pointer];
let projectElement = document.createElement("a");
projectElement.href = project.html_url;
projectElement.target = "_blank";
projectElement.id = "carousel-project";
// Create project title element.
let projectHeader = document.createElement("h2");
let projectHeaderText = document.createTextNode(project.name);
projectHeader.appendChild(projectHeaderText);
// Create project description element.
let projectHeaderSmall = document.createElement("small");
let projectHeaderSmallText = document.createTextNode(project.description);
projectHeaderSmall.appendChild(projectHeaderSmallText);
projectHeader.appendChild(projectHeaderSmall);
projectElement.appendChild(projectHeader);
let oldProject = document.getElementById("carousel-project");
carousel.replaceChild(projectElement, oldProject);
}
/**
* Fetch projects from GitHub and trigger carousel event and interval.
*/
function getProjects() {
fetch("https://api.github.com/users/gmemstr/repos")
.then(function (response) {
return response.json();
})
.then(function (apiResult) {
projects = apiResult;
carouselProjectPicker();
setInterval(carouselProjectPicker, 10000);
});
}

View file

@ -1,112 +1,92 @@
body, html { * {
font-family: 'Open Sans', sans-serif; --primary: #412554;
background-color: #2D2D2D; --secondary: #008B52;
color: #F6F6F6; --highlight: #FFE4A8;
font-weight: bolder; padding: 0; margin: 0;
margin: 0 auto; padding: 0; scroll-behavior: smooth;
} }
.more-to-come {
.name { background-color: var(--secondary);
opacity: 0; min-height: 100px;
position: absolute;
left:7vw;
top: 5vh;
font-size: 3vh;
padding: 10px;
background-color: lightgrey;
color:black;
border-radius: 20px;
transition: opacity .25s ease-in-out;
-moz-transition: opacity .25s ease-in-out;
-webkit-transition: opacity .25s ease-in-out;
} }
body {
.profile-img { font-family: sans-serif;
margin: 10px; background-color: #454545;
max-width: 5vw; color: #f2f2f2;
}
.profile-image {
width: 100px;
height: 100px;
border-radius: 50%; border-radius: 50%;
border: 0.20vw solid #4F4F51; filter: drop-shadow(0 0 4px black);
-webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.75);
-moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.75);
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.75);
} }
header {
.profile-img:hover + .name { color: #f2f2f2;
opacity: 1; height: 100vh;
transition: opacity .25s ease-in-out; background-color: var(--primary);
-moz-transition: opacity .25s ease-in-out;
-webkit-transition: opacity .25s ease-in-out;
}
.status {
position: absolute;
right:5vw;
top: 6vh;
font-size: 3vh;
}
.status span {
margin-right: 10px;
}
hr {
color: #FFFFFF;
width: 99vw;
}
.games {
margin-top: 10vh;
padding-left: 5%;
display: flex; display: flex;
overflow: auto; justify-content: center;
align-items: center;
flex-direction: column;
} }
.project { header small {
margin: 10px; font-size: 16px;
/*background-color: white;*/
height: 37vh;
text-align: center;
} }
.project-img { .check-this-out h2, .check-this-out small {
max-width: 30vh; display: block;
-webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.75);
-moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.75);
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.75);
} }
.projectname { .check-this-out small {
color: #34ABE5; color: var(--highlight);
opacity: 0;
transition: opacity .25s ease-in-out;
-moz-transition: opacity .25s ease-in-out;
-webkit-transition: opacity .25s ease-in-out;
} }
.check-this-out {
.project:hover .projectname {
opacity: 1;
transition: opacity .25s ease-in-out;
-moz-transition: opacity .25s ease-in-out;
-webkit-transition: opacity .25s ease-in-out;
}
.buttons {
display: flex;
justify-content: center;
margin-top: 10vh;
margin-bottom: 5vh;
text-align: center; text-align: center;
} }
.button {
margin: 0 0.5vw;
background-color: #505050;
width: 11vh;
height: 11vh;
border: 1px solid #4F4F51;
font-size: 8vh;
border-radius: 50%;
-webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.75);
-moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.75);
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.75);
}
main {
display: grid;
grid-template-columns: repeat(4, 1fr);
}
section {
position: relative;
}
section span {
padding: 10px 0;
text-align: center;
bottom: 0;
left: 0;
width: 100%;
position: absolute;
background-color: rgba(0,0,0,0.8);
}
section small {
display: block;
}
img {
width: 100%;
height: 100%;
}
.scroll {
position: absolute;
bottom: 10%;
}
a { a {
text-decoration: none; text-decoration: none;
color: #F6F6F6 ; color: var(--highlight);
} }
@media only screen and (max-width: 850px) {
main {
grid-template-columns: repeat(2, 1fr);
}
}
@media only screen and (max-width: 430px) {
main {
display: block;
}
}
@media only screen and (min-width: 1921px) {
main {
grid-template-columns: repeat(6, 1fr);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View file

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View file

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

View file

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View file

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View file

@ -1,87 +1,77 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en">
<head> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Gabriel Simmer</title> <title>Gabriel Simmer</title>
<meta name="description" content="Gabriel Simmer's Portfolio / Landing Page" />
<meta charset="UTF-8">
<meta name="author" content="Gabriel Simmer" />
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600" rel="stylesheet">
<script defer src="https://use.fontawesome.com/releases/v5.0.8/js/all.js"></script>
<link rel="stylesheet" href="assets/custom.css"> <link rel="stylesheet" href="assets/custom.css">
</head> </head>
<body> <body>
<div class="container"> <header id="header">
<header> <img src="https://avatars2.githubusercontent.com/u/1878840?s=100&v=4" class="profile-image" alt="Github profile image">
<img src="https://avatars2.githubusercontent.com/u/1878840?s=400&u=b433687936e1e1c1bfd858737d8323c6a5b58c33&v=4" alt="Github Profile Picture" class="profile-img"> <h1>Gabriel Simmer</h1>
<span class="name">Gabriel Simmer</span> <div class="check-this-out" id="carousel">
<div class="status"> <div id="carousel-project"></div>
<span id="time">10:32 <small>AM</small></span>
<span id="wifi"><i class="fas fa-wifi" id="wifi"></i></span>
<span id="battery">100% <i class="fas fa-battery-full"></i></span>
</div> </div>
<span class="scroll"><a href="#content">
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="#FFE4A8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>
</a></span>
</header> </header>
<main> <main id="content">
<div class="games"> <section><img src="assets/project-tiles/gitgalaxy.png" alt="Git Galaxy Logo">
<div class="project" id="pogo"> <span>
<h2 class="projectname">POGO</h2> <a href="https://gitgalaxy.com" target="_blank"><h2>Git Galaxy <small>Open source driven blog</small></h2></a>
<a href="https://github.com/gmemstr/pogo"><img src="assets/pogo.png" alt="Pogo Logo" class="project-img"></a> </span>
</div> </section>
<div class="project" id="platypus"> <section><img src="assets/project-tiles/pogo.png" alt="Pogo Logo">
<h2 class="projectname">PLATYPUS</h2> <span>
<a href="https://github.com/gmemstr/platypus"><img src="assets/platypus.png" alt="Platypus Logo" class="project-img"></a> <a href="https://github.com/gmemstr/pogo" target="_blank"><h2>Pogo <small>Self hosted podcast publishing and RSS</small></h2></a>
</div> </span>
<div class="project" id="gitgalaxy"> </section>
<h2 class="projectname">GIT GALAXY</h2> <section><img src="assets/project-tiles/nodemc.png" alt="NodeMC Logo">
<a href="https://gitgalaxy.com"><img src="assets/gitgalaxy.png" alt="Git Galaxy Logo" class="project-img"></a> <span>
</div> <a href="https://github.com/nodemc" target="_blank"><h2>NodeMC <small>Minecraft server wrapper for Nodejs</small></h2></a>
<div class="project" id="nodemc"> </span>
<h2 class="projectname">NODEMC</h2> </section>
<a href="https://github.com/NodeMC"><img src="assets/nodemc.png" alt="NodeMC Logo" class="project-img"></a> <section><img src="assets/project-tiles/alexanders.jpg" alt="Alexander Printing API module Logo">
</div> <span>
<div class="project" id="other"> <a href="https://drupal.org/project/alexanders" target="_blank"><h2>Alexanders <small>Alexanders Printing API module for Drupal</small></h2></a>
<h2 class="projectname">MORE</h2> </span>
<a href="https://github.com/gmemstr"><img src="assets/other.png" alt="Other Stuff" class="project-img"></a> </section>
</div> <section><img src="assets/project-tiles/approve.jpg" alt="Commerce Approve module Logo">
</div> <span>
<a href="https://drupal.org/project/commerce_approve" target="_blank"><h2>Commerce Approve <small>Require manual approval of Commerce orders.</small></h2></a>
<div class="buttons"> </span>
<div class="button" id="github"> </section>
<a href="https://github.com/gmemstr"><i class="fab fa-github-alt"></i></a> <section><img src="assets/project-tiles/quicklook.jpg" alt="Entity quicklook module Logo">
</div> <span>
<div class="button" id="twitch"> <a href="https://drupal.org/project/entity_quicklook" target="_blank"><h2>Entity Quicklook <small>Quicklook modal for entity displays.</small></h2></a>
<a href="https://twitch.tv/gmem_"><i class="fab fa-twitch" style="color:#b9a3e3;"></i></a> </span>
</div> </section>
<div class="button" id="reddit"> <section><img src="assets/project-tiles/quantity-pricing.jpg" alt="Commerce Approve module Logo">
<a href="https://reddit.com/u/gmemstr"><i class="fab fa-reddit-alien" style="color:#ff4500;"></i></a> <span>
</div> <a href="https://drupal.org/project/commerce_quantity_pricing" target="_blank"><h2>Commerce Quantity Pricing <small>Allow bulk discounts on order items.</small></h2></a>
<div class="button" id="email"> </span>
<a href="mailto:gabriel@gitgalaxy.com"><i class="far fa-envelope"></i></a> </section>
</div> <section><img src="assets/project-tiles/vado.jpg" alt="Commerce Approve module Logo">
</div> <span>
<a href="https://drupal.org/project/commerce_vado" target="_blank"><h2>Commerce Vado <small>Add-on product variations for order items.</small></h2></a>
</span>
</section>
<section><img src="assets/project-tiles/other.png" alt="GitHub Profile Screenshot">
<span>
<a href="https://github.com/gmemstr" target="_blank"><h2>GitHub Projects <small>Misc. open source projects</small></h2></a>
</span>
</section>
<section class="more-to-come">
<span>
<h2>More to come <small>...</small></h2>
</span>
</section>
</main> </main>
<hr />
<center><p>Hand built with <i class="fas fa-heart"></i> by Gabriel Simmer</p><style>.bmc-button img{width: 27px !important;margin-bottom: 3px !important;box-shadow: none !important;border: none !important;vertical-align: middle !important;}.bmc-button{line-height: 36px !important;height:37px !important;text-decoration: none !important;display:inline-block !important;color:#000000 !important;background-color:#FFFFFF !important;border-radius: 3px !important;border: 1px solid transparent !important;padding: 1px 9px !important;font-size: 23px !important;letter-spacing:0.6px !important;;box-shadow: 0px 1px 2px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;margin: 0 auto !important;font-family:'Cookie', cursive !important;-webkit-box-sizing: border-box !important;box-sizing: border-box !important;-o-transition: 0.3s all linear !important;-webkit-transition: 0.3s all linear !important;-moz-transition: 0.3s all linear !important;-ms-transition: 0.3s all linear !important;transition: 0.3s all linear !important;}.bmc-button:hover, .bmc-button:active, .bmc-button:focus {-webkit-box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;text-decoration: none !important;box-shadow: 0px 1px 2px 2px rgba(190, 190, 190, 0.5) !important;opacity: 0.85 !important;color:#000000 !important;}</style><link href="https://fonts.googleapis.com/css?family=Cookie" rel="stylesheet"><a class="bmc-button" target="_blank" href="https://www.buymeacoffee.com/gmem"><img src="https://www.buymeacoffee.com/assets/img/BMC-btn-logo.svg" alt="Buy me a coffee"><span style="margin-left:5px">Buy me a coffee</span></a></center>
</div>
<script>
var date = new Date();
var hours = date.getHours();
var minutes = date.getMinutes();
var ampm = hours >= 12 ? 'pm' : 'am';
hours = hours % 12;
hours = hours ? hours : 12; // the hour '0' should be '12'
minutes = minutes < 10 ? '0'+minutes : minutes;
var strTime = hours + ':' + minutes + ' <small>' + ampm.toUpperCase() + '</small>';
document.getElementById("time").innerHTML=strTime;
</script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-108077918-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-108077918-1'); <script src="/assets/app.js"></script>
</script> </body>
</html>
</body>