Skip to content
Snippets Groups Projects
Commit 0f6515de authored by OndraRehounek's avatar OndraRehounek
Browse files

Merge branch 'test' into feature/majak-misc-enhancements

parents 7b7d7ea6 4ce188dc
No related branches found
No related tags found
2 merge requests!435Release upgrades,!430Feature/majak misc enhancements
# Generated by Django 3.2.12 on 2022-02-13 11:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("uniweb", "0019_auto_20211006_2258"),
]
operations = [
migrations.AddField(
model_name="uniwebhomepage",
name="show_logo",
field=models.BooleanField(
default=True, help_text="Zobrazit logo", verbose_name="zobrazit logo"
),
),
migrations.AddField(
model_name="uniwebhomepage",
name="show_pirate_buttons",
field=models.BooleanField(
default=True,
help_text="Zobrazit pirátská tlačítka",
verbose_name="zobrazit pirátská tlačítka",
),
),
migrations.AddField(
model_name="uniwebhomepage",
name="show_social_links",
field=models.BooleanField(
default=True,
help_text="Zobrazit link na sociální sítě",
verbose_name="zobrazit soc. linky",
),
),
]
...@@ -308,6 +308,19 @@ class UniwebHomePage(Page, MetadataPageMixin, CalendarMixin): ...@@ -308,6 +308,19 @@ class UniwebHomePage(Page, MetadataPageMixin, CalendarMixin):
help_text="užší stránka je vhodná pro lepší čitelnost textů", help_text="užší stránka je vhodná pro lepší čitelnost textů",
) )
### Footer
show_logo = models.BooleanField(
"zobrazit logo", default=True, help_text="Zobrazit logo"
)
show_social_links = models.BooleanField(
"zobrazit soc. linky", default=True, help_text="Zobrazit link na sociální sítě"
)
show_pirate_buttons = models.BooleanField(
"zobrazit pirátská tlačítka",
default=True,
help_text="Zobrazit pirátská tlačítka",
)
### PANELS ### PANELS
content_panels = Page.content_panels + [ content_panels = Page.content_panels + [
...@@ -336,6 +349,14 @@ class UniwebHomePage(Page, MetadataPageMixin, CalendarMixin): ...@@ -336,6 +349,14 @@ class UniwebHomePage(Page, MetadataPageMixin, CalendarMixin):
), ),
FieldPanel("calendar_url"), FieldPanel("calendar_url"),
CommentPanel(), CommentPanel(),
MultiFieldPanel(
[
FieldPanel("show_logo"),
FieldPanel("show_social_links"),
FieldPanel("show_pirate_buttons"),
],
"nastavení patičky",
),
] ]
menu_panels = [StreamFieldPanel("top_menu")] menu_panels = [StreamFieldPanel("top_menu")]
......
...@@ -87,15 +87,18 @@ ...@@ -87,15 +87,18 @@
<div> <div>
<div class="footer__main py-4 lg:py-16 container container--default"> <div class="footer__main py-4 lg:py-16 container container--default">
<section class="footer__brand"> <section class="footer__brand">
{% if page.root_page.show_logo %}
<a href="https://www.pirati.cz"> <a href="https://www.pirati.cz">
<img src="https://styleguide.pirati.cz/2.3.x/images/logo-full-white.svg" alt="logo pirátské strany" class="w-32 md:w-40 pb-6" /> <img src="https://styleguide.pirati.cz/2.3.x/images/logo-full-white.svg" alt="logo pirátské strany" class="w-32 md:w-40 pb-6" />
</a> </a>
{% endif %}
<p class="para hidden md:block md:mb-4 lg:mb-0 text-grey-200"> <p class="para hidden md:block md:mb-4 lg:mb-0 text-grey-200">
<span class="copyleft inline-block">&copy;</span> {% now "Y" %} Piráti. Všechna práva vyhlazena. Sdílejte a nechte ostatní sdílet za stejných podmínek. <span class="copyleft inline-block">&copy;</span> {% now "Y" %} Piráti. Všechna práva vyhlazena. Sdílejte a nechte ostatní sdílet za stejných podmínek.
</p> </p>
</section> </section>
<section class="footer__social lg:text-right"> <section class="footer__social lg:text-right">
<div class="mb-4"> <div class="mb-4">
{% if page.root_page.show_social_links %}
<div class="social-icon-group space-x-2 text-white pb-4"> <div class="social-icon-group space-x-2 text-white pb-4">
<a href="https://www.pirati.cz" class="social-icon "><i class="ico--home"></i></a> <a href="https://www.pirati.cz" class="social-icon "><i class="ico--home"></i></a>
<a href="https://www.facebook.com/ceska.piratska.strana/" class="social-icon "><i class="ico--facebook"></i></a> <a href="https://www.facebook.com/ceska.piratska.strana/" class="social-icon "><i class="ico--facebook"></i></a>
...@@ -104,8 +107,10 @@ ...@@ -104,8 +107,10 @@
<a href="https://www.instagram.com/pirati.cz/" class="social-icon "><i class="ico--instagram"></i></a> <a href="https://www.instagram.com/pirati.cz/" class="social-icon "><i class="ico--instagram"></i></a>
<a href="https://www.flickr.com/photos/pirati/" class="social-icon "><i class="ico--flickr"></i></a> <a href="https://www.flickr.com/photos/pirati/" class="social-icon "><i class="ico--flickr"></i></a>
</div> </div>
{% endif %}
</div> </div>
<div class="flex flex-col md:flex-row lg:flex-col lg:items-end space-y-2 md:space-y-0 md:space-x-2 lg:space-x-0 lg:space-y-2"> <div class="flex flex-col md:flex-row lg:flex-col lg:items-end space-y-2 md:space-y-0 md:space-x-2 lg:space-x-0 lg:space-y-2">
{% if page.root_page.show_pirate_buttons %}
<a href="https://dary.pirati.cz" class="btn btn--icon btn--cyan-200 btn--hoveractive text-lg btn--fullwidth sm:btn--autowidth"> <a href="https://dary.pirati.cz" class="btn btn--icon btn--cyan-200 btn--hoveractive text-lg btn--fullwidth sm:btn--autowidth">
<div class="btn__body-wrap"> <div class="btn__body-wrap">
<div class="btn__body ">Přispěj</div> <div class="btn__body ">Přispěj</div>
...@@ -122,6 +127,7 @@ ...@@ -122,6 +127,7 @@
</div> </div>
</div> </div>
</a> </a>
{% endif %}
</div> </div>
</section> </section>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment