Skip to content

Commit

Permalink
More html cleanup to match W3c
Browse files Browse the repository at this point in the history
  • Loading branch information
daniviga committed Sep 22, 2023
1 parent 5ebce94 commit 8c15441
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 34 deletions.
4 changes: 4 additions & 0 deletions ram/portal/static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ a.badge, a.badge:hover {
#footer > p {
display: inline;
}

th.th-35 {
width: 35%;
}
4 changes: 2 additions & 2 deletions ram/portal/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@
<div class="container d-flex">
<div class="me-auto">
<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">
<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" />
<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" stroke-width="2" />
<style>
path {
text-indent:0;
Expand Down
6 changes: 3 additions & 3 deletions ram/portal/templates/cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</thead>
<tbody>
<tr>
<th width="35%" scope="row">Type</th>
<th class="th-35" scope="row">Type</th>
<td>{{ d.rolling_class.type }}</td>
</tr>
<tr>
Expand All @@ -54,7 +54,7 @@
<td>{{ d.era }}</td>
</tr>
<tr>
<th width="35%" scope="row">Manufacturer</th>
<th class="th-35" scope="row">Manufacturer</th>
<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 %}
{% endif %}</td>
Expand All @@ -78,7 +78,7 @@
</thead>
<tbody>
<tr>
<th width="35%" scope="row">Decoder</th>
<th class="th-35" scope="row">Decoder</th>
<td>{{ d.decoder }}</td>
</tr>
<tr>
Expand Down
10 changes: 5 additions & 5 deletions ram/portal/templates/companies.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@
<tbody>
{% if d.logo %}
<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>
</tr>
{% endif %}
<tr>
<th width="35%" scope="row">Name</th>
<th class="th-35" scope="row">Name</th>
<td>{{ d.extended_name }}</td>
</tr>
<tr>
<th width="35%" scope="row">Abbreviation</th>
<th class="th-35" scope="row">Abbreviation</th>
<td>{{ d.name }}</td>
</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 }}" />
</tr>
{% if d.freelance %}
<tr>
<th width="35%" scope="row">Notes</th>
<th class="th-35" scope="row">Notes</th>
<td>A <em>freelance</em> company</td>
</tr>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion ram/portal/templates/consist.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</thead>
<tbody>
<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>
</tr>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions ram/portal/templates/consists.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
<tbody>
{% if d.address %}
<tr>
<th width="35%" scope="row">Address</th>
<th class="th-35" scope="row">Address</th>
<td>{{ d.address }}</td>
</tr>
{% endif %}
<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>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion ram/portal/templates/home.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% extends "roster.html" %}

{% block header %}
<p class="lead text-muted">{{ site_conf.about | safe }}</p>
<div class="text-muted">{{ site_conf.about | safe }}</div>
{% endblock %}
2 changes: 1 addition & 1 deletion ram/portal/templates/includes/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{% endif %}
</li>
<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>
</a>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-theme">
Expand Down
6 changes: 3 additions & 3 deletions ram/portal/templates/manufacturers.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
<tbody>
{% if d.logo %}
<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>
</tr>
{% endif %}
{% if d.website %}
<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>
</tr>
{% endif %}
<tr>
<th width="35%" scope="row">Category</th>
<th class="th-35" scope="row">Category</th>
<td>{{ d.category | title }}</td>
</tr>
</tbody>
Expand Down
18 changes: 9 additions & 9 deletions ram/portal/templates/rollingstock.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</thead>
<tbody>
<tr>
<th width="35%" scope="row">Type</th>
<th class="th-35" scope="row">Type</th>
<td>{{ rolling_stock.rolling_class.type }}</td>
</tr>
<tr>
Expand Down Expand Up @@ -95,7 +95,7 @@
</thead>
<tbody>
<tr>
<th width="35%" scope="row">Manufacturer</th>
<th class="th-35" scope="row">Manufacturer</th>
<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 %}
{% endif %}</td>
Expand All @@ -119,7 +119,7 @@
</thead>
<tbody>
<tr>
<th width="35%" scope="row">Interface</th>
<th class="th-35" scope="row">Interface</th>
<td>{{ rolling_stock.get_decoder_interface_display }}</td>
</tr>
{% if rolling_stock.decoder %}
Expand All @@ -145,7 +145,7 @@
</thead>
<tbody>
<tr>
<th width="35%" scope="row">Manufacturer</th>
<th class="th-35" scope="row">Manufacturer</th>
<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 %}
{% endif %}</td>
Expand Down Expand Up @@ -182,7 +182,7 @@
<tbody>
{% for p in rolling_stock_properties %}
<tr>
<th width="35%" scope="row">{{ p.property }}</th>
<th class="th-35" scope="row">{{ p.property }}</th>
<td>{{ p.value }}</td>
</tr>
{% endfor %}
Expand All @@ -199,7 +199,7 @@
</thead>
<tbody>
<tr>
<th width="35%" scope="row">Class</th>
<th class="th-35" scope="row">Class</th>
<td>{{ rolling_stock.rolling_class.identifier }}</td>
</tr>
<tr>
Expand Down Expand Up @@ -234,7 +234,7 @@
<tbody>
{% for p in class_properties %}
<tr>
<th width="35%" scope="row">{{ p.property }}</th>
<th class="th-35" scope="row">{{ p.property }}</th>
<td>{{ p.value }}</td>
</tr>
{% endfor %}
Expand All @@ -255,7 +255,7 @@
<td>{{ rolling_stock.get_decoder_interface_display }}</td>
</tr>
<tr>
<th width="35%" scope="row">Address</th>
<th class="th-35" scope="row">Address</th>
<td>{{ rolling_stock.address }}</td>
</tr>
<tr>
Expand Down Expand Up @@ -319,7 +319,7 @@
<tbody>
{% for j in rolling_stock_journal %}
<tr>
<th width="35%" scope="row">{{ j.date }}</th>
<th class="th-35" scope="row">{{ j.date }}</th>
<td>{{ j.log | safe }}</a></td>
</tr>
{% endfor %}
Expand Down
8 changes: 4 additions & 4 deletions ram/portal/templates/scales.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
</thead>
<tbody>
<tr>
<th width="35%" scope="row">Name</th>
<th class="th-35" scope="row">Name</th>
<td>{{ d.scale }}</td>
</tr>
<tr>
<th width="35%" scope="row">Ratio</th>
<th class="th-35" scope="row">Ratio</th>
<td>{{ d.ratio }}</td>
</tr>
<tr>
<th width="35%" scope="row">Gauge</th>
<th class="th-35" scope="row">Gauge</th>
<td>{{ d.gauge }}</td>
</tr>
<tr>
<th width="35%" scope="row">Tracks</th>
<th class="th-35" scope="row">Tracks</th>
<td>{{ d.tracks }}</td>
</tr>
</tbody>
Expand Down
4 changes: 2 additions & 2 deletions ram/portal/templates/types.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
</thead>
<tbody>
<tr>
<th width="35%" scope="row">Type</th>
<th class="th-35" scope="row">Type</th>
<td>{{ d.type }}</td>
</tr>
<tr>
<th width="35%" scope="row">Category</th>
<th class="th-35" scope="row">Category</th>
<td>{{ d.category | title}}</td>
</tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion ram/ram/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ram.utils import git_suffix

__version__ = "0.3.2"
__version__ = "0.3.3"
__version__ += git_suffix(__file__)

0 comments on commit 8c15441

Please sign in to comment.