simple javascript clock for frontend
remove table from administration backend, styling with bootstrap for mobile compability
This commit is contained in:
parent
dfb84a4170
commit
3ed4b458a1
3 changed files with 68 additions and 26 deletions
|
@ -22,7 +22,6 @@
|
|||
|
||||
<div class="page-header"></div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<p><a href="../../${static_url}" title="static website">Show frontpage of this tycker</a></p>
|
||||
|
||||
|
@ -47,31 +46,49 @@
|
|||
|
||||
<div id="timestamp">
|
||||
<form action="generate" method="GET">
|
||||
<input type="submit" value="Generate current timestamp" />
|
||||
<button type="submit" class="btn btn-default">Generate current timestamp</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<table border="1">
|
||||
<tr><th>Timestamp</th><th>Title</th><th>Content</th></tr>
|
||||
<tr><form action="submit" method="GET">
|
||||
<td><input type="text" size="20" name="date" value="${now.strftime(date_format)}" /></td>
|
||||
<td><input type="text" size="25" name="title" value="" autofocus="autofocus" /></td>
|
||||
<td><textarea name="content" rows="8" cols="80" /></td>
|
||||
<td><input type="submit" value="Create" /></td>
|
||||
</form></tr>
|
||||
<tr py:for="entry in entries"><form action="submit" method="GET">
|
||||
<td><input type="text" size="20" name="date" value="${entry['timestamp'].strftime(date_format)}" /></td>
|
||||
<td><input type="text" size="25" name="title" value="${entry['title']}" /></td>
|
||||
<td><textarea name="content" rows="8" cols="80">${entry['content']}</textarea></td>
|
||||
<td><input type="hidden" name="entry_id" value="${entry.id}" /><input type="submit" value="Update" /></td>
|
||||
</form>
|
||||
<td><form action="delete" method="GET">
|
||||
<input type="hidden" name="entry_id" value="${entry.id}" />
|
||||
<input type="submit" value="Delete" />
|
||||
</form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<form action="submit" method="GET">
|
||||
<div class="form-group">
|
||||
<label for="Timestamp">Timestamp</label>
|
||||
<input type="text" class="form-control" id="Timestamp" name="date" value="${now.strftime(date_format)}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="Title">Title</label>
|
||||
<input type="text" class="form-control" id="Titel" name="title" value="" autofocus="autofocus" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="Content">Content</label>
|
||||
<textarea class="form-control" name="content" rows="8" cols="80" />
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Create</button>
|
||||
</form>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h3>Old entries</h3>
|
||||
<div class="well" py:for="entry in entries">
|
||||
<form action="submit" method="GET" >
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="date" value="${entry['timestamp'].strftime(date_format)}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="title" value="${entry['title']}" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<textarea name="content" class="form-control" rows="8" cols="80">${entry['content']}</textarea>
|
||||
</div>
|
||||
<input type="hidden" name="entry_id" value="${entry.id}" /><button type="submit" class="btn btn-default">Update</button>
|
||||
</form>
|
||||
<br/>
|
||||
<form action="delete" method="GET">
|
||||
<input type="hidden" name="entry_id" value="${entry.id}" />
|
||||
<button type="submit" class="btn btn-default">Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue