Initial progress on styling
This commit is contained in:
parent
c650c27825
commit
2c44a69ec3
38 changed files with 748 additions and 412 deletions
56
templates/fragments/post_details.html
Normal file
56
templates/fragments/post_details.html
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<div id="post-details" hx-target="this" hx-swap="outerHTML">
|
||||
<div>
|
||||
<label>Title</label>
|
||||
{% if let Some(title) = post.title %}{{ title }}{% else %}<em>None</em>{%
|
||||
endif %}
|
||||
</div>
|
||||
<div>
|
||||
<label>Description</label>
|
||||
{% if let Some(description) = post.description %}{{ description | markdown
|
||||
}}{% else %}
|
||||
<p><em>None</em></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<label>Is public?</label>
|
||||
{% if post.is_public %}Yes{% else %}No{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<label>Rating</label>
|
||||
{% match post.rating.as_ref() %} {% when "u" %} Unrated {% when "s" %} Safe
|
||||
{% when "q" %} Questionable {% when "e" %} Explicit {% else %} Unknown {%
|
||||
endmatch %}
|
||||
</div>
|
||||
<div>
|
||||
<label>Source(s)</label>
|
||||
{% if sources.is_empty() %}
|
||||
<em>None</em>{% else %}
|
||||
<ul>
|
||||
{% for source in sources %}
|
||||
<li id="source-{{ source.id }}">
|
||||
<a href="{{ source.url }}">{{ source.url }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
<label>Type</label>
|
||||
{{ post.media_type | capitalize }}
|
||||
</div>
|
||||
<div>
|
||||
<label>Width</label>
|
||||
{{ post.width }}px
|
||||
</div>
|
||||
<div>
|
||||
<label>Height</label>
|
||||
{{ post.height }}px
|
||||
</div>
|
||||
<div>
|
||||
<label>Upload date</label>
|
||||
{{ post.uploaded_at }}
|
||||
</div>
|
||||
{% if can_edit %}
|
||||
<button hx-get="/post_details/{{ post.id }}/edit">Edit</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue