Better alignment of detail page attributes
This commit is contained in:
parent
ebd0713eae
commit
8e75c00a8e
3 changed files with 64 additions and 53 deletions
|
@ -16,3 +16,7 @@
|
||||||
.detail-image a {
|
.detail-image a {
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center; }
|
text-align: center; }
|
||||||
|
|
||||||
|
#detail-attributes {
|
||||||
|
max-width: 1024px;
|
||||||
|
margin: auto; }
|
||||||
|
|
|
@ -21,3 +21,8 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#detail-attributes {
|
||||||
|
max-width: 1024px;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
|
@ -43,62 +43,64 @@
|
||||||
<img class="card-img-top" src="/images/normal/{{ image.hash }}" alt="{{ image.title }}"/>
|
<img class="card-img-top" src="/images/normal/{{ image.hash }}" alt="{{ image.title }}"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{% ifequal identity ":creator" %}
|
|
||||||
<div class="btn-group pull-right clearfix" role="group">
|
|
||||||
<a class="btn btn-primary btn-sm" href="/edit/{{ image.id }}">
|
|
||||||
<span class="fa fa-pencil"></span>
|
|
||||||
Bearbeiten
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-danger btn-sm" href="/delete/{{ image.id }}">
|
|
||||||
<span class="fa fa-trash"></span>
|
|
||||||
Löschen
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{% endifequal %}
|
|
||||||
|
|
||||||
<p>{{ image.created_at|parse-date|date:"dd.MM.yyyy, HH:mm" }} Uhr</p>
|
<div id="detail-attributes">
|
||||||
{% if image.description|length > 0 %}
|
{% ifequal identity ":creator" %}
|
||||||
<div class="col-md7">
|
<div class="btn-group pull-right clearfix" role="group">
|
||||||
<p>{{ image.description|markdown-to-html|safe }}</p>
|
<a class="btn btn-primary btn-sm" href="/edit/{{ image.id }}">
|
||||||
</div>
|
<span class="fa fa-pencil"></span>
|
||||||
{% endif %}
|
Bearbeiten
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-danger btn-sm" href="/delete/{{ image.id }}">
|
||||||
|
<span class="fa fa-trash"></span>
|
||||||
|
Löschen
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{% endifequal %}
|
||||||
|
|
||||||
<ul class="list-unlisted">
|
<p>{{ image.created_at|parse-date|date:"dd.MM.yyyy, HH:mm" }} Uhr</p>
|
||||||
{% for comment in comments %}
|
{% if image.description|length > 0 %}
|
||||||
<li class="media mb-3">
|
<div class="col-md7">
|
||||||
<a name="{{ comment.id }}"></a>
|
<p>{{ image.description|markdown-to-html|safe }}</p>
|
||||||
<img src="https://robohash.org/{{ comment.author }}?size=50x50" class="d-flex mr-3"/>
|
</div>
|
||||||
<div class="media-body">
|
{% endif %}
|
||||||
<h5 class="mt-0 mb-1">{{ comment.author }}</h5>
|
|
||||||
{% ifequal identity ":creator" %}
|
<ul class="list-unlisted">
|
||||||
<a class="btn btn-sm btn-danger" href="/delete-comment/{{ comment.id}}">Löschen</a>
|
{% for comment in comments %}
|
||||||
{% endifequal %}
|
<li class="media mb-3">
|
||||||
{{ comment.comment|markdown-to-html|safe }}
|
<a name="{{ comment.id }}"></a>
|
||||||
|
<img src="https://robohash.org/{{ comment.author }}?size=50x50" class="d-flex mr-3"/>
|
||||||
|
<div class="media-body">
|
||||||
|
<h5 class="mt-0 mb-1">{{ comment.author }}</h5>
|
||||||
|
{% ifequal identity ":creator" %}
|
||||||
|
<a class="btn btn-sm btn-danger" href="/delete-comment/{{ comment.id}}">Löschen</a>
|
||||||
|
{% endifequal %}
|
||||||
|
{{ comment.comment|markdown-to-html|safe }}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<form action="/add-comment/{{ image.id }}" method="POST" class="form-horizontal">
|
||||||
|
{% csrf-field %}
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="author">Name</label>
|
||||||
|
<input type="text" name="author" class="form-control"
|
||||||
|
value="{{ saved-author }}"
|
||||||
|
placeholder="Bitte einen Namen wählen (wird beim nächsten Mal gespeichert)">
|
||||||
</div>
|
</div>
|
||||||
</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<form action="/add-comment/{{ image.id }}" method="POST" class="form-horizontal">
|
<div class="form-group">
|
||||||
{% csrf-field %}
|
<label for="comment">Kommentar</label>
|
||||||
|
<textarea name="comment" class="form-control" rows="3"
|
||||||
<div class="form-group">
|
placeholder="Es kann auch Markdown-Syntax verwendet werden"></textarea>
|
||||||
<label for="author">Name</label>
|
</div>
|
||||||
<input type="text" name="author" class="form-control"
|
|
||||||
value="{{ saved-author }}"
|
|
||||||
placeholder="Bitte einen Namen wählen (wird beim nächsten Mal gespeichert)">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="comment">Kommentar</label>
|
|
||||||
<textarea name="comment" class="form-control" rows="3"
|
|
||||||
placeholder="Es kann auch Markdown-Syntax verwendet werden"></textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn-success">
|
|
||||||
<span class="fa fa-floppy-o"></span>
|
|
||||||
Kommentar hinzufügen
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn-success">
|
||||||
|
<span class="fa fa-floppy-o"></span>
|
||||||
|
Kommentar hinzufügen
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue