diff --git a/donate/migrations/0045_alter_donatehomepage_menu.py b/donate/migrations/0045_alter_donatehomepage_menu.py index c75228fc64b8bcb2ca765ce3dfa652807803dba7..908da220cacaeb72318dd69a8473b1bf65011995 100644 --- a/donate/migrations/0045_alter_donatehomepage_menu.py +++ b/donate/migrations/0045_alter_donatehomepage_menu.py @@ -1,20 +1,92 @@ # Generated by Django 4.1.10 on 2024-02-20 09:19 -from django.db import migrations import wagtail.blocks import wagtail.fields +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('donate', '0044_alter_donatehomepage_menu'), + ("donate", "0044_alter_donatehomepage_menu"), ] operations = [ migrations.AlterField( - model_name='donatehomepage', - name='menu', - field=wagtail.fields.StreamField([('menu_item', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(label='Titulek', required=True)), ('page', wagtail.blocks.PageChooserBlock(label='Stránka', required=False)), ('link', wagtail.blocks.URLBlock(label='Odkaz', required=False))])), ('menu_parent', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(label='Titulek', required=True)), ('menu_items', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(label='Titulek', required=True)), ('page', wagtail.blocks.PageChooserBlock(label='Stránka', required=False)), ('link', wagtail.blocks.URLBlock(label='Odkaz', required=False))]), label='Položky menu'))], template='donate/blocks/navbar_submenu.html'))], blank=True, use_json_field=True, verbose_name='Menu'), + model_name="donatehomepage", + name="menu", + field=wagtail.fields.StreamField( + [ + ( + "menu_item", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titulek", required=True + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + label="Stránka", required=False + ), + ), + ( + "link", + wagtail.blocks.URLBlock( + label="Odkaz", required=False + ), + ), + ] + ), + ), + ( + "menu_parent", + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titulek", required=True + ), + ), + ( + "menu_items", + wagtail.blocks.ListBlock( + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Titulek", required=True + ), + ), + ( + "page", + wagtail.blocks.PageChooserBlock( + label="Stránka", required=False + ), + ), + ( + "link", + wagtail.blocks.URLBlock( + label="Odkaz", required=False + ), + ), + ] + ), + label="Položky menu", + ), + ), + ], + template="donate/blocks/navbar_submenu.html", + ), + ), + ], + blank=True, + use_json_field=True, + verbose_name="Menu", + ), ), ] diff --git a/main/migrations/0074_mainresultspage.py b/main/migrations/0074_mainresultspage.py index da7654f12cf464f593d3c2790ad43475481fa10a..2918cc6c278fa1c94f35d48b490ad1fb93d592c3 100644 --- a/main/migrations/0074_mainresultspage.py +++ b/main/migrations/0074_mainresultspage.py @@ -1,32 +1,117 @@ # Generated by Django 4.1.10 on 2024-02-20 09:19 -from django.db import migrations, models import django.db.models.deletion -import shared.models.base import wagtail.blocks import wagtail.fields import wagtailmetadata.models +from django.db import migrations, models +import shared.models.base -class Migration(migrations.Migration): +class Migration(migrations.Migration): dependencies = [ - ('wagtailcore', '0083_workflowcontenttype'), - ('wagtailimages', '0025_alter_image_file_alter_rendition_file'), - ('main', '0073_alter_mainhomepage_content'), + ("wagtailcore", "0083_workflowcontenttype"), + ("wagtailimages", "0025_alter_image_file_alter_rendition_file"), + ("main", "0073_alter_mainhomepage_content"), ] operations = [ migrations.CreateModel( - name='MainResultsPage', + name="MainResultsPage", fields=[ - ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')), - ('content', wagtail.fields.StreamField([('flip_cards', wagtail.blocks.StructBlock([('cards', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(label='Nadpis')), ('content', wagtail.blocks.RichTextBlock(label='Obsah')), ('button_text', wagtail.blocks.CharBlock(help_text='Pokud není vyplněn, tlačítko se neukáže.', label='Nadpis tlačítka', required=False)), ('button_url', wagtail.blocks.CharBlock(label='Odkaz tlačítka', required=False))], label='Karta'), label='Karty'))])), ('text', wagtail.blocks.RichTextBlock(template='styleguide2/includes/atoms/text/prose_richtext.html'))], blank=True, use_json_field=True, verbose_name='Obsah')), - ('search_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image', verbose_name='Search image')), + ( + "page_ptr", + models.OneToOneField( + auto_created=True, + on_delete=django.db.models.deletion.CASCADE, + parent_link=True, + primary_key=True, + serialize=False, + to="wagtailcore.page", + ), + ), + ( + "content", + wagtail.fields.StreamField( + [ + ( + "flip_cards", + wagtail.blocks.StructBlock( + [ + ( + "cards", + wagtail.blocks.ListBlock( + wagtail.blocks.StructBlock( + [ + ( + "title", + wagtail.blocks.CharBlock( + label="Nadpis" + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Obsah" + ), + ), + ( + "button_text", + wagtail.blocks.CharBlock( + help_text="Pokud není vyplněn, tlačítko se neukáže.", + label="Nadpis tlačítka", + required=False, + ), + ), + ( + "button_url", + wagtail.blocks.CharBlock( + label="Odkaz tlačítka", + required=False, + ), + ), + ], + label="Karta", + ), + label="Karty", + ), + ) + ] + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + template="styleguide2/includes/atoms/text/prose_richtext.html" + ), + ), + ], + blank=True, + use_json_field=True, + verbose_name="Obsah", + ), + ), + ( + "search_image", + models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="+", + to="wagtailimages.image", + verbose_name="Search image", + ), + ), ], options={ - 'verbose_name': 'Výsledky', + "verbose_name": "Výsledky", }, - bases=(shared.models.base.SubpageMixin, wagtailmetadata.models.WagtailImageMetadataMixin, 'wagtailcore.page', models.Model), + bases=( + shared.models.base.SubpageMixin, + wagtailmetadata.models.WagtailImageMetadataMixin, + "wagtailcore.page", + models.Model, + ), ), ] diff --git a/main/migrations/0075_alter_mainresultspage_content.py b/main/migrations/0075_alter_mainresultspage_content.py index be81867e3b5c7b9e37c5299d0b77a6ca578bb3c6..e83d61e88d318a35feeb6e3d1f68d3da868e228a 100644 --- a/main/migrations/0075_alter_mainresultspage_content.py +++ b/main/migrations/0075_alter_mainresultspage_content.py @@ -1,21 +1,83 @@ # Generated by Django 4.1.10 on 2024-02-20 10:16 -from django.db import migrations import wagtail.blocks import wagtail.fields import wagtail.images.blocks +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('main', '0074_mainresultspage'), + ("main", "0074_mainresultspage"), ] operations = [ migrations.AlterField( - model_name='mainresultspage', - name='content', - field=wagtail.fields.StreamField([('flip_cards', wagtail.blocks.StructBlock([('cards', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Obrázek')), ('title', wagtail.blocks.CharBlock(label='Nadpis')), ('content', wagtail.blocks.RichTextBlock(label='Obsah')), ('button_text', wagtail.blocks.CharBlock(help_text='Pokud není vyplněn, tlačítko se neukáže.', label='Nadpis tlačítka', required=False)), ('button_url', wagtail.blocks.CharBlock(label='Odkaz tlačítka', required=False))], label='Karta'), label='Karty'))])), ('text', wagtail.blocks.RichTextBlock(template='styleguide2/includes/atoms/text/prose_richtext.html'))], blank=True, use_json_field=True, verbose_name='Obsah'), + model_name="mainresultspage", + name="content", + field=wagtail.fields.StreamField( + [ + ( + "flip_cards", + wagtail.blocks.StructBlock( + [ + ( + "cards", + wagtail.blocks.ListBlock( + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Obrázek" + ), + ), + ( + "title", + wagtail.blocks.CharBlock( + label="Nadpis" + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Obsah" + ), + ), + ( + "button_text", + wagtail.blocks.CharBlock( + help_text="Pokud není vyplněn, tlačítko se neukáže.", + label="Nadpis tlačítka", + required=False, + ), + ), + ( + "button_url", + wagtail.blocks.CharBlock( + label="Odkaz tlačítka", + required=False, + ), + ), + ], + label="Karta", + ), + label="Karty", + ), + ) + ] + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + template="styleguide2/includes/atoms/text/prose_richtext.html" + ), + ), + ], + blank=True, + use_json_field=True, + verbose_name="Obsah", + ), ), ] diff --git a/main/migrations/0076_alter_mainresultspage_content.py b/main/migrations/0076_alter_mainresultspage_content.py index f21f4925a79934b56a792cfd5bb84af13771ae1c..88744ed500c0651100096a68086a62c66740ab3c 100644 --- a/main/migrations/0076_alter_mainresultspage_content.py +++ b/main/migrations/0076_alter_mainresultspage_content.py @@ -1,21 +1,84 @@ # Generated by Django 4.1.10 on 2024-02-20 11:01 -from django.db import migrations import wagtail.blocks import wagtail.fields import wagtail.images.blocks +from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('main', '0075_alter_mainresultspage_content'), + ("main", "0075_alter_mainresultspage_content"), ] operations = [ migrations.AlterField( - model_name='mainresultspage', - name='content', - field=wagtail.fields.StreamField([('flip_cards', wagtail.blocks.StructBlock([('cards', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(label='Obrázek')), ('title', wagtail.blocks.TextBlock(help_text='Řádkování je manuální.', label='Nadpis')), ('content', wagtail.blocks.RichTextBlock(label='Obsah')), ('button_text', wagtail.blocks.CharBlock(help_text='Pokud není vyplněn, tlačítko se neukáže.', label='Nadpis tlačítka', required=False)), ('button_url', wagtail.blocks.CharBlock(label='Odkaz tlačítka', required=False))], label='Karta'), label='Karty'))])), ('text', wagtail.blocks.RichTextBlock(template='styleguide2/includes/atoms/text/prose_richtext.html'))], blank=True, use_json_field=True, verbose_name='Obsah'), + model_name="mainresultspage", + name="content", + field=wagtail.fields.StreamField( + [ + ( + "flip_cards", + wagtail.blocks.StructBlock( + [ + ( + "cards", + wagtail.blocks.ListBlock( + wagtail.blocks.StructBlock( + [ + ( + "image", + wagtail.images.blocks.ImageChooserBlock( + label="Obrázek" + ), + ), + ( + "title", + wagtail.blocks.TextBlock( + help_text="Řádkování je manuální.", + label="Nadpis", + ), + ), + ( + "content", + wagtail.blocks.RichTextBlock( + label="Obsah" + ), + ), + ( + "button_text", + wagtail.blocks.CharBlock( + help_text="Pokud není vyplněn, tlačítko se neukáže.", + label="Nadpis tlačítka", + required=False, + ), + ), + ( + "button_url", + wagtail.blocks.CharBlock( + label="Odkaz tlačítka", + required=False, + ), + ), + ], + label="Karta", + ), + label="Karty", + ), + ) + ] + ), + ), + ( + "text", + wagtail.blocks.RichTextBlock( + template="styleguide2/includes/atoms/text/prose_richtext.html" + ), + ), + ], + blank=True, + use_json_field=True, + verbose_name="Obsah", + ), ), ] diff --git a/shared/static/styleguide2/pirati-ui.svg b/shared/static/styleguide2/pirati-ui.svg index ffc20eccf43c3d89476c0124b2475cd314fe2ecd..c6e3a71ad07f5229dda5d69c9289dc5ce339be12 100644 --- a/shared/static/styleguide2/pirati-ui.svg +++ b/shared/static/styleguide2/pirati-ui.svg @@ -127,4 +127,4 @@ <glyph unicode="" glyph-name="price-tags" horiz-adv-x="1280" d="M1232 960h-384c-26.4 0-63.274-15.274-81.942-33.942l-476.116-476.116c-18.668-18.668-18.668-49.214 0-67.882l412.118-412.118c18.668-18.668 49.214-18.668 67.882 0l476.118 476.118c18.666 18.666 33.94 55.54 33.94 81.94v384c0 26.4-21.6 48-48 48zM992 576c-53.020 0-96 42.98-96 96s42.98 96 96 96 96-42.98 96-96-42.98-96-96-96zM128 416l544 544h-80c-26.4 0-63.274-15.274-81.942-33.942l-476.116-476.116c-18.668-18.668-18.668-49.214 0-67.882l412.118-412.118c18.668-18.668 49.214-18.668 67.882 0l30.058 30.058-416 416z" /> <glyph unicode="" glyph-name="twitter" horiz-adv-x="1001" d="M596.009 526.629l372.819 433.371h-88.346l-323.718-376.29-258.553 376.29h-298.21l390.983-569.018-390.983-454.457h88.351l341.855 397.375 273.051-397.375h298.21l-405.458 590.103zM475 385.969l-354.815 507.521h135.702l624.636-893.48h-135.702l-269.821 385.959z" /> <glyph unicode="" glyph-name="stats-dots" d="M128 64h896v-128h-1024v1024h128zM288 128c-53.020 0-96 42.98-96 96s42.98 96 96 96c2.828 0 5.622-0.148 8.388-0.386l103.192 171.986c-9.84 15.070-15.58 33.062-15.58 52.402 0 53.020 42.98 96 96 96s96-42.98 96-96c0-19.342-5.74-37.332-15.58-52.402l103.192-171.986c2.766 0.238 5.56 0.386 8.388 0.386 2.136 0 4.248-0.094 6.35-0.23l170.356 298.122c-10.536 15.408-16.706 34.036-16.706 54.11 0 53.020 42.98 96 96 96s96-42.98 96-96c0-53.020-42.98-96-96-96-2.14 0-4.248 0.094-6.35 0.232l-170.356-298.124c10.536-15.406 16.706-34.036 16.706-54.11 0-53.020-42.98-96-96-96s-96 42.98-96 96c0 19.34 5.74 37.332 15.578 52.402l-103.19 171.984c-2.766-0.238-5.56-0.386-8.388-0.386s-5.622 0.146-8.388 0.386l-103.192-171.986c9.84-15.068 15.58-33.060 15.58-52.4 0-53.020-42.98-96-96-96z" /> -</font></defs></svg> \ No newline at end of file +</font></defs></svg>