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
......@@ -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>
......
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