diff --git a/frontend/scss/app.scss b/frontend/scss/app.scss index 46606c2..b4bb35b 100644 --- a/frontend/scss/app.scss +++ b/frontend/scss/app.scss @@ -10,3 +10,4 @@ @import 'components/alert'; @import 'components/status'; @import 'components/chart'; +@import 'components/search'; diff --git a/frontend/scss/components/_btns.scss b/frontend/scss/components/_btns.scss index b7ffb37..30b4db4 100644 --- a/frontend/scss/components/_btns.scss +++ b/frontend/scss/components/_btns.scss @@ -6,7 +6,7 @@ } &-dark { - @apply bg-primary-900 hover:bg-primary-950 dark:bg-primary-950 focus-visible:outline-primary-950; + @apply bg-primary-900 hover:bg-primary-950 dark:bg-primary-600 dark:hover:bg-primary-500 focus-visible:outline-primary-950; } &-gray { diff --git a/frontend/scss/components/_input.scss b/frontend/scss/components/_input.scss index e62dc4a..8665c7c 100644 --- a/frontend/scss/components/_input.scss +++ b/frontend/scss/components/_input.scss @@ -258,7 +258,7 @@ select { } } .choices__list--dropdown .choices__item--selectable.is-highlighted, .choices__list[aria-expanded] .choices__item--selectable.is-highlighted { - @apply bg-gray-100; + @apply bg-gray-100 dark:bg-primary-950; } .choices__list--dropdown .choices__item--selectable.is-highlighted::after, .choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after { opacity: 0.5; @@ -307,6 +307,8 @@ select { border: 0; border-radius: 0; max-width: 100%; + + @apply bg-transparent; } .choices__input:focus { outline: 0; diff --git a/frontend/scss/components/_links.scss b/frontend/scss/components/_links.scss index fcb67b1..21d9ab7 100644 --- a/frontend/scss/components/_links.scss +++ b/frontend/scss/components/_links.scss @@ -1,6 +1,6 @@ .link { &-primary { - @apply text-primary-600 hover:text-primary-900 underline; + @apply text-primary-600 dark:text-primary-200 hover:text-primary-900 hover:dark:text-primary-300 underline; } &-dark { diff --git a/frontend/scss/components/_search.scss b/frontend/scss/components/_search.scss new file mode 100644 index 0000000..a621e04 --- /dev/null +++ b/frontend/scss/components/_search.scss @@ -0,0 +1,13 @@ +.search { + &-bar { + @apply w-full relative block rounded-md border-0 py-1.5 px-2 bg-white dark:bg-black text-gray-900 dark:text-white ring-1 ring-inset ring-gray-300 dark:ring-black placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-primary-600 sm:text-sm sm:leading-6 mb-2 md:mb-0; + } + + &-wrapper { + @apply bg-gray-200 dark:bg-primary-600 p-3 mt-4 rounded-t-md; + } + + &-result { + @apply bg-gray-200 dark:bg-primary-600 text-primary-950 dark:text-white pb-3 px-3 text-right; + } +} diff --git a/frontend/tailwind.config.cjs b/frontend/tailwind.config.cjs index 6f9bcd6..3d2eddf 100644 --- a/frontend/tailwind.config.cjs +++ b/frontend/tailwind.config.cjs @@ -40,5 +40,6 @@ export default { }, }, plugins: [], + important: true, } diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index 5fbb47b..5e748ac 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -30,26 +30,29 @@ -
+
- +
-
-
+
+
{% for user in users %}
-
-
+ +
-
{{ user.name }} +
{{ user.name }} {% if user.last_access %} (last access: {{ user.last_access | date }}) {% endif %} + {% if user.pw %} + Passwort zurücksetzen + {% endif %}
-
+
{{ macros::checkbox(label='Scheckbuch', name='is_guest', id=loop.index , checked=user.is_guest) }} {{ macros::checkbox(label='Steuerberechtigter', name='is_cox', id=loop.index , checked=user.is_cox) }} {{ macros::checkbox(label='Technical', name='is_tech', id=loop.index , checked=user.is_tech) }} @@ -58,16 +61,13 @@ {{ macros::input(label='Weight (kg)', name='weight', id=loop.index, type="text", value=user.weight) }} {{ macros::input(label='Sex', name='sex', id=loop.index, type="text", value=user.sex) }}
- {% if user.pw %} - Passwort zurücksetzen - {% endif %}
- diff --git a/templates/boatdamages.html.tera b/templates/boatdamages.html.tera index 0bfadbd..49e2d2f 100644 --- a/templates/boatdamages.html.tera +++ b/templates/boatdamages.html.tera @@ -38,24 +38,24 @@
-
+
- +
-
+
{% for boatdamage in boatdamages | sort(attribute="verified") %} -
+
- {{ boatdamage.created_at | date(format='%d.%m.%Y') }} ({{ boatdamage.boat.name }}){% if boatdamage.boat.damage %}(Boot gesperrt){% endif %} + {{ boatdamage.created_at | date(format='%d.%m.%Y') }} ({{ boatdamage.boat.name }}){% if boatdamage.boat.damage %}(Boot gesperrt){% endif %}
{{ boatdamage.desc }}
- + Schaden eingetragen von {{ boatdamage.user_created.name }} am/um {{ boatdamage.created_at | date(format='%d.%m.%Y (%H:%M)') }} {% if boatdamage.fixed_at %} - Repariert von {{ boatdamage.user_fixed.name }} am/um {{ boatdamage.fixed_at | date(format='%d.%m.%Y (%H:%M)') }} + Repariert von {{ boatdamage.user_fixed.name }} am/um {{ boatdamage.fixed_at | date(format='%d.%m.%Y (%H:%M)') }} {% else %} {% if loggedin_user.is_cox %}
@@ -70,7 +70,7 @@ {% endif %} {% if boatdamage.verified_at %} - Verifziert von {{ boatdamage.user_verified.name }} am/um {{ boatdamage.verified_at | date(format='%d.%m.%Y (%H:%M)') }} + Verifziert von {{ boatdamage.user_verified.name }} am/um {{ boatdamage.verified_at | date(format='%d.%m.%Y (%H:%M)') }} {% else %} {% if loggedin_user.is_tech and boatdamage.fixed_at %} diff --git a/templates/ergo.html.tera b/templates/ergo.html.tera index f0d8611..6e99f22 100644 --- a/templates/ergo.html.tera +++ b/templates/ergo.html.tera @@ -12,11 +12,11 @@
-
+
Deine Daten

- Folgende Daten hat der Ruderassistent von dir. Wenn diese nicht mehr aktuell sind, bitte gewünschte Änderungen an Philipp melden (Tel. nr siehe Signal, oder an it@rudernlinz.at). + Folgende Daten hat der Ruderassistent von dir. Wenn diese nicht mehr aktuell sind, bitte gewünschte Änderungen an Philipp melden (Tel. nr siehe Signal, oder an it@rudernlinz.at).

  • Geburtsdatum: {{ loggedin_user.dob }}
  • @@ -27,7 +27,7 @@
-
+

Neuer Eintrag

@@ -35,7 +35,7 @@
- +
@@ -66,7 +66,7 @@
- +
@@ -94,7 +94,7 @@
-
+

Aktuelle Woche

diff --git a/templates/includes/forms/boat.html.tera b/templates/includes/forms/boat.html.tera index 8fed8fc..614ca79 100644 --- a/templates/includes/forms/boat.html.tera +++ b/templates/includes/forms/boat.html.tera @@ -28,21 +28,21 @@
-
+
- +
-
+
{% endmacro new %} {% macro edit(boat, uuid) %}
- +
-
{{ boat.name }}
+
{{ boat.name }}
{{ macros::input(label='Name', name='name', type='text', value=boat.name) }} {{ macros::input(label='Plätze', name='amount_seats', type='number', min=0, value=boat.amount_seats) }} diff --git a/templates/includes/forms/log.html.tera b/templates/includes/forms/log.html.tera index 72c3447..bcb4266 100644 --- a/templates/includes/forms/log.html.tera +++ b/templates/includes/forms/log.html.tera @@ -9,11 +9,11 @@ {% endif %} {% for amount_seats, grouped_boats in boats | group_by(attribute="amount_seats") %}
-
+
{{ amount_seats }}x
{% for boat in grouped_boats %} -
+
{{ boat.name }} {% if boat.owner %} @@ -103,7 +103,7 @@
- + {{ log.departure | date(format="%H:%M") }} Uhr @@ -135,7 +135,7 @@ {% endif %} {% for rower in log.rowers %} -

{{ rower.name }} {% if rower.id == log.shipmaster or rower.id == log.steering_person %}({% if rower.id == log.shipmaster %}Schiffsführer{% endif %}{% if rower.id == log.shipmaster and rower.id == log.steering_person %}/{% endif %}{% if rower.id == log.steering_person%}Steuerperson{% endif %}){% endif %}

+

{{ rower.name }} {% if rower.id == log.shipmaster or rower.id == log.steering_person %}({% if rower.id == log.shipmaster %}Schiffsführer{% endif %}{% if rower.id == log.shipmaster and rower.id == log.steering_person %}/{% endif %}{% if rower.id == log.steering_person%}Steuerperson{% endif %}){% endif %}

{% endfor %} {% set amount_rowers = log.rowers | length %} @@ -156,7 +156,7 @@ {% endmacro show %} {% macro show_old(log, state, allowed_to_close=false, only_ones, index) %} -
+
{% if log.logtype %}
{% if log.logtype == 1 %} @@ -171,8 +171,8 @@
{% endif %}
- {{ log.boat.name }} ({{ log.shipmaster_user.name }}{% if log.shipmaster_only_steering %} - handgesteuert {% endif %}) - + {{ log.boat.name }} ({{ log.shipmaster_user.name }}{% if log.shipmaster_only_steering %} - handgesteuert {% endif %}) + {% if state == "completed" and log.departure | date(format='%d.%m.%Y') == log.arrival | date(format='%d.%m.%Y') %} {{ log.departure | date(format='%d.%m.%Y')}} ({{ log.departure | date(format='%H:%M')}} - {{ log.arrival | date(format='%H:%M')}}) @@ -185,10 +185,10 @@ {% if allowed_to_close and state == "on_water" %} {{ log::home(log=log, only_ones=only_ones) }} {% else %} -
+
{{ log.destination }} {% if state == "completed" %} - ({{ log.distance_in_km }} km) + ({{ log.distance_in_km }} km) {% endif %} {% if log.comments %} @@ -196,13 +196,13 @@ {% endif %}
{% if amount_guests > 0 or log.rowers | length > 0 %} -
+
Ruderer: {% for rower in log.rowers %} {{ rower.name }}{% if not loop.last or amount_guests > 0 %}, {% endif %} {% endfor %} {% if amount_guests > 0 %} - Gäste (ohne Account): {{ amount_guests }} + Gäste (ohne Account): {{ amount_guests }} {% endif %}
{% endif %} @@ -223,12 +223,12 @@
{{ macros::input(label="Distanz", name="distance_in_km", id="distance_in_km" ~ log.id , type="number", min=0, value=log.distance_in_km, required=true, class="rounded-md change-id-js") }} - km + km
{{ macros::input(label="Kommentar", name="comments", id="comments" ~ log.id, type="text", value=log.comments, class="rounded-md change-id-js") }} -
+
Details ändern
{{ macros::input(label='Abfahrtszeit', name='departure', type='datetime-local', required=true, class="change-id-js rounded-md", value=log.departure) }} diff --git a/templates/includes/macros.html.tera b/templates/includes/macros.html.tera index 5404eef..7de0cbf 100644 --- a/templates/includes/macros.html.tera +++ b/templates/includes/macros.html.tera @@ -158,8 +158,8 @@ {% endmacro input %} {% macro checkbox(label, name, id='', checked=false, class='', disabled=false) %} -
+
- + {{ planned_event.planned_starting_time }} Uhr - ({{ planned_event.name }} - {% if planned_event.trip_type %} - - - {{ planned_event.trip_type.icon | safe }}{{ planned_event.trip_type.name }} - {% endif %})
+ ({{ planned_event.name }}{% if planned_event.trip_type %} - {{ planned_event.trip_type.icon | safe }} {{ planned_event.trip_type.name }}{% endif %})
Details @@ -121,8 +117,8 @@ {% if loggedin_user.is_admin %} - {{ macros::input(label='Gast', name='user_note', type='text', required=true) }} - + {{ macros::input(label='Gast', class="input rounded-t", name='user_note', type='text', required=true) }} + {% endif %} @@ -134,8 +130,8 @@ {% if loggedin_user.is_admin %} {# --- START Edit Form --- #} -
-

Ausfahrt bearbeiten

+
+

Ausfahrt bearbeiten

@@ -170,7 +166,7 @@ {# --- START Trips --- #} {% if day.trips | length > 0 %} {% for trip in day.trips | sort(attribute="planned_starting_time") %} -
+
{% if trip.max_people == 0 %} @@ -184,13 +180,9 @@ {{ trip.trip_type.icon | safe }}{{ trip.trip_type.name }} {% endif %}) {% else %} - {{ trip.planned_starting_time }} + {{ trip.planned_starting_time }} Uhr - ({{ trip.cox_name }} - {% if trip.trip_type %} - - - {{ trip.trip_type.icon | safe }}{{ trip.trip_type.name }} - {% endif %}) + ({{ trip.cox_name }}{% if trip.trip_type %} - {{ trip.trip_type.icon | safe }} {{ trip.trip_type.name }}{% endif %}) {% endif %}
@@ -224,16 +216,16 @@ {{ macros::box(participants=trip.rower, empty_seats=trip.max_people - amount_cur_rower, bg='primary-100', color='black', trip_details_id=trip.trip_details_id, allow_removing=loggedin_user.id == trip.cox_id) }} {% if trip.cox_id == loggedin_user.id %} - {{ macros::input(label='Gast', name='user_note', type='text', required=true) }} - + {{ macros::input(label='Gast', class="input rounded-t", name='user_note', type='text', required=true) }} + {% endif %} {% endif %} {# --- START Edit Form --- #} {% if trip.cox_id == loggedin_user.id %} -
-

Ausfahrt bearbeiten

+
+

Ausfahrt bearbeiten

{{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=trip.max_people, min='0') }} {{ macros::input(label='Anmerkungen', name='notes', type='input', value=trip.notes) }} diff --git a/templates/log.completed.html.tera b/templates/log.completed.html.tera index 4b9b8e7..4ef5bbd 100644 --- a/templates/log.completed.html.tera +++ b/templates/log.completed.html.tera @@ -9,12 +9,12 @@

Logbuch

-
+
- +
-
+
{% for log in logs %} {{ log::show_old(log=log, state="completed", only_ones=false, index=loop.index) }} {% endfor %} diff --git a/templates/stat.boats.html.tera b/templates/stat.boats.html.tera index 1ea186c..ab67acf 100644 --- a/templates/stat.boats.html.tera +++ b/templates/stat.boats.html.tera @@ -5,19 +5,19 @@ {% block content %}

Bootsauswertung

-
+
- +
-
+
-
+
{% set_global km = 0 %} {% set_global index = 1 %} {% for s in stat %} -
- +
+ {% if km != s.rowed_km %} {{loop.index}} {% set_global index = loop.index %} diff --git a/templates/stat.people.html.tera b/templates/stat.people.html.tera index 8eb910e..7737082 100644 --- a/templates/stat.people.html.tera +++ b/templates/stat.people.html.tera @@ -7,19 +7,19 @@

Statistik

-
+
- +
-
+
-
+
{% set_global km = 0 %} {% set_global index = 1 %} {% for s in stat %} -
- +
+ {% if km != s.rowed_km %} {{loop.index}} {% set_global index = loop.index %}