css для вывода результативной таблицы (требуется дополнение)

This commit is contained in:
2024-11-29 02:07:38 +03:00
parent 6867da5c06
commit c7c3f3b14f

View File

@@ -3,30 +3,54 @@
<head>
<meta charset="UTF-8">
<title>{{ header }}</title>
<link href="/static/css/main.css" type="text/css" rel="stylesheet">
<link href="/static/css/output.css" type="text/css" rel="stylesheet">
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"
rel="stylesheet"
/>
<link
href="https://getbootstrap.com/docs/5.3/assets/css/docs.css"
rel="stylesheet"
/>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="logout">
<a href="{{ url_for('logout') }}"><button>Выход</button></a>
<div class="row flex-nowrap justify-content-between">
<div class="col-1 pt-1"></div>
<div class="col-10 text-center">
<label class="display-5 fw-bold">{{ header }}</label>
</div>
<div class="col-1 d-flex justify-content-end align-items-center">
<a href="{{ url_for('logout') }}"><button class="btn btn-danger">Выход</button></a>
</div>
</div>
<h1>{{ header }}</h1>
<!-- Output -->
{% if items %}
<table>
<tr>
{% for key in items[0].keys() %}
<th>{{ key }}</th>
{% endfor %}
</tr>
{% for item in items %}
<tr>
{% for value in item.values() %}
<td>{{ value }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
<div class="row flex-nowrap justify-content-between">
<div class="col-3"></div>
<div class="col-6">
<table class="table">
<thead class="table-dark">
<tr>
{% for key in items[0].keys() %}
<th>{{ key }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for item in items %}
<tr>
{% for value in item.values() %}
<td>{{ value }}</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="col-3"></div>
</div>
{% else %}
<p>Информации не найдено</p>
{% endif %}