43 lines
1.5 KiB
Text
43 lines
1.5 KiB
Text
{! vim: set ts=2 sw=2 et tw=120: !}
|
|
|
|
<h3>{name}</h3>
|
|
<img src="{dataURL}" alt="{name}">
|
|
{?b}
|
|
<p>
|
|
<strong>Bookmarked</strong>
|
|
</p>
|
|
{/b}
|
|
{?details}
|
|
<a href="/favorites/{_id}">Details</a>
|
|
{:else}
|
|
<form class="data" id="favourite{_id}" method="POST" action="/favorites/{_id}?_method=PUT">
|
|
<input type="hidden" name="dataURL" value="{dataURL}">
|
|
<label for="name">Name:</label>
|
|
<input type="text" name="name" placeholder="Name" value="{name}"><br>
|
|
<button type="button" class="imgur">Imgur options</button><hr>
|
|
<button data-update>Update</button><br>
|
|
<button data-delete formaction="/favorites/{_id}?_method=DELETE">Delete</button><br>
|
|
{?bookmarked}
|
|
<button data-del-bookmark name="bookmarked" value="false"
|
|
formaction="/favorites/{_id}/bookmarked?_method=PUT">Remove bookmark</button>
|
|
{:else}
|
|
<button data-bookmark name="bookmarked" value="true"
|
|
formaction="/favorites/{_id}/bookmarked?_method=PUT">Add bookmark</button>
|
|
{/bookmarked}
|
|
</form>
|
|
<form class="favorites hidden">
|
|
<hr>
|
|
<input type="hidden" name="dataURL" value="{dataURL}">
|
|
<input type="text" name="album" placeholder="Imgur album name"><br>
|
|
<input type="text" name="tags" placeholder="Imgur tags"><br>
|
|
<label for="favorites">Add in favorites</label>
|
|
<input type="checkbox" name="favorites"><br>
|
|
<label for="favorites">Replace an image</label>
|
|
<input type="checkbox" name="replace"><br>
|
|
<div class="replace hidden">
|
|
<input type="text" name="old_name" placeholder="Imgur image name to replace"><br>
|
|
</div>
|
|
<button type="submit">Submit to Imgur</button>
|
|
<div class="details"></div>
|
|
</form>
|
|
{/details}
|