Skip to content

Commit

Permalink
Introduced new navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-hov authored and monsij committed Dec 5, 2018
1 parent bbdfa70 commit 96b7149
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 36 deletions.
2 changes: 1 addition & 1 deletion pro1/blog/static/blog/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}

.navbar li a, .navbar .navbar-brand {
color: #fff !important;
color: green !important;
}

.navbar-nav li a:hover, .navbar-nav li.active a {
Expand Down
75 changes: 40 additions & 35 deletions pro1/blog/templates/blog/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,56 @@
<link rel="SHORTCUT ICON" href="{% static 'blog/images/dgpicon.png' %}" type="image/png" />

<!-- Bootstrap CSS-->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<!-- local css -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="{% static 'blog/css/style.css' %}">
<script src="{% static 'blog/js/jquery.min.js' %}"></script>
<script src="{% static 'blog/js/bootstrap.min.js' %}"></script>

<link rel="stylesheet" type="text/css" href="{% static 'blog/css/main.css' %}">
{% if title %}
<title> {{ post.title}}</title>
{% else %}
<title> Blog Home</title>
{% endif %}
</head>
<body>
<header class="site-header">
<nav class="navbar navbar-expand-md navbar-dark bg-steel fixed-top">

<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggle" aria-controls="navbarToggle" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbarToggle">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'blog-about' %}">
<span>
<img class="" src="{% static 'blog/images/dgpicon.png' %}" type="image/png" height="28" width="28">
Student Portal
</span>
</a>
</div>
<div class="collapse navbar-collapse" id="navbarToggle">
<div class="navbar navbar-default navbar-left">
{% if user.is_authenticated %}
<a class="nav-item nav-link" href="{% url 'blog-home' %}">Home</a>
<a class="nave-item nav-link" href="{% url 'notice-home' %}">Notice Board</a>
<a class="nave-item nav-link" href="/study">Study Zone</a>
<a class="nave-item nav-link" href="/interviews">Placement/Internships</a>
<a class="nav-item nav-link" href="{% url 'blog-about' %}">About</a>

{% else %}
<a class="nav-item nav-link" href="{% url 'blog-about' %}">About</a>
{% endif %}
</div>
<!-- Navbar Right Side -->
<div class="navbar navbar-default navbar-right">
{% if user.is_authenticated %}
<a class="nav-item nav-link" href="{% url 'profile' %}">Profile</a>
<a class="nav-item nav-link" href="{% url 'logout' %}">Logout</a>
{% else %}
<a class="nav-item nav-link" href="{% url 'login'%}">Login</a>
<a class="nav-item nav-link" href="{% url 'register'%}">Register</a>
{% endif %}
</div>
</div>
<ul class="nav navbar-nav navbar-right">
{% if user.is_authenticated %}
<li><a href="{% url 'blog-home' %}">Home</a></li>
<li><a href="{% url 'notice-home' %}">Notice Board</a></li>
<li><a href="/study">Study Zone</a></li>
<li><a href="/interviews">Placement/Internships</a></li>
<li><a href="{% url 'profile' %}">Profile</a></li>
<li><a href="{% url 'logout' %}">Logout</a></li>
{% else %}
<li><a href="{% url 'login'%}">Login</a></li>
<li><a href="{% url 'register'%}">Register</a></li>
{% endif %}
</ul>
</div>
</div>
</nav>
</header>

<br><br><br><br><br>
<main role="main" class="container">
<div class="row">
<div class="col-md-8">
Expand Down Expand Up @@ -82,7 +89,7 @@
</div>
</div>
</main>

<br><br><br>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
Expand All @@ -98,9 +105,7 @@
<a href="https://github.com/monsij/StudentPortal" class="navbar-btn btn-danger btn pull-right">
<span class="glyphicon glyphicon-star"></span>  Give us a star on Github</a>
</div>


</div>
</div>
<!-- Footer -->
</body>
</html>
Binary file modified pro1/db.sqlite3
Binary file not shown.

0 comments on commit 96b7149

Please sign in to comment.