Skip to content
Snippets Groups Projects
Verified Commit 23b8639b authored by jindra12's avatar jindra12
Browse files

Add original url algo

parent b0ba0f78
No related branches found
No related tags found
2 merge requests!816Release,!801Prepare basic shared tags
......@@ -12,6 +12,8 @@
{{ 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>
......
......@@ -29,6 +29,7 @@
<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 %}
......
......@@ -102,6 +102,10 @@ class ArticleMixin(models.Model):
class Meta:
abstract = True
@property
def get_original_url(self):
return f"{self.get_parent().get_ancestors().specific().live().last().full_url}{self.slug}"
@property
def get_no_index(self):
"""
......
{% if page.shared_from %}
<div>
Tento článek byl sdílen z&nbsp;externího zdroje. Originál si můžete přečíst <a href="{{ page.get_original_url }}">zde</a>.
</div>
{% endif %}
......@@ -11,6 +11,8 @@
<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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment