This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
|
||||
{% include 'navbar.html' %}
|
||||
|
||||
<div class="row" >
|
||||
{% include 'create-thread.html' %}
|
||||
</div>
|
||||
|
||||
<div class="row" >
|
||||
<div class="col s6 m5" id="op-posts">
|
||||
{% include 'op-posts.html' %}
|
||||
|
48
templates/create-thread.html
Normal file
48
templates/create-thread.html
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="card">
|
||||
<form
|
||||
hx-encoding='multipart/form-data'
|
||||
_='on htmx:xhr:progress(loaded, total) set #progress.value to (loaded/total)*100'
|
||||
hx-on::after-request="this.reset()"
|
||||
>
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
<span class="card-title">Создавай тред уже!</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-field col s6">
|
||||
<input id="send_this_text" name="send_this_text" type="text" >
|
||||
<label for="send_this_text">Печатать сюда</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="input-field col s6">
|
||||
<div class="file-field input-field">
|
||||
<div class="btn">
|
||||
<span>File</span>
|
||||
<input id="file" name="file" type="file" multiple>
|
||||
</div>
|
||||
<div class="file-path-wrapper">
|
||||
<input class="file-path validate" type="text" placeholder="Upload one or more files">
|
||||
<progress id='progress' value='0' max='100'></progress>
|
||||
</div>
|
||||
<!-- <div class="file-progress">
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<a href="/{{board}}/create-thread/{{ target_post_id }}">
|
||||
<button class="btn waves-effect waves-light"
|
||||
type="submit" name="action" hx-encoding='multipart/form-data'
|
||||
_='on htmx:xhr:progress(loaded, total) set #progress.value to (loaded/total)*100'
|
||||
hx-post="/{{board}}/create-thread/{{ target_post_id }}"
|
||||
hx-include="[name='send_this_text'], [name='file']"
|
||||
>
|
||||
Отправить!!
|
||||
<i class="material-icons right">send</i>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@@ -9,7 +9,7 @@
|
||||
|
||||
<div class="card-content white-text">
|
||||
<span class="new badge yellow" data-badge-caption="">
|
||||
<a class="purple-text" href="#post-{{ posto._key }}"> #{{ posto._key }} </a>
|
||||
<a class="purple-text" href="/{{board}}/{{ posto._key }}"> #{{ posto._key }} </a>
|
||||
</span>
|
||||
<span class="new badge blue" data-badge-caption="">Ответов: {{ posto.answers_num }}</span>
|
||||
<span class="new badge red" data-badge-caption="">Длина треда: {{ posto.children_num }}</span>
|
||||
@@ -43,7 +43,7 @@
|
||||
<div class="col s12 card-action white-text">
|
||||
<div class="right">
|
||||
<!-- <a href="#" hx-post="/post_my_post/{{ posto._key }}" hx-target="#neu-posts" >Answer me!</a> -->
|
||||
<a href="#answer-post" hx-post="/answer_post/{{ posto._key }}" hx-target="#answer-post" >В тред!</a>
|
||||
<a href="/{{board}}/{{ posto._key }}" >В тред!</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user