Merge branch 'facebook-button' into 'master'

Add facebook button

See merge request !112
This commit is contained in:
Skia
2017-09-17 15:18:07 +02:00
5 changed files with 122 additions and 65 deletions

View File

@ -23,6 +23,8 @@ $secondary-neutral-dark-color: hsl(40, 57.6%, 17%);
$white-color: hsl(219.6, 20.8%, 98%);
$black-color: hsl(40.0, 0%, 17%);
$faceblue: #3B5998;
$twitblue: #55acee;
@ -399,6 +401,38 @@ header {
}
}
.fb-share-button {
background: $faceblue;
border: none;
color: white;
padding: 0.5em 1em;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
border-radius: 2px;
}
.fb-share-button:hover {
color: lightgrey;
}
.twitter-share-button {
background: $twitblue;
border: none;
color: white;
padding: 0.5em 1em;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
border-radius: 2px;
}
.twitter-share-button:hover {
color: lightgrey;
}
.helptext {
display: block;
}

View File

@ -12,6 +12,14 @@
</a>
{%- endmacro %}
{% macro facebook_share(news) -%}
<a rel="nofollow" target="#" class="fb-share-button" href="https://www.facebook.com/sharer/sharer.php?u={{ news.get_full_url() }}">{% trans %}Share on Facebook{% endtrans %}</a>
{%- endmacro %}
{% macro tweet(news) -%}
<a rel="nofollow" target="#" class="twitter-share-button" href="https://twitter.com/intent/tweet?text={{ news.get_full_url() }}">{% trans %}Tweet{% endtrans %}</a>
{%- endmacro %}
{% macro user_mini_profile(user) %}
<div id="user_profile">