flask-htmx-board1/templates/answer-post.html

50 lines
2.6 KiB
HTML
Raw Normal View History

2023-07-19 00:28:45 +10:00
<div class="card">
<div class="card-content">
<div class="row">
2023-07-19 00:53:20 +10:00
<span class="card-title">Создай то, о чем будут говорить многие. Ты отвечаешь: <a href="#post-{{ target_post_id }}">>>{{ target_post_id }}</a></span>
2023-07-19 00:28:45 +10:00
<a class="btn-floating halfway-fab waves-effect waves-light red" href="#post-{{ target_post_id }}"><i class="material-icons">>></i></a>
2023-07-20 16:18:33 +10:00
<form hx-encoding='multipart/form-data' _='on htmx:xhr:progress(loaded, total) set #progress.value to (loaded/total)*100'>
<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 class="input-field col s6">
<input id="file" name="file" type="file" multiple>
2023-07-20 16:18:33 +10:00
<label for="file">Upload</label>
<progress id='progress' value='0' max='100'></progress>
</div>
</form>
2023-07-19 00:28:45 +10:00
</div>
</div>
<div class="card-action">
2023-07-19 00:54:27 +10:00
<a href="#answer-post">
<button class="btn waves-effect waves-light"
2023-07-20 16:21:42 +10:00
type="submit" name="action" hx-encoding='multipart/form-data'
2023-07-20 16:24:50 +10:00
_='on htmx:xhr:progress(loaded, total) set #progress.value to (loaded/total)*100'
2023-07-19 00:54:27 +10:00
hx-post="/post_to_another_post/{{ target_post_id }}"
hx-target="#neu-posts"
2023-07-20 16:18:33 +10:00
hx-include="[name='send_this_text'], [name='file']"
2023-07-19 00:54:27 +10:00
>
Отправить!!
<i class="material-icons right">send</i>
</button>
</a>
2023-07-20 01:43:33 +10:00
</div>
2023-07-20 16:18:33 +10:00
<!-- <div class="row">
2023-07-20 01:43:33 +10:00
<form hx-encoding='multipart/form-data' hx-post='/send_dudes'
_='on htmx:xhr:progress(loaded, total) set #progress.value to (loaded/total)*100'>
<input type='file' name='file'>
<button>
Upload
</button>
<progress id='progress' value='0' max='100'></progress>
</form>
2023-07-20 16:18:33 +10:00
</div> -->
2023-07-19 00:28:45 +10:00
<!-- <h1>Загрузить картинку:</h1>
<input type="file" #file placeholder="Загрузить картинку" (change)="sendPic($event)" style="display:none;">
<button type="button" class="btn btn-success" (click)="file.click()">Загрузить картинку</button>
<div *ngFor="let singlePic of inputImages" >Картинка: {{singlePic}}</div>
<p>
<button (click)="eraseData()" >Убрать картинку</button>
</p> -->
</div>