Hide social button when not connected

Fixes #143
This commit is contained in:
Bat 2018-07-18 23:37:05 +02:00
parent a785cb987b
commit 782955e2c4
7 changed files with 44 additions and 18 deletions

View File

@ -333,3 +333,6 @@ msgid "One author in this blog: "
msgid_plural "{{ count }} authors in this blog: " msgid_plural "{{ count }} authors in this blog: "
msgstr[0] "Du bist kein Autor in diesem Blog." msgstr[0] "Du bist kein Autor in diesem Blog."
msgstr[1] "Du bist kein Autor in diesem Blog." msgstr[1] "Du bist kein Autor in diesem Blog."
msgid "Login or use your Fediverse account to interact with this article"
msgstr ""

View File

@ -326,3 +326,6 @@ msgid "One author in this blog: "
msgid_plural "{{ count }} authors in this blog: " msgid_plural "{{ count }} authors in this blog: "
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "Login or use your Fediverse account to interact with this article"
msgstr ""

View File

@ -327,3 +327,6 @@ msgid "One author in this blog: "
msgid_plural "{{ count }} authors in this blog: " msgid_plural "{{ count }} authors in this blog: "
msgstr[0] "{{ count }} aut⋅eur⋅rice dans ce blog : " msgstr[0] "{{ count }} aut⋅eur⋅rice dans ce blog : "
msgstr[1] "{{ count }} aut⋅eur⋅rice⋅s dans ce blog : " msgstr[1] "{{ count }} aut⋅eur⋅rice⋅s dans ce blog : "
msgid "Login or use your Fediverse account to interact with this article"
msgstr "Connectez-vous ou utilisez votre compte sur le Fediverse pour interagir avec cet article"

View File

@ -336,5 +336,8 @@ msgstr[0] "Nie jesteś autorem tego bloga."
msgstr[1] "Nie jesteś autorem tego bloga." msgstr[1] "Nie jesteś autorem tego bloga."
msgstr[2] "Nie jesteś autorem tego bloga." msgstr[2] "Nie jesteś autorem tego bloga."
msgid "Login or use your Fediverse account to interact with this article"
msgstr ""
#~ msgid "Logowanie" #~ msgid "Logowanie"
#~ msgstr "Zaloguj się" #~ msgstr "Zaloguj się"

View File

@ -319,3 +319,6 @@ msgid "One author in this blog: "
msgid_plural "{{ count }} authors in this blog: " msgid_plural "{{ count }} authors in this blog: "
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "Login or use your Fediverse account to interact with this article"
msgstr ""

View File

@ -22,6 +22,13 @@ a, a:visited {
outline: none; outline: none;
} }
.center {
text-align: center;
font-weight: bold;
opacity: 0.6;
padding: 5em;
}
/* /*
* == Header == * == Header ==
*/ */

View File

@ -36,26 +36,30 @@
<div class="article-meta"> <div class="article-meta">
<p>{{ "This article is under the {{ license }} license." | _(license=post.license) }}</p> <p>{{ "This article is under the {{ license }} license." | _(license=post.license) }}</p>
<div class="actions"> {% if account %}
<form class="likes" action="like" method="POST"> <div class="actions">
<p aria-label="{{ "{{ count }} likes" | _n(singular="One like", count=n_likes) }}" title="{{ "{{ count }} likes" | _n(singular="One like", count=n_likes) }}">{{ n_likes }}</p> <form class="likes" action="like" method="POST">
<p aria-label="{{ "{{ count }} likes" | _n(singular="One like", count=n_likes) }}" title="{{ "{{ count }} likes" | _n(singular="One like", count=n_likes) }}">{{ n_likes }}</p>
{% if has_liked %} {% if has_liked %}
<button type="submit" class="liked"><i class="far fa-heart"></i>{{ "I don't like this anymore" | _ }}</button> <button type="submit" class="liked"><i class="far fa-heart"></i>{{ "I don't like this anymore" | _ }}</button>
{% else %} {% else %}
<button type="submit"><i class="fa fa-heart"></i>{{ "Add yours" | _ }}</button> <button type="submit"><i class="fa fa-heart"></i>{{ "Add yours" | _ }}</button>
{% endif %} {% endif %}
</form> </form>
<form class="reshares" action="reshare" method="POST"> <form class="reshares" action="reshare" method="POST">
<p aria-label="{{ "{{ count }} reshares" | _n(singular="One reshare", count=n_reshares) }}" title="{{ "{{ count }} reshares" | _n(singular="One reshare", count=n_reshares) }}">{{ n_reshares }}</p> <p aria-label="{{ "{{ count }} reshares" | _n(singular="One reshare", count=n_reshares) }}" title="{{ "{{ count }} reshares" | _n(singular="One reshare", count=n_reshares) }}">{{ n_reshares }}</p>
{% if has_reshared %} {% if has_reshared %}
<button type="submit" class="reshared"><i class="far fa-retweet"></i>{{ "I don't want to reshare this anymore" | _ }}</button> <button type="submit" class="reshared"><i class="far fa-retweet"></i>{{ "I don't want to reshare this anymore" | _ }}</button>
{% else %} {% else %}
<button type="submit"><i class="fa fa-retweet"></i>{{ "Reshare" | _ }}</button> <button type="submit"><i class="fa fa-retweet"></i>{{ "Reshare" | _ }}</button>
{% endif %} {% endif %}
</form> </form>
</div> </div>
{% else %}
<p class="center">{{ "Login or use your Fediverse account to interact with this article" | _ }}</p>
{% endif %}
<div class="comments"> <div class="comments">
<h2>{{ "Comments" | _ }}</h2> <h2>{{ "Comments" | _ }}</h2>