Add pasta ID + pasta URL to pasta page. Fix #36

This commit is contained in:
Daniel Szabo 2022-07-31 19:41:19 +01:00
parent 435c07d75e
commit f54d5bd780

View file

@ -1,19 +1,27 @@
{% include "header.html" %} {% include "header.html" %}
<a style="margin-right: 0.5rem" href="/raw/{{pasta.id_as_animals()}}">Raw Text Content</a> <div style="float: left">
{% if pasta.file.is_some() %} <a style="margin-right: 0.5rem" href="/raw/{{pasta.id_as_animals()}}">Raw Text Content</a>
<a style="margin-right: 0.5rem; margin-left: 0.5rem" href="/file/{{pasta.id_as_animals()}}/{{pasta.file.as_ref().unwrap().name}}">Attached file {% if pasta.file.is_some() %}
'{{pasta.file.as_ref().unwrap().name}}' [{{pasta.file.as_ref().unwrap().size}}]</a> <a style="margin-right: 0.5rem; margin-left: 0.5rem"
{%- endif %} href="/file/{{pasta.id_as_animals()}}/{{pasta.file.as_ref().unwrap().name}}">Attached file
{% if pasta.editable %} '{{pasta.file.as_ref().unwrap().name}}' [{{pasta.file.as_ref().unwrap().size}}]</a>
<a style="margin-right: 0.5rem; margin-left: 0.5rem" href="/edit/{{pasta.id_as_animals()}}">Edit</a> {%- endif %}
{%- endif %} {% if pasta.editable %}
<a style="margin-right: 0.5rem; margin-left: 0.5rem" href="/remove/{{pasta.id_as_animals()}}">Remove</a> <a style="margin-right: 0.5rem; margin-left: 0.5rem" href="/edit/{{pasta.id_as_animals()}}">Edit</a>
{% if args.highlightsyntax %} {%- endif %}
<pre><code>{{pasta.content_syntax_highlighted()}}</code></pre> <a style="margin-right: 0.5rem; margin-left: 0.5rem" href="/remove/{{pasta.id_as_animals()}}">Remove</a>
{%- else %} </div>
<pre><code>{{pasta.content_not_highlighted()}}</code></pre> <div style="float: right">
{%- endif %} <a href="/pasta/{{pasta.id_as_animals()}}"><i>{{pasta.id_as_animals()}}</i></a>
</div>
<br>
<div style="clear: both;">
{% if args.highlightsyntax %}
<pre><code>{{pasta.content_syntax_highlighted()}}</code></pre>
{%- else %}
<pre><code>{{pasta.content_not_highlighted()}}</code></pre>
{%- endif %}
</div>
<style> <style>
code-line { code-line {
counter-increment: listing; counter-increment: listing;