Navbar + css

This commit is contained in:
Edgar P. Burkhart 2022-05-20 19:44:32 +02:00
parent 467c8002e2
commit f85c67bb49
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
8 changed files with 78 additions and 10 deletions

View file

@ -9,9 +9,32 @@
{% block link %}
<link rel="stylesheet" href="{% static 'css/main.css' %}" type="text/css" />
<link rel="stylesheet" href="{% static 'css/nav.css' %}" type="text/css" />
{% endblock %}
</head>
<body>
{% block nav %}
{% spaceless %}
<nav>
<a href="{% url 'index' %}"
class="home{% if request.resolver_match.url_name == "index" %} cur{% endif %}">
Nummi
</a>
<a href="{% url 'transaction' %}"
class="{% if request.resolver_match.url_name == "transaction" %} cur{% endif %}">
Add transaction
</a>
<a href="{% url 'category' %}"
class="{% if request.resolver_match.url_name == "category" %} cur{% endif %}">
Add category
</a>
<a href="{% url 'logout' %}"
class="logout">
Log Out
</a>
</nav>
{% endspaceless %}
{% endblock %}
{% block body %}
{% endblock %}
</body>

View file

@ -1,8 +1,6 @@
{% extends "main/base.html" %}
{% block body %}
<a href="{% url 'index' %}">Home</a>
<h1>{{ category.tree|join:" → " }}</h1>
<form action="{% url 'update_category' category.id %}" method="post">

View file

@ -9,9 +9,6 @@
{% block body %}
<h1>Nummi</h1>
<a href="{% url 'logout' %}">Logout</a>
<a href="{% url 'transaction' %}">Add transaction</a>
{% if transactions %}
<div id="transactions">
<div class="header">

View file

@ -1,9 +1,8 @@
{% extends "main/base.html" %}
{% block body %}
<a href="{% url 'index' %}">Home</a>
<h1>{{ transaction }}</h1>
<form action="{% url 'update_transaction' transaction.id %}" method="post">
{% csrf_token %}
{{ form.as_p }}