Add options for a disclaimer, fix html code and remove deprecations (#50)

* Add options for a disclaimer, fix html code and remove deprecations

* Update READMEs

* Minor improvement to portal admin [skip ci]
This commit is contained in:
2025-01-30 23:13:32 +01:00
committed by GitHub
parent 04757d868a
commit 5d89cb96d2
13 changed files with 106 additions and 30 deletions

View File

@@ -9,7 +9,7 @@
{% endfor %}
</p>
{% endif %}
<small class="text-muted">Updated {{ book.updated_time | date:"M d, Y H:i" }}</small>
<small class="text-body-secondary">Updated {{ book.updated_time | date:"M d, Y H:i" }}</small>
{% endblock %}
{% block carousel %}
<div class="row">

View File

@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% block header %}
<p class="lead text-muted">Results found: {{ matches }}</p>
<p class="lead text-body-secondary">Results found: {{ matches }}</p>
{% endblock %}
{% block cards_layout %}
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-3">

View File

@@ -7,7 +7,7 @@
{{ t.name }}</a>{# new line is required #}
{% endfor %}
</p>
<small class="text-muted">Updated {{ consist.updated_time | date:"M d, Y H:i" }}</small>
<small class="text-body-secondary">Updated {{ consist.updated_time | date:"M d, Y H:i" }}</small>
{% endif %}
{% endblock %}
{% block carousel %}

View File

@@ -1,7 +1,7 @@
{% extends 'base.html' %}
{% block header %}
<small class="text-muted">Updated {{ flatpage.updated_time | date:"M d, Y H:i" }}</small>
<small class="text-body-secondary">Updated {{ flatpage.updated_time | date:"M d, Y H:i" }}</small>
{% endblock %}
{% block carousel %}
{% endblock %}

View File

@@ -1,5 +1,5 @@
{% extends "pagination.html" %}
{% block header %}
<div class="text-muted">{{ site_conf.about | safe }}</div>
<div class="text-body-secondary">{{ site_conf.about | safe }}</div>
{% endblock %}

View File

@@ -1,18 +1,34 @@
<footer class="text-muted py-4">
<div class="container">
<p class="float-end mb-1">
<a href="#">Back to top</a>
</p>
<footer class="text-body-secondary py-4">
<div class="container d-lg-flex justify-content-between">
<div id="footer" class="mb-1">
<p>&copy; {% now "Y" %}</p> {{ site_conf.footer | safe }}
<p>&copy; {% now "Y" %}</p> {{ site_conf.footer | safe }}
</div>
<div id="footer_extended" class="mb-0">
</div>
<div class="container">
<div id="footer_extended">
{{ site_conf.footer_extended | safe }}
</div>
</div>
<div class="container">
<p class="small text-muted">Made with ❤️ for 🚂 and <a href="https://github.com/daniviga/django-ram">django-ram</a>
{% if site_conf.show_version %}<br>Version {{ site_conf.version }}{% endif %}
<div class="container d-flex text-body-secondary">
<p class="flex-fill small">Made with ❤️ for 🚂 and <i class="bi bi-github"></i> <a href="https://github.com/daniviga/django-ram">django-ram</a>
{% if site_conf.show_version %}<br>Version {{ site_conf.version }}{% endif %}</p>
<p class="text-end fs-5">
{% if site_conf.disclaimer %}<a class="text-reset" title="Disclaimer" href="" data-bs-toggle="modal" data-bs-target="#disclaimerModal"><i class="bi bi-info-square-fill"></i></a> {% endif %}
<a class="text-reset" title="Back to top" href="#"><i class="bi bi-arrow-up-left-square-fill"></i></a>
</p>
</div>
<!-- Modal -->
<div class="modal fade" id="disclaimerModal" tabindex="-1" aria-labelledby="disclaimerLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="disclaimerLabel">Disclaimer</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
{{ site_conf.disclaimer | safe }}
</div>
</div>
</div>
</div>
</footer>

View File

@@ -8,7 +8,7 @@
{% endfor %}
</p>
{% endif %}
<small class="text-muted">Updated {{ rolling_stock.updated_time | date:"M d, Y H:i" }}</small>
<small class="text-body-secondary">Updated {{ rolling_stock.updated_time | date:"M d, Y H:i" }}</small>
{% endblock %}
{% block carousel %}
<div class="row">
@@ -194,7 +194,7 @@
</tr>
<tr>
<th scope="row">Production year</th>
<td>{{ rolling_stock.production_year|default:"-" }}</td>
<td>{{ rolling_stock.production_year | default:"-" }}</td>
</tr>
{% if rolling_stock.description %}
<tr>
@@ -215,17 +215,17 @@
<tr>
<th class="w-33" scope="row">Shop</th>
<td>
{{ rolling_stock.shop|default:"-" }}
{{ rolling_stock.shop | default:"-" }}
{% if rolling_stock.shop.website %} <a href="{{ rolling_stock.shop.website }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a>{% endif %}
</td>
</tr>
<tr>
<th class="w-33" scope="row">Purchase date</th>
<td>{{ rolling_stock.purchase_date|default:"-" }}</td>
<td>{{ rolling_stock.purchase_date | default:"-" }}</td>
</tr>
<tr>
<th scope="row">Price ({{ site_conf.currency }})</th>
<td>{{ rolling_stock.price|default:"-" }}</td>
<td>{{ rolling_stock.price | default:"-" }}</td>
</tr>
</tbody>
</table>
@@ -357,11 +357,11 @@
</tr>
<tr>
<th scope="row">Manufacturer</th>
<td>{{ rolling_stock.decoder.manufacturer|default:"-" }}</td>
<td>{{ rolling_stock.decoder.manufacturer | default:"-" }}</td>
</tr>
<tr>
<th scope="row">Version</th>
<td>{{ rolling_stock.decoder.version }}</td>
<td>{{ rolling_stock.decoder.version | default:"-"}}</td>
</tr>
<tr>
<th scope="row">Sound</th>