More html cleanup to match W3c

This commit is contained in:
2023-09-22 14:30:06 +02:00
parent 5ebce9480e
commit 8c15441fe5
13 changed files with 38 additions and 34 deletions

View File

@@ -36,3 +36,7 @@ a.badge, a.badge:hover {
#footer > p { #footer > p {
display: inline; display: inline;
} }
th.th-35 {
width: 35%;
}

View File

@@ -125,8 +125,8 @@
<div class="container d-flex"> <div class="container d-flex">
<div class="me-auto"> <div class="me-auto">
<a href="{% url 'index' %}" class="navbar-brand d-flex align-items-center"> <a href="{% url 'index' %}" class="navbar-brand d-flex align-items-center">
<svg class="me-2" width="26" height="16" enable-background="new 0 0 26 26" version="1" viewBox="0 0 26 16" xmlns="http://www.w3.org/2000/svg"> <svg class="me-2" width="26" height="16" viewBox="0 0 26 16" xmlns="http://www.w3.org/2000/svg">
<path d="m2.8125 0.0010991a1.0001 1.0001 0 0 0-0.8125 1c0 0.55455-0.44545 1-1 1a1.0001 1.0001 0 0 0-1 1v10a1.0001 1.0001 0 0 0 1 1c0.55455 0 1 0.44546 1 1a1.0001 1.0001 0 0 0 1 1h20a1.0001 1.0001 0 0 0 1-1c0-0.55454 0.44546-1 1-1a1.0001 1.0001 0 0 0 1-1v-10a1.0001 1.0001 0 0 0-1-1c-0.55454 0-1-0.44545-1-1a1.0001 1.0001 0 0 0-1-1h-20a1.0001 1.0001 0 0 0-0.09375 0 1.0001 1.0001 0 0 0-0.09375 0zm0.78125 2h14.406v1h2v-1h2.4062c0.30628 0.76906 0.82469 1.2875 1.5938 1.5938v8.8125c-0.76906 0.30628-1.2875 0.82469-1.5938 1.5938h-2.4062v-1h-2v1h-14.406c-0.30628-0.76906-0.82469-1.2875-1.5938-1.5938v-8.8125c0.76906-0.30628 1.2875-0.82469 1.5938-1.5938zm14.406 2v2h2v-2zm0 3v2h2v-2zm0 3v2h2v-2z" enable-background="accumulate" overflow="visible" stroke-width="2" /> <path d="m2.8125 0.0010991a1.0001 1.0001 0 0 0-0.8125 1c0 0.55455-0.44545 1-1 1a1.0001 1.0001 0 0 0-1 1v10a1.0001 1.0001 0 0 0 1 1c0.55455 0 1 0.44546 1 1a1.0001 1.0001 0 0 0 1 1h20a1.0001 1.0001 0 0 0 1-1c0-0.55454 0.44546-1 1-1a1.0001 1.0001 0 0 0 1-1v-10a1.0001 1.0001 0 0 0-1-1c-0.55454 0-1-0.44545-1-1a1.0001 1.0001 0 0 0-1-1h-20a1.0001 1.0001 0 0 0-0.09375 0 1.0001 1.0001 0 0 0-0.09375 0zm0.78125 2h14.406v1h2v-1h2.4062c0.30628 0.76906 0.82469 1.2875 1.5938 1.5938v8.8125c-0.76906 0.30628-1.2875 0.82469-1.5938 1.5938h-2.4062v-1h-2v1h-14.406c-0.30628-0.76906-0.82469-1.2875-1.5938-1.5938v-8.8125c0.76906-0.30628 1.2875-0.82469 1.5938-1.5938zm14.406 2v2h2v-2zm0 3v2h2v-2zm0 3v2h2v-2z" stroke-width="2" />
<style> <style>
path { path {
text-indent:0; text-indent:0;

View File

@@ -32,7 +32,7 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th width="35%" scope="row">Type</th> <th class="th-35" scope="row">Type</th>
<td>{{ d.rolling_class.type }}</td> <td>{{ d.rolling_class.type }}</td>
</tr> </tr>
<tr> <tr>
@@ -54,7 +54,7 @@
<td>{{ d.era }}</td> <td>{{ d.era }}</td>
</tr> </tr>
<tr> <tr>
<th width="35%" scope="row">Manufacturer</th> <th class="th-35" scope="row">Manufacturer</th>
<td>{%if d.manufacturer %} <td>{%if d.manufacturer %}
<a href="{% url 'filtered' _filter="manufacturer" search=d.manufacturer.slug %}">{{ d.manufacturer }}{% if d.manufacturer.website %}</a> <a href="{{ d.manufacturer.website }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a>{% endif %} <a href="{% url 'filtered' _filter="manufacturer" search=d.manufacturer.slug %}">{{ d.manufacturer }}{% if d.manufacturer.website %}</a> <a href="{{ d.manufacturer.website }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a>{% endif %}
{% endif %}</td> {% endif %}</td>
@@ -78,7 +78,7 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th width="35%" scope="row">Decoder</th> <th class="th-35" scope="row">Decoder</th>
<td>{{ d.decoder }}</td> <td>{{ d.decoder }}</td>
</tr> </tr>
<tr> <tr>

View File

@@ -17,25 +17,25 @@
<tbody> <tbody>
{% if d.logo %} {% if d.logo %}
<tr> <tr>
<th width="35%" scope="row">Logo</th> <th class="th-35" scope="row">Logo</th>
<td><img style="max-height: 48px" src="{{ d.logo.url }}" /></td> <td><img style="max-height: 48px" src="{{ d.logo.url }}" /></td>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
<th width="35%" scope="row">Name</th> <th class="th-35" scope="row">Name</th>
<td>{{ d.extended_name }}</td> <td>{{ d.extended_name }}</td>
</tr> </tr>
<tr> <tr>
<th width="35%" scope="row">Abbreviation</th> <th class="th-35" scope="row">Abbreviation</th>
<td>{{ d.name }}</td> <td>{{ d.name }}</td>
</tr> </tr>
<tr> <tr>
<th width="35%" scope="row">Country</th> <th class="th-35" scope="row">Country</th>
<td>{{ d.country.name }} <img src="{{ d.country.flag }}" alt="{{ d.country }}" /> <td>{{ d.country.name }} <img src="{{ d.country.flag }}" alt="{{ d.country }}" />
</tr> </tr>
{% if d.freelance %} {% if d.freelance %}
<tr> <tr>
<th width="35%" scope="row">Notes</th> <th class="th-35" scope="row">Notes</th>
<td>A <em>freelance</em> company</td> <td>A <em>freelance</em> company</td>
</tr> </tr>
{% endif %} {% endif %}

View File

@@ -82,7 +82,7 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th width="35%" scope="row">Company</th> <th class="th-35" scope="row">Company</th>
<td><abbr title="{{ consist.company.extended_name }}">{{ consist.company }}</abbr></td> <td><abbr title="{{ consist.company.extended_name }}">{{ consist.company }}</abbr></td>
</tr> </tr>
<tr> <tr>

View File

@@ -36,12 +36,12 @@
<tbody> <tbody>
{% if d.address %} {% if d.address %}
<tr> <tr>
<th width="35%" scope="row">Address</th> <th class="th-35" scope="row">Address</th>
<td>{{ d.address }}</td> <td>{{ d.address }}</td>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
<th width="35%" scope="row">Company</th> <th class="th-35" scope="row">Company</th>
<td><abbr title="{{ d.company.extended_name }}">{{ d.company }}</abbr></td> <td><abbr title="{{ d.company.extended_name }}">{{ d.company }}</abbr></td>
</tr> </tr>
<tr> <tr>

View File

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

View File

@@ -22,7 +22,7 @@
{% endif %} {% endif %}
</li> </li>
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="theme-icon-active nav-link dropdown-toggle" href="#" type="button" id="bd-theme" data-bs-toggle="dropdown" aria-expanded="false"> <a class="theme-icon-active nav-link dropdown-toggle" href="#" role="button" id="bd-theme" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-circle-half"></i> <i class="bi bi-circle-half"></i>
</a> </a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme"> <ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme">

View File

@@ -17,18 +17,18 @@
<tbody> <tbody>
{% if d.logo %} {% if d.logo %}
<tr> <tr>
<th width="35%" scope="row">Logo</th> <th class="th-35" scope="row">Logo</th>
<td><img style="max-height: 48px" src="{{ d.logo.url }}" /></td> <td><img style="max-height: 48px" src="{{ d.logo.url }}" /></td>
</tr> </tr>
{% endif %} {% endif %}
{% if d.website %} {% if d.website %}
<tr> <tr>
<th width="35%" scope="row">Website</th> <th class="th-35" scope="row">Website</th>
<td><a href="{{ d.website }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a></td> <td><a href="{{ d.website }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a></td>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
<th width="35%" scope="row">Category</th> <th class="th-35" scope="row">Category</th>
<td>{{ d.category | title }}</td> <td>{{ d.category | title }}</td>
</tr> </tr>
</tbody> </tbody>

View File

@@ -64,7 +64,7 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th width="35%" scope="row">Type</th> <th class="th-35" scope="row">Type</th>
<td>{{ rolling_stock.rolling_class.type }}</td> <td>{{ rolling_stock.rolling_class.type }}</td>
</tr> </tr>
<tr> <tr>
@@ -95,7 +95,7 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th width="35%" scope="row">Manufacturer</th> <th class="th-35" scope="row">Manufacturer</th>
<td>{%if rolling_stock.manufacturer %} <td>{%if rolling_stock.manufacturer %}
<a href="{% url 'filtered' _filter="manufacturer" search=rolling_stock.manufacturer.slug %}">{{ rolling_stock.manufacturer }}{% if rolling_stock.manufacturer.website %}</a> <a href="{{ rolling_stock.manufacturer.website }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a>{% endif %} <a href="{% url 'filtered' _filter="manufacturer" search=rolling_stock.manufacturer.slug %}">{{ rolling_stock.manufacturer }}{% if rolling_stock.manufacturer.website %}</a> <a href="{{ rolling_stock.manufacturer.website }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a>{% endif %}
{% endif %}</td> {% endif %}</td>
@@ -119,7 +119,7 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th width="35%" scope="row">Interface</th> <th class="th-35" scope="row">Interface</th>
<td>{{ rolling_stock.get_decoder_interface_display }}</td> <td>{{ rolling_stock.get_decoder_interface_display }}</td>
</tr> </tr>
{% if rolling_stock.decoder %} {% if rolling_stock.decoder %}
@@ -145,7 +145,7 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th width="35%" scope="row">Manufacturer</th> <th class="th-35" scope="row">Manufacturer</th>
<td>{%if rolling_stock.manufacturer %} <td>{%if rolling_stock.manufacturer %}
<a href="{% url 'filtered' _filter="manufacturer" search=rolling_stock.manufacturer.slug %}">{{ rolling_stock.manufacturer }}{% if rolling_stock.manufacturer.website %}</a> <a href="{{ rolling_stock.manufacturer.website }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a>{% endif %} <a href="{% url 'filtered' _filter="manufacturer" search=rolling_stock.manufacturer.slug %}">{{ rolling_stock.manufacturer }}{% if rolling_stock.manufacturer.website %}</a> <a href="{{ rolling_stock.manufacturer.website }}" target="_blank"><i class="bi bi-box-arrow-up-right"></i></a>{% endif %}
{% endif %}</td> {% endif %}</td>
@@ -182,7 +182,7 @@
<tbody> <tbody>
{% for p in rolling_stock_properties %} {% for p in rolling_stock_properties %}
<tr> <tr>
<th width="35%" scope="row">{{ p.property }}</th> <th class="th-35" scope="row">{{ p.property }}</th>
<td>{{ p.value }}</td> <td>{{ p.value }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
@@ -199,7 +199,7 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th width="35%" scope="row">Class</th> <th class="th-35" scope="row">Class</th>
<td>{{ rolling_stock.rolling_class.identifier }}</td> <td>{{ rolling_stock.rolling_class.identifier }}</td>
</tr> </tr>
<tr> <tr>
@@ -234,7 +234,7 @@
<tbody> <tbody>
{% for p in class_properties %} {% for p in class_properties %}
<tr> <tr>
<th width="35%" scope="row">{{ p.property }}</th> <th class="th-35" scope="row">{{ p.property }}</th>
<td>{{ p.value }}</td> <td>{{ p.value }}</td>
</tr> </tr>
{% endfor %} {% endfor %}
@@ -255,7 +255,7 @@
<td>{{ rolling_stock.get_decoder_interface_display }}</td> <td>{{ rolling_stock.get_decoder_interface_display }}</td>
</tr> </tr>
<tr> <tr>
<th width="35%" scope="row">Address</th> <th class="th-35" scope="row">Address</th>
<td>{{ rolling_stock.address }}</td> <td>{{ rolling_stock.address }}</td>
</tr> </tr>
<tr> <tr>
@@ -319,7 +319,7 @@
<tbody> <tbody>
{% for j in rolling_stock_journal %} {% for j in rolling_stock_journal %}
<tr> <tr>
<th width="35%" scope="row">{{ j.date }}</th> <th class="th-35" scope="row">{{ j.date }}</th>
<td>{{ j.log | safe }}</a></td> <td>{{ j.log | safe }}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}

View File

@@ -14,19 +14,19 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th width="35%" scope="row">Name</th> <th class="th-35" scope="row">Name</th>
<td>{{ d.scale }}</td> <td>{{ d.scale }}</td>
</tr> </tr>
<tr> <tr>
<th width="35%" scope="row">Ratio</th> <th class="th-35" scope="row">Ratio</th>
<td>{{ d.ratio }}</td> <td>{{ d.ratio }}</td>
</tr> </tr>
<tr> <tr>
<th width="35%" scope="row">Gauge</th> <th class="th-35" scope="row">Gauge</th>
<td>{{ d.gauge }}</td> <td>{{ d.gauge }}</td>
</tr> </tr>
<tr> <tr>
<th width="35%" scope="row">Tracks</th> <th class="th-35" scope="row">Tracks</th>
<td>{{ d.tracks }}</td> <td>{{ d.tracks }}</td>
</tr> </tr>
</tbody> </tbody>

View File

@@ -14,11 +14,11 @@
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<th width="35%" scope="row">Type</th> <th class="th-35" scope="row">Type</th>
<td>{{ d.type }}</td> <td>{{ d.type }}</td>
</tr> </tr>
<tr> <tr>
<th width="35%" scope="row">Category</th> <th class="th-35" scope="row">Category</th>
<td>{{ d.category | title}}</td> <td>{{ d.category | title}}</td>
</tr> </tr>
</tbody> </tbody>

View File

@@ -1,4 +1,4 @@
from ram.utils import git_suffix from ram.utils import git_suffix
__version__ = "0.3.2" __version__ = "0.3.3"
__version__ += git_suffix(__file__) __version__ += git_suffix(__file__)