Commit d888a6b6 authored by Krophil's avatar Krophil
Browse files

Add Twitter button

parent a40c48a7
Pipeline #1252 passed with stage
in 5 minutes and 53 seconds
{% extends "core/base.jinja" %}
{% from 'core/macros.jinja' import user_profile_link, facebook_share %}
{% from 'core/macros.jinja' import user_profile_link, facebook_share, tweet %}
{% block title %}
{% trans %}News{% endtrans %} -
......@@ -31,6 +31,7 @@
{% endif %}
</br>
{{ facebook_share(news) }}
{{ tweet(news) }}
</section>
{% endblock %}
......
......@@ -23,7 +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;
$faceblue: #3B5998;
$twitblue: #55acee;
......@@ -416,6 +417,22 @@ header {
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;
}
......
......@@ -13,7 +13,11 @@
{%- endmacro %}
{% macro facebook_share(news) -%}
<a class="fb-share-button" href="https://www.facebook.com/sharer/sharer.php?u={{ news.get_full_url() }}">{% trans %}Share on Facebook{% endtrans %}</a>
<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) %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment