Fixed breadcrumb styling in BS5

This commit is contained in:
Jan Böhmer 2022-07-24 22:48:21 +02:00
parent 270d622265
commit a07c43ea8a
2 changed files with 35 additions and 35 deletions

View file

@ -10,15 +10,15 @@
{% set disabled = attachment.secure and not is_granted("show_secure", attachment) %} {% set disabled = attachment.secure and not is_granted("show_secure", attachment) %}
{% if not attachment_helper or attachment_helper.fileExisting(attachment) %} {% if not attachment_helper or attachment_helper.fileExisting(attachment) %}
{% if link and not disabled %} {% if link and not disabled %}
<a target="_blank" data-turbo="false" rel="noopener" href="{{ attachment|entityURL('file_view') }}"> <a target="_blank" data-turbo="false" rel="noopener" href="{{ attachment|entityURL('file_view') }}">
{% endif %}
{% if attachment.picture %}
<img class="hoverpic" data-thumbnail="{{ attachment|entityURL('file_view') }}" src="{{ attachment|entityURL('file_view') }}">
{% else %}
<i class="text-dark {{ class }} {{ ext_to_fa_icon(attachment.extension) }}"></i>
{% endif %} {% endif %}
{% if attachment.picture %}
<img class="hoverpic" data-thumbnail="{{ attachment|entityURL('file_view') }}" src="{{ attachment|entityURL('file_view') }}">
{% else %}
<i class="text-dark {{ class }} {{ ext_to_fa_icon(attachment.extension) }}"></i>
{% endif %}
{% if link and not disabled %} {% if link and not disabled %}
</a> </a>
{% endif %} {% endif %}
{% elseif not attachment_helper.fileExisting(attachment) %} {% elseif not attachment_helper.fileExisting(attachment) %}
<i class="{{ class }} fa-exclamation-triangle text-danger" title="{% trans %}attachment.file_not_found{% endtrans %}"></i> <i class="{{ class }} fa-exclamation-triangle text-danger" title="{% trans %}attachment.file_not_found{% endtrans %}"></i>
@ -72,19 +72,19 @@
{% endmacro %} {% endmacro %}
{% macro breadcrumb_entity_link(entity, link_type = "list_parts") %} {% macro breadcrumb_entity_link(entity, link_type = "list_parts") %}
<nav aria-label="breadcrumb"> <nav aria-label="breadcrumb">
<ol class="breadcrumb"> <ol class="breadcrumb py-2 px-3 rounded" style="background-color: var(--bs-gray-200);">
{% for e in entity.pathArray %} {% for e in entity.pathArray %}
<li class="breadcrumb-item {% if loop.last %}active{% endif %}"> <li class="breadcrumb-item {% if loop.last %}active{% endif %}">
{% if link_type is not empty and not loop.last and e.id is not null %} {% if link_type is not empty and not loop.last and e.id is not null %}
<a href="{{ e | entityURL(link_type) }}">{{ e.name }}</a> <a href="{{ e | entityURL(link_type) }}">{{ e.name }}</a>
{% else %} {% else %}
{{ e.name }} {{ e.name }}
{% endif %} {% endif %}
</li> </li>
{% endfor %} {% endfor %}
</ol> </ol>
</nav> </nav>
{% endmacro %} {% endmacro %}
{% macro bool_icon(bool) %} {% macro bool_icon(bool) %}
@ -119,20 +119,20 @@
{% endmacro %} {% endmacro %}
{% macro parameters_table(parameters) %} {% macro parameters_table(parameters) %}
<table class="table table-hover table-striped table-sm"> <table class="table table-hover table-striped table-sm">
<thead> <thead>
<tr>
<th>{% trans %}specifications.property{% endtrans %}</th>
<th>{% trans %}specifications.value{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for param in parameters %}
<tr> <tr>
<td>{{ param.name }} {% if param.symbol is not empty %}<span class="latex" data-controller="common--latex">${{ param.symbol }}$</span>{% endif %}</td> <th>{% trans %}specifications.property{% endtrans %}</th>
<td>{{ param.formattedValue }}</td> <th>{% trans %}specifications.value{% endtrans %}</th>
</tr> </tr>
{% endfor %} </thead>
</tbody> <tbody>
</table> {% for param in parameters %}
<tr>
<td>{{ param.name }} {% if param.symbol is not empty %}<span class="latex" data-controller="common--latex">${{ param.symbol }}$</span>{% endif %}</td>
<td>{{ param.formattedValue }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endmacro parameters_table %} {% endmacro parameters_table %}

View file

@ -1,7 +1,7 @@
{% extends "base.html.twig" %} {% extends "base.html.twig" %}
{% block content %} {% block content %}
<div class="bg-light rounded p-3"> <div class="rounded p-4" style="background-color: var(--bs-gray-300);">
<h1 class="display-3">{{ partdb_title }}</h1> <h1 class="display-3">{{ partdb_title }}</h1>
<h4> <h4>
{% trans %}version.caption{% endtrans %}: {{ shivas_app_version }} {% trans %}version.caption{% endtrans %}: {{ shivas_app_version }}