Use fixed position instead of sticky for sidenav and top bar so it works in IE
This commit is contained in:
parent
c089682a27
commit
8b78b2a553
@ -25,9 +25,12 @@ body {
|
|||||||
margin: $gap;
|
margin: $gap;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
-ms-flex-negative: 1;
|
-ms-flex-negative: 1;
|
||||||
|
top: 68px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
@include media($medium-screen) {
|
@include media($medium-screen) {
|
||||||
margin: $gap * 2;
|
margin: $gap * 2;
|
||||||
|
top: 68px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.js-is-sticky {
|
&.js-is-sticky {
|
||||||
width: 80.8%;
|
width: calc(100% - 25rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sticky-cta-container {
|
.sticky-cta-container {
|
||||||
|
@ -2,11 +2,10 @@
|
|||||||
background-color: $color-blue-darkest;
|
background-color: $color-blue-darkest;
|
||||||
border-bottom: 1px solid $color-black;
|
border-bottom: 1px solid $color-black;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
|
position: fixed;
|
||||||
&.js-is-sticky {
|
top: 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 16;
|
z-index: 10;
|
||||||
}
|
|
||||||
|
|
||||||
&__navigation {
|
&__navigation {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
padding: ($gap / 2) $gap;
|
padding: ($gap / 2) $gap;
|
||||||
z-index: 15;
|
z-index: 15;
|
||||||
|
position: fixed;
|
||||||
|
height: 20px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
flex-grow: 0;
|
flex-grow: 0;
|
||||||
|
@ -5,17 +5,30 @@
|
|||||||
|
|
||||||
.sidenav-container {
|
.sidenav-container {
|
||||||
box-shadow: $box-shadow;
|
box-shadow: $box-shadow;
|
||||||
|
overflow: hidden;
|
||||||
|
position: relative;
|
||||||
|
top: 68px;
|
||||||
|
|
||||||
.sidenav {
|
&__toggler {
|
||||||
@include media($large-screen) {
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
width: 25rem;
|
width: 25rem;
|
||||||
|
|
||||||
&.js-is-sticky {
|
&--minimized {
|
||||||
width: 19.2%;
|
@extend .sidenav-container__toggler;
|
||||||
min-width: 25rem;
|
width: 10rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&__fixed {
|
||||||
|
position: fixed;
|
||||||
|
overflow: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidenav {
|
||||||
|
width: 25rem;
|
||||||
|
overflow: scroll;
|
||||||
|
|
||||||
|
@include media($large-screen) {
|
||||||
|
margin: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__title {
|
&__title {
|
||||||
@ -184,9 +197,5 @@
|
|||||||
|
|
||||||
width: 10rem;
|
width: 10rem;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
|
||||||
&.js-is-sticky {
|
|
||||||
width: 10rem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% macro StickyCTA(text) -%}
|
{% macro StickyCTA(text) -%}
|
||||||
<div class="sticky-cta" v-sticky='{ "stickyBitStickyOffset": 48 }'>
|
<div class="sticky-cta" v-sticky='{ "stickyBitStickyOffset": 68 }'>
|
||||||
<div class="sticky-cta-container">
|
<div class="sticky-cta-container">
|
||||||
<div class="sticky-cta-text">
|
<div class="sticky-cta-text">
|
||||||
<h3>{{ text }}</h3>
|
<h3>{{ text }}</h3>
|
||||||
|
@ -4,31 +4,35 @@
|
|||||||
|
|
||||||
<div v-cloak is="SidenavToggler" class="sidenav-container">
|
<div v-cloak is="SidenavToggler" class="sidenav-container">
|
||||||
<template slot-scope='props'>
|
<template slot-scope='props'>
|
||||||
<div v-sticky='{ "stickyBitStickyOffset": 48 }' v-bind:class="{'global-navigation': true, 'sidenav': props.isVisible, 'sidenav--minimized': !props.isVisible}">
|
<div v-bind:class="{'sidenav-container__toggler': props.isVisible, 'sidenav-container__toggler--minimized': !props.isVisible}">
|
||||||
<a href="#" v-on:click="props.toggle" class="sidenav__toggle">
|
<div class="sidenav-container__fixed">
|
||||||
<template v-if="props.isVisible">
|
<div v-bind:class="{'global-navigation': true, 'sidenav': props.isVisible, 'sidenav--minimized': !props.isVisible}">
|
||||||
{{ Icon('angle-double-left-solid', classes="toggle-arrows icon--blue") }}
|
<a href="#" v-on:click="props.toggle" class="sidenav__toggle">
|
||||||
Hide
|
<template v-if="props.isVisible">
|
||||||
</template>
|
{{ Icon('angle-double-left-solid', classes="toggle-arrows icon--blue") }}
|
||||||
<template v-else>
|
Hide
|
||||||
Show
|
</template>
|
||||||
{{ Icon('angle-double-right-solid', classes="toggle-arrows icon--blue") }}
|
<template v-else>
|
||||||
</template>
|
Show
|
||||||
</a>
|
{{ Icon('angle-double-right-solid', classes="toggle-arrows icon--blue") }}
|
||||||
<div v-if="props.isVisible">
|
</template>
|
||||||
<div class="sidenav__title">Portfolios</div>
|
</a>
|
||||||
<ul class="sidenav__list--padded">
|
<div v-if="props.isVisible">
|
||||||
{% if portfolios %}
|
<div class="sidenav__title">Portfolios</div>
|
||||||
{% for other_portfolio in portfolios|sort(attribute='name') %}
|
<ul class="sidenav__list--padded">
|
||||||
{{ SidenavItem(other_portfolio.name,
|
{% if portfolios %}
|
||||||
href=url_for("applications.portfolio_applications", portfolio_id=other_portfolio.id),
|
{% for other_portfolio in portfolios|sort(attribute='name') %}
|
||||||
active=(other_portfolio.id | string) == request.view_args.get('portfolio_id')
|
{{ SidenavItem(other_portfolio.name,
|
||||||
) }}
|
href=url_for("applications.portfolio_applications", portfolio_id=other_portfolio.id),
|
||||||
{% endfor %}
|
active=(other_portfolio.id | string) == request.view_args.get('portfolio_id')
|
||||||
{% else %}
|
) }}
|
||||||
<li><span class="sidenav__text">You have no portfolios yet</span></li>
|
{% endfor %}
|
||||||
{% endif %}
|
{% else %}
|
||||||
</ul>
|
<li><span class="sidenav__text">You have no portfolios yet</span></li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% from "components/icon.html" import Icon %}
|
{% from "components/icon.html" import Icon %}
|
||||||
|
|
||||||
<header class="topbar" v-sticky>
|
<header class="topbar">
|
||||||
<nav class="topbar__navigation">
|
<nav class="topbar__navigation">
|
||||||
<a href="{{ url_for('atst.home') }}" class="topbar__link topbar__link--home">
|
<a href="{{ url_for('atst.home') }}" class="topbar__link topbar__link--home">
|
||||||
{{ Icon('shield', classes='topbar__link-icon') }}
|
{{ Icon('shield', classes='topbar__link-icon') }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user