geochan/src/thread_page.eml.html

28 lines
1.4 KiB
HTML
Raw Normal View History

2021-12-29 21:07:17 +01:00
let f thread_view thread_id request =
<script type="text/javascript" src="/assets/js/js_thread.js" defer="defer"></script>
2021-12-29 21:07:17 +01:00
<%s! thread_view %>
% begin match Dream.session "nick" request with
% | None ->
2022-02-20 18:02:25 +01:00
% let redirect = Dream.to_percent_encoded (Format.sprintf "redirect=/thread/%s" thread_id) in
<a href="/login?<%s redirect%>">Login to reply!</a>
2021-12-29 21:07:17 +01:00
% | Some _ ->
2022-02-18 20:17:24 +01:00
<div class="post-form">
<%s! Dream.form_tag ~action:( Format.sprintf "/thread/%s" thread_id)
2021-12-29 21:07:17 +01:00
~enctype:`Multipart_form_data request %>
2022-02-18 20:17:24 +01:00
<label for="reply-comment" id="reply-comment-label" class="form-label">Comment:</label>
<textarea name="reply-comment" type="text" class="form-control" id="reply-comment" aria-labelledby="reply-comment-label"></textarea>
2021-12-29 21:07:17 +01:00
2022-02-18 20:17:24 +01:00
<label for="tags" id="tags-label" class="form-label">Tags:</label>
<input name="tags" type="text" class="form-control" id="tags" aria-labelledby="tags-label"></input>
2021-12-29 21:07:17 +01:00
2022-02-18 20:17:24 +01:00
<label for="file" id="file-label" class="form-label">Picture:</label>
<input id="file" name="file" aria-describedby="file-label" type="file" accept="image/*">
2022-01-25 14:07:28 +01:00
2022-02-18 20:17:24 +01:00
<label for="alt" id="alt-label" class="form-label">Image description:</label>
<input name="alt" type="text" class="form-control" id="alt" aria-labelledby="alt-label"></input>
2021-12-29 21:07:17 +01:00
<button type="submit" class="btn btn-primary">Reply</button>
</div>
</form>
% end;