Bug fixes and new styling for the news page

This commit is contained in:
Inga Kirschnick
2022-12-21 14:38:17 +01:00
parent c79bc1ed57
commit f5a1cf75dd
6 changed files with 59 additions and 43 deletions

View File

@ -22,7 +22,7 @@
<div class="col s7">
<div class="row">
<div class="col s12">
<h3 style="float:left">{{ user.username }}<span class="new badge green" id="public-information-badge" data-badge-caption="custom caption" style="margin-top:20px;"></span></h3>
<h3 style="float:left">{{ user.username }}<span class="new badge green" id="public-information-badge" data-badge-caption="" style="margin-top:20px;"></span></h3>
</div>
<div class="col 12">
{% if user.show_last_seen %}
@ -82,8 +82,8 @@
{% endif %}
<p></p>
<br>
{% if current_user.is_authenticated and current_user.id == user.id %}
<a class="waves-effect waves-light btn-small" href="{{ url_for('.edit_profile', user_id=user.id) }}">Edit profile</a>
{% if current_user.is_authenticated and current_user.hashid == user.id %}
<a class="waves-effect waves-light btn-small" href="{{ url_for('.edit_profile', user_id=current_user.id) }}">Edit profile</a>
{% endif %}
</div>
</div>
@ -115,8 +115,7 @@
{{ super() }}
<script>
let publicInformationBadge = document.querySelector('#public-information-badge');
if ("{{ user }}" == "{{ current_user }}") {
if ("{{ user.id }}" == "{{ current_user.hashid }}") {
if ("{{ user.is_public }}" == "True") {
publicInformationBadge.dataset.badgeCaption = 'Your profile is public';
publicInformationBadge.classList.add('green');