forked from Ruderverein-Donau-Linz/rowt
[TASK] support dark mode second draft
This commit is contained in:
@ -28,21 +28,21 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-200 p-3 mt-4 rounded-t-md">
|
||||
<div class="search-wrapper">
|
||||
<label for="name" class="sr-only">Suche</label>
|
||||
<input type="search" name="name" id="filter-js" class="w-full relative block rounded-md border-0 py-1.5 px-2 text-gray-900 ring-1 ring-inset ring-gray-300 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" placeholder="Suchen nach Namen...">
|
||||
<input type="search" name="name" id="filter-js" class="search-bar" placeholder="Suchen nach Namen...">
|
||||
</div>
|
||||
|
||||
<div id="filter-result-js" class="bg-gray-200 text-primary-950 pb-3 px-3 text-right"></div>
|
||||
<div id="filter-result-js" class="search-result"></div>
|
||||
{% endmacro new %}
|
||||
|
||||
|
||||
{% macro edit(boat, uuid) %}
|
||||
<div data-filterable="true" data-filter="{{ boat.name }}" class="w-full border-t">
|
||||
<form action="/admin/boat/{{ boat.id }}" data-filterable="true" method="post" class="bg-white p-4 w-full">
|
||||
<form action="/admin/boat/{{ boat.id }}" data-filterable="true" method="post" class="bg-white dark:bg-primary-900 p-4 w-full">
|
||||
<div class="w-full">
|
||||
<input type="hidden" name="id" value="{{ boat.id }}"/>
|
||||
<div class="font-bold mb-1">{{ boat.name }}<br/></div>
|
||||
<div class="font-bold mb-1 text-black dark:text-white">{{ boat.name }}<br/></div>
|
||||
<div class="grid md:grid-cols-3 gap-3">
|
||||
{{ 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) }}
|
||||
|
@ -9,11 +9,11 @@
|
||||
{% endif %}
|
||||
{% for amount_seats, grouped_boats in boats | group_by(attribute="amount_seats") %}
|
||||
<div class="pb-2">
|
||||
<div class="bg-gray-100 text-primary-950 text-center text-sm mb-2">
|
||||
<div class="bg-gray-100 dark:bg-primary-600 text-primary-950 dark:text-white text-center text-sm mb-2">
|
||||
<strong>{{ amount_seats }}x</strong>
|
||||
</div>
|
||||
{% for boat in grouped_boats %}
|
||||
<div id="boat-{{ boat.id }}" class="px-3 boats-js cursor-pointer" {% if boat.damage != 'locked' %} data-seats="{{boat.amount_seats}}" data-default_shipmaster_only_steering="{{boat.default_shipmaster_only_steering}}" data-onclick="true" {% endif %} data-id="{{ boat.id }}">
|
||||
<div id="boat-{{ boat.id }}" class="px-3 boats-js text-black dark:text-white {% if boat.damage != 'locked' and not boat.on_water %} cursor-pointer hover:text-primary-900 dark:hover:text-gray-100 {% endif %}" {% if boat.damage != 'locked' and not boat.on_water %} data-seats="{{boat.amount_seats}}" data-default_shipmaster_only_steering="{{boat.default_shipmaster_only_steering}}" data-onclick="true" {% endif %} data-id="{{ boat.id }}">
|
||||
<span class="status-damage status-damage-{{ boat.damage }}"></span>
|
||||
<span {% if boat.damage == 'locked' or boat.on_water %} class="opacity-50" {% endif %}>{{ boat.name }}
|
||||
{% if boat.owner %}
|
||||
@ -103,7 +103,7 @@
|
||||
<div class="w-full">
|
||||
<div class="flex justify-between items-center">
|
||||
<div>
|
||||
<strong class="block text-primary-900">
|
||||
<strong class="block text-primary-900 dark:text-white">
|
||||
{{ log.departure | date(format="%H:%M") }}
|
||||
Uhr
|
||||
</strong>
|
||||
@ -135,7 +135,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% for rower in log.rowers %}
|
||||
<p>{{ rower.name }} {% if rower.id == log.shipmaster or rower.id == log.steering_person %}<small class="text-gray-600">({% 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 %})</small>{% endif %}</p>
|
||||
<p>{{ rower.name }} {% if rower.id == log.shipmaster or rower.id == log.steering_person %}<small class="text-gray-600 dark:text-primary-100">({% 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 %})</small>{% endif %}</p>
|
||||
{% 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) %}
|
||||
<div class="border-t bg-white py-3 px-4 relative" data-filterable="true" data-filter="{{ log.boat.name }} {% for rower in log.rowers %} {{ rower.name }} {% endfor %}">
|
||||
<div class="border-t bg-white dark:bg-primary-900 py-3 px-4 relative" data-filterable="true" data-filter="{{ log.boat.name }} {% for rower in log.rowers %} {{ rower.name }} {% endfor %}">
|
||||
{% if log.logtype %}
|
||||
<div class="absolute top-0 right-0 bg-primary-100 rounded-bl-md text-primary-950 text-xs w-32 px-2 py-1 text-center font-bold">
|
||||
{% if log.logtype == 1 %}
|
||||
@ -171,8 +171,8 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
<div {% if log.logtype %} class="mt-4 sm:mt-0" {% endif %}>
|
||||
<strong>{{ log.boat.name }}</strong> <small class="text-gray-600">({{ log.shipmaster_user.name }}{% if log.shipmaster_only_steering %} - handgesteuert {% endif %})</small>
|
||||
<small class="block text-gray-600">
|
||||
<strong class="text-black dark:text-white">{{ log.boat.name }}</strong> <small class="text-gray-600 dark:text-gray-100">({{ log.shipmaster_user.name }}{% if log.shipmaster_only_steering %} - handgesteuert {% endif %})</small>
|
||||
<small class="block text-gray-600 dark:text-gray-100">
|
||||
|
||||
{% 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 %}
|
||||
<div>
|
||||
<div class="text-black dark:text-white">
|
||||
{{ log.destination }}
|
||||
{% if state == "completed" %}
|
||||
<small class="text-gray-600">({{ log.distance_in_km }} km)</small>
|
||||
<small class="text-gray-600 dark:text-gray-100">({{ log.distance_in_km }} km)</small>
|
||||
{% endif %}
|
||||
|
||||
{% if log.comments %}
|
||||
@ -196,13 +196,13 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if amount_guests > 0 or log.rowers | length > 0 %}
|
||||
<div class="text-sm text-gray-600">
|
||||
<div class="text-sm text-gray-600 dark:text-gray-100">
|
||||
Ruderer:
|
||||
{% for rower in log.rowers %}
|
||||
{{ rower.name }}{% if not loop.last or amount_guests > 0 %}, {% endif %}
|
||||
{% endfor %}
|
||||
{% if amount_guests > 0 %}
|
||||
Gäste <small class="text-gray-600">(ohne Account)</small>: {{ amount_guests }}
|
||||
Gäste <small class="text-gray-600 dark:text-gray-100">(ohne Account)</small>: {{ amount_guests }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
@ -223,12 +223,12 @@
|
||||
|
||||
<div class="relative">
|
||||
{{ 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") }}
|
||||
<span class="absolute right-0 bottom-0 py-1.5 px-2 bg-white dark:bg-primary-950 border-0 text-gray-600 dark:text-gray-100 ring-1 ring-inset ring-gray-300 rounded-br-md rounded-tr-md">km</span>
|
||||
<span class="absolute right-0 bottom-0 py-1.5 px-2 bg-white dark:bg-primary-950 border-0 text-gray-600 dark:text-gray-100 ring-1 ring-inset ring-gray-300 dark:ring-primary-950 rounded-br-md rounded-tr-md">km</span>
|
||||
</div>
|
||||
|
||||
{{ macros::input(label="Kommentar", name="comments", id="comments" ~ log.id, type="text", value=log.comments, class="rounded-md change-id-js") }}
|
||||
|
||||
<details class="bg-gray-200 bg-opacity-80 rounded-md p-2">
|
||||
<details class="bg-gray-200 bg-opacity-80 dark:bg-primary-900 rounded-md p-2">
|
||||
<summary class="cursor-pointer">Details ändern</summary>
|
||||
<div class="grid grid-cols-1 gap-3">
|
||||
{{ macros::input(label='Abfahrtszeit', name='departure', type='datetime-local', required=true, class="change-id-js rounded-md", value=log.departure) }}
|
||||
|
Reference in New Issue
Block a user