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

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>
......@@ -36,4 +37,4 @@
<input type="submit" value="{% trans 'submit'|capfirst %}" class="btn btn-style1 pull-right login" />
</form>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -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>
......@@ -18,4 +19,4 @@
In case books are missing from the catalog, or if you discover any other problems with the books, send an email to <a href="mailto:onderwijs@thalia.nu">onderwijs@thalia.nu</a>.
{% endblocktrans %}
</p>
{% endblock %}}
\ No newline at end of file
{% endblock %}}
......@@ -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 %}
......@@ -34,4 +35,4 @@
of rooms for student organizations. The USC consists of fourteen members. Eight are chosen by students and the other six represent different
student organizations from the university. You can read more about the USC <a href="http://www.ru.nl/usr/">here</a>.</p>
{% endblocktrans %}
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -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' %}
......@@ -36,4 +37,4 @@
<a href="{% url "events:event" event.id %}" class="forgot btn pull-right btn-style2">{% trans 'Cancel' %}</a>
</form>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -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>
......
......@@ -3,6 +3,7 @@
{% load i18n %}
{% block title %}{% trans "Merchandise" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Merchandise" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Merchandise" %}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n admin_urls static admin_modify %}
{% block title %}{{ newsletter.title }} | {{ site_title|default:_('Thalia site admin') }}{% endblock %}
{% block opengraph_title %}{{ newsletter.title }} | {{ site_title|default:_('Thalia site admin') }}{% endblock %}
{% block branding %}
<h1 id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('Thalia administration') }}</a></h1>
......@@ -32,4 +33,4 @@
</form>
<br class="clear">
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}{% trans "Partners" %} — {% trans "Career" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Partners" %} — {% trans "Career" %} — {{ block.super }}{% endblock %}
{% block body %}
......
......@@ -2,6 +2,7 @@
{% load i18n bleach_tags %}
{% block title %}{{ partner.name }} — {% trans "Partners" %} — {% trans "Career" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{{ partner.name }} — {% trans "Partners" %} — {% trans "Career" %} — {{ block.super }}{% endblock %}
{% block header_image %}{% spaceless %}
{% if partner.site_header %}
......
......@@ -2,6 +2,7 @@
{% load i18n bleach_tags %}
{% block title %}{% trans "Vacancies" %} — {% trans "Career" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Vacancies" %} — {% trans "Career" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Vacancies" %}</h1>
......
......@@ -2,6 +2,7 @@
{% load staticfiles i18n thumbnail shared_thumbnail compress %}
{% block title %}{{ album.title }} — {% trans "Photos" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{{ album.title }} — {% trans "Photos" %} — {{ block.super }}{% endblock %}
{% block css_head %}
{{ block.super }}
......
......@@ -2,6 +2,7 @@
{% load i18n thumbnail staticfiles compress %}
{% block title %}{% trans "Photos" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Photos" %} — {{ block.super }}{% endblock %}
{% block css_head %}
{{ block.super }}
......
......@@ -2,6 +2,7 @@
{% load i18n staticfiles %}
{% block title %}{% trans "Add order" %} — {{ event.title }} — {% trans "Pizzas"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Add order" %} — {{ event.title }} — {% trans "Pizzas"|capfirst %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% blocktrans with title=event.title %}Add order for {{ title }}{% endblocktrans %}</h1>
......
{% extends "pizzas/base.html" %}
{% load i18n staticfiles %}
{% block title %}{{ event.title }} — {% trans "Pizzas"|capfirst %} — {{ block.super }}{% endblock %}
{% block title %}{% if event %}{{ event.title }} — {% endif %}{% trans "Pizzas"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% if event %}{{ event.title }} — {% endif %}{% trans "Pizzas"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph %}
{% if event %}
<meta property="og:description" content="{% blocktrans with title=event.title %}Order food for {{ title }}{% endblocktrans %}" />
{% else %}
<meta property="og:description" content="{% trans "There is no current event for which you can order food" %}" />
{% endif %}
{% endblock %}
{% block header_image_container %}
{% if event.just_ended %}
......
......@@ -3,6 +3,7 @@
{% load i18n staticfiles %}
{% block title %}{{ event.title }} — {% trans "Pizzas"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{{ event.title }} — {% trans "Pizzas"|capfirst %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>
......
......@@ -2,6 +2,7 @@
{% load i18n staticfiles %}
{% block title %}{{ event.title }} — {% trans "Pizzas"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{{ event.title }} — {% trans "Pizzas"|capfirst %} — {{ block.super }}{% endblock %}
{% block body %}
......
......@@ -4,6 +4,7 @@
{% comment %}This page is automatically used by django.contrib.auth.views{% endcomment %}
{% block title %}{% trans "Logout" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Logout" %} — {{ block.super }}{% endblock %}
{% block body %}
......@@ -13,4 +14,4 @@
<p class="text-center"><a href="{% url 'login' %}">{% trans 'Log in again' %}</a></p>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -4,6 +4,7 @@
{% comment %}This page is automatically used by django.contrib.auth.views{% endcomment %}
{% block title %}{% trans "Login" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Login" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Log in" %}</h1>
......
......@@ -4,6 +4,7 @@
{% comment %}This page is automatically used by django.contrib.auth.views{% endcomment %}
{% block title %}{% trans "Password change" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Password change" %} — {{ block.super }}{% endblock %}
{% block body %}
......@@ -11,4 +12,4 @@
<p class="text-center">{% trans 'Your password was changed.' %}</p>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -4,6 +4,7 @@
{% comment %}This page is automatically used by django.contrib.auth.views{% endcomment %}
{% block title %}{% trans "Password change" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Password change" %} — {{ block.super }}{% endblock %}
{% block body %}
......@@ -45,4 +46,4 @@
</form>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -4,6 +4,7 @@
{% comment %}This page is automatically used by django.contrib.auth.views{% endcomment %}
{% block title %}{% trans "Forgot password" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Forgot password" %} — {{ block.super }}{% endblock %}
{% block body %}
......@@ -13,4 +14,4 @@
<p class="text-center"><a href="{{ login_url }}">{% trans 'Log in' %}</a></p>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -4,6 +4,7 @@
{% comment %}This page is automatically used by django.contrib.auth.views{% endcomment %}
{% block title %}{% trans "Forgot password" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Forgot password" %} — {{ block.super }}{% endblock %}
{% block body %}
......@@ -44,4 +45,4 @@
{% endif %}
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -4,6 +4,7 @@
{% comment %}This page is automatically used by django.contrib.auth.views{% endcomment %}
{% block title %}{% trans "Forgot password" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Forgot password" %} — {{ block.super }}{% endblock %}
{% block body %}
......@@ -13,4 +14,4 @@
<p class="text-center">{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}</p>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -4,6 +4,7 @@
{% comment %}This page is automatically used by django.contrib.auth.views{% endcomment %}
{% block title %}{% trans "Forgot password" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Forgot password" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Forgot password" %}</h1>
......@@ -32,4 +33,4 @@
</div>
</form>
</div>
{% endblock %}
\ No newline at end of file
{% endblock %}
......@@ -2,6 +2,7 @@
{% load i18n thumbnail %}
{% block title %}{% trans "Thabloid" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Thabloid" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Thabloid" %}</h1>
......
......@@ -21,9 +21,11 @@
<meta name="msapplication-square150x150logo" content="{% static "images/browser_icons/icon-mediumtile.png" %}">
<meta name="msapplication-wide310x150logo" content="{% static "images/browser_icons/icon-widetile.png" %}">
<meta name="msapplication-square310x310logo" content="{% static "images/browser_icons/icon-largetile.png" %}">
<meta property="og:image" content="{% if request.is_secure %}https://{% else %}http://{% endif %}{{ request.get_host }}{% static "images/browser_icons/icon-largetile.png" %}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{% trans 'Study Association Thalia' %}" />
<meta property="og:title" content="{% block opengraph_title %}{% trans 'Study Association Thalia' %}{% endblock %}" />
{% block opengraph %}{% endblock %}
<!-- css stylesheets -->
{% block css_head %}
......
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}Error — {{ block.super }}{% endblock %}
{% block opengraph_title %}Error — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% blocktrans %}Error{% endblocktrans %}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}{% trans "Association" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Association" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Thalia, the study association of Computer Science and Information Science"|upper %}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}{% trans "Become a Member" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Become a Member" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Become a Member" %}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}{% trans "Become active" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Become active" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Become active" %}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}{% trans "Contact" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Contact" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Contact" %}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}{% trans "for members"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "for members"|capfirst %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "for members"|upper %}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n %}
{% block title %}{% trans "Sister Associations" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Sister Associations" %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "Associations of the Radboud University Science Faculty" %}</h1>
......
......@@ -2,6 +2,7 @@
{% load i18n static %}
{% block title %}{% trans "styleguide"|capfirst %} — {% trans "for members"|capfirst %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "styleguide"|capfirst %} — {% trans "for members"|capfirst %} — {{ block.super }}{% endblock %}
{% block body %}
<h1>{% trans "styleguide"|capfirst %}</h1>
......
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