chore: remove underdeveloped comments
This commit is contained in:
parent
7b52b803c8
commit
d0ecb9357a
11 changed files with 4 additions and 110 deletions
|
|
@ -1,22 +0,0 @@
|
|||
{% macro li(comment) %}
|
||||
<li>{{ comment.comment }}</li>
|
||||
{% endmacro li %}
|
||||
|
||||
{% macro list(comments) %}
|
||||
<div id="comments">
|
||||
<ul id="comments_ul">
|
||||
{% for comment in comments %}
|
||||
{{ self::li(comment=comment) }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endmacro list %}
|
||||
|
||||
{% macro form(plant_id, target="#comments > ul") %}
|
||||
<form hx-post="/comments" hx-target="{{ target }}" hx-swap="beforeend">
|
||||
<input type="hidden" id="plant_id" name="plant_id" value="{{ plant_id }}">
|
||||
<label for="comment">Comment:</label>
|
||||
<textarea id="comment" name="comment" rows=4></textarea></br>
|
||||
<input type="submit">
|
||||
</form>
|
||||
{% endmacro form %}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
{% import "components/comment.html" as comp_comment %}
|
||||
{{ comp_comment::li(comment=comment) }}
|
||||
|
|
@ -1,11 +1,7 @@
|
|||
{% import "components/event.html" as comp_event %}
|
||||
{% import "components/plant.html" as comp_plant %}
|
||||
{% import "components/comment.html" as comp_comment %}
|
||||
|
||||
{{ comp_plant::info(plant=plant) }}
|
||||
<h3>Events</h3>
|
||||
{{ comp_event::list(events=events) }}
|
||||
{{ comp_event::form(plant_id=plant.id) }}
|
||||
<h3>Comments</h3>
|
||||
{{ comp_comment::list(comments=comments) }}
|
||||
{{ comp_comment::form(plant_id=plant.id) }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue