FreeTube/src/renderer/components/top-nav/top-nav.sass

165 lines
3.7 KiB
Sass
Raw Normal View History

2020-03-24 16:25:36 +01:00
@mixin top-nav-is-colored
@at-root
.topNavBarColor &, .topNavBarColor#{&}
@content
2020-03-24 15:34:55 +01:00
.topNav
position: fixed
z-index: 4
left: 0
right: 0
top: 0
height: 60px
line-height: 60px
background-color: var(--card-bg-color)
-webkit-box-shadow: 0px 2px 1px 0px var(--primary-shadow-color)
display: flex
2020-03-24 15:34:55 +01:00
align-items: center
align-content: center
2020-03-24 15:34:55 +01:00
@media only screen and (min-width: 961px)
display: grid
grid-template-columns: 1fr 440px 1fr
2020-03-24 15:34:55 +01:00
2020-03-24 16:25:36 +01:00
@include top-nav-is-colored
background-color: var(--primary-color)
2020-03-24 15:34:55 +01:00
2020-03-27 08:25:11 +01:00
.menuIcon // the hamburger button
2020-03-26 15:17:59 +01:00
@media only screen and (max-width: 680px)
display: none
.navIcon // all icons in the top navigation
2020-03-24 15:34:55 +01:00
font-size: 20px
padding: 10px
cursor: pointer
color: var(--primary-text-color)
border-radius: 50%
transition: background 0.2s ease-out
2020-03-24 16:25:36 +01:00
width: 1em
height: 1em
2020-03-24 15:34:55 +01:00
&.fa-arrow-left, &.fa-arrow-right
color: gray
opacity: 0.5
pointer-events: none
user-select: none
2020-03-24 16:25:36 +01:00
@include top-nav-is-colored
color: var(--text-with-main-color)
2020-03-24 15:34:55 +01:00
2020-03-24 16:25:36 +01:00
&:hover
background-color: var(--primary-color-hover)
2020-03-24 15:34:55 +01:00
2020-03-24 16:25:36 +01:00
&:hover
background-color: var(--side-nav-hover-color)
transition: background 0.2s ease-in
2020-03-24 15:34:55 +01:00
2020-03-24 16:25:36 +01:00
&:active
background-color: var(--tertiary-text-color)
transition: background 0.2s ease-in
2020-03-24 15:34:55 +01:00
@include top-nav-is-colored
background-color: var(--primary-color-active)
.navFilterIcon // Filter icon
$effect-distance: 10px
margin-left: $effect-distance
&.filterChanged // When filter value changed from default
box-shadow: 0 0 $effect-distance var(--primary-color)
@include top-nav-is-colored
box-shadow: 0 0 $effect-distance var(--text-with-main-color)
2020-03-26 15:17:59 +01:00
.side // parts of the top nav either side of the search bar
2020-03-24 15:34:55 +01:00
display: flex
align-items: center
&.profiles
justify-content: flex-end
2020-03-24 16:25:36 +01:00
.navSearchIcon
@media only screen and (min-width: 681px)
display: none
2020-03-24 15:34:55 +01:00
2021-04-15 20:28:35 +02:00
.navNewWindowIcon
@media only screen and (max-width: 680px)
2021-04-15 20:28:35 +02:00
display: none
2020-03-26 15:17:59 +01:00
.logo // parts that make up the logo
2020-03-24 16:25:36 +01:00
display: flex
align-items: center
padding: 0px 25px 0px 10px
cursor: pointer
2020-03-24 15:34:55 +01:00
&:active
background-color: var(--tertiary-text-color)
transition: background 0.2s ease-in
@include top-nav-is-colored
background-color: var(--primary-color-active)
2020-03-24 16:25:36 +01:00
.logoIcon
background-image: var(--logo-icon)
background-repeat: no-repeat
background-position: right top
background-size: 25px
width: 25px
height: 25px
2020-03-24 15:34:55 +01:00
2020-03-26 15:17:59 +01:00
@include top-nav-is-colored
background-image: var(--logo-icon-bar-color)
2020-03-24 15:34:55 +01:00
2020-03-24 16:25:36 +01:00
.logoText
margin-left: 5px
position: relative
top: -3px
background-image: var(--logo-text)
background-repeat: no-repeat
background-position: right top
background-size: 100px
width: 100px
height: 40px
2020-03-24 15:34:55 +01:00
2020-03-24 16:25:36 +01:00
@media only screen and (max-width: 680px)
display: none
2020-03-24 15:34:55 +01:00
2020-03-26 15:17:59 +01:00
@include top-nav-is-colored
background-image: var(--logo-text-bar-color)
2020-03-24 16:25:36 +01:00
2020-03-26 15:17:59 +01:00
.middle // the middle part of the top nav which contains the search bar
max-width: 440px
flex: 1
2020-03-24 15:34:55 +01:00
.searchContainer
display: flex
align-items: center
2020-03-24 16:25:36 +01:00
@media only screen and (max-width: 680px)
position: fixed
left: 0
right: 0
top: 60px
background-color: var(--side-nav-color)
@include top-nav-is-colored
background-color: var(--primary-color-hover)
2020-03-24 16:25:36 +01:00
.searchInput
flex: 1
2020-03-24 15:34:55 +01:00
.searchFilters
position: absolute
2020-03-26 15:17:59 +01:00
left: 0
right: 0
margin: 10px 20px 20px 220px
2020-03-24 16:25:36 +01:00
transition: margin 150ms ease-in-out
2020-03-24 15:34:55 +01:00
2020-03-24 16:25:36 +01:00
@media only screen and (max-width: 680px)
left: 0
right: 0
margin: 95px 10px 0px
2020-03-24 15:34:55 +01:00
@media only screen and (min-width: 681px)
&.expand
margin-left: 100px