use base template for main page
This commit is contained in:
@@ -6,7 +6,7 @@ from financeplanner.utils import format_price
|
|||||||
|
|
||||||
|
|
||||||
class AdminSite(admin.AdminSite):
|
class AdminSite(admin.AdminSite):
|
||||||
index_title = "FloPlanner"
|
index_title = "FinancePlanner"
|
||||||
site_title = "Admin Panel"
|
site_title = "Admin Panel"
|
||||||
site_header = "Admin Panel"
|
site_header = "Admin Panel"
|
||||||
site_url = reverse_lazy("finance:index")
|
site_url = reverse_lazy("finance:index")
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<h1>FloPlanner</h1>
|
<h1>📊 FinancePlanner 💰</h1>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% block navi %}{% endblock %}
|
{% block navi %}{% endblock %}
|
||||||
|
|||||||
@@ -1,24 +1,15 @@
|
|||||||
{% load static %}
|
{% extends "financeplanner/base.html" %}
|
||||||
|
|
||||||
{% load custom_tags %}
|
{% load custom_tags %}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
{% block navi %}
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>FinancePlanner</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'financeplanner/style.css' %}">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<h1>📊 FinancePlanner</h1>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<a href="{% url 'admin:index' %}" class="mini-link">Admin Panel</a>
|
<a href="{% url 'admin:index' %}" class="mini-link">Admin Panel</a>
|
||||||
-
|
-
|
||||||
<a href="{% url 'logout' %}" class="mini-link">Logout</a>
|
<a href="{% url 'logout' %}" class="mini-link">Logout</a>
|
||||||
</p>
|
{% endblock %}
|
||||||
|
|
||||||
<div class="main-container flex-col-centering">
|
{% block content %}
|
||||||
|
<div class="main-container flex-col-centering">
|
||||||
{% if daily_stats %}
|
{% if daily_stats %}
|
||||||
<div id="date-panel">-</div>
|
<div id="date-panel">-</div>
|
||||||
<div id="graph">
|
<div id="graph">
|
||||||
@@ -40,9 +31,9 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<p>No enough data from {{ start|date:"d.m.y" }} til {{ end|date:"d.m.y" }} to show a graph.</p>
|
<p>No enough data from {{ start|date:"d.m.y" }} til {{ end|date:"d.m.y" }} to show a graph.</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<h2>Analysis</h2>
|
<h2>Analysis</h2>
|
||||||
<p>current average amounts per month:</p>
|
<p>current average amounts per month:</p>
|
||||||
<table>
|
<table>
|
||||||
@@ -81,9 +72,9 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p>monthly result after irregular expenses: {{ avg_monthly_result_complete|euro }}</p>
|
<p>monthly result after irregular expenses: {{ avg_monthly_result_complete|euro }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<h2>Relevant Balances</h2>
|
<h2>Relevant Balances</h2>
|
||||||
{% if balances %}
|
{% if balances %}
|
||||||
<table>
|
<table>
|
||||||
@@ -105,9 +96,9 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<p>-</p>
|
<p>-</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<h2>Relevant Stored Transactions</h2>
|
<h2>Relevant Stored Transactions</h2>
|
||||||
{% if transactions %}
|
{% if transactions %}
|
||||||
<table>
|
<table>
|
||||||
@@ -135,9 +126,9 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<p>-</p>
|
<p>-</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
<h2>Calculated Actual Transactions</h2>
|
<h2>Calculated Actual Transactions</h2>
|
||||||
{% if actual_transactions %}
|
{% if actual_transactions %}
|
||||||
<table>
|
<table>
|
||||||
@@ -161,9 +152,9 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<p>-</p>
|
<p>-</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
const graph = document.getElementById('graph');
|
const graph = document.getElementById('graph');
|
||||||
const datePanel = document.getElementById('date-panel');
|
const datePanel = document.getElementById('date-panel');
|
||||||
let scrolling = false;
|
let scrolling = false;
|
||||||
@@ -203,7 +194,5 @@
|
|||||||
graph.addEventListener('mouseleave', () => stopDragScroll());
|
graph.addEventListener('mouseleave', () => stopDragScroll());
|
||||||
graph.addEventListener('mouseup', () => stopDragScroll());
|
graph.addEventListener('mouseup', () => stopDragScroll());
|
||||||
graph.addEventListener('mousemove', (event) => doDragScroll(event));
|
graph.addEventListener('mousemove', (event) => doDragScroll(event));
|
||||||
</script>
|
</script>
|
||||||
|
{% endblock %}
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user