Complete insert and update on create. Basically first complete working version
This commit is contained in:
3
templates/feeds.html
Normal file
3
templates/feeds.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{% for feed in feeds %}
|
||||
{% include "feed.html" %}
|
||||
{% endfor %}
|
||||
@@ -7,7 +7,10 @@
|
||||
.navbar {
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: #161b22;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
@@ -36,34 +39,38 @@
|
||||
<div style="display:flex; justify-content:flex-end">
|
||||
<button x-on:click="isModalOpen = true">Create</button>
|
||||
</div>
|
||||
<div class="overlay" x-show="isModalOpen" x-cloak></div>
|
||||
<dialog open x-show="isModalOpen" x-cloak x-transition>
|
||||
<div class="overlay" style="z-index: 30" x-show="isModalOpen" x-cloak></div>
|
||||
<dialog open style="z-index: 31" x-show="isModalOpen" x-cloak x-transition>
|
||||
<header>
|
||||
<h2>Create new RSS Feed</h2>
|
||||
<h2>Create new RSS Feed subscription</h2>
|
||||
</header>
|
||||
<p>
|
||||
<b><strong>Gol D. Roger</strong></b>
|
||||
<br>
|
||||
<b>฿5,564,800,000</b>
|
||||
</p>
|
||||
<p>
|
||||
Kono sakuhin ha fiction dethunode jitsuzaisuru jinbutsu dantai sonota no soshiki to doitsu no meishou ga
|
||||
gekichu ni toujyou shitatoshitemo jitsuzai na monotoha issai mukankeideth.
|
||||
</p>
|
||||
<form id="create_form" hx-post="/feed/" hx-swap="none">
|
||||
<label>
|
||||
Name
|
||||
<input type="text" name="name">
|
||||
</label>
|
||||
<label>
|
||||
Feed URL
|
||||
<input type="url" name="feed_url">
|
||||
</label>
|
||||
</form>
|
||||
<footer>
|
||||
<button x-on:click="isModalOpen = false">Close</button>
|
||||
<button form="create_form" type="reset" x-on:click="isModalOpen = false">Close</button>
|
||||
<button form="create_form" type="submit">Submit</button>
|
||||
</footer>
|
||||
</dialog>
|
||||
<table style="text-align:center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Feed Name</th>
|
||||
<th>Feed URL</th>
|
||||
<th>Last Mail Sent</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody hx-get="/feed/" hx-trigger="newFeed from:body" x-on:htmx:after-settle="isModalOpen = false">
|
||||
{{ feeds|safe }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<table style="text-align:center">
|
||||
<tr>
|
||||
<th>Feed Name</th>
|
||||
<th>Feed URL</th>
|
||||
<th>Last Mail Sent</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
{% for feed in feeds %}
|
||||
{% include "feed.html" %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user