MB: styling of boathouse

This commit is contained in:
philipp 2024-03-09 16:49:04 +01:00
parent 1e96c113a9
commit f14177d497

View File

@ -3,11 +3,11 @@
{% import "includes/forms/boat" as boat %} {% import "includes/forms/boat" as boat %}
{% extends "base" %} {% extends "base" %}
{% macro show_place(aisle_name, side_name, level) %} {% macro show_place(aisle_name, side_name, level) %}
<li> <li class="truncate p-2 flex relative w-full">
{% set aisle = aisle_name ~ "-aisle" %} {% set aisle = aisle_name ~ "-aisle" %}
{% set place = boathouse[aisle][side_name] %} {% set place = boathouse[aisle][side_name] %}
{% if place[level] %} {% if place[level] %}
{{ place[level].1.name }} <a href="/board/boathouse/{{ place[level].0 }}/delete">X</a> {{ place[level].1.name }} <a class="btn btn-primary absolute end-0" href="/board/boathouse/{{ place[level].0 }}/delete">X</a>
{% elif boats | length > 0 %} {% elif boats | length > 0 %}
<details> <details>
<summary>Kein Boot</summary> <summary>Kein Boot</summary>
@ -36,8 +36,8 @@
</ol> </ol>
</div> </div>
{% endmacro show_side %} {% endmacro show_side %}
{% macro show_aisle(name) %} {% macro show_aisle(name, last=false) %}
<div id="{{ name }}-aisle" class="grid grid-cols-2 gap-4"> <div id="{{ name }}-aisle" class="grid grid-cols-2 gap-4 {% if not last %}md:border-r{% endif %}">
{{ self::show_side(aisle_name = name, side_name = "mountain") }} {{ self::show_side(aisle_name = name, side_name = "mountain") }}
{{ self::show_side(aisle_name = name, side_name = "water") }} {{ self::show_side(aisle_name = name, side_name = "water") }}
</div> </div>
@ -45,10 +45,10 @@
{% block content %} {% block content %}
<div class="max-w-screen-lg w-full dark:text-white"> <div class="max-w-screen-lg w-full dark:text-white">
<h1 class="h1">Bootshaus</h1> <h1 class="h1">Bootshaus</h1>
<div class="grid md:grid-cols-3 gap-4 divide-x"> <div class="grid md:grid-cols-3 gap-4">
{{ self::show_aisle(name = "mountain") }} {{ self::show_aisle(name = "mountain") }}
{{ self::show_aisle(name = "middle") }} {{ self::show_aisle(name = "middle") }}
{{ self::show_aisle(name = "water") }} {{ self::show_aisle(name = "water", last = true) }}
</div> </div>
</div> </div>
{% endblock content %} {% endblock content %}