Remove usage of fixed positioning for core UI elements (#2284)
* Use flex positioning instead of fixed * Remove expand class * Fix sticky description on video in mobile * Sort CSS properties
This commit is contained in:
parent
5f8e33c6ad
commit
8d5aa4d855
|
@ -3,24 +3,15 @@
|
||||||
src: url(assets/font/Roboto-Regular.ttf);
|
src: url(assets/font/Roboto-Regular.ttf);
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
font-family: 'Roboto', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.routerView {
|
.routerView {
|
||||||
margin-left: 200px;
|
flex: 1 1 0%;
|
||||||
margin-top: 80px;
|
margin: 18px 10px;
|
||||||
transition-property: margin;
|
|
||||||
transition-duration: 150ms;
|
|
||||||
transition-timing-function: ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.expand {
|
|
||||||
margin-left: 80px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner {
|
.banner {
|
||||||
|
@ -46,9 +37,8 @@ body {
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 680px) {
|
@media only screen and (max-width: 680px) {
|
||||||
.expand, .routerView {
|
.routerView {
|
||||||
margin-left: 0px;
|
margin: 68px 8px 68px;
|
||||||
margin-bottom: 80px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner {
|
.banner {
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
<ft-flex-box
|
<ft-flex-box
|
||||||
v-if="showUpdatesBanner || showBlogBanner"
|
v-if="showUpdatesBanner || showBlogBanner"
|
||||||
class="flexBox routerView"
|
class="flexBox routerView"
|
||||||
:class="{ expand: !isOpen }"
|
|
||||||
>
|
>
|
||||||
<ft-notification-banner
|
<ft-notification-banner
|
||||||
v-if="showUpdatesBanner"
|
v-if="showUpdatesBanner"
|
||||||
|
@ -36,7 +35,6 @@
|
||||||
<RouterView
|
<RouterView
|
||||||
ref="router"
|
ref="router"
|
||||||
class="routerView"
|
class="routerView"
|
||||||
:class="{ expand: !isOpen }"
|
|
||||||
/>
|
/>
|
||||||
<!-- </keep-alive> -->
|
<!-- </keep-alive> -->
|
||||||
</transition>
|
</transition>
|
||||||
|
|
|
@ -3,11 +3,10 @@
|
||||||
height: calc(100vh - 60px);
|
height: calc(100vh - 60px);
|
||||||
width: 200px;
|
width: 200px;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
position: fixed;
|
position: sticky;
|
||||||
left: 0px;
|
left: 0;
|
||||||
top: 0px;
|
top: 60px;
|
||||||
z-index: 4;
|
z-index: 3;
|
||||||
margin-top: 60px;
|
|
||||||
box-shadow: 1px -1px 1px -1px var(--primary-shadow-color);
|
box-shadow: 1px -1px 1px -1px var(--primary-shadow-color);
|
||||||
background-color: var(--side-nav-color);
|
background-color: var(--side-nav-color);
|
||||||
transition-property: width;
|
transition-property: width;
|
||||||
|
@ -168,6 +167,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.sideNav {
|
.sideNav {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,10 +44,6 @@ export default Vue.extend({
|
||||||
return this.$store.getters.getSearchSettings
|
return this.$store.getters.getSearchSettings
|
||||||
},
|
},
|
||||||
|
|
||||||
isSideNavOpen: function () {
|
|
||||||
return this.$store.getters.getIsSideNavOpen
|
|
||||||
},
|
|
||||||
|
|
||||||
barColor: function () {
|
barColor: function () {
|
||||||
return this.$store.getters.getBarColor
|
return this.$store.getters.getBarColor
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,12 +4,13 @@
|
||||||
@content
|
@content
|
||||||
|
|
||||||
.topNav
|
.topNav
|
||||||
position: fixed
|
position: sticky
|
||||||
z-index: 4
|
z-index: 4
|
||||||
left: 0
|
left: 0
|
||||||
right: 0
|
right: 0
|
||||||
top: 0
|
top: 0
|
||||||
height: 60px
|
height: 60px
|
||||||
|
width: 100%
|
||||||
line-height: 60px
|
line-height: 60px
|
||||||
background-color: var(--card-bg-color)
|
background-color: var(--card-bg-color)
|
||||||
-webkit-box-shadow: 0px 2px 1px 0px var(--primary-shadow-color)
|
-webkit-box-shadow: 0px 2px 1px 0px var(--primary-shadow-color)
|
||||||
|
@ -24,6 +25,9 @@
|
||||||
@include top-nav-is-colored
|
@include top-nav-is-colored
|
||||||
background-color: var(--primary-color)
|
background-color: var(--primary-color)
|
||||||
|
|
||||||
|
@media only screen and (max-width: 680px)
|
||||||
|
position: fixed
|
||||||
|
|
||||||
.menuIcon // the hamburger button
|
.menuIcon // the hamburger button
|
||||||
@media only screen and (max-width: 680px)
|
@media only screen and (max-width: 680px)
|
||||||
display: none
|
display: none
|
||||||
|
@ -160,7 +164,3 @@
|
||||||
left: 0
|
left: 0
|
||||||
right: 0
|
right: 0
|
||||||
margin: 95px 10px 0px
|
margin: 95px 10px 0px
|
||||||
|
|
||||||
@media only screen and (min-width: 681px)
|
|
||||||
&.expand
|
|
||||||
margin-left: 100px
|
|
||||||
|
|
|
@ -90,7 +90,6 @@
|
||||||
<ft-search-filters
|
<ft-search-filters
|
||||||
v-show="showFilters"
|
v-show="showFilters"
|
||||||
class="searchFilters"
|
class="searchFilters"
|
||||||
:class="{ expand: !isSideNavOpen }"
|
|
||||||
@filterValueUpdated="handleSearchFilterValueChanged"
|
@filterValueUpdated="handleSearchFilterValueChanged"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -619,6 +619,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
margin: 0;
|
||||||
|
min-height: 100vh;
|
||||||
color: var(--primary-text-color);
|
color: var(--primary-text-color);
|
||||||
background-color: var(--bg-color);
|
background-color: var(--bg-color);
|
||||||
--red-500: #f44336;
|
--red-500: #f44336;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
=dual-column-template
|
=dual-column-template
|
||||||
grid-template: "video video sidebar" 0fr "info info sidebar" auto "info info sidebar" auto / 1fr 1fr 1fr
|
grid-template: "video video sidebar" 0fr "info info sidebar" 1fr "info info sidebar" 1fr / 1fr 1fr 1fr
|
||||||
|
|
||||||
=theatre-mode-template
|
=theatre-mode-template
|
||||||
grid-template: "video video video" auto "info info sidebar" auto "info info sidebar" auto / 1fr 1fr 1fr
|
grid-template: "video video video" auto "info info sidebar" auto "info info sidebar" auto / 1fr 1fr 1fr
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
grid-area: video
|
grid-area: video
|
||||||
|
|
||||||
.videoAreaMargin
|
.videoAreaMargin
|
||||||
margin: 0px 8px 16px
|
margin: 0 0 16px
|
||||||
|
|
||||||
.videoPlayer
|
.videoPlayer
|
||||||
grid-column: 1
|
grid-column: 1
|
||||||
|
@ -61,11 +61,16 @@
|
||||||
margin-top: 10px
|
margin-top: 10px
|
||||||
|
|
||||||
.watchVideo
|
.watchVideo
|
||||||
margin: 0px 8px 16px
|
margin: 0 0 16px
|
||||||
grid-column: 1
|
grid-column: 1
|
||||||
|
|
||||||
.infoArea
|
.infoArea
|
||||||
grid-area: info
|
grid-area: info
|
||||||
|
position: relative
|
||||||
|
|
||||||
|
@media only screen and (min-width: 901px)
|
||||||
|
position: sticky
|
||||||
|
top: 76px
|
||||||
|
|
||||||
.sidebarArea
|
.sidebarArea
|
||||||
grid-area: sidebar
|
grid-area: sidebar
|
||||||
|
@ -83,4 +88,7 @@
|
||||||
height: 500px
|
height: 500px
|
||||||
|
|
||||||
.watchVideoRecommendations, .theatreRecommendations
|
.watchVideoRecommendations, .theatreRecommendations
|
||||||
|
margin: 0 0 16px
|
||||||
|
|
||||||
|
@media only screen and (min-width: 901px)
|
||||||
margin: 0 8px 16px
|
margin: 0 8px 16px
|
||||||
|
|
Loading…
Reference in New Issue