Skip to content

Commit

Permalink
🚨 reformat all html files
Browse files Browse the repository at this point in the history
  • Loading branch information
krmax44 committed Oct 30, 2023
1 parent 6a3bbc9 commit 2cf90d3
Show file tree
Hide file tree
Showing 213 changed files with 4,082 additions and 4,598 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{% extends "admin/change_form.html" %}

{% load static %}

{% block after_field_sets %}
{{ block.super }}
{{ adminform.model_admin.charcount_fields|json_script:"charcount-fields" }}
<script src="{% static 'js/fds_blog/charcount.js' %}"></script>
{% endblock %}
{% endblock %}
177 changes: 80 additions & 97 deletions fragdenstaat_de/fds_blog/templates/fds_blog/_article_detail.html
Original file line number Diff line number Diff line change
@@ -1,122 +1,105 @@
{% load i18n cms_tags %}
{% load markup %}
{% load static %}

{% block article_header %}
<div class="blog-header-container">
<header class="blog-header">
<div class="row justify-content-center">
<div class="col-md-12 col-lg-10">

<h1 class="blog-header__title">
<span class="d-block fw-normal blog-header__meta mb-2">
{{ article.kicker }}
</span>
<span>{% render_model article "title" %}</span>
</h1>

{% if article.teaser %}
<div class="blog-lead">
{% render_model article "teaser" "" "" "safe" %}
</div>
{% endif %}

<div class="mt-3 mb-5 blog-header__meta">
<time datetime="{{ article.start_publication|date:'c' }}">
{{ article.start_publication|date:"DATE_FORMAT" }}
</time>
{% with authors=article.get_authors %}
{% if authors %}
<span> -
{% for author in authors %}
{% if author.get_absolute_url %}
<a href="{{ author.get_absolute_url }}" rel="author">
{% endif %}
{{ author.get_full_name }}{% if author.get_absolute_url %}</a>{% endif %}{% if not forloop.last %},{% endif %}
{% endfor %}
</span>
{% endif %}
{% endwith %}
</div>

{% block article_header_image %}
{% if article.image %}
{% include "fds_blog/includes/blog_picture_detail.html" with picture=article.image columns="col-12 col-lg-10" loading="eager" %}
{% endif %}
{% endblock article_header_image %}

</div>
<div class="blog-header-container">
<header class="blog-header">
<div class="row justify-content-center">
<div class="col-md-12 col-lg-10">
<h1 class="blog-header__title">
<span class="d-block fw-normal blog-header__meta mb-2">{{ article.kicker }}</span>
<span>{% render_model article "title" %}</span>
</h1>
{% if article.teaser %}
<div class="blog-lead">{% render_model article "teaser" "" "" "safe" %}</div>
{% endif %}
<div class="mt-3 mb-5 blog-header__meta">
<time datetime="{{ article.start_publication|date:'c' }}">
{{ article.start_publication|date:"DATE_FORMAT" }}
</time>
{% with authors=article.get_authors %}
{% if authors %}
<span> -
{% for author in authors %}
{% if author.get_absolute_url %}<a href="{{ author.get_absolute_url }}" rel="author">{% endif %}
{{ author.get_full_name }}
{% if author.get_absolute_url %}</a>{% endif %}
{% if not forloop.last %},{% endif %}
{% endfor %}
</span>
{% endif %}
{% endwith %}
</div>
{% block article_header_image %}
{% if article.image %}
{% include "fds_blog/includes/blog_picture_detail.html" with picture=article.image columns="col-12 col-lg-10" loading="eager" %}
{% endif %}
{% endblock article_header_image %}
</div>
</div>
</header>
</div>
</header>
</div>
{% endblock article_header %}

{% block article_updates %}
{% if updated_articles %}
<div class="blog-content">
<p>
{% blocktranslate count counter=updated_articles|length %}
{% if updated_articles %}
<div class="blog-content">
<p>
{% blocktranslate count counter=updated_articles|length %}
Updated article:
{% plural %}
Updated articles:
{% endblocktranslate %}
{% for related_article in updated_articles %}
{{ related_article.publication_date|date:"SHORT_DATE_FORMAT" }} – <a href="{{ related_article.get_absolute_url }}">{{ related_article.title }}</a>{% if not forloop.last %},{% endif %}
{% endfor %}
</p>
</div>
{% endif %}
{% for related_article in updated_articles %}
{{ related_article.publication_date|date:"SHORT_DATE_FORMAT" }} – <a href="{{ related_article.get_absolute_url }}">{{ related_article.title }}</a>
{% if not forloop.last %},{% endif %}
{% endfor %}
</p>
</div>
{% endif %}
{% endblock %}

{% block article_content %}
{% render_placeholder article.content_placeholder %}
{% render_placeholder article.content_placeholder %}
{% endblock article_content %}

{% block article_previous %}
{% if previous_articles %}
<div class="blog-content">
<p>
{% blocktranslate count counter=previous_articles|length %}
{% if previous_articles %}
<div class="blog-content">
<p>
{% blocktranslate count counter=previous_articles|length %}
Previous article:
{% plural %}
Previous articles:
{% endblocktranslate %}
{% for related_article in previous_articles %}
{{ related_article.publication_date|date:"SHORT_DATE_FORMAT" }} – <a href="{{ related_article.get_absolute_url }}">{{ related_article.title }}</a>{% if not forloop.last %},{% endif %}
{% endfor %}
</p>
</div>
{% endif %}
{% for related_article in previous_articles %}
{{ related_article.publication_date|date:"SHORT_DATE_FORMAT" }} – <a href="{{ related_article.get_absolute_url }}">{{ related_article.title }}</a>
{% if not forloop.last %},{% endif %}
{% endfor %}
</p>
</div>
{% endif %}
{% endblock %}

{% block article_ads %}
{% static_placeholder "banner_ad" %}
{% static_placeholder "banner_ad" %}
{% endblock article_ads %}

{% block article_languages %}
<div class="container">
<div class="row justify-content-center pt-5">
<div class="col-md-8">
{% with other_langs=article.other_languages %}
{% if other_langs %}
<p>
{% trans "This article is available in other languages." %}
</p>
<ul class="list-unstyled">
{% for lang_article in other_langs %}
<li>
{{ lang_article.language|language_name }}:
<a href="{{ lang_article.get_absolute_url }}">
{{ lang_article.title }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
<div class="container">
<div class="row justify-content-center pt-5">
<div class="col-md-8">
{% with other_langs=article.other_languages %}
{% if other_langs %}
<p>{% trans "This article is available in other languages." %}</p>
<ul class="list-unstyled">
{% for lang_article in other_langs %}
<li>
{{ lang_article.language|language_name }}:
<a href="{{ lang_article.get_absolute_url }}">{{ lang_article.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% endwith %}
</div>
</div>
</div>
</div>
</div>
{% endblock article_languages %}

{% block article_authors %}{% endblock article_authors %}
{% block article_authors %}
{% endblock article_authors %}
100 changes: 45 additions & 55 deletions fragdenstaat_de/fds_blog/templates/fds_blog/article_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,53 @@
{% load markup %}
{% load static %}
{% load blog_tags %}

{% block canonical_url %}<link rel="canonical" href="{{ meta.url }}"/>{% endblock canonical_url %}
{% block canonical_url %}
<link rel="canonical" href="{{ meta.url }}" />
{% endblock canonical_url %}
{% block title %}{{ article.meta_title }}{% endblock %}

{% block meta %}
{% include "snippets/meta.html" with description=article.teaser|striptags keywords=article.tag_list %}
{% include "fds_blog/includes/social_meta.html" with article=article %}
{% with other_langs=article.other_languages %}
{% for lang_article in other_langs %}
<link rel="alternate" hreflang="{{ lang_article.language }}" href="{{ lang_article.get_full_url }}"/>
{% endfor %}
{% endwith %}
{% include "snippets/meta.html" with description=article.teaser|striptags keywords=article.tag_list %}
{% include "fds_blog/includes/social_meta.html" with article=article %}
{% with other_langs=article.other_languages %}
{% for lang_article in other_langs %}
<link rel="alternate"
hreflang="{{ lang_article.language }}"
href="{{ lang_article.get_full_url }}" />
{% endfor %}
{% endwith %}
{% endblock %}

{% block content_blog %}{% spaceless %}
<article id="post-{{ article.slug }} post-item post-detail">

{% include article.content_template %}

</article>
{% endspaceless %}

{% static_placeholder "blog_donation_banner" %}

{% with next_read=article|get_next_read %}
{% if next_read %}
<div class="container">
<div class="row justify-content-center py-5">
<div class="col-md-5">
{% if next_read.image_id %}
<a href="{{ next_read.get_absolute_url }}">{% include "fds_blog/includes/blog_picture.html" with picture=next_read.image columns="col-md-5" %}</a>
{% block content_blog %}
{% spaceless %}
<article id="post-{{ article.slug }} post-item post-detail">{% include article.content_template %}</article>
{% endspaceless %}
{% static_placeholder "blog_donation_banner" %}
{% with next_read=article|get_next_read %}
{% if next_read %}
<div class="container">
<div class="row justify-content-center py-5">
<div class="col-md-5">
{% if next_read.image_id %}
<a href="{{ next_read.get_absolute_url }}">
{% include "fds_blog/includes/blog_picture.html" with picture=next_read.image columns="col-md-5" %}
</a>
{% endif %}
</div>
<div class="col-md-5 next-reads__text">
<h3>
<a href="{{ next_read.get_absolute_url }}">
{% if next_read.kicker %}<span class="d-block fw-normal blog-header__meta">{{ next_read.kicker }}</span>{% endif %}
{{ next_read.title }}
</a>
</h3>
<p>{% render_model next_read "teaser" "" "" "safe" %}</p>
<p>
<div class="cl-effect-10">
<a href="{{ next_read.get_absolute_url }}" data-hover="&rarr;">{% translate "Read article" %}</a>
</div>
</p>
</div>
</div>
</div>
{% endif %}
</div>
<div class="col-md-5 next-reads__text">
<h3>
<a href="{{ next_read.get_absolute_url }}">
{% if next_read.kicker %}
<span class="d-block fw-normal blog-header__meta">
{{ next_read.kicker }}
</span>
{% endif %}
{{ next_read.title }}
</a>
</h3>
<p>
{% render_model next_read "teaser" "" "" "safe" %}
</p>
<p>
<div class="cl-effect-10">
<a href="{{ next_read.get_absolute_url }}" data-hover="&rarr;">
{% translate "Read article" %}
</a>
</div>
</p>
</div>
</div>
</div>
{% endif %}
{% endwith %}
{% endwith %}
{% endblock content_blog %}
Loading

0 comments on commit 2cf90d3

Please sign in to comment.