karton/templates/pastalist.html
Dániel Szabó f56ffa98e4 - added new pasta type URL and automatic redirection endpoint
- added water.css styling
- added CL argument to set port
- added raw URL to pasta list
2022-04-23 16:47:36 +01:00

96 lines
2.1 KiB
HTML

{% include "header.html" %}
{% if pastas.is_empty() %}
<p>
No pastas yet. 😔 Create one <a href="/">here</a>.
</p>
{%- else %}
<br>
<table style="width: 100%">
<thead>
<tr>
<th colspan="4">Pastas</th>
</tr>
<tr>
<th>
Key
</th>
<th>
Created
</th>
<th>
Expiration
</th>
<th>
</th>
</tr>
</thead>
<tbody>
{% for pasta in pastas %}
{% if pasta.pasta_type == "text" %}
<tr>
<td>
<a href="/pasta/{{pasta.idAsAnimals()}}">{{pasta.idAsAnimals()}}</a>
</td>
<td>
{{pasta.createdAsString()}}
</td>
<td>
{{pasta.expirationAsString()}}
</td>
<td>
<a style="margin-right:1rem" href="/raw/{{pasta.idAsAnimals()}}">Raw</a>
<a href="/remove/{{pasta.idAsAnimals()}}">Remove</a>
</td>
</tr>
{%- endif %}
{% endfor %}
</tbody>
</table>
<br>
<table>
<thead>
<tr>
<th colspan="4">URL Redirects</th>
</tr>
<tr >
<th>
Key
</th>
<th>
Created
</th>
<th>
Expiration
</th>
<th>
</th>
</tr>
</thead>
{% for pasta in pastas %}
{% if pasta.pasta_type == "url" %}
<tr>
<td>
<a href="/url/{{pasta.idAsAnimals()}}">{{pasta.idAsAnimals()}}</a>
</td>
<td>
{{pasta.createdAsString()}}
</td>
<td>
{{pasta.expirationAsString()}}
</td>
<td>
<a style="margin-right:1rem" href="/raw/{{pasta.idAsAnimals()}}">Raw</a>
<a href="/remove/{{pasta.idAsAnimals()}}">Remove</a>
</td>
</tr>
{%- endif %}
{% endfor %}
</tbody>
</table>
<br>
{%- endif %}
{% include "footer.html" %}