Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:

# Automatically sort python imports
- repo: https://github.com/PyCQA/isort
rev: 9.0.0a3
rev: 9.0.0b1
hooks:
- id: isort
args: [--profile, black]
Expand All @@ -35,7 +35,7 @@ repos:

# Autoformat: HTML, Jinja, etc.
- repo: https://github.com/djlint/djLint
rev: v1.36.4
rev: v1.43.2
hooks:
- id: djlint-reformat-jinja
files: "\\.html"
Expand All @@ -55,7 +55,7 @@ repos:

# Lint: Dockerfile
- repo: https://github.com/hadolint/hadolint
rev: v2.14.0
rev: v2.15.1
hooks:
- id: hadolint-docker
entry: hadolint/hadolint:v2.12.1-beta hadolint
Expand Down Expand Up @@ -90,7 +90,7 @@ repos:

# Lint: Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.48.0
rev: v0.49.1
hooks:
- id: markdownlint
args: ["--fix"]
Expand Down
38 changes: 19 additions & 19 deletions templates/account/index.html
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{% extends "base.html" %}
{% block header %}
<h1>
{% block title %}
Accounts
{% endblock title %}
</h1>
<h1>
{% block title %}
Accounts
{% endblock title %}
</h1>
{% endblock header %}
{% block content %}
{% for account in accounts %}
<article class="post">
<header>
<div>
<h1>{{ account['account_number'] }}</h1>
<div class="about">in {{ account['branch_name'] }}</div>
</div>
<a class="action"
href="{{ url_for('account_update_view', account_number=account['account_number']) }}">Edit</a>
</header>
<p class="body">€ {{ account['balance'] }}</p>
</article>
{% if not loop.last %}<hr />{% endif %}
{% endfor %}
{% for account in accounts %}
<article class="post">
<header>
<div>
<h1>{{ account['account_number'] }}</h1>
<div class="about">in {{ account['branch_name'] }}</div>
</div>
<a class="action"
href="{{ url_for('account_update_view', account_number=account['account_number']) }}">Edit</a>
</header>
<p class="body">€ {{ account['balance'] }}</p>
</article>
{% if not loop.last %}<hr />{% endif %}
{% endfor %}
{% endblock content %}
62 changes: 31 additions & 31 deletions templates/account/update.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
{% extends "base.html" %}
{% block header %}
<h1>
{% block title %}
Account {{ account['account_number'] }} | Edit
{% endblock title %}
</h1>
<h1>
{% block title %}
Account {{ account['account_number'] }} | Edit
{% endblock title %}
</h1>
{% endblock header %}
{% block content %}
<form method="post">
<label for="account_number">Account Number</label>
<input name="account_number"
id="account_number"
type="text"
value="{{ request.form['account_number'] or account['account_number'] }}"
disabled />
<label for="balance">Balance</label>
<input name="balance"
id="balance"
type="number"
min="0"
step="0.0001"
placeholder="0.0000"
value="{{ request.form['balance'] or account['balance'] }}"
required />
<input type="submit" value="Save" />
</form>
<hr />
<form action="{{ url_for('account_delete', account_number=account['account_number']) }}"
method="post">
<input class="danger"
type="submit"
value="Delete"
onclick="return confirm('Are you sure?');" />
</form>
<form method="post">
<label for="account_number">Account Number</label>
<input name="account_number"
id="account_number"
type="text"
value="{{ request.form['account_number'] or account['account_number'] }}"
disabled />
<label for="balance">Balance</label>
<input name="balance"
id="balance"
type="number"
min="0"
step="0.0001"
placeholder="0.0000"
value="{{ request.form['balance'] or account['balance'] }}"
required />
<input type="submit" value="Save" />
</form>
<hr />
<form action="{{ url_for('account_delete', account_number=account['account_number']) }}"
method="post">
<input class="danger"
type="submit"
value="Delete"
onclick="return confirm('Are you sure?');" />
</form>
{% endblock content %}
34 changes: 17 additions & 17 deletions templates/base.html
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<!DOCTYPE html>
<title>
{% block title %}
{% endblock title %}
{% block title %}
{% endblock title %}
- Bank</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" />
<nav>
<h1>
<a href="{{ url_for('account_index') }}">Bank</a>
</h1>
<ul>
<li>
<a href="{{ url_for('account_index') }}">Accounts</a>
</li>
</ul>
<h1>
<a href="{{ url_for('account_index') }}">Bank</a>
</h1>
<ul>
<li>
<a href="{{ url_for('account_index') }}">Accounts</a>
</li>
</ul>
</nav>
<section class="content">
<header>
{% block header %}
{% endblock header %}
</header>
{% for message in get_flashed_messages() %}<div class="flash">{{ message }}</div>{% endfor %}
{% block content %}
{% endblock content %}
<header>
{% block header %}
{% endblock header %}
</header>
{% for message in get_flashed_messages() %}<div class="flash">{{ message }}</div>{% endfor %}
{% block content %}
{% endblock content %}
</section>