-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jason Karlavige
authored and
Jason Karlavige
committed
May 31, 2018
1 parent
1e2e5c4
commit 4660853
Showing
18 changed files
with
161 additions
and
8 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#mobile-menu { | ||
position:fixed; | ||
right:20px; | ||
top:20px; | ||
z-index:9999; | ||
background:#371f1f; | ||
width:40px; | ||
height:40px; | ||
display:flex; | ||
align-items:center; | ||
justify-content:center; | ||
cursor:pointer; | ||
} | ||
#mobile-menu .fas { | ||
font-size:1.5rem; | ||
color:#fff; | ||
} | ||
#credits { | ||
background:#881d2d; | ||
padding:2.75rem 1rem; | ||
height:50vh; | ||
text-align:center; | ||
position:absolute; | ||
top:-50vh; | ||
left:0; | ||
right:0; | ||
display:flex; | ||
flex-direction:column; | ||
justify-content: space-between; | ||
transition:top .4s; | ||
-webkit-transition:top .4s; | ||
} | ||
.credit-block { | ||
display:flex; | ||
flex-direction:column; | ||
} | ||
.credit-block span { | ||
font-weight:300; | ||
} | ||
#credit-logo { | ||
display:block; | ||
width:80%; | ||
max-width:200px; | ||
margin:0 auto; | ||
} | ||
#react-logo { | ||
animation: App-logo-spin infinite 20s linear; | ||
width:50px; | ||
display:block; | ||
margin:0 auto; | ||
} | ||
@keyframes App-logo-spin { | ||
from { transform: rotate(0deg); } | ||
to { transform: rotate(360deg); } | ||
} | ||
|
||
/* Tablet */ | ||
@media only screen and (min-width: 480px) { | ||
#credits { | ||
width:75%; | ||
left:auto; | ||
flex-direction:row; | ||
padding:1rem; | ||
height:20vh; | ||
align-items:center; | ||
} | ||
} | ||
|
||
/* Desktop */ | ||
@media only screen and (min-width: 768px) { | ||
#credits { | ||
padding:1rem 7rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React, { Component } from 'react' | ||
import './Credits.css' | ||
import menuIcon from '../../images/menu-icon.svg' | ||
import jkLogo from '../../images/jk_light.svg' | ||
import reactLogo from '../../images/react-logo.svg'; | ||
/* Helpers */ | ||
import handleMenu from '../../helpers/handleMenu.js' | ||
|
||
class Credits extends Component { | ||
render() { | ||
return [ | ||
<div id='mobile-menu' onClick={handleMenu} key={1}> | ||
<i className='fas fa-bars'></i> | ||
</div>, | ||
<section id='credits' key={2}> | ||
<div className='credit-block'> | ||
<span>Developed by</span> | ||
<a href='http://jasonkarlavige.com' id='credit-logo' target='_blank'><img src={jkLogo} id="jk-logo" alt="Jason Karlavige"/></a> | ||
</div> | ||
<div className='credit-block'> | ||
<span>Dice Styles by</span> | ||
<a href='https://game-icons.net/tags/dice.html' target='_blank'>Game-icons.net</a> | ||
<a href='https://websemantics.uk/tools/svg-to-background-image-conversion/' target='_blank'>webSemantics</a> | ||
</div> | ||
<div className='credit-block'> | ||
<span id='credit-react'>Made with React</span> | ||
<img src={reactLogo} id="react-logo" alt="logo" /> | ||
</div> | ||
</section> | ||
] | ||
} | ||
} | ||
|
||
export default Credits | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ | |
font-weight:500; | ||
cursor:pointer; | ||
text-align:center; | ||
position:fixed; | ||
bottom:0; | ||
right:0; | ||
height:15vh; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Toggles Menu | ||
let isActive = false | ||
|
||
export default function handleMenu(array) { | ||
const credits = document.querySelector('#credits') | ||
const menu = document.querySelector('#mobile-menu') | ||
const icon = document.querySelector('.fas') | ||
let rollBtn = document.querySelector('#roll-btn') | ||
|
||
// If roll button is clicked, hide menu | ||
rollBtn.addEventListener('click', hideMenu) | ||
|
||
// If menu is hidden, show - Else hide menu | ||
if(isActive === false) { | ||
showMenu() | ||
} else { | ||
hideMenu() | ||
} | ||
|
||
// Show Menu | ||
function showMenu() { | ||
credits.style.top = 0 + 'vh' | ||
icon.classList.remove('fa-bars') | ||
icon.classList.add('fa-times') | ||
isActive = true | ||
} | ||
// Hide Menu | ||
function hideMenu() { | ||
credits.style.top = -50 + 'vh' | ||
icon.classList.remove('fa-times') | ||
icon.classList.add('fa-bars') | ||
isActive = false | ||
} | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.