mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Enhanced news
This commit is contained in:
BIN
core/static/com/img/fb-icon.png
Normal file
BIN
core/static/com/img/fb-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
core/static/com/img/twitter-icon.png
Normal file
BIN
core/static/com/img/twitter-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
@ -497,6 +497,15 @@ header {
|
||||
}
|
||||
.news_content {
|
||||
clear: left;
|
||||
.button_bar {
|
||||
text-align: right;
|
||||
.fb {
|
||||
color: $faceblue;
|
||||
}
|
||||
.twitter {
|
||||
color: $twitblue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -566,36 +575,60 @@ header {
|
||||
}
|
||||
}
|
||||
|
||||
.fb-share-button {
|
||||
background: $faceblue;
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 0.5em 1em;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
#news_details {
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
padding: 0.4em;
|
||||
width: 80%;
|
||||
background: $white-color;
|
||||
h4 {
|
||||
margin-top: 1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.club_logo {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
width: 19%;
|
||||
float: left;
|
||||
min-width: 10em;
|
||||
margin: 0em;
|
||||
margin-right: 0.5em;
|
||||
margin-top: 0.5em;
|
||||
img {
|
||||
max-height: 15em;
|
||||
max-width: 12em;
|
||||
display: block;
|
||||
margin: 0em auto;
|
||||
}
|
||||
}
|
||||
.share_button {
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 0.5em 1em;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
border-radius: 2px;
|
||||
float: right;
|
||||
display: block;
|
||||
margin-left: 0.3em;
|
||||
&:hover {
|
||||
color: lightgrey;
|
||||
}
|
||||
}
|
||||
|
||||
.fb-share-button:hover {
|
||||
color: lightgrey;
|
||||
}
|
||||
.facebook {
|
||||
background: $faceblue;
|
||||
}
|
||||
|
||||
.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 {
|
||||
background: $twitblue;
|
||||
}
|
||||
|
||||
.twitter-share-button:hover {
|
||||
color: lightgrey;
|
||||
.news_meta {
|
||||
margin-top: 10em;
|
||||
font-size: small;
|
||||
}
|
||||
}
|
||||
|
||||
.helptext {
|
||||
|
@ -12,17 +12,43 @@
|
||||
</a>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro link_news_logo(news) -%}
|
||||
{% if news.club.logo -%}
|
||||
{{ news.club.logo.url }}
|
||||
{% else -%}
|
||||
{{ static("com/img/news.png") }}
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro gen_news_metatags(news) -%}
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:site" content="{{ settings.SITH_TWITTER }}" />
|
||||
<meta name="twitter:creator" content= "{{ settings.SITH_TWITTER }}" />
|
||||
<meta property="og:url" content="{{ news.get_full_url() }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:title" content="{{ news.title }}" />
|
||||
<meta property="og:description" content="{{ news.summary }}" />
|
||||
<meta property="og:image" content="{{ "https://%s%s" % (settings.SITH_URL, link_news_logo(news)) }}" />
|
||||
{%- 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>
|
||||
<a rel="nofollow" target="#" class="share_button facebook" 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>
|
||||
<a rel="nofollow" target="#" class="share_button twitter" href="https://twitter.com/intent/tweet?text={{ news.get_full_url() }}">{% trans %}Tweet{% endtrans %}</a>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro fb_quick(news) -%}
|
||||
<a rel="nofollow" target="#" href="https://www.facebook.com/sharer/sharer.php?u={{ news.get_full_url() }}" class="fb fa fa-facebook-square fa-2x"></a>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro tweet_quick(news) -%}
|
||||
<a rel="nofollow" target="#" href="https://twitter.com/intent/tweet?text={{ news.get_full_url() }}" class="twitter fa fa-twitter-square fa-2x"></a>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro user_mini_profile(user) %}
|
||||
<div id="user_profile">
|
||||
|
||||
<div id="right_column">
|
||||
<div id="pictures">
|
||||
{% if user.profile_pict %}
|
||||
|
Reference in New Issue
Block a user