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

Add show_transparent_header opt.

parent 4c02d50c
No related branches found
No related tags found
2 merge requests!1250Release,!1249Update templates
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
bg-no-repeat bg-cover bg-center bg-blend-darken bg-[top_right_-7rem] bg-no-repeat bg-cover bg-center bg-blend-darken bg-[top_right_-7rem]
{% if background_image %} {% if background_image %}
bg-[#00000088] {% if not show_tansparent_header %}bg-[#00000088]{% endif %}
{% else %} {% else %}
bg-black bg-black
{% endif %} {% endif %}
......
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
{% block extra_classes %}{% endblock %} {% block extra_classes %}{% endblock %}
{% if background_image %} {% if background_image %}
bg-[#00000088] bg-no-repeat bg-cover bg-center bg-blend-darken bg-[top_right_-7rem] {% if not show_tansparent_header %}bg-[#00000088]{% endif %}
bg-no-repeat bg-cover bg-center bg-blend-darken bg-[top_right_-7rem]
{% else %} {% else %}
bg-black bg-black
{% endif %} {% endif %}
......
# Generated by Django 5.0.7 on 2025-03-04 07:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('uniweb', '0117_uniwebhomepage_has_expanded_navbar'),
]
operations = [
migrations.AddField(
model_name='uniwebflexiblepage',
name='show_tansparent_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?'),
),
]
...@@ -256,6 +256,15 @@ class UniwebFlexiblePage( ...@@ -256,6 +256,15 @@ class UniwebFlexiblePage(
): ):
### FIELDS ### FIELDS
show_tansparent_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( main_image = models.ForeignKey(
"wagtailimages.Image", "wagtailimages.Image",
on_delete=models.PROTECT, on_delete=models.PROTECT,
...@@ -279,6 +288,7 @@ class UniwebFlexiblePage( ...@@ -279,6 +288,7 @@ class UniwebFlexiblePage(
content_panels = Page.content_panels + [ content_panels = Page.content_panels + [
FieldPanel("content"), FieldPanel("content"),
FieldPanel("main_image"), FieldPanel("main_image"),
FieldPanel("show_tansparent_header"),
] ]
edit_handler = TabbedInterface( edit_handler = TabbedInterface(
......
...@@ -5,5 +5,5 @@ ...@@ -5,5 +5,5 @@
{% endblock %} {% endblock %}
{% block header %} {% 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_tansparent_header=page.show_tansparent_header title=page.title main_image=page.main_image show_scroll_progress=page.show_scroll_progress %}
{% endblock %} {% endblock %}
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