Set js for non transparent navbar always
This commit is contained in:
parent
3b6e5d448b
commit
f1821954eb
2 changed files with 15 additions and 11 deletions
|
@ -77,16 +77,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function _navScroll() {
|
function _navScroll() {
|
||||||
if ($(window).scrollTop() > 10) {
|
if (!window.non_transparent_navbar_always) {
|
||||||
$(".navbar").removeClass("navbar-transparent");
|
if ($(window).scrollTop() > 10) {
|
||||||
$(".navbar-default .btn-link").css("color", "#777");
|
$(".navbar").removeClass("navbar-transparent");
|
||||||
$(".dropdown-menu").removeClass("navbar-transparent");
|
$(".navbar-default .btn-link").css("color", "#777");
|
||||||
$(".dropdown-menu > li > a").css("color", "#777");
|
$(".dropdown-menu").removeClass("navbar-transparent");
|
||||||
} else {
|
$(".dropdown-menu > li > a").css("color", "#777");
|
||||||
$(".navbar").addClass("navbar-transparent");
|
} else {
|
||||||
$(".navbar-default .btn-link").css("color", "#fff");
|
$(".navbar").addClass("navbar-transparent");
|
||||||
$(".dropdown-menu").addClass("navbar-transparent");
|
$(".navbar-default .btn-link").css("color", "#fff");
|
||||||
$(".dropdown-menu > li > a").css("color", "#fff");
|
$(".dropdown-menu").addClass("navbar-transparent");
|
||||||
|
$(".dropdown-menu > li > a").css("color", "#fff");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{% load staticfiles i18n custom_tags %}
|
{% load staticfiles i18n custom_tags %}
|
||||||
{% get_current_language as LANGUAGE_CODE %}
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
|
{% if instance.show_non_transparent_navbar_always %}
|
||||||
|
<script>window.non_transparent_navbar_always=true;</script>
|
||||||
|
{% endif %}
|
||||||
<nav class="navbar navbar-default navbar-fixed-top topnav {% if instance.show_non_transparent_navbar_always is False %}navbar-transparent{% endif %}">
|
<nav class="navbar navbar-default navbar-fixed-top topnav {% if instance.show_non_transparent_navbar_always is False %}navbar-transparent{% endif %}">
|
||||||
<!-- Brand and toggle get grouped for better mobile display -->
|
<!-- Brand and toggle get grouped for better mobile display -->
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
|
Loading…
Reference in a new issue