From 6b89ce208758ea0c29c24a465e74ad3bf4c5b7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bedna=C5=99=C3=ADk?= <jan.bednarik@gmail.com> Date: Wed, 23 Aug 2023 22:07:55 +0200 Subject: [PATCH] Shared article info tweaks --- .../district/district_article_page.html | 4 ++-- main/templates/main/main_article_page.html | 16 +++++++++++++++- shared/templates/shared/article_shared_link.html | 8 +++++--- uniweb/templates/uniweb/uniweb_article_page.html | 4 ++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/district/templates/district/district_article_page.html b/district/templates/district/district_article_page.html index db90ced9..25b8c980 100644 --- a/district/templates/district/district_article_page.html +++ b/district/templates/district/district_article_page.html @@ -12,8 +12,6 @@ {{ page.title }} </h1> - {% include "shared/article_shared_link.html" %} - <div class="flex flex-col md:flex-row md:items-center"> <div class="inline-flex divide-x flex-grow"> <span class="pr-2">{{ page.date|date:"DATE_FORMAT" }}</span> @@ -75,6 +73,8 @@ </div> </div> </div> + + {% include "shared/article_shared_link.html" %} </article> {% if related_articles|length %} diff --git a/main/templates/main/main_article_page.html b/main/templates/main/main_article_page.html index 36dce372..af02f1d6 100644 --- a/main/templates/main/main_article_page.html +++ b/main/templates/main/main_article_page.html @@ -29,7 +29,6 @@ <div class="grid-content leading-6"> <p class="font-condensed text-xl leading-7 mb-5"> {{ page.perex }} - {% include "shared/article_shared_link.html" %} </p> </div> {% if page.author_page.title or page.author %} @@ -39,6 +38,21 @@ {% for block in page.content %} {% include_block block %} {% endfor %} + + {% if page.shared_from %} + <div class="grid-container mb-5"> + <div class="grid-content"> + <div class="prose max-w-none 3xl:text-lg"> + <div class="content-block"> + <p> + <em>Tento článek byl sdílen z jiného webu. Originál si můžete přečíst <a href="{{ page.get_original_url }}">zde</a>.</em> + </p> + </div> + </div> + </div> + </div> + {% endif %} + </main> {% include 'main/includes/newsletter_section.html' %} diff --git a/shared/templates/shared/article_shared_link.html b/shared/templates/shared/article_shared_link.html index 5cb8ee8e..3f3cb88f 100644 --- a/shared/templates/shared/article_shared_link.html +++ b/shared/templates/shared/article_shared_link.html @@ -1,5 +1,7 @@ {% if page.shared_from %} - <div> - Tento článek byl sdílen z externího zdroje. Originál si můžete přečíst <a href="{{ page.get_original_url }}">zde</a>. - </div> + <div class="alert alert--light content-block"> + <p> + <em>Tento článek byl sdílen z jiného webu. Originál si můžete přečíst <a href="{{ page.get_original_url }}">zde</a>.</em> + </p> + </div> {% endif %} diff --git a/uniweb/templates/uniweb/uniweb_article_page.html b/uniweb/templates/uniweb/uniweb_article_page.html index 030fef10..e964898d 100644 --- a/uniweb/templates/uniweb/uniweb_article_page.html +++ b/uniweb/templates/uniweb/uniweb_article_page.html @@ -11,8 +11,6 @@ <h1 itemprop="headline" class="head-alt-md md:head-alt-lg mb-4">{{ page.title }}</h1> - {% include "shared/article_shared_link.html" %} - <div class="flex flex-col md:flex-row md:items-center"> <div class="inline-flex divide-x flex-grow my-4"> <span class="pr-2">{{ page.date|date:"SHORT_DATE_FORMAT" }}</span> @@ -47,6 +45,8 @@ {% endfor %} </div> </div> + + {% include "shared/article_shared_link.html" %} </article> <section class="mt-16 md:mt-24"> -- GitLab