From 30f22f7f31ea0c90b05671b2d234893cea0c2c43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Wed, 8 Jul 2020 00:07:19 +0200 Subject: [PATCH] Add twitter card meta tags Add meta tags to display a preview for the linked page on twitter --- AKPlan/templates/AKPlan/plan_base.html | 5 +++++ AKSubmission/templates/AKSubmission/ak_detail.html | 6 ++++++ AKSubmission/templates/AKSubmission/ak_overview.html | 5 +++++ .../templates/AKSubmission/submission_overview.html | 5 +++++ 4 files changed, 21 insertions(+) diff --git a/AKPlan/templates/AKPlan/plan_base.html b/AKPlan/templates/AKPlan/plan_base.html index 50372f20..846e79d2 100644 --- a/AKPlan/templates/AKPlan/plan_base.html +++ b/AKPlan/templates/AKPlan/plan_base.html @@ -4,6 +4,11 @@ {% load i18n %} {% load static %} +{% block meta %} + <meta name="twitter:card" content="summary" /> + <meta name="twitter:title" content="{{ event.name }} - {% trans "Plan" %}" /> +{% endblock %} + {% block imports %} {% get_current_language as LANGUAGE_CODE %} diff --git a/AKSubmission/templates/AKSubmission/ak_detail.html b/AKSubmission/templates/AKSubmission/ak_detail.html index 483e66e3..bef54a41 100644 --- a/AKSubmission/templates/AKSubmission/ak_detail.html +++ b/AKSubmission/templates/AKSubmission/ak_detail.html @@ -10,6 +10,12 @@ {% block title %}{% trans "AKs" %}: {{ ak.event.name }} - {% trans "AK" %}: {{ ak.name }}{% endblock %} +{% block meta %} + <meta name="twitter:card" content="summary" /> + <meta name="twitter:title" content="{{ak.name}} ({{ak.event.name }})" /> + <meta name="twitter:description" content="{{ ak.description }}" /> +{% endblock %} + {% block breadcrumbs %} {% include "AKSubmission/submission_breadcrumbs.html" %} <li class="breadcrumb-item"><a diff --git a/AKSubmission/templates/AKSubmission/ak_overview.html b/AKSubmission/templates/AKSubmission/ak_overview.html index 0e1d1158..01b8ab84 100644 --- a/AKSubmission/templates/AKSubmission/ak_overview.html +++ b/AKSubmission/templates/AKSubmission/ak_overview.html @@ -7,6 +7,11 @@ {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AKs" %}{% endblock %} +{% block meta %} + <meta name="twitter:card" content="summary" /> + <meta name="twitter:title" content="{{ event.name }} - {% trans "AKs" %}" /> +{% endblock %} + {% block imports %} <style> /* Prevent wrapping of buttons in AK table */ diff --git a/AKSubmission/templates/AKSubmission/submission_overview.html b/AKSubmission/templates/AKSubmission/submission_overview.html index 6265d4c3..e7994b69 100644 --- a/AKSubmission/templates/AKSubmission/submission_overview.html +++ b/AKSubmission/templates/AKSubmission/submission_overview.html @@ -6,6 +6,11 @@ {% block title %}{% trans "AKs" %}: {{ event.name }} - {% trans "AK Submission" %}{% endblock %} +{% block meta %} + <meta name="twitter:card" content="summary" /> + <meta name="twitter:title" content="{{ event.name }} - {% trans "AK Submission" %}" /> +{% endblock %} + {% block imports %} <style> /* Prevent wrapping of buttons in AK table */ -- GitLab