Made names in card headers links on most pages
This commit is contained in:
parent
86a8ae825a
commit
3d1b22f952
5 changed files with 66 additions and 12 deletions
|
@ -7,8 +7,21 @@
|
||||||
{% for post in posts if not post.hidden %}
|
{% for post in posts if not post.hidden %}
|
||||||
<div class="card" style="word-wrap: break-word; margin-bottom: 16px; width: 100%;">
|
<div class="card" style="word-wrap: break-word; margin-bottom: 16px; width: 100%;">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<b>{{ post.poster }}</b> at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }} {% if post.edited %}<i>(Edited)</i>{% endif %}
|
<b><a href="/profile/{{ post.poster }}">{{ post.poster }}</a></b> at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }} {% if post.edited %}<i>(Edited)</i>{% endif %}
|
||||||
<span style="float: right"><a href="/reply/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-reply"></i></a> {% if logged_in == post.poster %} <a href="/delete/{{ post._id }}" class="btn btn-danger btn-sm"><i class="far fa-trash-alt"></i></a>{% endif %}</span>
|
<span style="float: right">
|
||||||
|
{% if logged_in|lower in post.likes %}
|
||||||
|
<form style="display: inline;" method="POST" action="/unlike/{{ post._id }}"><button type="submit" class="btn btn-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
||||||
|
{% else %}
|
||||||
|
<form style="display: inline;" method="POST" action="/like/{{ post._id }}"><button type="submit" class="btn btn-outline-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
||||||
|
{% endif %}
|
||||||
|
<a href="/reply/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-reply"></i></a>
|
||||||
|
{% if logged_in|lower == post.poster|lower %}
|
||||||
|
<a href="/editpost/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-edit"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if logged_in|lower == post.poster|lower %}
|
||||||
|
<a href="/delete/{{ post._id }}" class="btn btn-danger btn-sm"><i class="far fa-trash-alt"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{{ post.content }}
|
{{ post.content }}
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% for post in posts if not post.hidden %}
|
{% for post in posts if not post.hidden %}
|
||||||
<div class="card" style="word-wrap: break-word; margin-bottom: 16px; width: 100%;">
|
<div class="card" style="word-wrap: break-word; margin-bottom: 16px; width: 100%;">
|
||||||
<div class="card-header"><b>{{ post.poster }}</b> at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }} {% if post.edited %}<i>(Edited)</i>{% endif %}
|
<div class="card-header">
|
||||||
|
<b><a href="/profile/{{ post.poster }}">{{ post.poster }}</a></b> at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }} {% if post.edited %}<i>(Edited)</i>{% endif %}
|
||||||
<span style="float: right">
|
<span style="float: right">
|
||||||
{% if logged_in|lower in post.likes %}
|
{% if logged_in|lower in post.likes %}
|
||||||
<form style="display: inline;" method="POST" action="/unlike/{{ post._id }}"><button type="submit" class="btn btn-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
<form style="display: inline;" method="POST" action="/unlike/{{ post._id }}"><button type="submit" class="btn btn-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
||||||
|
@ -14,11 +15,15 @@
|
||||||
<form style="display: inline;" method="POST" action="/like/{{ post._id }}"><button type="submit" class="btn btn-outline-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
<form style="display: inline;" method="POST" action="/like/{{ post._id }}"><button type="submit" class="btn btn-outline-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="/reply/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-reply"></i></a>
|
<a href="/reply/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-reply"></i></a>
|
||||||
{% if logged_in == post.poster %}
|
{% if logged_in|lower == post.poster|lower %}
|
||||||
|
<a href="/editpost/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-edit"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if logged_in|lower == post.poster|lower %}
|
||||||
<a href="/delete/{{ post._id }}" class="btn btn-danger btn-sm"><i class="far fa-trash-alt"></i></a>
|
<a href="/delete/{{ post._id }}" class="btn btn-danger btn-sm"><i class="far fa-trash-alt"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{{ post.content }}
|
{{ post.content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,23 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% for post in posts %}
|
{% for post in posts %}
|
||||||
<div class="card" style="word-wrap: brea-word; margin-bottom: 16px; width: 100%;">
|
<div class="card" style="word-wrap: brea-word; margin-bottom: 16px; width: 100%;">
|
||||||
<div class="card-header"><b>{{ post.poster }}</b> at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }} <span style="float: right"><a href="/reply/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-reply"></i></a> {% if logged_in == post.poster %} <a href="/delete/{{ post._id }}" class="btn btn-danger btn-sm"><i class="far fa-trash-alt"></i></a>{% endif %}</span></div>
|
<div class="card-header">
|
||||||
|
<b><a href="/profile/{{ post.poster }}">{{ post.poster }}</a></b> at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }} {% if post.edited %}<i>(Edited)</i>{% endif %}
|
||||||
|
<span style="float: right">
|
||||||
|
{% if logged_in|lower in post.likes %}
|
||||||
|
<form style="display: inline;" method="POST" action="/unlike/{{ post._id }}"><button type="submit" class="btn btn-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
||||||
|
{% else %}
|
||||||
|
<form style="display: inline;" method="POST" action="/like/{{ post._id }}"><button type="submit" class="btn btn-outline-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
||||||
|
{% endif %}
|
||||||
|
<a href="/reply/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-reply"></i></a>
|
||||||
|
{% if logged_in|lower == post.poster|lower %}
|
||||||
|
<a href="/editpost/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-edit"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if logged_in|lower == post.poster|lower %}
|
||||||
|
<a href="/delete/{{ post._id }}" class="btn btn-danger btn-sm"><i class="far fa-trash-alt"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{{ post.content }}
|
{{ post.content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% for post in posts if not post.hidden %}
|
{% for post in posts if not post.hidden %}
|
||||||
<div class="card mx-xs-2 mb-3" style="word-wrap: break-word; width: 100%;">
|
<div class="card mx-xs-2 mb-3" style="word-wrap: break-word; width: 100%;">
|
||||||
<div class="card-header"><b>{{ post.poster }}</b> at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }} {% if post.edited %}<i>(Edited)</i>{% endif %}
|
<div class="card-header">
|
||||||
|
<b><a href="/profile/{{ post.poster }}">{{ post.poster }}</a></b> at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }} {% if post.edited %}<i>(Edited)</i>{% endif %}
|
||||||
<span style="float: right">
|
<span style="float: right">
|
||||||
{% if logged_in|lower in post.likes %}
|
{% if logged_in|lower in post.likes %}
|
||||||
<form style="display: inline;" method="POST" action="/unlike/{{ post._id }}"><button type="submit" class="btn btn-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
<form style="display: inline;" method="POST" action="/unlike/{{ post._id }}"><button type="submit" class="btn btn-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
||||||
|
@ -14,7 +15,10 @@
|
||||||
<form style="display: inline;" method="POST" action="/like/{{ post._id }}"><button type="submit" class="btn btn-outline-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
<form style="display: inline;" method="POST" action="/like/{{ post._id }}"><button type="submit" class="btn btn-outline-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="/reply/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-reply"></i></a>
|
<a href="/reply/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-reply"></i></a>
|
||||||
{% if logged_in == post.poster %}
|
{% if logged_in|lower == post.poster|lower %}
|
||||||
|
<a href="/editpost/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-edit"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if logged_in|lower == post.poster|lower %}
|
||||||
<a href="/delete/{{ post._id }}" class="btn btn-danger btn-sm"><i class="far fa-trash-alt"></i></a>
|
<a href="/delete/{{ post._id }}" class="btn btn-danger btn-sm"><i class="far fa-trash-alt"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -4,7 +4,23 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
{% for post in posts %}
|
{% for post in posts %}
|
||||||
<div class="card" style="word-wrap: brea-word; margin-bottom: 16px; width: 100%;">
|
<div class="card" style="word-wrap: brea-word; margin-bottom: 16px; width: 100%;">
|
||||||
<div class="card-header"><b>{{ post.poster }}</b> at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }} {% if post.edited %}<i>(Edited)</i>{% endif %}<span style="float: right"><a href="/reply/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-reply"></i></a> {% if logged_in == post.poster %} <a href="/delete/{{ post._id }}" class="btn btn-danger btn-sm"><i class="far fa-trash-alt"></i></a>{% endif %}</span></div>
|
<div class="card-header">
|
||||||
|
<b><a href="/profile/{{ post.poster }}">{{ post.poster }}</a></b> at {{ post.timePosted.strftime('%Y-%m-%d %-H:%M') }} {% if post.edited %}<i>(Edited)</i>{% endif %}
|
||||||
|
<span style="float: right">
|
||||||
|
{% if logged_in|lower in post.likes %}
|
||||||
|
<form style="display: inline;" method="POST" action="/unlike/{{ post._id }}"><button type="submit" class="btn btn-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
||||||
|
{% else %}
|
||||||
|
<form style="display: inline;" method="POST" action="/like/{{ post._id }}"><button type="submit" class="btn btn-outline-danger btn-sm"><i class="fas fa-heart"></i> {{ post.likes|count }}</button></form>
|
||||||
|
{% endif %}
|
||||||
|
<a href="/reply/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-reply"></i></a>
|
||||||
|
{% if logged_in|lower == post.poster|lower %}
|
||||||
|
<a href="/editpost/{{ post._id }}" class="btn btn-primary btn-sm"><i class="far fa-edit"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
{% if logged_in|lower == post.poster|lower %}
|
||||||
|
<a href="/delete/{{ post._id }}" class="btn btn-danger btn-sm"><i class="far fa-trash-alt"></i></a>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{{ post.content }}
|
{{ post.content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue