Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,14 @@
{# Schema.org markup for Google+ #}
<meta itemprop="name" content="{{ article.meta_title }}">
{% if article.abstract %}<meta itemprop="description" content="{{ article.abstract|striptags }}">{% endif %}
{# Twitter Card data #}
<meta name="twitter:site" content="@fragdenstaat">
<meta name="twitter:title" content="{{ article.meta_title }}">
{% if article.teaser %}<meta name="twitter:description" content="{{ article.teaser|striptags }}">{% endif %}
<meta name="twitter:creator" content="@fragdenstaat">
{% if article.image %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image:src"
content="{% thumbnail article.image 1120x600 crop subject_location=article.image.subject_location %}">
{% else %}
<meta name="twitter:card" content="summary">
{% endif %}
{# Open Graph data #}
<meta property="og:title" content="{{ article.meta_title }}" />
<meta property="og:type" content="article" />
<meta property="og:url"
content="{{ SITE_URL }}{{ article.get_absolute_url }}" />
{% if article.image %}
<meta property="og:image"
content="{% thumbnail article.image 1200x630 crop subject_location=article.image.subject_location %}" />
content="{% thumbnail article.image "ogimage" subject_location=article.image.subject_location %}" />
{% endif %}
{% if article.teaser %}<meta property="og:description" content="{{ article.teaser|striptags }}" />{% endif %}
<meta property="og:site_name" content="{{ SITE_NAME }}" />
Expand Down
18 changes: 1 addition & 17 deletions fragdenstaat_de/fds_cms/templates/fds_cms/social_meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,6 @@
{% if description and description != "None" %}<meta itemprop="description" content="{{ description }}">{% endif %}
<meta name="description"
content="{% if description and description != "None" %}{{ description }}{% else %}{% blocktrans with site=SITE_NAME %}{{ site }} helps you to make freedom of information requests to public bodies{% endblocktrans %}{% endif %}" />
{# Twitter Card data #}
<meta name="twitter:site" content="@fragdenstaat">
<meta name="twitter:title" content="{{ title }}">
{% if description and description != "None" %}<meta name="twitter:description" content="{{ description }}">{% endif %}
<meta name="twitter:creator" content="@fragdenstaat">
{% if image_url %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image:src" content="{{ image_url }}">
{% elif object.fdspageextension.image %}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image:src"
content="{% thumbnail object.fdspageextension.image 1120x600 crop subject_location=object.fdspageextension.image.subject_location %}">
{% else %}
<meta name="twitter:card" content="summary">
<meta name="twitter:image:src" content="{{ SITE_LOGO }}">
{% endif %}
{# Open Graph data #}
<meta property="og:title" content="{{ title }}" />
<meta property="og:type" content="article" />
Expand All @@ -40,7 +24,7 @@
<meta property="og:image" content="{{ image_url }}" />
{% elif object.fdspageextension.image %}
<meta property="og:image"
content="{% thumbnail object.fdspageextension.image 1200x630 crop subject_location=object.fdspageextension.image.subject_location %}" />
content="{% thumbnail object.fdspageextension.image "ogimage" subject_location=object.fdspageextension.image.subject_location %}" />
{% else %}
<meta property="og:image" content="{{ SITE_LOGO }}">
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<meta property="og:description" content="{{ event.description }}" />
{% if event.image %}
<meta property="og:image"
content="{% thumbnail event.image 1200x630 crop subject_location=event.image.subject_location %}" />
content="{% thumbnail event.image "ogimage" subject_location=event.image.subject_location %}" />
{% endif %}
{% endblock meta %}
{% block title %}{{ event.title }} – {{ SITE_NAME }}{% endblock %}
Expand All @@ -25,7 +25,7 @@ <h1>{{ event.title }}</h1>
</div>
{% if event.image %}
<div class="col-12 col-md-6 col-lg-4 pb-3">
<img src="{% thumbnail event.image 1200x630 crop subject_location=event.image.subject_location %}"
<img src="{% thumbnail event.image "ogimage" subject_location=event.image.subject_location %}"
alt="{{ event.image.default_alt_text }}"
class="img-fluid" />
</div>
Expand Down
7 changes: 7 additions & 0 deletions fragdenstaat_de/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,13 @@ def FILER_SERVERS(self):
"xxlcontainer@2x": {"size": (2592, 0)},
"xxxl": {"size": (3840, 0)},
},
"": {
"ogimage": {
"size": (1200, 630),
"crop": True,
"replace_alpha": "#ffffff",
},
},
}
FDS_THUMBNAIL_ENABLE_AVIF = False

Expand Down
1 change: 0 additions & 1 deletion fragdenstaat_de/templates/account/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
<meta property="og:title"
content="{{ object.get_full_name }} – FragDenStaat-Profil" />
<meta property="og:image" content="{{ og_image_url }}" />
<meta name="twitter:card" content="summary_large_image">
{% endblock %}
8 changes: 0 additions & 8 deletions fragdenstaat_de/templates/filingcabinet/document_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@
{% if object.public %}
<meta itemprop="name" content="{{ object.title }}">
{% if object.description %}<meta itemprop="description" content="{{ object.description }}">{% endif %}
{# Twitter Card data #}
<meta name="twitter:site" content="@fragdenstaat">
<meta name="twitter:title" content="{{ object.title }}">
{% if object.description %}<meta name="twitter:description" content="{{ object.description }}">{% endif %}
<meta name="twitter:creator" content="@fragdenstaat">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image:src"
content="{% thumbnail object.get_cover_image_file 1120x600 crop %}">
{# Open Graph data #}
<meta property="og:title" content="{{ object.title }}" />
<meta property="og:type" content="article" />
Expand Down
1 change: 0 additions & 1 deletion fragdenstaat_de/templates/foirequest/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
{% url 'foirequest-show-og' slug=object.slug as foirequest_path %}
{% ogimage_url path=foirequest_path as og_image_url %}
<meta property="og:image" content="{{ og_image_url }}" />
<meta name="twitter:card" content="summary_large_image">
{% endblock %}