add js_newthread.ml; make newthread_page beautiful
This commit is contained in:
parent
983a1ec4dd
commit
99c0736482
4 changed files with 144 additions and 4 deletions
|
|
@ -1,7 +1,18 @@
|
|||
let f ~board request =
|
||||
<script type="text/javascript" src="/assets/js/js_babillard.js" defer="defer"></script>
|
||||
%let url = Format.asprintf "/%a/new_thread" Babillard.pp_board board in
|
||||
<%s! Dream.form_tag ~action:url ~enctype:`Multipart_form_data request %>
|
||||
% begin match Dream.session "nick" request with
|
||||
% | None ->
|
||||
Login to make a new thread.
|
||||
% | Some _nick ->
|
||||
<script type="text/javascript" src="/assets/js/js_newthread.js" defer="defer"></script>
|
||||
<div id="board" data-board="babillard">Click the map to make a new thread:</div>
|
||||
<div class="row mb-3">
|
||||
<div class="col-md-6">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" id="newthread-form" style="visibility:hidden">
|
||||
<%s! Dream.form_tag ~action:url ~enctype:`Multipart_form_data request %>
|
||||
<input type="hidden" id="lat_input" name="lat_input">
|
||||
<input type="hidden" id="lng_input" name="lng_input">
|
||||
|
||||
|
|
@ -16,6 +27,8 @@ let f ~board request =
|
|||
|
||||
<input id="file" name="file" aria-describedby="fileHelp" type="file">
|
||||
<div id="fileHelp" class="form-text">Add a picture for your thread</div>
|
||||
<div id="map"></div>
|
||||
<button type="submit" class="btn btn-primary">Make Thread</button>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
% end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue