Initial commit
This commit is contained in:
commit
2722c7d40a
36 changed files with 6266 additions and 0 deletions
56
templates/index.html
Normal file
56
templates/index.html
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
|
||||
<title>Samey</title>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article>
|
||||
<h2>Search</h2>
|
||||
<form method="get" action="/posts/1">
|
||||
<input
|
||||
class="tags"
|
||||
type="text"
|
||||
id="search-tags"
|
||||
name="tags"
|
||||
hx-post="/search_tags"
|
||||
hx-trigger="input changed delay:400ms"
|
||||
hx-target="next .tags-autocomplete"
|
||||
hx-on::after-settle="this.focus(); this.setSelectionRange(-1, -1);"
|
||||
value=""
|
||||
autofocus
|
||||
/>
|
||||
<ul class="tags-autocomplete" id="search-autocomplete"></ul>
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
</article>
|
||||
<article>
|
||||
<h2>Upload media</h2>
|
||||
<form method="post" action="/upload" enctype="multipart/form-data">
|
||||
<input
|
||||
class="tags"
|
||||
type="text"
|
||||
id="upload-tags"
|
||||
name="tags"
|
||||
hx-post="/search_tags"
|
||||
hx-trigger="input changed delay:400ms"
|
||||
hx-target="next .tags-autocomplete"
|
||||
hx-on::after-settle="this.focus(); this.setSelectionRange(-1, -1);"
|
||||
value=""
|
||||
/>
|
||||
<ul class="tags-autocomplete" id="upload-autocomplete"></ul>
|
||||
<input
|
||||
type="file"
|
||||
id="media-file"
|
||||
name="media-file"
|
||||
accept=".jpg, .jpeg, .png, .webp, .gif"
|
||||
/>
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
</article>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue