Improved QR code view

- added backlink to pasta page
- added link on QR SVG to its destination
- 404 if incorrect id
- QR code of URL pasta will now redirect to /url endpoint
This commit is contained in:
Daniel Szabo 2022-11-07 20:28:45 +02:00
parent 5854572e87
commit c6e2b026e6
2 changed files with 73 additions and 15 deletions

View file

@ -1,7 +1,29 @@
{% include "header.html" %}
<div style="text-align: center">
{{qr}}
<div style="float: left">
<a href="{{ args.public_path }}/pasta/{{pasta.id_as_animals()}}">Back to Pasta</a>
</div>
<div style="text-align: center; padding: 3rem;">
{% if pasta.pasta_type == "url" %}
<a href="{{ args.public_path }}/url/{{pasta.id_as_animals()}}">
{{qr}}
</a>
{% else %}
<a href="{{ args.public_path }}/pasta/{{pasta.id_as_animals()}}">
{{qr}}
</a>
{% endif %}
</div>
<style>
.copy-text-button,
.copy-url-button {
font-size: small;
padding: 4px;
width: 6rem;
}
</style>
{% include "footer.html" %}