Skip to content

Commit 92eb7ef

Browse files
committed
Fixed bugs associated with navbar, refined jumbotron design
1 parent 2268c64 commit 92eb7ef

File tree

3 files changed

+65
-26
lines changed

3 files changed

+65
-26
lines changed

_includes/header.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
<nav class="navbar navbar-fixed-top {% if page.navbar_gray %}navbar-gray{%endif%} {% if page.url == '/' | page.url == '/index.html' %}jupytercon-navbar{% endif %}" role="navigation" id="navbar" >
1+
<nav class="navbar navbar-fixed-top {% if page.navbar_gray %}navbar-gray{%endif%} {% if page.url == '/' || page.url == '/index.html' %}jupytercon-navbar{% endif %}" role="navigation" id="navbar" >
22
<div class="navbar-inner">
33
<div class="container">
44
<!-- Brand and toggle get grouped for better mobile display -->
55
<div class="navbar-header">
66
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
77
<span class="sr-only">Toggle navigation</span>
8-
<span class="icon-bar"></span>
9-
<span class="icon-bar"></span>
10-
<span class="icon-bar"></span>
8+
<span class="icon-bar {% if page.url == '/' || page.url == '/index.html' %}white-icon-bar{% endif %}"></span>
9+
<span class="icon-bar {% if page.url == '/' || page.url == '/index.html' %}white-icon-bar{% endif %}"></span>
10+
<span class="icon-bar {% if page.url == '/' || page.url == '/index.html' %}white-icon-bar{% endif %}"></span>
1111
</button>
1212
<a class="navbar-brand" href="{{site.baseurl}}/index.html">
13-
<img class="navbar-logo" src="{% if page.url == '/' | page.url == '/index.html' %}{{site.baseurl}}/assets/white_nav_logo.svg{% else %}{{site.baseurl}}/assets/nav_logo.svg{%endif%}" alt="Jupyter logo">
13+
<img id="jupyter-nav-logo" class="navbar-logo" src="{% if page.url == '/' | page.url == '/index.html' %}{{site.baseurl}}/assets/white_nav_logo.svg{% else %}{{site.baseurl}}/assets/nav_logo.svg{%endif%}" alt="Jupyter logo">
1414
</a>
1515
</div>
16+
<div class="blur"></div>
1617
<!-- Collect the nav links, forms, and other content for toggling -->
1718
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
1819
<ul class="nav navbar-nav navbar-right {% if page.url == '/' | page.url == '/index.html' %}jupytercon-nav{% endif %}">

css/logo-nav.css

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ body {
3535
-webkit-box-shadow: 1px 1px 1px #999;
3636
box-shadow: 1px 1px 1px #999;
3737
}
38+
.jupytercon-nav > li > .black-tab {
39+
color: black;
40+
}
3841
.navbar-logo {
3942
height: 45px;
4043
}
@@ -554,12 +557,13 @@ body {
554557
margin-top: 0px;
555558
position: relative;
556559
top: -70px;
560+
margin-bottom: -70px;
557561
}
558562
#jupytercon-logo {
559563
display: block;
560564
margin: 0 auto;
561565
width: 500px;
562-
margin-top: 48px;
566+
margin-top: 60px;
563567
}
564568
.jupytercon-header, .jupytercon-subheader {
565569
color: white;
@@ -576,6 +580,10 @@ body {
576580
display: block;
577581
text-align: center;
578582
margin-top: 60px;
583+
margin-bottom: 20px;
584+
}
585+
.navbar-toggle > .white-icon-bar {
586+
background-color: white;
579587
}
580588

581589
/* Bootstrap Breakpoint Media Queries */
@@ -794,7 +802,6 @@ body {
794802
}
795803
.jupytercon-jumbotron {
796804
margin-right: 0px;
797-
margin-bottom: 0px;
798805
}
799806
}
800807
/* Extra small devices (these are mostly fixes to make sure elements act correctly to look good) */

js/scroll.js

Lines changed: 50 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,51 @@
1-
$(window).on("scroll", function () {
2-
if ($(this).scrollTop() > 200) {
3-
$(".navbar").addClass("transparent");
4-
// $(".navbar").stop().animate({opacity: 0});
5-
}
6-
else {
7-
$(".navbar").removeClass("transparent");
8-
// $(".navbar").stop().animate({opacity: 1});
9-
}
10-
});
11-
$(window).on("scroll", function () {
12-
if ($(this).scrollTop() > 0) {
13-
$(".navbar").addClass("navbar-scroll");
14-
// $(".navbar").stop().animate({opacity: 0});
15-
}
16-
else {
17-
$(".navbar").removeClass("navbar-scroll");
18-
// $(".navbar").stop().animate({opacity: 1});
19-
}
1+
$(document).ready(function() {
2+
$(window).bind('resize', function() {
3+
if (window.location.pathname == '/' || window.location.pathname == '/index.html') {
4+
if (window.outerWidth < 768) {
5+
$('.navbar').removeClass('jupytercon-navbar');
6+
$('.tab').addClass('black-tab');
7+
document.getElementById('jupyter-nav-logo').src = '/assets/nav_logo.svg';
8+
$('.icon-bar').removeClass('white-icon-bar');
9+
}
10+
else {
11+
console.log(window.location.pathname);
12+
$('.navbar').addClass('jupytercon-navbar');
13+
$('.tab').removeClass('black-tab');
14+
document.getElementById('jupyter-nav-logo').src = '/assets/white_nav_logo.svg';
15+
$('.icon-bar').addClass('white-icon-bar');
16+
}
17+
}
18+
});
19+
$(window).on("scroll", function () {
20+
if ($(this).scrollTop() > 0) {
21+
$(".navbar").addClass("navbar-scroll");
22+
// $(".navbar").stop().animate({opacity: 0});
23+
24+
// For JupyterCon Custom Navbar
25+
if (window.location.pathname == '/' || window.location.pathname == '/index.html') {
26+
$('.navbar').removeClass('jupytercon-navbar');
27+
$('.tab').addClass('black-tab');
28+
document.getElementById('jupyter-nav-logo').src = '/assets/nav_logo.svg';
29+
$('.icon-bar').removeClass('white-icon-bar');
30+
}
31+
}
32+
else {
33+
$(".navbar").removeClass("navbar-scroll");
34+
// $(".navbar").stop().animate({opacity: 1});
35+
36+
// For JupyterCon Custom Navbar
37+
if (window.location.pathname == '/' || window.location.pathname == '/index.html') {
38+
if (window.outerWidth < 768) {
39+
$('.navbar').removeClass('jupytercon-navbar');
40+
}
41+
else {
42+
console.log(window.location.pathname);
43+
$('.navbar').addClass('jupytercon-navbar');
44+
$('.tab').removeClass('black-tab');
45+
document.getElementById('jupyter-nav-logo').src = '/assets/white_nav_logo.svg';
46+
$('.icon-bar').addClass('white-icon-bar');
47+
}
48+
}
49+
}
50+
});
2051
});

0 commit comments

Comments
 (0)