Styles in flash

This commit is contained in:
2023-06-05 14:25:47 +02:00
parent ae04ea5426
commit b4ced47b52
9 changed files with 59 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
{% from 'bootstrap5/nav.html' import render_nav_item %}
<nav class="navbar navbar-expand-sm navbar-light bg-light mb-4 justify-content-end">
<nav class="navbar navbar-expand-sm navbar-dark bg-dark mb-4 justify-content-end">
<div class="container">
<button class="navbar-toggler"
type="button"

View File

@@ -7,7 +7,6 @@
content="width=device-width, initial-scale=1, shrink-to-fit=no">
{% block styles %}
{{ bootstrap.load_css() }}
<link rel="stylesheet" href="/css/elina.css">
<link rel="stylesheet"
href="{{ url_for('static', filename='css/main.css') }}">
{% endblock %}
@@ -16,9 +15,14 @@
</head>
<body>
{% include "_nav.html" %}
{% with messages = get_flashed_messages() %}
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for message in messages %}<div class="alert alert-info" role="alert">{{ message }}</div>{% endfor %}
{% for category, message in messages %}
{% if category == 'message' %}
{% set category = "info" %}
{% endif %}
<div class="alert alert-{{ category }}" role="alert">{{ message }}</div>
{% endfor %}
{% endif %}
{% endwith %}
<div class="container">

View File

@@ -5,9 +5,15 @@
<ul>
{% for benchmark in benchmarks %}
<li>
<a href="">{{ benchmark.name }} {{ benchmark.folder }}</a>
<a href="{{ url_for('main.set_benchmark', benchmark_id=benchmark.id) }}">{{ benchmark.name }}
{% if benchmark == current_user.benchmark %}*{% endif %}
</a>
</li>
{% endfor %}
</ul>
{% else %}
<img src="{{ url_for('static', filename='img/robert-lukeman-_RBcxo9AU-U-unsplash.jpg') }}"
class="img-fluid"
alt="image robert lukeman">
{% endif %}
{% endblock %}