add a base.html file and refactor the other html files
This commit is contained in:
parent
b8fa6eef5c
commit
bc3b14b5dd
|
@ -1,15 +1,9 @@
|
||||||
<!DOCTYPE html>
|
{% extends "webshop/base.html" %}
|
||||||
<head>
|
{% block section_title %}{{ article.name }}{% endblock %}
|
||||||
<link rel="stylesheet" href="{{ STATIC_URL }}/static/admin/css/base.css" />
|
{% block content %}
|
||||||
</head>
|
<h3>Description</h3>
|
||||||
<body>
|
<p>{{ article.description }}</p>
|
||||||
<div id="content" class="flex">
|
<p><b>Stock:</b> {{ article.stock }}</p>
|
||||||
<h1>{{ article.name }}</h1>
|
<p><b>Status:</b> {{ article.status}}</p>
|
||||||
<h3>Description</h3>
|
<p><b>Price:</b> {{ article.price_in_chf }}</p>
|
||||||
<p>{{ article.description }}</p>
|
{% endblock %}
|
||||||
<p><b>Stock:</b> {{ article.stock }}</p>
|
|
||||||
<p><b>Status:</b> {{ article.status}}</p>
|
|
||||||
<p><b>Price:</b> {{ article.price_in_chf }}</p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="{{ STATIC_URL }}/static/admin/css/base.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="content" class="flex">
|
||||||
|
<h1>{% block section_title %}Music Instrument Shop{% endblock %}</h1>
|
||||||
|
{% block content %}{% endblock %}
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
<footer>
|
||||||
|
{% block footer %}
|
||||||
|
<p><font size="1">This is a case study project of Ivan Hörler and Andreas Zweili.
|
||||||
|
It is a school project/excercise and has no commercial intent.</font></p>
|
||||||
|
{% endblock %}
|
||||||
|
</footer>
|
||||||
|
</html>
|
|
@ -1,21 +1,13 @@
|
||||||
<!DOCTYPE html>
|
{% extends "webshop/base.html" %}
|
||||||
<html>
|
{% block section_title %}Category Overview{% endblock %}
|
||||||
<head>
|
{% block content %}
|
||||||
<link rel="stylesheet" href="{{ STATIC_URL }}/static/admin/css/base.css" />
|
{% if article_list %}
|
||||||
</head>
|
<ul>
|
||||||
<body>
|
{% for article in article_list %}
|
||||||
|
<li><a href="{% url 'details' article.id %}">{{ article.name }}</a></li>
|
||||||
<div id="content" class="flex">
|
{% endfor %}
|
||||||
<h1>{{ category.name }}</h1>
|
</ul>
|
||||||
{% if article_list %}
|
{% else %}
|
||||||
<ul>
|
<p>There are no articles in this category.</p>
|
||||||
{% for article in article_list %}
|
{% endif %}
|
||||||
<li><a href="{% url 'details' article.id %}">{{ article.name }}</a></li>
|
{% endblock %}
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
{% else %}
|
|
||||||
<p>There are no articles in this category.</p>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
<!DOCTYPE html>
|
{% extends "webshop/base.html" %}
|
||||||
<head>
|
{% block content %}
|
||||||
<link rel="stylesheet" href="{{ STATIC_URL }}/static/admin/css/base.css" />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="content" class="flex">
|
|
||||||
<h1>Music Shop</h1>
|
|
||||||
{% if category_list %}
|
{% if category_list %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for category, sub_category in category_list.items %}
|
{% for category, sub_category in category_list.items %}
|
||||||
|
@ -18,7 +13,5 @@
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>No categories are available.</p>
|
<p>No categories are available.</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
{% endblock %}
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
Loading…
Reference in New Issue