Commit 414cb37b authored by Thom Wiggers's avatar Thom Wiggers 📐
Browse files

Merge branch 'feature/opengraph-improvements' into 'master'

Make it possible to change the opengraph title per page and add more specific tags if preferred

Closes #270

See merge request !389
parents be831914 12b3c4cc
......@@ -2,6 +2,7 @@
{% load i18n thumbnail static %}
{% block title %}{% trans "Board" %} {{ board.since.year }}-{{ board.until.year }} — {% trans "Boards" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Board" %} {{ board.since.year }}-{{ board.until.year }} — {% trans "Boards" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>
......
{% extends "base.html" %}
{% load i18n thumbnail static %}
{% block title %}{% trans 'Boards' %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans 'Boards' %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans 'Boards' %}</h1>
......
{% extends "base.html" %}
{% load i18n static thumbnail %}
{% block title %}{{ committee.name }} — {% trans 'Committees' %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{{ committee.name }} — {% trans 'Committees' %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{{ committee.name }}
......
{% extends "base.html" %}
{% load i18n thumbnail static %}
{% block title %}{% trans 'Committees' %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans 'Committees' %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans 'committees'|capfirst %}</h1>
......
......@@ -4,6 +4,7 @@
{% load compress %}
{% block title %}{% trans 'Documents' %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans 'Documents' %} — {{ block.super }}{% endblock %}
{% block css_head %}
{{ block.super }}
......
......@@ -2,6 +2,7 @@
{% load i18n fieldtype %}
{% block title %}{% trans "Submit Exam" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Submit Exam" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Submit Exam" %}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n fieldtype %}
{% block title %}{% trans "Submit Summary" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Submit Summary" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Submit Summary" %}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}{% trans "Book Sale" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Book Sale" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Book Sale" %}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}{{ course.name }} — {% trans "Course" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{{ course.name }} — {% trans "Course" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{{ course.name }}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}{% trans "Course overview" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Course overview" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1 class="main-title">{% trans "Course overview" %}</h1>
......
......@@ -3,6 +3,7 @@
{% load i18n %}
{% block title %}{% trans "Student Participation" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Student Participation" %} — {{ block.super }}{% endblock %}
{% block body %}
......
......@@ -2,6 +2,7 @@
{% load i18n admin_urls static admin_modify %}
{% block title %}{{ event.title }} | {{ site_title|default:_('Thalia site admin') }}{% endblock %}
{% block opengraph_title %}{{ event.title }} | {{ site_title|default:_('Thalia site admin') }}{% endblock %}
{% block extrastyle %}
{{ block.super }}
......
......@@ -2,6 +2,11 @@
{% load i18n static bleach_tags thumbnail %}
{% block title %}{{ event.title }} — {% trans "Calendar"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{{ event.title }} — {% trans "Calendar"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph %}
<meta property="og:description" content="{{ event.description|striptags|truncatewords:10 }}" />
{% endblock %}
{% block body %}
<h1>{{ event.title }}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n static fieldtype %}
{% block title %}{% if action == 'update' %}{% trans "Update registration" %}{% else %}{% trans "Complete registration" %}{% endif %} — {{ event.title }} — {% trans "Calendar" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% if action == 'update' %}{% trans "Update registration" %}{% else %}{% trans "Complete registration" %}{% endif %} — {{ event.title }} — {% trans "Calendar" %} — {{ block.super }}{% endblock %}
{% block body %}
{% if action == 'update' %}
......
......@@ -3,6 +3,7 @@
{% get_current_language as LANGUAGE_CODE %}
{% block title %}{% trans "Calendar"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Calendar"|capfirst %} — {{ block.super }}{% endblock %}
{% block css_head %}
{{ block.super }}
......
......@@ -4,6 +4,7 @@
{% load i18n %}
{% block title %}{% trans "members"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "members"|capfirst %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans 'Account' %}</h1>
......
......@@ -3,6 +3,7 @@
{% load static i18n fieldtype %}
{% block title %}{% trans "edit profile"|capfirst %} — {% trans "members"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "edit profile"|capfirst %} — {% trans "members"|capfirst %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "edit profile"|capfirst %}</h1>
......
......@@ -5,6 +5,7 @@
{% load thumbnail %}
{% block title %}{% trans "members"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "members"|capfirst %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "members"|capfirst %}</h1>
......
......@@ -4,6 +4,7 @@
{% load i18n %}
{% block title %}{% trans "profile"|capfirst %} — {% trans "members"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "profile"|capfirst %} — {% trans "members"|capfirst %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>
......
......@@ -3,6 +3,7 @@
{% load static %}
{% block title %}{%trans "Statistics" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{%trans "Statistics" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Statistics" %}</h1>
......
Supports Markdown
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