divided the navigation to separate file.
This commit is contained in:
parent
7fb1c36e98
commit
e765a999c6
|
@ -7,7 +7,7 @@
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||||
|
|
||||||
<!-- Add additional CSS in static file -->
|
<!-- Add additional CSS in static file -->
|
||||||
{% load static %}
|
{% load staticfiles %}
|
||||||
<link rel="stylesheet" href="{{ STATIC_URL }}/static/webshop/css/base.css" />
|
<link rel="stylesheet" href="{{ STATIC_URL }}/static/webshop/css/base.css" />
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>
|
<title>
|
||||||
|
@ -28,39 +28,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<nav class="navbar navbar-default">
|
{% block nav %}{% include "webshop/nav.html" %}{% endblock %}
|
||||||
<div class="container-fluid">
|
|
||||||
<div class="navbar-header">
|
|
||||||
<a class="navbar-brand" href="{% url 'index' %}">
|
|
||||||
HOME
|
|
||||||
</a>
|
|
||||||
<ul class="nav navbar-nav">
|
|
||||||
<li><a href="#">CART</a></li>
|
|
||||||
{% if user.is_authenticated %}
|
|
||||||
<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>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
<form action="" method="POST" novalidate>
|
|
||||||
{% csrf_token %}
|
|
||||||
<select name="CurrencyUpdate" id="CurrencyUpdate" onchange="this.form.submit()">
|
|
||||||
<option value="CHF">CHF</option>
|
|
||||||
<option value="USD">USD</option>
|
|
||||||
<option value="GBP">GBP</option>
|
|
||||||
<option value="JPY">JPY</option>
|
|
||||||
</select>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
|
@ -127,5 +95,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
|
||||||
|
<script src="{% static 'js/app.js' %}"></script>
|
||||||
|
<script>{% block javascript %}{% endblock %}</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{% extends "webshop/base.html" %}
|
{% extends "webshop/base.html" %}
|
||||||
|
|
||||||
{% block section_title %}Articles{% endblock %}
|
{% block section_title %}Articles{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if articles_list %}
|
{% if articles_list %}
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
{% block nav %}
|
||||||
|
<nav class="navbar navbar-default">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<a class="navbar-brand" href="{% url 'index' %}">
|
||||||
|
HOME
|
||||||
|
</a>
|
||||||
|
<ul class="nav navbar-nav">
|
||||||
|
<li><a href="#">CART</a></li>
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
<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>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
<form action="" method="POST" novalidate>
|
||||||
|
{% csrf_token %}
|
||||||
|
<select name="CurrencyUpdate" id="CurrencyUpdate" onchange="this.form.submit()">
|
||||||
|
<option value="CHF">CHF</option>
|
||||||
|
<option value="USD">USD</option>
|
||||||
|
<option value="GBP">GBP</option>
|
||||||
|
<option value="JPY">JPY</option>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue