Initial commit
This commit is contained in:
commit
d42a361e95
9 changed files with 363 additions and 0 deletions
7
templates/footer.html
Normal file
7
templates/footer.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<hr>
|
||||
<p style="font-size: smaller">
|
||||
MicroBin by Daniel Szabo. Fork me on <a href="https://github.com/szabodanika/microbin">GitHub</a>!
|
||||
Let's keep the Web <b>compact</b>, <b>accessible</b> and <b>humane</b>!
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
19
templates/header.html
Normal file
19
templates/header.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>MicroBin</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<body style="max-width: 720px; margin: auto; padding-left:0.5rem; padding-right:0.5rem; line-height: 1.5; font-size: 1.1em; font-family: sans-serif">
|
||||
<br>
|
||||
|
||||
<b style="margin-right: 0.5rem">
|
||||
MicroBin
|
||||
</b>
|
||||
|
|
||||
<a href="/" style="margin-right: 0.5rem; margin-left: 0.5rem">New Pasta</a>
|
||||
|
|
||||
<a href="/pastalist" style="margin-right: 0.5rem; margin-left: 0.5rem">Pasta List</a>
|
||||
|
|
||||
<a href="https://github.com/szabodanika/microbin" style="margin-right: 0.5rem; margin-left: 0.5rem">GitHub</a>
|
||||
|
||||
<hr>
|
23
templates/index.html
Normal file
23
templates/index.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% include "header.html" %}
|
||||
<form action="create" method="POST">
|
||||
<input name="id" value="0" type="hidden">
|
||||
<label for="expiration">Expiration</label><br>
|
||||
<select name="expiration" id="expiration">
|
||||
<optgroup label="Expire">
|
||||
<option value="firstread">First Read</option>
|
||||
<option value="10min">10 minutes</option>
|
||||
<option value="1hour">1 hour</option>
|
||||
<option selected value="24hour">24 hours</option>
|
||||
<option value="1week">1 week</option>
|
||||
</optgroup>
|
||||
<option value="never">Never Expire</option>
|
||||
</select>
|
||||
<br>
|
||||
<label>Content</label>
|
||||
<br>
|
||||
<textarea style="width: 100%; min-height: 100px" name="content"></textarea>
|
||||
<br>
|
||||
<br>
|
||||
<input style="width: 100px; background-color: limegreen" type="submit" value="Submit"/>
|
||||
</form>
|
||||
{% include "footer.html" %}
|
6
templates/pasta.html
Normal file
6
templates/pasta.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% include "header.html" %}
|
||||
<a href="/rawpasta/{{pasta.id}}">Raw Pasta</a>
|
||||
<pre style="background: lightgray; border: 1px black solid; padding: 0.5rem; overflow: auto">
|
||||
{{pasta}}
|
||||
</pre>
|
||||
{% include "footer.html" %}
|
40
templates/pastalist.html
Normal file
40
templates/pastalist.html
Normal file
|
@ -0,0 +1,40 @@
|
|||
{% include "header.html" %}
|
||||
<table style="width: 100%" border="1">
|
||||
<tr style="background: lightgrey">
|
||||
<th>
|
||||
Key
|
||||
</th>
|
||||
<th>
|
||||
Created
|
||||
</th>
|
||||
<th>
|
||||
Expiration
|
||||
</th>
|
||||
<th>
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
{% for pasta in pastas %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/pasta/{{pasta.idAsAnimals()}}">{{pasta.idAsAnimals()}}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{pasta.createdAsString()}}
|
||||
</td>
|
||||
<td>
|
||||
{{pasta.expirationAsString()}}
|
||||
</td>
|
||||
<td>
|
||||
<a href="/remove/{{pasta.idAsAnimals()}}">Remove</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% if pastas.is_empty() %}
|
||||
<p>
|
||||
No Pastas :-(
|
||||
</p>
|
||||
{%- endif %}
|
||||
{% include "footer.html" %}
|
Loading…
Add table
Add a link
Reference in a new issue