mirror of
https://github.com/ae-utbm/sith.git
synced 2025-11-10 05:53:06 +00:00
add missing open graph tags
This commit is contained in:
@@ -9,6 +9,18 @@
|
||||
{{ club.short_description }}
|
||||
{%- endblock %}
|
||||
|
||||
{% block metatags %}
|
||||
<meta property="og:url" content="{{ request.build_absolute_uri(club.get_absolute_url()) }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="{{ club.name }}" />
|
||||
<meta property="og:description" content="{{ club.short_description }}" />
|
||||
{% if club.logo %}
|
||||
<meta property="og:image" content="{{ request.build_absolute_uri(club.logo.url) }}" />
|
||||
{% else %}
|
||||
<meta property="og:image" content="{{ request.build_absolute_uri(static("core/img/logo_no_text.png")) }}" />
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="club_detail">
|
||||
{% if club.logo %}
|
||||
@@ -17,7 +29,7 @@
|
||||
{% if page_revision %}
|
||||
{{ page_revision|markdown }}
|
||||
{% else %}
|
||||
<h3>{% trans %}Club{% endtrans %}</h3>
|
||||
<h3>{{ club.name }}</h3>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
{% extends "core/base.jinja" %}
|
||||
{% from 'core/macros.jinja' import user_profile_link, facebook_share, tweet, link_news_logo, gen_news_metatags %}
|
||||
{% from 'core/macros.jinja' import user_profile_link, link_news_logo %}
|
||||
{% from "com/macros.jinja" import news_moderation_alert %}
|
||||
|
||||
{% block title %}
|
||||
{% trans %}News{% endtrans %} -
|
||||
{{ object.title }}
|
||||
{% trans %}News{% endtrans %} - {{ object.title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
{{ gen_news_metatags(news) }}
|
||||
{% block description %}{{ news.summary }}{% endblock %}
|
||||
|
||||
{% block metatags %}
|
||||
<meta property="og:url" content="{{ news.get_full_url() }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="article:section" content="{% trans %}News{% endtrans %}" />
|
||||
<meta property="og:title" content="{{ news.title }}" />
|
||||
<meta property="og:description" content="{{ news.summary }}" />
|
||||
<meta property="og:image" content="{{ request.build_absolute_uri(link_news_logo(news)) }}" />
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -44,8 +49,14 @@
|
||||
<div><em>{{ news.summary|markdown }}</em></div>
|
||||
<br/>
|
||||
<div>{{ news.content|markdown }}</div>
|
||||
{{ facebook_share(news) }}
|
||||
{{ tweet(news) }}
|
||||
<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>
|
||||
<div class="news_meta">
|
||||
<p>{% trans %}Author: {% endtrans %}{{ user_profile_link(news.author) }}</p>
|
||||
{% if news.moderator %}
|
||||
|
||||
@@ -4,12 +4,22 @@
|
||||
{% block head %}
|
||||
<title>{% block title %}Association des Étudiants de l'UTBM{% endblock %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{% block description -%}
|
||||
<meta
|
||||
name="description"
|
||||
content="{% block description -%}
|
||||
{% trans trimmed %}
|
||||
AE UTBM is a voluntary organisation run by UTBM students.
|
||||
It organises student life at UTBM and manages its student facilities.
|
||||
{% endtrans %}
|
||||
{%- endblock %}">
|
||||
{%- endblock %}"
|
||||
>
|
||||
<meta property="og:site_name" content="Association des Étudiants de l'UTBM" />
|
||||
{% block metatags %}
|
||||
<meta property="og:url" content="{{ request.build_absolute_uri() }}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="Association des Étudiants de l'UTBM" />
|
||||
<meta property="og:image" content="{{ request.build_absolute_uri(static("core/img/logo_no_text.png")) }}" />
|
||||
{% endblock %}
|
||||
<link rel="shortcut icon" href="{{ static('core/img/favicon.ico') }}">
|
||||
<link rel="stylesheet" href="{{ static('core/base.css') }}">
|
||||
<link rel="stylesheet" href="{{ static('core/style.scss') }}">
|
||||
|
||||
@@ -20,25 +20,6 @@
|
||||
{% 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="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="share_button twitter" href="https://twitter.com/intent/tweet?text={{ news.get_full_url() }}">{% trans %}Tweet{% endtrans %}</a>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro user_mini_profile(user) %}
|
||||
<div class="user_mini_profile">
|
||||
<div class="user_mini_profile_infos">
|
||||
|
||||
@@ -12,6 +12,18 @@
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block metatags %}
|
||||
{% if page %}
|
||||
<meta property="og:url" content="{{ request.build_absolute_uri(page.get_absolute_url()) }}" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="article:section" content="{% trans %}Page{% endtrans %}" />
|
||||
<meta property="og:title" content="{{ page.get_display_name() }}" />
|
||||
<meta property="og:image" content="{{ request.build_absolute_uri(static("core/img/logo_no_text.png")) }}" />
|
||||
{% else %}
|
||||
{{ super() }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{%- macro print_page_name(page) -%}
|
||||
{%- if page -%}
|
||||
{{ print_page_name(page.parent) }} >
|
||||
|
||||
Reference in New Issue
Block a user