Skip to content
Snippets Groups Projects
Commit b0f640a9 authored by Alexa Valentová's avatar Alexa Valentová
Browse files

update layout, fix <head> title getting (again)

parent 1807ef3d
No related branches found
No related tags found
2 merge requests!1013update layout, fix <head> title getting (again),!1012update layout, fix <head> title getting (again)
Pipeline #18667 passed
...@@ -131,12 +131,18 @@ class ExtendedMetadataPageMixin(models.Model): ...@@ -131,12 +131,18 @@ class ExtendedMetadataPageMixin(models.Model):
return self.root_page.get_meta_title_suffix() return self.root_page.get_meta_title_suffix()
def get_meta_title(self): def get_meta_title(self):
title = super().get_meta_title()
suffix = self.get_meta_title_suffix() suffix = self.get_meta_title_suffix()
if not suffix: if title == self.root_page.title:
return super().get_meta_title() return f"Domů | Piráti {suffix}"
# Covers scenario when title_suffix is not set and evaluates to super().get_meta_title() value.
# Rather than having MS Pardubice | MS Pardubice, just use MS Pardubice alone.
if title != suffix:
return f"{super().get_meta_title()} | Piráti {self.get_meta_title_suffix()}"
return f"{super().get_meta_title()} | {self.get_meta_title_suffix()}" return f"Piráti {title}"
class SubpageMixin: class SubpageMixin:
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -21,18 +21,31 @@ ...@@ -21,18 +21,31 @@
{% endif %} {% endif %}
</div> </div>
<div
class="
flex gap-2 flex-col
lg:gap-6 lg:flex-row
"
>
<h4 <h4
class="text-xl font-bold w-64" class="text-xl font-bold w-64"
>{{ self.page.title }}</h4> >{{ self.page.title }}</h4>
{% if self.page.position %} {% if self.page.position %}
<p class="ml-6"> <p class="lg:ml-6">
{{ self.page.position }} {{ self.page.position }}
</p> </p>
{% endif %} {% endif %}
{% if self.page.is_pirate is not None %} {% if self.page.is_pirate is not None %}
<div class="ml-auto font-bold flex items-center gap-1"> <div
class="
font-bold flex items-center gap-1
lg:ml-auto
"
>
{% if self.page.is_pirate %} {% if self.page.is_pirate %}
<img <img
class="w-8" class="w-8"
...@@ -44,6 +57,7 @@ ...@@ -44,6 +57,7 @@
Pirátská Strana Pirátská Strana
</div> </div>
{% elif self.page.other_party %} {% elif self.page.other_party %}
{% if self.page.other_party_logo %}
{% image self.page.other_party_logo fill-150x150 as other_party_logo_image %} {% image self.page.other_party_logo fill-150x150 as other_party_logo_image %}
<img <img
...@@ -56,7 +70,9 @@ ...@@ -56,7 +70,9 @@
{{ self.page.other_party }} {{ self.page.other_party }}
</div> </div>
{% endif %} {% endif %}
{% endif %}
</div> </div>
{% endif %} {% endif %}
</div>
</a> </a>
</li> </li>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment