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

65 lines
3.1 KiB
HTML
Raw Normal View History

2023-07-19 00:28:45 +10:00
<div class="card">
<div class="card-content">
<div class="row">
2024-01-29 02:13:25 +10:00
<span class="card-title">Ты отвечаешь: <a href="#post-{{ target_post_id }}">>>{{ target_post_id }}</a></span>
2024-01-29 02:34:24 +10:00
</div>
<div class="row">
2024-01-29 02:44:05 +10:00
<a class="btn-floating halfway-fab waves-effect waves-light red" href="#post-{{ target_post_id }}"><i class="material-icons">>>{{ target_post_id }}</i></a>
2023-07-19 00:28:45 +10:00
</div>
2024-01-29 02:34:24 +10:00
<form hx-encoding='multipart/form-data' _='on htmx:xhr:progress(loaded, total) set #progress.value to (loaded/total)*100'>
<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">
2024-01-29 02:44:05 +10:00
<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>
2024-01-29 02:47:56 +10:00
<!-- <div class="file-progress">
</div> -->
2024-01-29 02:44:05 +10:00
</div>
2024-01-29 02:34:24 +10:00
</div>
</div>
</form>
</div>
2023-07-19 00:28:45 +10:00
<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>