uniform design (card) + names + deleted Home

This commit is contained in:
janphilippweinsheimer 2024-03-01 10:30:41 +01:00
parent 7ac9168147
commit 0b927009b5
5 changed files with 28 additions and 21 deletions

7
app.py
View File

@ -135,10 +135,15 @@ def index():
for habit_list in habit_lists:
habit_list.habits = sorted(habit_list.get_habits(), key=lambda habit: (not habit.checked, habit.slot))
days = {"Monday": "Montag", "Tuesday": "Dienstag", "Wednesday": "Mittwoch", "Thursday": "Donnerstag",
"Friday": "Freitag", "Saturday": "Samstag", "Sunday": "Sonntag"}
date = datetime.datetime.now().strftime("%d.%m.%Y %H:%M ") + days[datetime.datetime.now().strftime("%A")]
return render_template(
'index.html',
title=name,
utc_dt=datetime.datetime.now().strftime("%d.%m.%Y %H:%M %A"),
utc_dt=date,
habit_lists=habit_lists,
heatmap_values=heatmap_values,
errors={},

View File

@ -121,7 +121,7 @@
</div>
<!-- Beschreibung -->
<div class="col-md-3 d-none d-md-block text-black text-opacity-50"
<div class="col-md-4 d-none d-md-block text-black text-opacity-50"
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis">
{{ habit.note }}
</div>
@ -129,7 +129,7 @@
<!-- Streak -->
<div class="col-2" id="streak-{{ habit.id }}" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis">
{% if not habit.streak == 0 %}
{{ habit.streak }} 🔥
{{ habit.streak }}20 🔥
{% endif %}
</div>
@ -140,7 +140,7 @@
<i class="bi bi-trash3"></i>
</button>
<!-- -->
<!-- Knopf für das Bearbeiten der Gewohnheit -->
<a type="button" class="btn" href="{{ url_for('edit_habit') }}?habit={{ habit.id }}" aria-current="page"
style="width: 40px; height: 40px; min-height: 3em;">

View File

@ -2,7 +2,7 @@
{% block content %}
<div class="card bg-light p-5 mt-5">
<h1>Habitliste erstellen📋</h1>
<h1>Gewohnheitsliste erstellen📋</h1>
<form action="/habit-list" method="POST">
<div class="mb-3">

View File

@ -2,7 +2,7 @@
{% block content %}
<div class="card bg-light p-5 mt-5">
<h1>Habit erstellen📋</h1>
<h1>Gewohnheit erstellen📋</h1>
<form action="/habit" method="POST">
<div class="mb-3">

View File

@ -1,23 +1,25 @@
{% extends 'layouts/main.html' %}
{% block content %}
<div class="card bg-light mt-4 p-5">
<h1>{{ habit_list.name }}: {{ title }}</h1>
<p>Lade Nutzer per ihrer E-Mail-Adresse ein</p>
<h1>{{ habit_list.name }}: {{ title }}</h1>
<p>Lade Nutzer per ihrer E-Mail-Adresse ein</p>
<form action="/users" method="POST">
<div class="mb-3">
<label for="email" class="form-label">E-Mail</label>
<input type="text" placeholder="beispiel@cimeyclust.com" class="form-control {% if errors.get('email') %} is-invalid {% endif %}" id="email" name="email" value="{{email}}">
<div class="invalid-feedback">
{{ errors.get('email', '') }}
<form action="/users" method="POST">
<div class="mb-3">
<label for="email" class="form-label">E-Mail</label>
<input type="text" placeholder="beispiel@cimeyclust.com"
class="form-control {% if errors.get('email') %} is-invalid {% endif %}" id="email" name="email"
value="{{email}}">
<div class="invalid-feedback">
{{ errors.get('email', '') }}
</div>
</div>
</div>
<input hidden="hidden" name="habit_list_id" value="{{ habit_list.id }}">
<!-- submit button -->
<button type="submit" class="btn btn-primary">Einladen</button>
</form>
<input hidden="hidden" name="habit_list_id" value="{{ habit_list.id }}">
<!-- submit button -->
<button type="submit" class="btn btn-primary">Einladen</button>
</form>
</div>
{% endblock %}