Skip to content

Commit 97e73fb

Browse files
author
David Schowalter
committed
Enhance appointment UI styling and layout.
Introduced sticky header for controls, improved appointment grouping and styling, and added alternating background colors for better readability. Adjusted HTML structure to simplify date selection and align styles with updated CSS. Expanded appointment details representation for better clarity.
1 parent 2ff51ed commit 97e73fb

File tree

2 files changed

+88
-19
lines changed

2 files changed

+88
-19
lines changed

app/static/css/appointments.css

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,22 @@
1111
to { opacity: 1; transform: translateY(0); }
1212
}
1313

14+
/* Sticky Header für Steuerelemente */
15+
.controls-header {
16+
position: sticky;
17+
top: 0;
18+
background-color: white;
19+
padding: var(--spacing-sm);
20+
z-index: 100;
21+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
22+
margin-bottom: var(--spacing-md);
23+
border-radius: var(--border-radius);
24+
}
25+
1426
/* Fetch-Button */
1527
.btn-fetch {
1628
background-color: var(--primary-color);
17-
margin-bottom: var(--spacing-xl);
29+
margin-bottom: var(--spacing-md);
1830
position: relative;
1931
overflow: hidden;
2032
}
@@ -122,6 +134,34 @@
122134
scrollbar-color: var(--primary-color) #f0f0f0;
123135
}
124136

137+
/* Gruppierung für Termine */
138+
.appointment-group {
139+
margin-bottom: var(--spacing-md);
140+
border-bottom: 1px solid var(--border-color);
141+
padding-bottom: var(--spacing-sm);
142+
}
143+
144+
.appointment-group-header {
145+
background-color: var(--primary-color);
146+
color: white;
147+
padding: 5px 10px;
148+
border-radius: 4px;
149+
margin-bottom: 8px;
150+
font-weight: bold;
151+
font-size: 0.9rem;
152+
display: flex;
153+
justify-content: space-between;
154+
}
155+
156+
.appointment-count {
157+
background-color: white;
158+
color: var(--primary-color);
159+
border-radius: 10px;
160+
padding: 0 8px;
161+
font-size: 0.8rem;
162+
display: inline-block;
163+
}
164+
125165
.appointments-container::-webkit-scrollbar {
126166
width: 8px;
127167
}
@@ -149,13 +189,21 @@
149189

150190
.appointment-item {
151191
padding: var(--spacing-xs) var(--spacing-sm);
192+
background-color: #f5f9ff; /* Leichter Hintergrund für bessere Unterscheidung */
193+
margin-bottom: 4px;
194+
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
152195
}
153196

154197
.calendar-item {
155198
margin-bottom: 2px;
156199
padding: 0 var(--spacing-xs);
157200
}
158201

202+
/* Alternierende Farben für Termine */
203+
.appointment-item:nth-child(even) {
204+
background-color: #f0f7ff;
205+
}
206+
159207
.appointment-item {
160208
flex-wrap: wrap;
161209
}
@@ -181,6 +229,23 @@
181229
padding: var(--spacing-xs) 0;
182230
}
183231

232+
/* Verbesserte Darstellung der Termindetails */
233+
.appointment-label {
234+
display: flex;
235+
flex-direction: column;
236+
}
237+
238+
.appointment-date {
239+
font-weight: bold;
240+
color: var(--primary-color);
241+
font-size: 0.9rem;
242+
}
243+
244+
.appointment-description {
245+
color: var(--text-color);
246+
margin-top: 2px;
247+
}
248+
184249
/* Hover-Effekte */
185250
.appointment-item:hover,
186251
.calendar-item:hover {

app/templates/appointments.html

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767

6868
// Mit Verzögerung scrollen, um sicherzustellen, dass die Seite vollständig geladen ist
6969
setTimeout(function() {
70-
// Zu fetch_appointments scrollen (Button oder Input mit diesem Namen)
70+
// Zu den Appointments-Actions scrollen (Buttons über den Terminen)
7171
$('html, body').animate({
72-
scrollTop: $('input[name="fetch_appointments"]').offset().top - 20
72+
scrollTop: $('.appointments-actions').offset().top - 20
7373
}, 1000);
7474
}, 500);
7575
}
@@ -207,6 +207,21 @@ <h2>{{ base_url }}</h2>
207207

208208
<!-- Form to fetch appointments -->
209209
<form method="POST">
210+
<div class="controls-header">
211+
<!-- Date selection -->
212+
<label for="start_date">Startdatum:</label>
213+
<input type="text" id="start_date" name="start_date"
214+
value="{{ start_date }}" required>
215+
216+
<label for="end_date">Enddatum:</label>
217+
<input type="text" id="end_date" name="end_date"
218+
value="{{ end_date }}" required>
219+
220+
<!-- Submit button for fetching appointments -->
221+
<input type="submit" name="fetch_appointments"
222+
value="Termine abholen" class="btn btn-fetch">
223+
</div>
224+
210225
<!-- Calendars selection -->
211226
<div class="calendars-container">
212227
{% for calendar in calendars %}
@@ -221,19 +236,6 @@ <h2>{{ base_url }}</h2>
221236
</div>
222237
{% endfor %}
223238
</div>
224-
225-
<!-- Date selection -->
226-
<label for="start_date">Startdatum:</label>
227-
<input type="text" id="start_date" name="start_date"
228-
value="{{ start_date }}" required>
229-
230-
<label for="end_date">Enddatum:</label>
231-
<input type="text" id="end_date" name="end_date"
232-
value="{{ end_date }}" required>
233-
234-
<!-- Submit button for fetching appointments -->
235-
<input type="submit" name="fetch_appointments"
236-
value="Termine abholen" class="btn btn-fetch">
237239
</form>
238240
{% if appointments %}
239241
<form method="POST" enctype="multipart/form-data">
@@ -247,9 +249,11 @@ <h2>{{ base_url }}</h2>
247249
<input type="checkbox" id="appointment-{{ appointment['id'] }}" name="appointment_id"
248250
value="{{ appointment['id'] }}" class="appointment-checkbox" checked>
249251
<label for="appointment-{{ appointment['id'] }}" class="appointment-label">
250-
{{ appointment['startDateView'] }}
251-
({{ appointment['startTimeView'] }}-{{ appointment['endTimeView'] }})
252-
<br/>{{ appointment['description'] }}
252+
<span class="appointment-date">
253+
{{ appointment['startDateView'] }}
254+
({{ appointment['startTimeView'] }}-{{ appointment['endTimeView'] }})
255+
</span>
256+
<span class="appointment-description">{{ appointment['description'] }}</span>
253257
</label>
254258
<textarea name="additional_info_{{ appointment['id'] }}"
255259
placeholder="Zusätzliche Informationen">{{ appointment['additional_info'] | default('') }}</textarea>

0 commit comments

Comments
 (0)