Skip to content

Commit

Permalink
Have a Go Back hyperlink in the base template
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmark committed Nov 4, 2023
1 parent cad3df6 commit 228b777
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 12 deletions.
21 changes: 21 additions & 0 deletions python/web/src/static/themes/modern/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,27 @@ section#manual a p {
margin: 0;
}

/*
------------------------------------------------------------------------------
Base > Section: Back
------------------------------------------------------------------------------
*/
section#back {
margin: 2rem 0 1rem;
}

section#back a {
margin: auto;
display: block;
padding: 0.25rem 0 0.25rem 2rem;
background: url("icons/chevrons-left.svg") no-repeat left center;
font-weight: bold;
}

section#back a p {
margin: 0;
}

/*
------------------------------------------------------------------------------
Admin > Section: Services
Expand Down
2 changes: 0 additions & 2 deletions python/web/src/templates/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,4 @@
</div>
</section>

<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>

{% endblock content %}
5 changes: 5 additions & 0 deletions python/web/src/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ <h1>
{{ content_class }}
{% block content %}{% endblock content %}
</div>
{% if self._TemplateReference__context.name not in ("index.html", "upload.html") %}
<section id="back">
<p><a href="#" onclick="history.go(-1)">{{ _("Go Back") }}</a></p>
</section>
{% endif %}
<div align="center" class="footer">
<div>
{{ _("PiSCSI software version:") }} <b>{{ env["version"] }}</b>
Expand Down
2 changes: 0 additions & 2 deletions python/web/src/templates/deviceinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,4 @@ <h2>{{ _("Detailed Info for Attached Devices") }}</h2>
</table>
</p>
{% endfor %}
<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>

{% endblock content %}
2 changes: 0 additions & 2 deletions python/web/src/templates/diskinfo.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
{% block content %}
<h2>{{ _("Disk Image Details: %(file_name)s", file_name=file_name) }}</h2>
<p><pre>{{ diskinfo }}</pre></p>
<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>

{% endblock content %}
2 changes: 0 additions & 2 deletions python/web/src/templates/drives.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,4 @@ <h2>{{ _("Removable Disk Drives") }}</h2>
</tbody>
</table>
<p><small>{{ _("%(disk_space)s MiB disk space remaining on the Pi", disk_space=env["free_disk_space"]) }}</small></p>
<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>

{% endblock content %}
2 changes: 0 additions & 2 deletions python/web/src/templates/logs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
{% block content %}
<h2>{{ _("System Logs: %(scope)s %(lines)s lines", scope=scope, lines=lines) }}</h2>
<p><pre>{{ logs }}</pre></p>
<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>

{% endblock content %}
2 changes: 0 additions & 2 deletions python/web/src/templates/manpage.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ <h2>{{ _("Manual for %(app)s", app=app) }}</h2>
<div id="manpage-content">
{{ manpage | safe }}
</div>

<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>
{% endblock content %}

0 comments on commit 228b777

Please sign in to comment.