lbry.tech/app/sass/partials/_navigation.scss

131 lines
3.1 KiB
SCSS
Raw Permalink Normal View History

2018-05-02 00:45:31 +02:00
.navigation {
2018-10-06 00:46:08 +02:00
width: 100%;
2018-05-02 00:45:31 +02:00
top: 0; left: 0;
2018-10-13 00:29:53 +02:00
background-color: $lbry-white;
box-shadow: 0 1px 5px rgba($lbry-black, 0.1);
2018-05-11 16:07:16 +02:00
padding-right: env(safe-area-inset-right);
padding-left: env(safe-area-inset-left);
2018-05-02 00:45:31 +02:00
position: fixed;
z-index: 10;
2019-01-29 17:16:14 +01:00
> div:first-of-type {
2018-05-10 21:13:25 +02:00
position: relative;
@media (min-width: 701px) {
align-items: stretch;
display: flex;
flex-flow: row wrap;
}
@media (max-width: 700px) {
2018-10-06 00:46:08 +02:00
width: 100%;
2018-05-10 21:13:25 +02:00
overflow: auto;
2018-10-06 00:46:08 +02:00
overflow-scrolling: touch; // sass-lint:disable-line no-misspelled-properties
2018-05-10 21:13:25 +02:00
white-space: nowrap;
&::before {
width: 2rem; height: 4rem;
top: 0; right: 0;
2018-10-13 00:29:53 +02:00
background-image: linear-gradient(90deg, rgba($lbry-white, 0), $lbry-white 50%, $lbry-white); // iOS Safari cannot handle `transparent`
2018-05-10 21:13:25 +02:00
content: "";
position: fixed;
z-index: 2;
}
}
2018-05-02 00:45:31 +02:00
}
}
.navigation__item {
2019-01-29 17:16:14 +01:00
overflow: hidden;
2018-05-02 00:45:31 +02:00
position: relative;
2018-05-10 21:13:25 +02:00
@media (max-width: 700px) {
display: inline-block;
transform: translate3d(0, 0, 0);
transition: opacity 0.2s 0.2s ease, transform 0.4s 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
vertical-align: top;
&:last-of-type {
margin-right: 3rem;
}
}
2018-05-02 00:45:31 +02:00
&:first-of-type {
@include hide-text;
width: 10rem; height: 3rem;
2018-10-06 00:46:08 +02:00
top: 0.5rem;
2018-08-29 01:57:18 +02:00
// background-image: url("/assets/media/svg/logo.svg");
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 320 250' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath fill='%23222' d='M296.05, 85.9l0, 14.1l-138.8, 85.3l-104.6, -51.3l0.2, -7.9l104, 51.2l132.2, -81.2l0, -5.8l-124.8, -60.2l-139.2, 86.1l0, 38.5l131.8, 65.2l137.6, -84.4l3.9, 6l-141.1, 86.4l-139.2, -68.8l0, -46.8l145.8, -90.2l132.2, 63.8Z'/%3E %3Cpath d='M294.25, 150.9l2, -12.6l-12.2, -2.1l0.8, -4.9l17.1, 2.9l-2.8, 17.5l-4.9, -0.8Z'/%3E %3C/svg%3E");
background-repeat: no-repeat;
background-size: contain;
2018-05-02 00:45:31 +02:00
flex: 1;
}
2019-03-19 23:56:32 +01:00
&:not(:first-of-type):not([href="http://localhost:8000"]):not([href="https://lbry.com"]) {
2019-01-29 17:16:14 +01:00
&::after {
width: 100%; height: 3px;
left: 0;
2018-05-02 00:45:31 +02:00
2019-01-29 17:16:14 +01:00
background-color: $lbry-teal-3;
content: "";
position: absolute;
transition: bottom 0.2s;
2018-05-02 00:45:31 +02:00
}
&:not(:hover) {
2019-01-29 17:16:14 +01:00
&::after {
bottom: -3px;
2018-05-02 00:45:31 +02:00
}
}
2019-01-29 17:16:14 +01:00
&:hover,
&.active {
&::after {
bottom: 0;
2018-05-02 00:45:31 +02:00
}
}
2019-01-29 17:16:14 +01:00
}
2018-07-19 01:46:58 +02:00
2019-01-29 17:16:14 +01:00
&:not(:first-of-type) {
color: inherit;
font-size: 1rem;
line-height: 4rem;
}
2018-07-19 01:46:58 +02:00
2019-03-19 23:56:32 +01:00
&:not([href="http://localhost:8000"]):not([href="https://lbry.com"]) {
2019-01-29 17:16:14 +01:00
padding-right: 0.5rem;
padding-left: 0.5rem;
2018-07-19 01:46:58 +02:00
}
2019-01-29 17:16:14 +01:00
&[href="http://localhost:8000"],
2019-03-19 23:56:32 +01:00
&[href="https://lbry.com"] {
2019-01-29 17:16:14 +01:00
color: $lbry-white;
margin-right: 0.5rem;
padding-right: 1rem;
padding-left: 1rem;
2018-07-19 01:46:58 +02:00
2019-01-29 17:16:14 +01:00
&:not(:hover)::after {
background-color: $lbry-black;
2018-07-19 01:46:58 +02:00
}
2019-01-29 17:16:14 +01:00
&:hover::after {
background-color: $lbry-teal-3;
}
2019-01-21 23:16:49 +01:00
2019-01-29 17:16:14 +01:00
&::after {
width: 100%; height: 2rem;
top: 1rem; left: 0;
2019-01-21 23:16:49 +01:00
2019-01-29 17:16:14 +01:00
border-radius: 3px;
content: "";
position: absolute;
transition: background-color 0.2s;
z-index: -1;
2018-07-19 01:46:58 +02:00
}
}
2018-05-02 00:45:31 +02:00
}