--
This commit is contained in:
parent
40143681de
commit
13aede1519
5 changed files with 139 additions and 42 deletions
|
|
@ -83,10 +83,12 @@ a:hover {
|
||||||
-webkit-box-pack: center;
|
-webkit-box-pack: center;
|
||||||
-ms-flex-pack: center;
|
-ms-flex-pack: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.masthead p.content .subheader {
|
.masthead p.content .subheader {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.masthead .down {
|
.masthead .down {
|
||||||
|
|
@ -149,7 +151,7 @@ img.large {
|
||||||
background-color: #2a2a2a;
|
background-color: #2a2a2a;
|
||||||
color: #eeeeee;
|
color: #eeeeee;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 10000000;
|
z-index: 1;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
|
@ -164,6 +166,8 @@ img.large {
|
||||||
-webkit-box-align: center;
|
-webkit-box-align: center;
|
||||||
-ms-flex-align: center;
|
-ms-flex-align: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
-webkit-box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.5);
|
||||||
|
box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.masthead {
|
.masthead {
|
||||||
|
|
@ -180,10 +184,9 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
.titlebar.top .item {
|
.titlebar.top .item {
|
||||||
background-color: #3a3a3a;
|
display: -webkit-inline-box;
|
||||||
display: -webkit-box;
|
display: -ms-inline-flexbox;
|
||||||
display: -ms-flexbox;
|
display: inline-flex;
|
||||||
display: flex;
|
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
-webkit-box-direction: normal;
|
-webkit-box-direction: normal;
|
||||||
-ms-flex-direction: column;
|
-ms-flex-direction: column;
|
||||||
|
|
@ -191,12 +194,19 @@ body {
|
||||||
-webkit-box-pack: center;
|
-webkit-box-pack: center;
|
||||||
-ms-flex-pack: center;
|
-ms-flex-pack: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
background-color: #3a3a3a;
|
||||||
font-family: "Spartan";
|
font-family: "Spartan";
|
||||||
padding: 0px 1rem;
|
padding: 0px 1rem;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.titlebar.top .item span {
|
||||||
|
display: -webkit-inline-box;
|
||||||
|
display: -ms-inline-flexbox;
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|
||||||
.titlebar.top .item:hover {
|
.titlebar.top .item:hover {
|
||||||
background-color: #2a2a2a;
|
background-color: #2a2a2a;
|
||||||
-webkit-transition: all ease-in 150ms;
|
-webkit-transition: all ease-in 150ms;
|
||||||
|
|
@ -214,6 +224,11 @@ body {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dropdown.item {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown.item:hover .dropdown-content {
|
.dropdown.item:hover .dropdown-content {
|
||||||
max-height: 100vh;
|
max-height: 100vh;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
@ -222,28 +237,43 @@ body {
|
||||||
.dropdown.item .dropdown-content {
|
.dropdown.item .dropdown-content {
|
||||||
max-height: 0px;
|
max-height: 0px;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
-webkit-transition: max-height 0.5s ease-in-out;
|
-webkit-transition: max-height 0.5s ease-in-out;
|
||||||
transition: max-height 0.5s ease-in-out;
|
transition: max-height 0.5s ease-in-out;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: #3a3a3a;
|
background-color: #3a3a3a;
|
||||||
min-width: 160px;
|
|
||||||
margin-left: -1rem;
|
|
||||||
margin-top: 5.45em;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown.item .dropdown-content a {
|
.dropdown.item .dropdown-content .item {
|
||||||
color: #eeeeee;
|
color: #eeeeee;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown.item .dropdown-content a:hover {
|
.dropdown.item .dropdown-content .item:hover {
|
||||||
background-color: #252525;
|
background-color: #252525;
|
||||||
-webkit-transition: all ease-in 150ms;
|
-webkit-transition: all ease-in 150ms;
|
||||||
transition: all ease-in 150ms;
|
transition: all ease-in 150ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dropdown.item .dropdown-content .dropdown.item {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown.item .dropdown-content .dropdown.item .dropdown-content {
|
||||||
|
max-width: 100vw;
|
||||||
|
max-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dropdown.item .dropdown.item .dropdown-content {
|
||||||
|
top: 0;
|
||||||
|
left: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
@ -385,4 +415,17 @@ button:active {
|
||||||
transform: translateY(-15px);
|
transform: translateY(-15px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 767px) {
|
||||||
|
.dropdown.item.compact > *,
|
||||||
|
.dropdown.item.compact {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.titlebar.top .item:not(.compact) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
/*# sourceMappingURL=main.css.map */
|
/*# sourceMappingURL=main.css.map */
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -71,7 +71,6 @@ a {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
p.content {
|
p.content {
|
||||||
// height: 100%;
|
|
||||||
font-size: 64px;
|
font-size: 64px;
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
|
|
||||||
|
|
@ -79,9 +78,11 @@ a {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
.subheader {
|
.subheader {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -143,7 +144,7 @@ img {
|
||||||
background-color: map-get($dark, "background");
|
background-color: map-get($dark, "background");
|
||||||
color: map-get($dark, "foreground");
|
color: map-get($dark, "foreground");
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 10000000;
|
z-index: 1;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
|
@ -151,7 +152,7 @@ img {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.5);
|
||||||
@at-root .masthead {
|
@at-root .masthead {
|
||||||
height: calc(100vh - 3rem);
|
height: calc(100vh - 3rem);
|
||||||
}
|
}
|
||||||
|
|
@ -166,15 +167,20 @@ img {
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
background-color: map-get($dark, "item");
|
display: inline-flex;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
|
background-color: map-get($dark, "item");
|
||||||
font-family: "Spartan";
|
font-family: "Spartan";
|
||||||
padding: 0px 1rem;
|
padding: 0px 1rem;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
span {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: map-get($dark, "background");
|
background-color: map-get($dark, "background");
|
||||||
transition: all ease-in 150ms;
|
transition: all ease-in 150ms;
|
||||||
|
|
@ -193,6 +199,9 @@ img {
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown.item {
|
.dropdown.item {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
&:hover .dropdown-content {
|
&:hover .dropdown-content {
|
||||||
max-height: 100vh;
|
max-height: 100vh;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
@ -201,17 +210,16 @@ img {
|
||||||
& .dropdown-content {
|
& .dropdown-content {
|
||||||
max-height: 0px;
|
max-height: 0px;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
|
top: 100%;
|
||||||
|
left: 0;
|
||||||
-webkit-transition: max-height 0.5s ease-in-out;
|
-webkit-transition: max-height 0.5s ease-in-out;
|
||||||
-moz-transition: max-height 0.5s ease-in-out;
|
-moz-transition: max-height 0.5s ease-in-out;
|
||||||
-o-transition: max-height 0.5s ease-in-out;
|
-o-transition: max-height 0.5s ease-in-out;
|
||||||
transition: max-height 0.5s ease-in-out;
|
transition: max-height 0.5s ease-in-out;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: map-get($dark, "item");
|
background-color: map-get($dark, "item");
|
||||||
min-width: 160px;
|
|
||||||
margin-left: -1rem;
|
|
||||||
margin-top: 5.45em;
|
|
||||||
|
|
||||||
& a {
|
& .item {
|
||||||
color: $foreground;
|
color: $foreground;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
@ -222,6 +230,22 @@ img {
|
||||||
transition: all ease-in 150ms;
|
transition: all ease-in 150ms;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& .dropdown.item {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
overflow: visible;
|
||||||
|
|
||||||
|
& .dropdown-content {
|
||||||
|
max-width: 100vw;
|
||||||
|
max-height: 100vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& & .dropdown-content {
|
||||||
|
top: 0;
|
||||||
|
left: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -339,3 +363,18 @@ button {
|
||||||
transform: translateY(-15px);
|
transform: translateY(-15px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Desktop Titlebar Logic
|
||||||
|
@media (min-width: 767px) {
|
||||||
|
.dropdown.item.compact > *,
|
||||||
|
.dropdown.item.compact {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mobile Titlebar Logic
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.titlebar.top .item:not(.compact) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,7 @@
|
||||||
const isMobile = () => {
|
$(document).ready(function () {
|
||||||
return window.innerWidth < 767;
|
$('.dropdown-submenu a.test').on("click", function (e) {
|
||||||
};
|
$(this).next('ul').toggle();
|
||||||
|
e.stopPropagation();
|
||||||
|
e.preventDefault();
|
||||||
$(document).ready(() => {
|
});
|
||||||
|
});
|
||||||
if (isMobile()) {
|
|
||||||
// alert("'Detected' mobile device; fixing things up");
|
|
||||||
let titlebars = document.querySelectorAll(".titlebar");
|
|
||||||
|
|
||||||
titlebars.forEach((titlebar) => {
|
|
||||||
// TODO: Auto-convert to mobile-friendly bar
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
34
index.html
34
index.html
|
|
@ -21,6 +21,28 @@
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="top titlebar">
|
<div class="top titlebar">
|
||||||
|
|
||||||
|
<!-- Mobile friendly menu -->
|
||||||
|
<div class="dropdown item compact">
|
||||||
|
<span>
|
||||||
|
<i class="fa fa-bars"></i> Menu
|
||||||
|
</span>
|
||||||
|
<div class="dropdown-content">
|
||||||
|
<div class="dropdown item">
|
||||||
|
<span>
|
||||||
|
Support <i class="fa fa-caret-right"></i>
|
||||||
|
</span>
|
||||||
|
<div class="dropdown-content">
|
||||||
|
<div class="item compact">Link 1</div>
|
||||||
|
<div class="item compact">Link 2</div>
|
||||||
|
<div class="item compact">Link 3</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
About
|
About
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -30,16 +52,20 @@
|
||||||
<div class="item">
|
<div class="item">
|
||||||
Reddit
|
Reddit
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown item slidedown">
|
<div class="item">
|
||||||
|
YouTube
|
||||||
|
</div>
|
||||||
|
<div class="dropdown item">
|
||||||
<span>
|
<span>
|
||||||
Support <i class="fa fa-caret-down"></i>
|
Support <i class="fa fa-caret-down"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a href="#">Link 1</a>
|
<div class="item">Link 1</div>
|
||||||
<a href="#">Link 2</a>
|
<div class="item">Link 2</div>
|
||||||
<a href="#">Link 3</a>
|
<div class="item">Link 3</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue