Дизайнерские заморочки с отчётом

This commit is contained in:
2024-11-21 15:00:50 +03:00
parent da90fe023f
commit f61e69b366
3 changed files with 80 additions and 36 deletions

View File

@@ -10,36 +10,43 @@
<a href="{{ url_for('logout') }}"><button>Выход</button></a>
</div>
<h1>{{ title }}</h1>
<div class="form">
<form action="" method="post">
<label for="category">Выберите предмет формирования отчета</label>
<select name="category" id="category" required>
{% for item in items %}
<option value="{{ item['id'] }}">{{ item['name'] }}</option>
{% endfor %}
</select>
<label for="month">Выберите отчетный период</label>
<div class="period">
<select name="month" id="month" required>
<option value="1">Январь</option>
<option value="2">Февраль</option>
<option value="3">Март</option>
<option value="4">Апрель</option>
<option value="5">Май</option>
<option value="6">Июнь</option>
<option value="7">Июль</option>
<option value="8">Август</option>
<option value="9">Сентябрь</option>
<option value="10">Октябрь</option>
<option value="11">Ноябрь</option>
<option value="12">Декабрь</option>
</select>
<input type="number" name="year" value="2024" min="1990" max="2100" required>
</div>
<form action="" method="post">
<select name="category" required>
{% for item in items %}
<option value="{{ item['id'] }}">{{ item['name'] }}</option>
{% endfor %}
</select>
<select name="month" required>
<option value="1">Январь</option>
<option value="2">Февраль</option>
<option value="3">Март</option>
<option value="4">Апрель</option>
<option value="5">Май</option>
<option value="6">Июнь</option>
<option value="7">Июль</option>
<option value="8">Август</option>
<option value="9">Сентябрь</option>
<option value="10">Октябрь</option>
<option value="11">Ноябрь</option>
<option value="12">Декабрь</option>
</select>
<input type="number" name="year" value="2024" min="1990" max="2100" required>
{% if write %}
<button type="submit" value="write">Создать</button>
{% else %}
<button type="submit" value="read">Просмотр</button>
{% endif %}
</form>
<div class="return">
<a href="{{ url_for('index') }}"><button>Главное меню</button></a>
{% if write %}
<button type="submit" value="write">Создать</button>
{% else %}
<button type="submit" value="read">Просмотр</button>
{% endif %}
</form>
<div class="return">
<a href="{{ url_for('index') }}"><button>Главное меню</button></a>
</div>
</div>
</body>
</html>
</html>

View File

@@ -10,7 +10,7 @@
<a href="{{ url_for('logout') }}"><button>Выход</button></a>
</div>
<h1>Выберите вариант отчетов</h1>
<div style="text-align: center; margin: 20px 0;">
<div class="buttons_menu">
<a href="{{ url_for('report_bp.create') }}"><button>Создать отчет</button></a>
<a href="{{ url_for('report_bp.view') }}"><button>Читать отчеты</button></a>
</div>

View File

@@ -1,4 +1,4 @@
h1,h2 {
h1, h2 {
text-align: center;
}
@@ -26,6 +26,11 @@ div.logout, div.login {
text-align: center;
}
div.buttons_menu{
text-align: center;
margin: 20px 0;
}
div.logout button {
margin-top: -5px;
background-color: #ff0000;
@@ -37,11 +42,12 @@ div.login button {
}
div.return {
display: flex;
justify-content: center;
display: flex;
justify-content: center;
margin-top: 15px;
}
div.return button{
div.return button {
background-color: chocolate;
}
@@ -50,4 +56,35 @@ div.form {
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
text-align: center;
background-color: white;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
div.form label {
display: block;
margin-bottom: 5px;
font-size: 16px;
font-weight: bold;
color: #333;
}
div.form select, div.form input[type=number] {
margin-bottom: 15px;
padding: 5px;
font-size: 14px;
width: 100%;
box-sizing: border-box;
}
div.form .period {
display: flex;
gap: 10px;
justify-content: center;
}
div.form button {
margin-top: 15px;
}