change thread_view to a thread_preview with link

This commit is contained in:
Swrup 2022-01-09 11:28:18 +01:00
parent 0ad247c4be
commit 7330594dbf
12 changed files with 263 additions and 242 deletions

View file

@ -1,29 +1,14 @@
let f request =
<script type="text/javascript" src="/assets/js/js_thread_map.js" defer="defer"></script>
<script type="text/javascript" src="/assets/js/js_babillard.js" defer="defer"></script>
<%s Format.sprintf "Babillard is love" %>
<div class="mb-3">
% begin match Dream.session "nick" request with
% | None ->
% begin match Dream.session "nick" request with
% | None ->
% | Some _nick ->
<%s! Dream.form_tag ~action:"/babillard" ~enctype:`Multipart_form_data request %>
<input type="hidden" id="lat_input" name="lat_input">
<input type="hidden" id="lng_input" name="lng_input">
<label for="subject" id="subjectLabel" class="form-label">Subject</label>
<input name="subject" type="text" class="form-control" id="subject" aria-labelledby="subjectLabel"></input>
<label for="threadComment" id="threadCommentLabel" class="form-label">Comment</label>
<textarea name="threadComment" type="text" class="form-control" id="threadComment" aria-labelledby="threadCommentLabel"></textarea>
<label for="tags" id="tagsLabel" class="form-label">Tags</label>
<input name="tags" type="text" class="form-control" id="tags" aria-labelledby="tagsLabel"></input>
<input id="file" name="file" aria-describedby="fileHelp" type="file">
<div id="fileHelp" class="form-text">Add a picture for your thread</div>
<button type="submit" class="btn btn-primary">Make Thread</button>
</form>
%end;
% | Some _nick ->
<a href="/babillard/new_thread">[New Thread]</a>
% end;
<div id="map"></div>
<div id="thread_div"></div>
<div id="thread_preview_div"></div>
<a id="thread_link"></a>
</div>