juicy css mobile nav toggle
This commit is contained in:
parent
00b0dd023b
commit
2dabf8e53f
0
client/.eslintrc.js
Executable file → Normal file
0
client/.eslintrc.js
Executable file → Normal file
@ -95,7 +95,6 @@ nav button {
|
|||||||
display: block;
|
display: block;
|
||||||
color: #888;
|
color: #888;
|
||||||
flex: 1 1 100%;
|
flex: 1 1 100%;
|
||||||
font-size: 16pt;
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border-width: 0px;
|
border-width: 0px;
|
||||||
@ -514,3 +513,7 @@ main .top {
|
|||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Mobile Nav*/
|
||||||
|
#toggle-nav { display: none; }
|
||||||
|
#toggle-nav-label { display: none; }
|
||||||
56
client/assets/styles/styles.mobile.css
Normal file
56
client/assets/styles/styles.mobile.css
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
@media (max-height: 800px), (max-width: 800px) {
|
||||||
|
#cryps {
|
||||||
|
font-size: 50%;
|
||||||
|
grid-template-columns: min-content 1fr;
|
||||||
|
grid-template-rows: min-content 1fr;
|
||||||
|
grid-template-areas:
|
||||||
|
"tnav hd "
|
||||||
|
"main main";
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
height: 1em;
|
||||||
|
}
|
||||||
|
nav {
|
||||||
|
opacity: 0;
|
||||||
|
position: fixed;
|
||||||
|
margin-top: 4em;
|
||||||
|
pointer-events: none;
|
||||||
|
-webkit-transition: all 0.5s ease-in-out;
|
||||||
|
-moz-transition: all 0.5s ease-in-out;
|
||||||
|
-o-transition: all 0.5s ease-in-out;
|
||||||
|
transition: all 0.5s ease-in-out;
|
||||||
|
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
-webkit-transition: all 0.5s ease-in-out;
|
||||||
|
-moz-transition: all 0.5s ease-in-out;
|
||||||
|
-o-transition: all 0.5s ease-in-out;
|
||||||
|
transition: all 0.5s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toggle-nav { display: none; }
|
||||||
|
|
||||||
|
#toggle-nav-label {
|
||||||
|
grid-area: tnav;
|
||||||
|
color: whitesmoke;
|
||||||
|
line-height: 1.75em;
|
||||||
|
font-size: 1.5em;
|
||||||
|
display: block;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-right: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toggle-nav:checked #toggle-nav-label {
|
||||||
|
color: #ababab;
|
||||||
|
}
|
||||||
|
|
||||||
|
#toggle-nav:checked ~ nav {
|
||||||
|
opacity: 1;
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
#toggle-nav:checked ~ main {
|
||||||
|
opacity: 0.1;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -11,8 +11,9 @@
|
|||||||
<link rel="manifest" href="manifest.webmanifest">
|
<link rel="manifest" href="manifest.webmanifest">
|
||||||
<link rel="stylesheet" href="./node_modules/izitoast/dist/css/iziToast.min.css"></script>
|
<link rel="stylesheet" href="./node_modules/izitoast/dist/css/iziToast.min.css"></script>
|
||||||
<link href="https://fonts.googleapis.com/css?family=Jura" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Jura" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="assets/normalize.css">
|
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="assets/skeleton.css">
|
<link rel="stylesheet" href="assets/styles/normalize.css">
|
||||||
|
<link rel="stylesheet" href="assets/styles/skeleton.css">
|
||||||
</head>
|
</head>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
7
client/index.js
Executable file → Normal file
7
client/index.js
Executable file → Normal file
@ -1,6 +1,7 @@
|
|||||||
require('./styles.css');
|
require('./assets/styles/styles.css');
|
||||||
require('./instance.css');
|
require('./assets/styles/styles.mobile.css');
|
||||||
require('./game.css');
|
require('./assets/styles/instance.css');
|
||||||
|
require('./assets/styles/game.css');
|
||||||
|
|
||||||
// kick it off
|
// kick it off
|
||||||
require('./src/app');
|
require('./src/app');
|
||||||
|
|||||||
@ -51,6 +51,8 @@ document.fonts.load('16pt "Jura"').then(() => {
|
|||||||
|
|
||||||
const Cryps = () => (
|
const Cryps = () => (
|
||||||
<div id="cryps" >
|
<div id="cryps" >
|
||||||
|
<input type="checkbox" id="toggle-nav"/>
|
||||||
|
<label id="toggle-nav-label" htmlFor="toggle-nav"><i className="fa fa-bars"></i></label>
|
||||||
<Header />
|
<Header />
|
||||||
<Nav />
|
<Nav />
|
||||||
<Main />
|
<Main />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user