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

main image, transp. header

parent 4db46100
No related branches found
No related tags found
2 merge requests!1256Release,!1255main image, transp. header
Pipeline #20761 passed
# Generated by Django 5.0.7 on 2025-03-12 09:11
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('uniweb', '0121_alter_uniwebarticlepage_content_and_more'),
('wagtailimages', '0027_image_description'),
]
operations = [
migrations.AddField(
model_name='uniwebhomepage',
name='main_image',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='wagtailimages.image', verbose_name='Obrázek na pozadí hlavičky'),
),
migrations.AddField(
model_name='uniwebhomepage',
name='show_transparent_header',
field=models.BooleanField(default=False, help_text='Pokud je toto pole zaškrtlé, obrázek na pozadí hlavičky se neztmaví.', verbose_name='Průhledná hlavička?'),
),
]
......@@ -77,6 +77,24 @@ class UniwebHomePage(
### FIELDS
show_transparent_header = models.BooleanField(
default=False,
verbose_name="Průhledná hlavička?",
help_text=(
"Pokud je toto pole zaškrtlé, obrázek na pozadí hlavičky "
"se neztmaví."
)
)
main_image = models.ForeignKey(
"wagtailimages.Image",
on_delete=models.PROTECT,
blank=True,
null=True,
verbose_name="Obrázek na pozadí hlavičky",
related_name="+",
)
menu_button_name = models.CharField(
verbose_name="Text na tlačítku pro zapojení", max_length=16
)
......@@ -138,6 +156,11 @@ class UniwebHomePage(
### PANELS
content_panels = MainHomePageMixin.content_panels + [
FieldPanel("main_image"),
FieldPanel("show_transparent_header"),
]
settings_panels = [
MultiFieldPanel(
[
......
......@@ -8,7 +8,7 @@
{% endblock %}
{% block header %}
{% include 'styleguide2/includes/organisms/header/photo_header.html' with title=page.title main_image=page.main_image show_scroll_progress=page.show_scroll_progress %}
{% include 'styleguide2/includes/organisms/header/photo_header.html' with show_transparent_header=page.show_transparent_header title=page.title main_image=page.main_image show_scroll_progress=page.show_scroll_progress %}
{% endblock %}
<main class="mb-2 lg:mb-12">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment