Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
1 result

Target

Select target project
  • Institut π / pi-cms
  • jakub.wolf / pi-cms
2 results
Select Git revision
  • master
  • jw
2 results
Show changes
1000 files
+ 5025
170255
Compare changes
  • Side-by-side
  • Inline

Files

.gitignore

0 → 100644
+6 −0
Original line number Diff line number Diff line
__pycache__/
.env
institut/static/css/style.css
static/*
media/*
node_modules/
+4 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ help:
	@echo "Application:"
	@echo "  run             Run the application on port ${PORT}"
	@echo "  shell           Access the Django shell"
	@echo "  superuser       Create superuser
	@echo ""
	@echo "Database:"
	@echo "  migrations      Generate migrations"
@@ -57,6 +58,9 @@ run: venv
shell: venv
	${VENV}/bin/python manage.py shell --settings=${SETTINGS}

superuser: venv
	${VENV}/bin/python manage.py createsuperuser --settings=${SETTINGS}

migrations: venv
	${VENV}/bin/python manage.py makemigrations --settings=${SETTINGS}

+5 −1
Original line number Diff line number Diff line
DATABASE_URL="postgresql://nastenka:nastenka@localhost:5432/postgres"
DATABASE_URL="postgresql://institut:institut@localhost:5432/postgres"

# ALLOWED_HOSTS=dev.imaniti.org
# SECRET_KEY=asdf
# CSRF_TRUSTED_ORIGINS=https://dev.imaniti.org

home/admin.py

0 → 100644
+15 −0
Original line number Diff line number Diff line
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register

from .models import Tag


class TagAdmin(ModelAdmin):
    model = Tag
    menu_label = "Štítky"
    menu_icon = "tag"
    menu_order = 290
    add_to_settings_menu = False
    exclude_from_explorer = False


modeladmin_register(TagAdmin)

home/blocks.py

0 → 100644
+12 −0
Original line number Diff line number Diff line
from wagtail.blocks import CharBlock, EmailBlock, StructBlock, TextBlock


class PersonBlock(StructBlock):
    name = CharBlock(label="Jméno")
    position = TextBlock(label="Pracovní pozice", required=False)
    email = EmailBlock(label="E-mailová adresa", required=False)

    class Meta:
        label = "Osoba"
        template = "home/blocks/person_block.html"
        icon = "user"

home/feeds.py

0 → 100644
+52 −0
Original line number Diff line number Diff line
import typing
from datetime import datetime

from django.contrib.syndication.views import Feed
from django.template.loader import render_to_string
from django.urls import reverse

from .models import HomeArticlePage, HomeArticlesPage


class LatestArticlesFeed(Feed):
    def get_object(self, request, id: int) -> HomeArticlesPage:
        return HomeArticlesPage.objects.get(id=id)

    def title(self, obj: HomeArticlesPage) -> str:
        return obj.title

    def link(self, obj: HomeArticlesPage) -> str:
        return obj.get_full_url()

    def items(self, obj: HomeArticlesPage) -> list:
        return HomeArticlePage.objects.live().child_of(obj).order_by("-date")[:32]

    def item_title(self, item: HomeArticlePage) -> str:
        return item.title

    def item_description(self, item: HomeArticlePage) -> str:
        return render_to_string(
            "home/feed_item_description.html",
            {"item": item},
        )

    def item_pubdate(self, item: HomeArticlePage) -> datetime:
        return datetime(
            item.date.year,
            item.date.month,
            item.date.day,
            12,
            0,
        )

    def item_author_name(self, item: HomeArticlePage) -> str:
        if item.author:
            return item.author

        return ""

    def item_categories(self, item: HomeArticlePage) -> list:
        return item.tags.all()

    def item_link(self, item: HomeArticlePage) -> str:
        return item.get_full_url()
+292 −5
Original line number Diff line number Diff line
# -*- coding: utf-8 -*-
# Generated by Django 4.2.2 on 2023-07-23 12:14

import django.db.models.deletion
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("wagtailcore", "0040_page_draft_title"),
        ("wagtailcore", "0083_workflowcontenttype"),
    ]

    operations = [
        migrations.CreateModel(
            name="HomePage",
            name="HomeArticlesPage",
            fields=[
                (
                    "page_ptr",
                    models.OneToOneField(
                        on_delete=models.CASCADE,
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="wagtailcore.page",
                    ),
                ),
                ("author", models.CharField(verbose_name="Autor")),
                ("perex", wagtail.fields.RichTextField(verbose_name="Perex")),
                ("content", wagtail.fields.RichTextField(verbose_name="Obsah")),
            ],
            options={
                "abstract": False,
            },
            bases=("wagtailcore.page",),
        ),
        migrations.CreateModel(
            name="HomePage",
            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",
                        to="wagtailcore.page",
                    ),
                ),
                (
                    "heading_text",
                    wagtail.fields.RichTextField(verbose_name="Hlavní text stránky"),
                ),
                (
                    "events",
                    wagtail.fields.StreamField(
                        [
                            (
                                "event",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "name",
                                            wagtail.blocks.CharBlock(label="Jméno"),
                                        ),
                                        ("url", wagtail.blocks.URLBlock(label="URL")),
                                        (
                                            "date",
                                            wagtail.blocks.DateBlock(
                                                label="Datum konání", required=False
                                            ),
                                        ),
                                        (
                                            "location",
                                            wagtail.blocks.CharBlock(
                                                label="Lokace", required=False
                                            ),
                                        ),
                                    ]
                                ),
                            )
                        ],
                        blank=True,
                        null=True,
                        use_json_field=True,
                        verbose_name="Události",
                    ),
                ),
                (
                    "documents",
                    wagtail.fields.StreamField(
                        [
                            (
                                "document",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "name",
                                            wagtail.blocks.CharBlock(label="Jméno"),
                                        ),
                                        (
                                            "date_added",
                                            wagtail.blocks.DateBlock(
                                                label="Datum přidání", required=False
                                            ),
                                        ),
                                        (
                                            "url",
                                            wagtail.blocks.URLBlock(
                                                label="URL (místo dokumentu)",
                                                required=False,
                                            ),
                                        ),
                                        (
                                            "file",
                                            wagtail.documents.blocks.DocumentChooserBlock(
                                                label="Dokument", required=False
                                            ),
                                        ),
                                    ]
                                ),
                            )
                        ],
                        blank=True,
                        null=True,
                        use_json_field=True,
                        verbose_name="Dokumenty",
                    ),
                ),
                (
                    "donation_text",
                    wagtail.fields.RichTextField(verbose_name="Text pro dary"),
                ),
                ("address", models.CharField(verbose_name="Sídlo")),
                ("branch", models.CharField(verbose_name="Pobočka")),
                ("email", models.EmailField(max_length=254, verbose_name="Email")),
                ("ds_id", models.CharField(verbose_name="Datová schránka")),
                (
                    "director",
                    wagtail.fields.StreamField(
                        [
                            (
                                "person",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "name",
                                            wagtail.blocks.CharBlock(label="Jméno"),
                                        ),
                                        (
                                            "position",
                                            wagtail.blocks.TextBlock(
                                                label="Pracovní pozice", required=False
                                            ),
                                        ),
                                        (
                                            "email",
                                            wagtail.blocks.EmailBlock(
                                                label="E-mailová adresa", required=False
                                            ),
                                        ),
                                    ]
                                ),
                            )
                        ],
                        blank=True,
                        null=True,
                        use_json_field=True,
                        verbose_name="Ředitel",
                    ),
                ),
                (
                    "controller",
                    wagtail.fields.StreamField(
                        [
                            (
                                "person",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "name",
                                            wagtail.blocks.CharBlock(label="Jméno"),
                                        ),
                                        (
                                            "position",
                                            wagtail.blocks.TextBlock(
                                                label="Pracovní pozice", required=False
                                            ),
                                        ),
                                        (
                                            "email",
                                            wagtail.blocks.EmailBlock(
                                                label="E-mailová adresa", required=False
                                            ),
                                        ),
                                    ]
                                ),
                            )
                        ],
                        blank=True,
                        null=True,
                        use_json_field=True,
                        verbose_name="Kontrolor",
                    ),
                ),
                (
                    "council_members",
                    wagtail.fields.StreamField(
                        [
                            (
                                "person",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "name",
                                            wagtail.blocks.CharBlock(label="Jméno"),
                                        ),
                                        (
                                            "position",
                                            wagtail.blocks.TextBlock(
                                                label="Pracovní pozice", required=False
                                            ),
                                        ),
                                        (
                                            "email",
                                            wagtail.blocks.EmailBlock(
                                                label="E-mailová adresa", required=False
                                            ),
                                        ),
                                    ]
                                ),
                            )
                        ],
                        blank=True,
                        null=True,
                        use_json_field=True,
                        verbose_name="Správní rada",
                    ),
                ),
                (
                    "volunteers",
                    wagtail.fields.StreamField(
                        [
                            (
                                "person",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "name",
                                            wagtail.blocks.CharBlock(label="Jméno"),
                                        ),
                                        (
                                            "position",
                                            wagtail.blocks.TextBlock(
                                                label="Pracovní pozice", required=False
                                            ),
                                        ),
                                        (
                                            "email",
                                            wagtail.blocks.EmailBlock(
                                                label="E-mailová adresa", required=False
                                            ),
                                        ),
                                    ]
                                ),
                            )
                        ],
                        blank=True,
                        null=True,
                        use_json_field=True,
                        verbose_name="Dobrovolníci",
                    ),
                ),
                (
                    "employees",
                    wagtail.fields.StreamField(
                        [
                            (
                                "person",
                                wagtail.blocks.StructBlock(
                                    [
                                        (
                                            "name",
                                            wagtail.blocks.CharBlock(label="Jméno"),
                                        ),
                                        (
                                            "position",
                                            wagtail.blocks.TextBlock(
                                                label="Pracovní pozice", required=False
                                            ),
                                        ),
                                        (
                                            "email",
                                            wagtail.blocks.EmailBlock(
                                                label="E-mailová adresa", required=False
                                            ),
                                        ),
                                    ]
                                ),
                            )
                        ],
                        blank=True,
                        null=True,
                        use_json_field=True,
                        verbose_name="Zaměstnanci",
                    ),
                ),
            ],
+0 −62
Original line number Diff line number Diff line
# -*- coding: utf-8 -*-
from django.db import migrations


def create_homepage(apps, schema_editor):
    # Get models
    ContentType = apps.get_model("contenttypes.ContentType")
    Page = apps.get_model("wagtailcore.Page")
    Site = apps.get_model("wagtailcore.Site")
    HomePage = apps.get_model("home.HomePage")

    # Delete the default homepage
    # If migration is run multiple times, it may have already been deleted
    Page.objects.filter(id=2).delete()

    # Create content type for homepage model
    homepage_content_type, __ = ContentType.objects.get_or_create(
        model="homepage", app_label="home"
    )

    # Create a new homepage
    homepage = HomePage.objects.create(
        title="Home",
        draft_title="Home",
        slug="home",
        content_type=homepage_content_type,
        path="00010001",
        depth=2,
        numchild=0,
        url_path="/home/",
    )

    # Create a site with the new homepage set as the root
    Site.objects.create(hostname="localhost", root_page=homepage, is_default_site=True)


def remove_homepage(apps, schema_editor):
    # Get models
    ContentType = apps.get_model("contenttypes.ContentType")
    HomePage = apps.get_model("home.HomePage")

    # Delete the default homepage
    # Page and Site objects CASCADE
    HomePage.objects.filter(slug="home", depth=2).delete()

    # Delete content type for homepage model
    ContentType.objects.filter(model="homepage", app_label="home").delete()


class Migration(migrations.Migration):

    run_before = [
        ("wagtailcore", "0053_locale_model"),
    ]

    dependencies = [
        ("home", "0001_initial"),
    ]

    operations = [
        migrations.RunPython(create_homepage, remove_homepage),
    ]
+46 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-07-23 12:29

import django.db.models.deletion
import wagtail.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("wagtailcore", "0083_workflowcontenttype"),
        ("home", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="HomeArticlePage",
            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",
                    ),
                ),
                ("author", models.CharField(verbose_name="Autor")),
                ("perex", wagtail.fields.RichTextField(verbose_name="Perex")),
                ("content", wagtail.fields.RichTextField(verbose_name="Obsah")),
            ],
            options={
                "abstract": False,
            },
            bases=("wagtailcore.page",),
        ),
        migrations.RemoveField(
            model_name="homearticlespage",
            name="author",
        ),
        migrations.RemoveField(
            model_name="homearticlespage",
            name="perex",
        ),
    ]
+20 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-07-23 12:31

import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0002_homearticlepage_remove_homearticlespage_author_and_more"),
    ]

    operations = [
        migrations.AlterField(
            model_name="homearticlespage",
            name="content",
            field=wagtail.fields.RichTextField(
                blank=True, null=True, verbose_name="Obsah"
            ),
        ),
    ]
+20 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-07-23 12:37

import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0003_alter_homearticlespage_content"),
    ]

    operations = [
        migrations.AddField(
            model_name="homearticlepage",
            name="date",
            field=models.DateField(
                default=django.utils.timezone.now, verbose_name="Datum vytvoření"
            ),
        ),
    ]
+45 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-07-23 13:41

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0004_homearticlepage_date"),
    ]

    operations = [
        migrations.CreateModel(
            name="Tag",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(verbose_name="Jméno")),
            ],
            options={
                "verbose_name": "Štítek",
                "verbose_name_plural": "Štítky",
            },
        ),
        migrations.AlterModelOptions(
            name="homearticlepage",
            options={"ordering": ["-date"]},
        ),
        migrations.AlterField(
            model_name="homearticlepage",
            name="perex",
            field=models.TextField(verbose_name="Perex"),
        ),
        migrations.AddField(
            model_name="homearticlepage",
            name="tags",
            field=models.ManyToManyField(to="home.tag", verbose_name="Štítky"),
        ),
    ]
+19 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-07-24 01:02

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0005_tag_alter_homearticlepage_options_and_more"),
    ]

    operations = [
        migrations.AlterField(
            model_name="tag",
            name="id",
            field=models.BigAutoField(
                auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
            ),
        ),
    ]
+174 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-07-24 03:57

import django.db.models.deletion
import django.utils.timezone
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("wagtailcore", "0083_workflowcontenttype"),
        ("home", "0006_alter_tag_id"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="homearticlepage",
            options={"ordering": ["-date"], "verbose_name": "Článek"},
        ),
        migrations.AlterModelOptions(
            name="homearticlespage",
            options={"verbose_name": "Rozcestník článků"},
        ),
        migrations.AlterModelOptions(
            name="homepage",
            options={"verbose_name": "Domovká stránka"},
        ),
        migrations.AlterField(
            model_name="homearticlepage",
            name="author",
            field=models.CharField(
                blank=True, max_length=128, null=True, verbose_name="Autor"
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="address",
            field=models.CharField(max_length=128, verbose_name="Sídlo"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="branch",
            field=models.CharField(max_length=128, verbose_name="Pobočka"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="documents",
            field=wagtail.fields.StreamField(
                [
                    (
                        "document",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "date_added",
                                    wagtail.blocks.DateBlock(
                                        label="Datum přidání", required=False
                                    ),
                                ),
                                (
                                    "page",
                                    wagtail.blocks.PageChooserBlock(
                                        label="Stránka (místo dokumentu)",
                                        required=False,
                                    ),
                                ),
                                (
                                    "file",
                                    wagtail.documents.blocks.DocumentChooserBlock(
                                        label="Dokument", required=False
                                    ),
                                ),
                            ]
                        ),
                    )
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Dokumenty",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="ds_id",
            field=models.CharField(max_length=128, verbose_name="Datová schránka"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="email",
            field=models.EmailField(max_length=128, verbose_name="Email"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="events",
            field=wagtail.fields.StreamField(
                [
                    (
                        "event",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "page",
                                    wagtail.blocks.PageChooserBlock(label="Stránka"),
                                ),
                                (
                                    "date",
                                    wagtail.blocks.DateBlock(
                                        label="Datum konání", required=False
                                    ),
                                ),
                                (
                                    "location",
                                    wagtail.blocks.CharBlock(
                                        label="Lokace", required=False
                                    ),
                                ),
                            ]
                        ),
                    )
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Události",
            ),
        ),
        migrations.AlterField(
            model_name="tag",
            name="name",
            field=models.CharField(max_length=32, verbose_name="Jméno"),
        ),
        migrations.CreateModel(
            name="HomeUniversalPage",
            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",
                    ),
                ),
                (
                    "author",
                    models.CharField(
                        blank=True, max_length=128, null=True, verbose_name="Autor"
                    ),
                ),
                (
                    "date",
                    models.DateField(
                        default=django.utils.timezone.now,
                        verbose_name="Datum vytvoření",
                    ),
                ),
                ("perex", models.TextField(verbose_name="Perex")),
                ("content", wagtail.fields.RichTextField(verbose_name="Obsah")),
                ("tags", models.ManyToManyField(to="home.tag", verbose_name="Štítky")),
            ],
            options={
                "verbose_name": "Univerzální stránka",
                "ordering": ["-date"],
            },
            bases=("wagtailcore.page",),
        ),
    ]
+16 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-07-24 04:02

from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0007_alter_homearticlepage_options_and_more"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="homeuniversalpage",
            name="perex",
        ),
    ]
+154 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-08-06 07:51

import django.db.models.deletion
import django.utils.timezone
import wagtail.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("wagtaildocs", "0012_uploadeddocument"),
        ("wagtailcore", "0083_workflowcontenttype"),
        ("home", "0008_remove_homeuniversalpage_perex"),
    ]

    operations = [
        migrations.CreateModel(
            name="HomeDocumentPage",
            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",
                    ),
                ),
                (
                    "author",
                    models.CharField(
                        blank=True, max_length=128, null=True, verbose_name="Autor"
                    ),
                ),
                (
                    "date",
                    models.DateField(
                        default=django.utils.timezone.now,
                        verbose_name="Datum vytvoření",
                    ),
                ),
                ("content", wagtail.fields.RichTextField(verbose_name="Obsah")),
                (
                    "document",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        to="wagtaildocs.document",
                    ),
                ),
                ("tags", models.ManyToManyField(to="home.tag", verbose_name="Štítky")),
            ],
            options={
                "verbose_name": "Dokument",
                "ordering": ["-date"],
            },
            bases=("wagtailcore.page",),
        ),
        migrations.CreateModel(
            name="HomeDocumentsPage",
            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.RichTextField(
                        blank=True, null=True, verbose_name="Obsah"
                    ),
                ),
            ],
            options={
                "verbose_name": "Rozcestník dokumentů",
            },
            bases=("wagtailcore.page",),
        ),
        migrations.CreateModel(
            name="HomeEventPage",
            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",
                    ),
                ),
                (
                    "author",
                    models.CharField(
                        blank=True, max_length=128, null=True, verbose_name="Autor"
                    ),
                ),
                ("content", wagtail.fields.RichTextField(verbose_name="Obsah")),
                (
                    "date",
                    models.DateField(
                        blank=True, null=True, verbose_name="Datum konání"
                    ),
                ),
                (
                    "location",
                    models.CharField(max_length=64, verbose_name="Místo konání"),
                ),
                ("tags", models.ManyToManyField(to="home.tag", verbose_name="Štítky")),
            ],
            options={
                "verbose_name": "Akce",
                "ordering": ["-date"],
            },
            bases=("wagtailcore.page",),
        ),
        migrations.CreateModel(
            name="HomeEventsPage",
            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.RichTextField(
                        blank=True, null=True, verbose_name="Obsah"
                    ),
                ),
            ],
            options={
                "verbose_name": "Rozcestník akcí",
            },
            bases=("wagtailcore.page",),
        ),
        migrations.DeleteModel(
            name="HomeUniversalPage",
        ),
    ]
+19 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-08-06 08:29

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0009_homedocumentpage_homedocumentspage_homeeventpage_and_more"),
    ]

    operations = [
        migrations.AlterField(
            model_name="homeeventpage",
            name="location",
            field=models.CharField(
                blank=True, max_length=64, null=True, verbose_name="Místo konání"
            ),
        ),
    ]
+38 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-08-06 08:38

import django.db.models.deletion
import wagtail.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("wagtaildocs", "0012_uploadeddocument"),
        ("home", "0010_alter_homeeventpage_location"),
    ]

    operations = [
        migrations.AlterField(
            model_name="homedocumentpage",
            name="content",
            field=wagtail.fields.RichTextField(
                blank=True, null=True, verbose_name="Obsah"
            ),
        ),
        migrations.AlterField(
            model_name="homedocumentpage",
            name="document",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to="wagtaildocs.document",
                verbose_name="Dokument",
            ),
        ),
        migrations.AlterField(
            model_name="homeeventpage",
            name="content",
            field=wagtail.fields.RichTextField(
                blank=True, null=True, verbose_name="Obsah"
            ),
        ),
    ]
+20 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-08-06 09:51

from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0011_alter_homedocumentpage_content_and_more"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="homepage",
            name="documents",
        ),
        migrations.RemoveField(
            model_name="homepage",
            name="events",
        ),
    ]
+78 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-12 15:11

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0012_remove_homepage_documents_remove_homepage_events"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="homearticlepage",
            options={"verbose_name": "Článek"},
        ),
        migrations.AlterModelOptions(
            name="homedocumentpage",
            options={"verbose_name": "Dokument"},
        ),
        migrations.AlterModelOptions(
            name="homeeventpage",
            options={"verbose_name": "Akce"},
        ),
        migrations.AddField(
            model_name="homepage",
            name="academic_council_description",
            field=models.CharField(
                default="Akademická rada je poradním orgánem ústavu a v rámci své činnosti zejména poskytuje správní radě stanoviska k ideovému směřování, strategickým materiálům, rozpočtu a plánu činností ústavu. Dále vykonává akademická rada dohled nad ideovou a odbornou kvalitou výstupů ústavu.",
                verbose_name="Akademická rada - popis",
            ),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="homepage",
            name="controller_description",
            field=models.CharField(
                default="Kontrolor je kontrolním orgánem ústavu.",
                verbose_name="Kontrolor - popis",
            ),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="homepage",
            name="council_members_description",
            field=models.CharField(
                default="Správní rada dbá o zachování účelu, pro nějž byl ústav založen, a dohlíží na řádné hospodaření s jeho majetkem.",
                verbose_name="Správní rada - popis",
            ),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="homepage",
            name="director_description",
            field=models.CharField(
                default="Ředitel je statutárním orgánem ústavu, řídí jeho činnost, jedná jeho jménem a rozhoduje ve všech záležitostech, které nespadají do pravomoci jiných orgánů.",
                verbose_name="Ředitel - popis",
            ),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="homepage",
            name="employees_description",
            field=models.CharField(
                default="Zaměstnanci poskytují administrativní, organizační a expertní podporu pro vykonávání činností ústavu.",
                verbose_name="Zaměstnanci - popis",
            ),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="homepage",
            name="volunteers_description",
            field=models.CharField(
                default="Dobrovolnický kruh je participační orgán ústavu. Účelem dobrovolnického kruhu je sdružovat osoby, které se chtějí dobrovolně podílet na činnostech ústavu, a navrhovat správní radě projekty pro realizaci ústavem v souladu s účelem ústavu.",
                verbose_name="Dobrovolníci - popis",
            ),
            preserve_default=False,
        ),
    ]
+42 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-12 15:18

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0013_alter_homearticlepage_options_and_more"),
    ]

    operations = [
        migrations.AlterField(
            model_name="homepage",
            name="academic_council_description",
            field=models.TextField(verbose_name="Akademická rada - popis"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="controller_description",
            field=models.TextField(verbose_name="Kontrolor - popis"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="council_members_description",
            field=models.TextField(verbose_name="Správní rada - popis"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="director_description",
            field=models.TextField(verbose_name="Ředitel - popis"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="employees_description",
            field=models.TextField(verbose_name="Zaměstnanci - popis"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="volunteers_description",
            field=models.TextField(verbose_name="Dobrovolníci - popis"),
        ),
    ]
+16 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-12 15:36

from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0014_alter_homepage_academic_council_description_and_more"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="homepage",
            options={"verbose_name": "Domovská stránka"},
        ),
    ]
+102 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-12 19:00

import django.db.models.deletion
import wagtail.contrib.routable_page.models
import wagtail.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("wagtailcore", "0083_workflowcontenttype"),
        ("wagtailimages", "0025_alter_image_file_alter_rendition_file"),
        ("home", "0015_alter_homepage_options"),
    ]

    operations = [
        migrations.CreateModel(
            name="HomePeoplePage",
            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.RichTextField(
                        blank=True, null=True, verbose_name="Obsah"
                    ),
                ),
            ],
            options={
                "verbose_name": "Rozcestník uživatelů",
            },
            bases=(
                wagtail.contrib.routable_page.models.RoutablePageMixin,
                "wagtailcore.page",
            ),
        ),
        migrations.CreateModel(
            name="HomePersonPage",
            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",
                    ),
                ),
                ("name", models.CharField(max_length=64, verbose_name="Jméno")),
                (
                    "position",
                    models.TextField(
                        blank=True, null=True, verbose_name="Pracovní pozice"
                    ),
                ),
                (
                    "email",
                    models.EmailField(
                        blank=True,
                        max_length=254,
                        null=True,
                        verbose_name="Emailová adresa",
                    ),
                ),
                (
                    "description",
                    wagtail.fields.RichTextField(
                        blank=True, null=True, verbose_name="Popis"
                    ),
                ),
                (
                    "image",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="wagtailimages.image",
                        verbose_name="Profilový obrázek",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=(
                wagtail.contrib.routable_page.models.RoutablePageMixin,
                "wagtailcore.page",
            ),
        ),
    ]
+20 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-12 19:01

from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0016_homepeoplepage_homepersonpage"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="homepeoplepage",
            options={"verbose_name": "Rozcestník osob"},
        ),
        migrations.AlterModelOptions(
            name="homepersonpage",
            options={"verbose_name": "Osoba"},
        ),
    ]
+16 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-12 19:01

from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0017_alter_homepeoplepage_options_and_more"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="homepersonpage",
            name="name",
        ),
    ]
+204 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-12 19:21

import wagtail.blocks
import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0018_remove_homepersonpage_name"),
    ]

    operations = [
        migrations.AlterField(
            model_name="homepage",
            name="controller",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            page_type=["home.HomePersonPage"]
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Kontrolor",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="council_members",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            page_type=["home.HomePersonPage"]
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Správní rada",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="director",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            page_type=["home.HomePersonPage"]
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Ředitel",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="employees",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            page_type=["home.HomePersonPage"]
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Zaměstnanci",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="volunteers",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            page_type=["home.HomePersonPage"]
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Dobrovolníci",
            ),
        ),
    ]
+272 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-12 19:27

import django.db.models.deletion
import wagtail.blocks
import wagtail.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0019_alter_homepage_controller_and_more"),
    ]

    operations = [
        migrations.AddField(
            model_name="homearticlepage",
            name="author_page",
            field=models.ForeignKey(
                blank=True,
                help_text="Pokud je vybrána stránka, není nutno vyplňovat jméno autora níže.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="home.homepersonpage",
                verbose_name="Stránka autora",
            ),
        ),
        migrations.AddField(
            model_name="homedocumentpage",
            name="author_page",
            field=models.ForeignKey(
                blank=True,
                help_text="Pokud je vybrána stránka, není nutno vyplňovat jméno autora níže.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="home.homepersonpage",
                verbose_name="Stránka autora",
            ),
        ),
        migrations.AddField(
            model_name="homeeventpage",
            name="author_page",
            field=models.ForeignKey(
                blank=True,
                help_text="Pokud je vybrána stránka, není nutno vyplňovat jméno autora níže.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="home.homepersonpage",
                verbose_name="Stránka autora",
            ),
        ),
        migrations.AlterField(
            model_name="homearticlepage",
            name="author",
            field=models.CharField(
                blank=True, max_length=128, null=True, verbose_name="Jméno autora"
            ),
        ),
        migrations.AlterField(
            model_name="homedocumentpage",
            name="author",
            field=models.CharField(
                blank=True, max_length=128, null=True, verbose_name="Jméno autora"
            ),
        ),
        migrations.AlterField(
            model_name="homeeventpage",
            name="author",
            field=models.CharField(
                blank=True, max_length=128, null=True, verbose_name="Jméno autora"
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="controller",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Kontrolor",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="council_members",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Správní rada",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="director",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Ředitel",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="employees",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Zaměstnanci",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="volunteers",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Dobrovolníci",
            ),
        ),
    ]
+114 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-12 19:39

import wagtail.blocks
import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0020_homearticlepage_author_page_and_more"),
    ]

    operations = [
        migrations.AlterField(
            model_name="homepage",
            name="controller",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    )
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Kontrolor",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="council_members",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    )
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Správní rada",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="director",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    )
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Ředitel",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="employees",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    )
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Zaměstnanci",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="volunteers",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    )
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Dobrovolníci",
            ),
        ),
    ]
+214 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-12 19:49

import wagtail.blocks
import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0021_alter_homepage_controller_and_more"),
    ]

    operations = [
        migrations.AlterField(
            model_name="homepage",
            name="controller",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Kontrolor",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="council_members",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Správní rada",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="director",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Ředitel",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="employees",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Zaměstnanci",
            ),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="volunteers",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Dobrovolníci",
            ),
        ),
    ]
+54 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-15 17:01

import wagtail.blocks
import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0022_alter_homepage_controller_and_more"),
    ]

    operations = [
        migrations.AddField(
            model_name="homepage",
            name="academic_council",
            field=wagtail.fields.StreamField(
                [
                    (
                        "person",
                        wagtail.blocks.StructBlock(
                            [
                                ("name", wagtail.blocks.CharBlock(label="Jméno")),
                                (
                                    "position",
                                    wagtail.blocks.TextBlock(
                                        label="Pracovní pozice", required=False
                                    ),
                                ),
                                (
                                    "email",
                                    wagtail.blocks.EmailBlock(
                                        label="E-mailová adresa", required=False
                                    ),
                                ),
                            ]
                        ),
                    ),
                    (
                        "person_page",
                        wagtail.blocks.PageChooserBlock(
                            icon="user",
                            label="Stránka osoby",
                            page_type=["home.HomePersonPage"],
                        ),
                    ),
                ],
                blank=True,
                null=True,
                use_json_field=True,
                verbose_name="Akademická rada",
            ),
        ),
    ]
+43 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-08-15 23:51

import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0023_homepage_academic_council"),
    ]

    operations = [
        migrations.AlterField(
            model_name="homepage",
            name="academic_council_description",
            field=wagtail.fields.RichTextField(verbose_name="Akademická rada - popis"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="controller_description",
            field=wagtail.fields.RichTextField(verbose_name="Kontrolor - popis"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="council_members_description",
            field=wagtail.fields.RichTextField(verbose_name="Správní rada - popis"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="director_description",
            field=wagtail.fields.RichTextField(verbose_name="Ředitel - popis"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="employees_description",
            field=wagtail.fields.RichTextField(verbose_name="Zaměstnanci - popis"),
        ),
        migrations.AlterField(
            model_name="homepage",
            name="volunteers_description",
            field=wagtail.fields.RichTextField(verbose_name="Dobrovolníci - popis"),
        ),
    ]
+19 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-19 22:46

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0023_homepage_academic_council"),
    ]

    operations = [
        migrations.AddField(
            model_name="homepersonpage",
            name="name_titles",
            field=models.CharField(
                blank=True, max_length=32, null=True, verbose_name="Tituly"
            ),
        ),
    ]
+33 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-19 23:08

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("wagtailimages", "0025_alter_image_file_alter_rendition_file"),
        ("home", "0024_homepersonpage_name_titles"),
    ]

    operations = [
        migrations.AddField(
            model_name="homearticlepage",
            name="image",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="+",
                to="wagtailimages.image",
                verbose_name="Obrázek",
            ),
        ),
        migrations.AddField(
            model_name="homearticlepage",
            name="show_image_on_homepage",
            field=models.BooleanField(
                default=False, verbose_name="Zobrazovat obrázek na homepage"
            ),
        ),
    ]
+55 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-20 14:17

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("wagtailcore", "0083_workflowcontenttype"),
        ("home", "0025_homearticlepage_image_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="SocialMediaSettings",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "mastodon",
                    models.URLField(blank=True, help_text="Mastodon URL", null=True),
                ),
                (
                    "twitter",
                    models.URLField(blank=True, help_text="Twitter URL", null=True),
                ),
                (
                    "linkedin",
                    models.URLField(blank=True, help_text="LinkedIn URL", null=True),
                ),
                (
                    "facebook",
                    models.URLField(blank=True, help_text="Facebook URL", null=True),
                ),
                (
                    "site",
                    models.OneToOneField(
                        editable=False,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="wagtailcore.site",
                    ),
                ),
            ],
            options={
                "verbose_name": "Sociální sítě",
            },
        ),
    ]
+20 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-20 15:50

from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0026_socialmediasettings"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="homedocumentpage",
            name="tags",
        ),
        migrations.RemoveField(
            model_name="homeeventpage",
            name="tags",
        ),
    ]
+57 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-20 16:06

import django.db.models.deletion
import modelcluster.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("taggit", "0005_auto_20220424_2025"),
        ("home", "0027_remove_homedocumentpage_tags_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="ArticleTag",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.RemoveField(
            model_name="homearticlepage",
            name="tags",
        ),
        migrations.DeleteModel(
            name="Tag",
        ),
        migrations.AddField(
            model_name="articletag",
            name="content_object",
            field=modelcluster.fields.ParentalKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="tagged_items",
                to="home.homearticlepage",
            ),
        ),
        migrations.AddField(
            model_name="articletag",
            name="tag",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="%(app_label)s_%(class)s_items",
                to="taggit.tag",
            ),
        ),
    ]
+25 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-20 16:06

import modelcluster.contrib.taggit
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("taggit", "0005_auto_20220424_2025"),
        ("home", "0028_articletag_remove_homearticlepage_tags_delete_tag_and_more"),
    ]

    operations = [
        migrations.AddField(
            model_name="homearticlepage",
            name="tags",
            field=modelcluster.contrib.taggit.ClusterTaggableManager(
                blank=True,
                help_text="A comma-separated list of tags.",
                through="home.ArticleTag",
                to="taggit.Tag",
                verbose_name="Štítky",
            ),
        ),
    ]
+116 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-20 16:50

import django.db.models.deletion
import django.utils.timezone
import wagtail.contrib.routable_page.models
import wagtail.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("wagtailimages", "0025_alter_image_file_alter_rendition_file"),
        ("wagtailcore", "0083_workflowcontenttype"),
        ("home", "0029_homearticlepage_tags"),
    ]

    operations = [
        migrations.CreateModel(
            name="HomeVideosPage",
            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.RichTextField(
                        blank=True, null=True, verbose_name="Obsah"
                    ),
                ),
            ],
            options={
                "verbose_name": "Rozcestník videí",
            },
            bases=(
                wagtail.contrib.routable_page.models.RoutablePageMixin,
                "wagtailcore.page",
            ),
        ),
        migrations.CreateModel(
            name="HomeVideoPage",
            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",
                    ),
                ),
                (
                    "author",
                    models.CharField(
                        blank=True,
                        max_length=128,
                        null=True,
                        verbose_name="Jméno autora",
                    ),
                ),
                (
                    "date",
                    models.DateField(
                        default=django.utils.timezone.now,
                        verbose_name="Datum vytvoření",
                    ),
                ),
                ("content", wagtail.fields.RichTextField(verbose_name="Obsah")),
                (
                    "embed_url",
                    models.URLField(
                        help_text="Pro získání adresy zmáčkni tlačítko Sdílet, vyber záložku Embed a zaškrtní zobrazování pouze URL.",
                        verbose_name="URL Embedu",
                    ),
                ),
                (
                    "author_page",
                    models.ForeignKey(
                        blank=True,
                        help_text="Pokud je vybrána stránka, není nutno vyplňovat jméno autora níže.",
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="home.homepersonpage",
                        verbose_name="Stránka autora",
                    ),
                ),
                (
                    "thumbnail",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="wagtailimages.image",
                        verbose_name="Náhledový obrázek",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=(
                wagtail.contrib.routable_page.models.RoutablePageMixin,
                "wagtailcore.page",
            ),
        ),
    ]
+16 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-20 16:53

from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0030_homevideospage_homevideopage"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="homevideopage",
            options={"verbose_name": "Video"},
        ),
    ]
+20 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-20 16:54

import wagtail.fields
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0031_alter_homevideopage_options"),
    ]

    operations = [
        migrations.AlterField(
            model_name="homevideopage",
            name="content",
            field=wagtail.fields.RichTextField(
                blank=True, null=True, verbose_name="Obsah"
            ),
        ),
    ]
+12 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.2 on 2023-08-20 18:44

from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0024_alter_homepage_academic_council_description_and_more"),
        ("home", "0032_alter_homevideopage_content"),
    ]

    operations = []
+119 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-21 18:21

import django.db.models.deletion
import modelcluster.contrib.taggit
import modelcluster.fields
import wagtail_color_panel.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        ("home", "0033_merge_20230820_1844"),
    ]

    operations = [
        migrations.CreateModel(
            name="Tag",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(max_length=100, unique=True, verbose_name="name"),
                ),
                (
                    "slug",
                    models.SlugField(
                        allow_unicode=True,
                        max_length=100,
                        unique=True,
                        verbose_name="slug",
                    ),
                ),
                (
                    "bg_color",
                    wagtail_color_panel.fields.ColorField(
                        blank=True, max_length=7, null=True, verbose_name="Barva pozadí"
                    ),
                ),
                (
                    "fg_color",
                    wagtail_color_panel.fields.ColorField(
                        blank=True, max_length=7, null=True, verbose_name="Barva textu"
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="TaggedArticle",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "object_id",
                    models.IntegerField(db_index=True, verbose_name="object ID"),
                ),
                (
                    "content_object",
                    modelcluster.fields.ParentalKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tagged_items",
                        to="home.homearticlepage",
                    ),
                ),
                (
                    "content_type",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="%(app_label)s_%(class)s_tagged_items",
                        to="contenttypes.contenttype",
                        verbose_name="content type",
                    ),
                ),
                (
                    "tag",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="%(app_label)s_%(class)s_items",
                        to="home.tag",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.DeleteModel(
            name="ArticleTag",
        ),
        migrations.AlterField(
            model_name="homearticlepage",
            name="tags",
            field=modelcluster.contrib.taggit.ClusterTaggableManager(
                blank=True,
                help_text="A comma-separated list of tags.",
                through="home.TaggedArticle",
                to="home.Tag",
                verbose_name="Štítky",
            ),
        ),
    ]
+27 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-21 18:26

import wagtail_color_panel.fields
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0034_tag_taggedarticle_delete_articletag_and_more"),
    ]

    operations = [
        migrations.AlterField(
            model_name="tag",
            name="bg_color",
            field=wagtail_color_panel.fields.ColorField(
                default="#fafafa", max_length=7, verbose_name="Barva pozadí"
            ),
        ),
        migrations.AlterField(
            model_name="tag",
            name="fg_color",
            field=wagtail_color_panel.fields.ColorField(
                default="#000000", max_length=7, verbose_name="Barva textu"
            ),
        ),
    ]
+22 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-21 18:44

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0035_alter_tag_bg_color_alter_tag_fg_color"),
    ]

    operations = [
        migrations.AlterField(
            model_name="taggedarticle",
            name="tag",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="article_tags",
                to="home.tag",
            ),
        ),
    ]
+16 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-21 19:06

from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0036_alter_taggedarticle_tag"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="homearticlepage",
            name="tags",
        ),
    ]
+24 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-21 19:06

import modelcluster.contrib.taggit
from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0037_remove_homearticlepage_tags"),
    ]

    operations = [
        migrations.AddField(
            model_name="homearticlepage",
            name="tags",
            field=modelcluster.contrib.taggit.ClusterTaggableManager(
                blank=True,
                help_text="A comma-separated list of tags.",
                through="home.TaggedArticle",
                to="home.Tag",
                verbose_name="Štítky",
            ),
        ),
    ]
+20 −0
Original line number Diff line number Diff line
# Generated by Django 4.2.4 on 2023-08-21 19:09

from django.db import migrations


class Migration(migrations.Migration):
    dependencies = [
        ("home", "0038_homearticlepage_tags"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="taggedarticle",
            name="content_type",
        ),
        migrations.RemoveField(
            model_name="taggedarticle",
            name="object_id",
        ),
    ]
+674 −3
Original line number Diff line number Diff line
from django.db import models

from django.utils import timezone
from modelcluster.contrib.taggit import ClusterTaggableManager
from modelcluster.fields import ParentalKey
from taggit.models import ItemBase, TagBase
from wagtail.admin.panels import (
    FieldPanel,
    InlinePanel,
    MultiFieldPanel,
    ObjectList,
    TabbedInterface,
)
from wagtail.blocks import PageChooserBlock
from wagtail.contrib.routable_page.models import RoutablePageMixin, path
from wagtail.contrib.settings.models import BaseSiteSetting, register_setting
from wagtail.documents import get_document_model
from wagtail.fields import RichTextField, StreamField
from wagtail.models import Page
from wagtail_color_panel.edit_handlers import NativeColorPanel
from wagtail_color_panel.fields import ColorField

from .blocks import PersonBlock

# --- BEGIN Tags ---


class Tag(TagBase):
    bg_color = ColorField(verbose_name="Barva pozadí", default="#fafafa")
    fg_color = ColorField(verbose_name="Barva textu", default="#000000")

    panels = [
        FieldPanel("name"),
        FieldPanel("slug"),
        NativeColorPanel("bg_color"),
        NativeColorPanel("fg_color"),
    ]


class TaggedArticle(ItemBase):
    content_object = ParentalKey(
        "home.HomeArticlePage", on_delete=models.CASCADE, related_name="tagged_items"
    )

    tag = models.ForeignKey(Tag, on_delete=models.CASCADE, related_name="article_tags")


# --- END Tags ---


class HomePage(RoutablePageMixin, Page):
    heading_text = RichTextField(verbose_name="Hlavní text stránky")

    # --- Donations ---

    donation_text = RichTextField(verbose_name="Text pro dary")

    # --- Contact info ---

    address = models.CharField(verbose_name="Sídlo", max_length=128)
    branch = models.CharField(verbose_name="Pobočka", max_length=128)
    email = models.EmailField(verbose_name="Email", max_length=128)
    ds_id = models.CharField(verbose_name="Datová schránka", max_length=128)

    # --- People ---

    director = StreamField(
        [
            ("person", PersonBlock()),
            (
                "person_page",
                PageChooserBlock(
                    page_type="home.HomePersonPage", label="Stránka osoby", icon="user"
                ),
            ),
        ],
        verbose_name="Ředitel",
        use_json_field=True,
        blank=True,
        null=True,
    )
    director_description = RichTextField(verbose_name="Ředitel - popis")

    academic_council = StreamField(
        [
            ("person", PersonBlock()),
            (
                "person_page",
                PageChooserBlock(
                    page_type="home.HomePersonPage", label="Stránka osoby", icon="user"
                ),
            ),
        ],
        verbose_name="Akademická rada",
        use_json_field=True,
        blank=True,
        null=True,
    )
    academic_council_description = RichTextField(verbose_name="Akademická rada - popis")

    controller = StreamField(
        [
            ("person", PersonBlock()),
            (
                "person_page",
                PageChooserBlock(
                    page_type="home.HomePersonPage", label="Stránka osoby", icon="user"
                ),
            ),
        ],
        verbose_name="Kontrolor",
        use_json_field=True,
        blank=True,
        null=True,
    )
    controller_description = RichTextField(verbose_name="Kontrolor - popis")

    council_members = StreamField(
        [
            ("person", PersonBlock()),
            (
                "person_page",
                PageChooserBlock(
                    page_type="home.HomePersonPage", label="Stránka osoby", icon="user"
                ),
            ),
        ],
        verbose_name="Správní rada",
        use_json_field=True,
        blank=True,
        null=True,
    )
    council_members_description = RichTextField(verbose_name="Správní rada - popis")

    volunteers = StreamField(
        [
            ("person", PersonBlock()),
            (
                "person_page",
                PageChooserBlock(
                    page_type="home.HomePersonPage", label="Stránka osoby", icon="user"
                ),
            ),
        ],
        verbose_name="Dobrovolníci",
        use_json_field=True,
        blank=True,
        null=True,
    )
    volunteers_description = RichTextField(verbose_name="Dobrovolníci - popis")

    employees = StreamField(
        [
            ("person", PersonBlock()),
            (
                "person_page",
                PageChooserBlock(
                    page_type="home.HomePersonPage", label="Stránka osoby", icon="user"
                ),
            ),
        ],
        verbose_name="Zaměstnanci",
        use_json_field=True,
        blank=True,
        null=True,
    )
    employees_description = RichTextField(verbose_name="Zaměstnanci - popis")

    subpage_types = [
        "home.HomeArticlesPage",
        "home.HomeEventsPage",
        "home.HomeDocumentsPage",
        "home.HomeVideosPage",
        "home.HomePeoplePage",
    ]

    intro_panels = Page.content_panels + [
        FieldPanel("heading_text", icon="pilcrow"),
        FieldPanel("donation_text", icon="pilcrow"),
        MultiFieldPanel(
            [
                FieldPanel("address", icon="home"),
                FieldPanel("branch", icon="home"),
                FieldPanel("email", icon="pilcrow"),
                FieldPanel("ds_id", icon="mail"),
            ],
            heading="Kontaktní údaje",
        ),
    ]

    people_panels = [
        FieldPanel("director_description", icon="pilcrow"),
        FieldPanel("director", icon="user"),
        FieldPanel("academic_council_description"),
        FieldPanel("academic_council", icon="user"),
        FieldPanel("controller_description", icon="pilcrow"),
        FieldPanel("controller", icon="user"),
        FieldPanel("council_members_description", icon="pilcrow"),
        FieldPanel("council_members", icon="group"),
        FieldPanel("volunteers_description", icon="pilcrow"),
        FieldPanel("volunteers", icon="group"),
        FieldPanel("employees_description", icon="pilcrow"),
        FieldPanel("employees", icon="group"),
    ]

    edit_handler = TabbedInterface(
        [
            ObjectList(intro_panels, heading="Základy"),
            ObjectList(people_panels, heading="Lidé"),
            ObjectList(Page.promote_panels, heading="Propagace"),
        ]
    )

    # Articles

    @property
    def articles_page(self) -> "HomeArticlesPage":
        return HomeArticlesPage.objects.live().first()

    @property
    def latest_articles(self) -> "QuerySet":
        return HomeArticlePage.objects.order_by("-date").live().all()[:3]

    # Events

    @property
    def events_page(self) -> "HomeEventsPage":
        return HomeEventsPage.objects.live().first()

    @property
    def latest_events(self) -> "QuerySet":
        return HomeEventPage.objects.order_by("-date").live().all()[:8]

    # Documents

    @property
    def documents_page(self) -> "HomeDocumentsPage":
        return HomeDocumentsPage.objects.child_of(self).live().first()

    @property
    def latest_documents(self) -> list:
        documents = list(
            HomeDocumentPage.objects.child_of(self.documents_page)
            .order_by("-date")
            .live()
            .all()[:4]
        )

        # Pad documents list so it's always 4 items long
        documents += [None] * (4 - len(documents))

        document_directories = list(
            HomeDocumentsPage.objects.child_of(self.documents_page).live().all()[:4]
        )

        # Replace 0-4 last items in the list with directories
        position_in_documents = 3

        for document_directory in document_directories:
            documents[position_in_documents] = document_directory
            position_in_documents -= 1

        # Then remove the Nones we padded the list with
        return list(filter(lambda document: document is not None, documents))

    # Feed

    @path("feeds/atom/")
    def view_feed(self, request):
        # Avoid circular import
        from .feeds import LatestArticlesFeed  # noqa

        return LatestArticlesFeed()(request, self.articles_page.id)

    class Meta:
        verbose_name = "Domovská stránka"


# --- BEGIN Articles, events, videos and documents ---


class HomeArticlesPage(Page):
    content = RichTextField(verbose_name="Obsah", blank=True, null=True)

    parent_page_type = ["home.HomePage"]
    subpage_types = ["home.HomeArticlePage"]

    content_panels = Page.content_panels + [
        FieldPanel("content", icon="pilcrow"),
    ]

    @property
    def articles(self):
        return HomeArticlePage.objects.live().order_by("-date")

    def get_context(self, request):
        context = super().get_context(request)
        articles = self.articles

        # Filter by tag
        tag = request.GET.get("tag")
        if tag:
            articles = articles.filter(tags__name=tag)
            context["filtered_tag"] = tag

        context["articles"] = articles

        return context

    class Meta:
        verbose_name = "Rozcestník článků"


class HomeEventsPage(Page):
    content = RichTextField(verbose_name="Obsah", blank=True, null=True)

    parent_page_type = ["home.HomePage"]
    subpage_types = ["home.HomeEventPage"]

    content_panels = Page.content_panels + [
        FieldPanel("content", icon="pilcrow"),
    ]

    @property
    def events(self):
        return HomeEventPage.objects.live().order_by("-date").all()

    class Meta:
        verbose_name = "Rozcestník akcí"


class HomeDocumentsPage(Page):
    content = RichTextField(verbose_name="Obsah", blank=True, null=True)

    parent_page_type = ["home.HomePage"]
    subpage_types = ["home.HomeDocumentPage", "home.HomeDocumentsPage"]

    content_panels = Page.content_panels + [
        FieldPanel("content", icon="pilcrow"),
    ]

    @property
    def documents(self):
        documents = list(
            HomeDocumentPage.objects.child_of(self).order_by("-date").live().all()
        )

        document_directories = list(
            HomeDocumentsPage.objects.child_of(self).live().all()
        )

        return documents + document_directories

    class Meta:
        verbose_name = "Rozcestník dokumentů"


class HomeVideosPage(Page):
    content = RichTextField(verbose_name="Obsah", blank=True, null=True)

    parent_page_type = ["home.HomePage"]
    subpage_types = ["home.HomeVideoPage"]

    content_panels = Page.content_panels + [
        FieldPanel("content", icon="pilcrow"),
    ]

    @property
    def videos(self):
        return HomeVideoPage.objects.live().order_by("-date").all()

    class Meta:
        verbose_name = "Rozcestník videí"


class HomeContentPageMixin(Page):
    author_page = models.ForeignKey(
        "home.HomePersonPage",
        on_delete=models.SET_NULL,
        blank=True,
        null=True,
        verbose_name="Stránka autora",
        help_text="Pokud je vybrána stránka, není nutno vyplňovat jméno autora níže.",
    )

    author = models.CharField(
        verbose_name="Jméno autora",
        max_length=128,
        blank=True,
        null=True,
    )

    date = models.DateField(verbose_name="Datum vytvoření", default=timezone.now)

    content = RichTextField(verbose_name="Obsah")

    parent_page_type = ["home.HomeArticlesPage"]

    content_panels = Page.content_panels + [
        MultiFieldPanel(
            [
                FieldPanel("author_page", icon="user"),
                FieldPanel("author", icon="user"),
            ],
            heading="Autor",
        ),
        FieldPanel("date", icon="calendar"),
        FieldPanel("content", icon="pilcrow"),
    ]

    @property
    def shortened_perex(self) -> str:
        if len(self.perex) > 310:
            return self.perex[:300] + "..."

        return self.perex

    class Meta:
        abstract = True


class HomeArticlePage(HomeContentPageMixin):
    image = models.ForeignKey(
        "wagtailimages.Image",
        null=True,
        blank=True,
        on_delete=models.SET_NULL,
        related_name="+",
        verbose_name="Obrázek",
    )

    content = RichTextField(
        verbose_name="Obsah",
        features=[
            "h2",
            "h3",
            "h4",
            "bold",
            "italic",
            "ol",
            "ul",
            "hr",
            "link",
            "document-link",
            "image",
            "embed",
            "footnotes",
        ],
    )

    show_image_on_homepage = models.BooleanField(
        verbose_name="Zobrazovat obrázek na homepage",
        default=False,
    )

    tags = ClusterTaggableManager(
        through=TaggedArticle, blank=True, verbose_name="Štítky"
    )

    perex = models.TextField(verbose_name="Perex")

    content_panels = Page.content_panels + [
        MultiFieldPanel(
            [
                FieldPanel("author_page", icon="user"),
                FieldPanel("author", icon="user"),
            ],
            heading="Autor",
        ),
        MultiFieldPanel(
            [
                FieldPanel("image", icon="image", heading=" "),
                FieldPanel("show_image_on_homepage"),
            ],
            heading="Obrázek",
        ),
        FieldPanel("date", icon="calendar"),
        FieldPanel("perex", icon="pilcrow"),
        FieldPanel("tags", icon="tag"),
        FieldPanel("content", icon="pilcrow"),
        InlinePanel("footnotes", label="Footnotes", icon="pilcrow"),
    ]

    class Meta:
        verbose_name = "Článek"


class HomeEventPage(HomeContentPageMixin):
    date = models.DateField(verbose_name="Datum konání", blank=True, null=True)
    location = models.CharField(
        verbose_name="Místo konání", blank=True, null=True, max_length=64
    )

    content = RichTextField(verbose_name="Obsah", blank=True, null=True)

    content_panels = Page.content_panels + [
        FieldPanel("date", icon="calendar"),
        FieldPanel("location", icon="globe"),
        MultiFieldPanel(
            [
                FieldPanel("author_page", icon="user"),
                FieldPanel("author", icon="user"),
            ],
            heading="Autor",
        ),
        FieldPanel("content", icon="pilcrow"),
    ]

    class Meta:
        verbose_name = "Akce"


class HomeDocumentPage(HomeContentPageMixin):
    document = models.ForeignKey(
        get_document_model(), on_delete=models.PROTECT, verbose_name="Dokument"
    )

    content = RichTextField(verbose_name="Obsah", blank=True, null=True)

    subpage_types = ["home.HomeDocumentPage"]

    content_panels = Page.content_panels + [
        FieldPanel("document", icon="doc-full"),
        MultiFieldPanel(
            [
                FieldPanel("author_page", icon="user"),
                FieldPanel("author", icon="user"),
            ],
            heading="Autor",
        ),
        FieldPanel("date", icon="calendar"),
        FieldPanel("content", icon="pilcrow"),
    ]

    class Meta:
        verbose_name = "Dokument"


class HomeVideoPage(HomeContentPageMixin):
    embed_url = models.URLField(
        verbose_name="URL Embedu",
        help_text="Pro získání adresy zmáčkni tlačítko Sdílet, vyber záložku Embed a zaškrtní zobrazování pouze URL.",
    )

    thumbnail = models.ForeignKey(
        "wagtailimages.Image",
        null=True,
        blank=True,
        on_delete=models.SET_NULL,
        related_name="+",
        verbose_name="Náhledový obrázek",
    )

    content = RichTextField(verbose_name="Obsah", blank=True, null=True)

    content_panels = Page.content_panels + [
        FieldPanel("embed_url", icon="link"),
        FieldPanel("thumbnail", icon="image"),
        MultiFieldPanel(
            [
                FieldPanel("author_page", icon="user"),
                FieldPanel("author", icon="user"),
            ],
            heading="Autor",
        ),
        FieldPanel("date", icon="calendar"),
        FieldPanel("content", icon="pilcrow"),
    ]

    class Meta:
        verbose_name = "Video"


# --- END Articles, events, videos and documents ---
# --- BEGIN People ---


class HomePeoplePage(Page):
    content = RichTextField(verbose_name="Obsah", blank=True, null=True)

    parent_page_type = ["home.HomePage"]
    subpage_types = ["home.HomePersonPage"]

    content_panels = Page.content_panels + [
        FieldPanel("content", icon="pilcrow"),
    ]

    @property
    def people(self):
        return HomePersonPage.objects.live().order_by("title").all()

    class Meta:
        verbose_name = "Rozcestník osob"


class HomePersonPage(Page):
    image = models.ForeignKey(
        "wagtailimages.Image",
        null=True,
        blank=True,
        on_delete=models.SET_NULL,
        related_name="+",
        verbose_name="Profilový obrázek",
    )

    name_titles = models.CharField(
        max_length=32,
        blank=True,
        null=True,
        verbose_name="Tituly",
    )

    position = models.TextField(verbose_name="Pracovní pozice", blank=True, null=True)

    email = models.EmailField(verbose_name="Emailová adresa", blank=True, null=True)

    description = RichTextField(verbose_name="Popis", blank=True, null=True)

    content_panels = Page.content_panels + [
        FieldPanel("name_titles", icon="pilcrow"),
        FieldPanel("image", icon="image"),
        FieldPanel("position", icon="pilcrow"),
        FieldPanel("email", icon="mail"),
        FieldPanel("description", icon="pilcrow"),
    ]

    @property
    def full_name(self) -> str:
        name = self.title

        if self.name_titles is not None:
            name = f"{self.name_titles} {name}"

        return name

    @property
    def inline_position(self) -> str:
        """Returns this person's position formatted to fit on a single line."""

        if self.position is None:
            return None

        split_positions = self.position.split("\n")
        split_positions = [position.strip() for position in split_positions]

        return ", ".join(split_positions)

    class Meta:
        verbose_name = "Osoba"


# --- END People ---
# --- BEGIN Settings ---


@register_setting
class SocialMediaSettings(BaseSiteSetting):
    mastodon = models.URLField(blank=True, null=True, help_text="Mastodon URL")
    twitter = models.URLField(blank=True, null=True, help_text="Twitter URL")
    linkedin = models.URLField(blank=True, null=True, help_text="LinkedIn URL")
    facebook = models.URLField(blank=True, null=True, help_text="Facebook URL")

    panels = [
        MultiFieldPanel(
            [
                FieldPanel("mastodon"),
                FieldPanel("twitter"),
                FieldPanel("linkedin"),
                FieldPanel("facebook"),
            ],
            heading="Nastavení sociálních sítí",
        )
    ]

    class Meta:
        verbose_name = "Sociální sítě"


class HomePage(Page):
    pass
# --- END Settings ---
+8 −0
Original line number Diff line number Diff line
/* bebas-neue-regular - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  src: url('./bebas-neue-v10-latin_latin-ext-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
+28.1 KiB

File added.

No diff preview for this file type.

+126 −0

File added.

Preview size limit exceeded, changes collapsed.

+27.9 KiB

File added.

No diff preview for this file type.

+28 KiB

File added.

No diff preview for this file type.

+374 −0
Original line number Diff line number Diff line
@font-face {
    font-family: "pirati-ui";
    src:
        url("./pirati-ui.eot") format("embedded-opentype"),
        url("./pirati-ui.ttf") format("truetype"),
        url("./pirati-ui.woff") format("woff"),
        url("./pirati-ui.svg") format("svg");
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

[class^="ico--"], [class*=" ico--"] {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: 'pirati-ui' !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ico--mastodon:before {
  content: "\e973";
}
.ico--helios:before {
  content: "\e96e";
}
.ico--redmine:before {
  content: "\e96f";
}
.ico--zulip:before {
  content: "\e970";
}
.ico--forum:before {
  content: "\e971";
}
.ico--pirati:before {
  content: "\e90d";
}
.ico--jitsi:before {
  content: "\e90f";
}
.ico--open-source:before {
  content: "\e90e";
}
.ico--donation-full:before {
  content: "\e96c";
}
.ico--donation-outline:before {
  content: "\e96d";
}
.ico--strategy:before {
  content: "\e932";
}
.ico--pig:before {
  content: "\e928";
}
.ico--thermometer:before {
  content: "\e90a";
}
.ico--menu:before {
  content: "\e933";
}
.ico--chevron-right:before {
  content: "\e923";
}
.ico--chevron-left:before {
  content: "\e924";
}
.ico--chevron-down:before {
  content: "\e925";
}
.ico--chevron-up:before {
  content: "\e926";
}
.ico--link-horizontal:before {
  content: "\e910";
}
.ico--beer:before {
  content: "\e909";
}
.ico--food:before {
  content: "\e968";
}
.ico--dots-three-vertical:before {
  content: "\e940";
}
.ico--dots-three-horizontal:before {
  content: "\e941";
}
.ico--log-out:before {
  content: "\e942";
}
.ico--envelope:before {
  content: "\e908";
}
.ico--pin:before {
  content: "\e943";
}
.ico--at:before {
  content: "\e905";
}
.ico--glass:before {
  content: "\e967";
}
.ico--checkmark:before {
  content: "\e965";
}
.ico--info:before {
  content: "\e901";
}
.ico--question:before {
  content: "\e904";
}
.ico--warning:before {
  content: "\e93f";
}
.ico--code:before {
  content: "\e94a";
}
.ico--checkbox-unchecked:before {
  content: "\e94e";
}
.ico--star-full:before {
  content: "\e94f";
}
.ico--star-empty:before {
  content: "\e950";
}
.ico--bookmark:before {
  content: "\e951";
}
.ico--cog:before {
  content: "\e952";
}
.ico--key:before {
  content: "\e953";
}
.ico--zoom-in:before {
  content: "\e954";
}
.ico--zoom-out:before {
  content: "\e955";
}
.ico--shrink:before {
  content: "\e956";
}
.ico--printer:before {
  content: "\e957";
}
.ico--file-openoffice:before {
  content: "\e958";
}
.ico--user:before {
  content: "\e959";
}
.ico--file-excel:before {
  content: "\e95a";
}
.ico--file-word:before {
  content: "\e95b";
}
.ico--file-pdf:before {
  content: "\e95c";
}
.ico--file-picture:before {
  content: "\e95d";
}
.ico--file-blank:before {
  content: "\e95e";
}
.ico--folder-upload:before {
  content: "\e95f";
}
.ico--upload:before {
  content: "\e960";
}
.ico--cloud-upload:before {
  content: "\e961";
}
.ico--folder-download:before {
  content: "\e962";
}
.ico--download:before {
  content: "\e963";
}
.ico--cloud-download:before {
  content: "\e964";
}
.ico--alarm:before {
  content: "\e900";
}
.ico--calculator:before {
  content: "\e911";
}
.ico--facebook-full:before {
  content: "\e913";
}
.ico--feed:before {
  content: "\e927";
}
.ico--library:before {
  content: "\e929";
}
.ico--office:before {
  content: "\e92a";
}
.ico--attachment:before {
  content: "\e92b";
}
.ico--enlarge:before {
  content: "\e92c";
}
.ico--eye-off:before {
  content: "\e92e";
}
.ico--eye:before {
  content: "\e92f";
}
.ico--share:before {
  content: "\e931";
}
.ico--search:before {
  content: "\e939";
}
.ico--pencil:before {
  content: "\e93c";
}
.ico--lock-open:before {
  content: "\e947";
}
.ico--lock:before {
  content: "\e948";
}
.ico--equalizer:before {
  content: "\e949";
}
.ico--switch:before {
  content: "\e94b";
}
.ico--loop:before {
  content: "\e94c";
}
.ico--refresh:before {
  content: "\e94d";
}
.ico--bullhorn:before {
  content: "\e944";
}
.ico--bin:before {
  content: "\e945";
}
.ico--cross:before {
  content: "\e937";
}
.ico--checkbox-checked:before {
  content: "\e938";
}
.ico--globe:before {
  content: "\e93a";
}
.ico--wikipedia:before {
  content: "\e93b";
}
.ico--youtube:before {
  content: "\e936";
}
.ico--users:before {
  content: "\e934";
}
.ico--book:before {
  content: "\e935";
}
.ico--bubbles:before {
  content: "\e930";
}
.ico--map:before {
  content: "\e914";
}
.ico--compass:before {
  content: "\e915";
}
.ico--folder-open:before {
  content: "\e916";
}
.ico--folder:before {
  content: "\e917";
}
.ico--drawer:before {
  content: "\e918";
}
.ico--stop:before {
  content: "\e919";
}
.ico--github:before {
  content: "\e91a";
}
.ico--clock:before {
  content: "\e91b";
}
.ico--calendar:before {
  content: "\e91c";
}
.ico--flickr:before {
  content: "\e91d";
}
.ico--instagram:before {
  content: "\e91e";
}
.ico--twitter:before {
  content: "\e91f";
}
.ico--newspaper:before {
  content: "\e920";
}
.ico--cart:before {
  content: "\e921";
}
.ico--home:before {
  content: "\e922";
}
.ico--link:before {
  content: "\e912";
}
.ico--power:before {
  content: "\e90c";
}
.ico--rocket:before {
  content: "\e946";
}
.ico--location:before {
  content: "\e906";
}
.ico--phone:before {
  content: "\e907";
}
.ico--linkedin:before {
  content: "\e903";
}
.ico--facebook:before {
  content: "\e902";
}
.ico--envelop:before {
  content: "\e972";
}
.ico--bed:before {
  content: "\e969";
}
.ico--train:before {
  content: "\e96a";
}
.ico--bus:before {
  content: "\e96b";
}
.ico--wheelchair:before {
  content: "\e966";
}
.ico--thumbs-down:before {
  content: "\e93d";
}
.ico--thumbs-up:before {
  content: "\e93e";
}
.ico--anchor:before {
  content: "\e92d";
}
.ico--paw:before {
  content: "\e90b";
}
+35 −0
Original line number Diff line number Diff line
/* source-serif-4-regular - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400;
  src: url('./source-serif-4-v7-latin_latin-ext-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* source-serif-4-italic - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 400;
  src: url('./source-serif-4-v7-latin_latin-ext-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* source-serif-4-700 - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 700;
  src: url('./source-serif-4-v7-latin_latin-ext-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* source-serif-4-700italic - latin_latin-ext */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 700;
  src: url('./source-serif-4-v7-latin_latin-ext-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
+17.2 KiB

17.18 KiB

+2.28 KiB

2.28 KiB

+24 −0
Original line number Diff line number Diff line
<li>
    <div class="flex gap-2">
        {% if self.email %}
            <a class="flex gap-2" href="mailto:{{ self.email }}">
        {% endif %}

                {% if self.position %}
                    <strong>{{ self.name }}</strong>
                {% else %}
                    {{ self.name }}
                {% endif %}

        {% if self.email %}
                <div class="flex items-center">
                    <i class="ico--at text-xl text-pii-cyan"></i>
                </div>
            </a>
        {% endif %}
    </div>

    {% if self.position %}
        <p class="leading-4 whitespace-pre-line">{{ self.position }}</p>
    {% endif %}
</li>
+25 −0
Original line number Diff line number Diff line
<li>
    <div class="flex gap-2">
        <div class="flex gap-2">
            <a href="{{ page.url }}">
                {% if page.position %}
                    <strong>{{ page.full_name }}</strong>
                {% else %}
                    {{ page.full_name }}
                {% endif %}
            </a>

            {% if page.email %}
                <a href="mailto:{{ page.email }}">
                    <div class="flex items-center">
                        <i class="ico--at text-xl text-pii-cyan"></i>
                    </div>
                </a>
            {% endif %}
        </div>
    </div>

    {% if page.position %}
        <p class="leading-4 whitespace-pre-line">{{ page.position }}</p>
    {% endif %}
</li>
+5 −0
Original line number Diff line number Diff line
{% load wagtailcore_tags %}

<p>{{ item.perex }}</p>

{{ item.content|richtext }}
+55 −0
Original line number Diff line number Diff line
{% extends "base.html" %}
{% load static wagtailcore_tags wagtailimages_tags footnotes %}

{% block content %}
<main class="flex flex-col items-center gap-10 pt-14">
    <div class="container">
        <h1 class="font-bebas text-4xl">{{ page.title }}</h1>

        <small class="text-pii-cyan uppercase font-bold">
            {% for tag in page.tags.all %}
                <a
                    href="/clanky?tag={{ tag.name }}"
                    class="px-2 py-0.5 rounded-sm"
                    style="background-color:{{ tag.bg_color }};color:{{ tag.fg_color }}"
                >{{ tag.name }}</a>&nbsp;
            {% endfor %}
        </small>

        <div class="flex flex-col gap-1 mt-3 text-gray-700">
            <div class="flex gap-2 items-center">
                <i class="ico--calendar"></i>
                <div>{{ page.date }}</div>
            </div>

            {% if page.author_page %}
                <a
                    class="flex gap-2 items-center"
                    href="{{ page.author_page.url }}"
                >
                    <i class="ico--user"></i>
                    <div>{{ page.author_page.title }}</div>
                </a>
            {% elif page.author %}
                <div class="flex gap-2 items-center">
                    <i class="ico--user"></i>
                    <div>{{ page.author }}</div>
                </div>
            {% endif %}
        </div>

        <div class="mt-5 prose max-w-screen-md font-serif">
            {% if page.image %}
                {% image page.image original as article_image %}
                <img src="{{ article_image.url }}">
            {% endif %}

            <p class="mb-3">{{ page.perex }}</p>

            {% richtext_footnotes page.content|richtext %}

            {% include "home/includes/footnotes.html" %}
        </div>
    </div>
</main>
{% endblock %}
+66 −0
Original line number Diff line number Diff line
{% extends "base.html" %}
{% load static wagtailcore_tags wagtailimages_tags %}

{% block content %}
<main class="flex flex-col items-center gap-10 pt-14">
    <div class="container">
        <h1 class="font-bebas text-4xl mb-4">{{ page.title }}</h1>

        {% if filtered_tag %}
            <div class="text-gray-500 mb-5">
                <span>Filtrovaný štítek: <strong>{{ filtered_tag }}</strong></span>
                <br>
                <a href="/clanky">
                    <i class="ico--chevron-left"></i>
                    <span class="underline">Zpět na seznam</span>
                </a>
            </div>
        {% endif %}

        {% if page.content %}
            <div class="prose font-serif mb-3">
                {{ page.content|richtext }}
            </div>
        {% endif %}

        <ul class="flex gap-4 flex-wrap">
            {% for article in articles %}
                <li class="bg-pii-cyan lg:h-96 text-white w-full lg:w-80 drop-shadow-lg">
                    <a href="{{ article.url }}">
                        {% if article.image and article.show_image_on_homepage %}
                            {% image article.image max-400x400 as article_image %}
                            <img
                                class="w-full bg-white max-h-48 object-cover"
                                src="{{ article_image.url }}"
                                alt="Náhledový obrázek článku"
                            >
                        {% endif %}

                        <div class="p-7 flex flex-col gap-2 h-full">
                            <small class="text-white uppercase font-bold">
                                {% for tag in article.tags.all %}
                                    <span
                                        class="px-2 py-0.5 rounded-sm"
                                        style="background-color:{{ tag.bg_color }};color:{{ tag.fg_color }}"
                                    >{{ tag.name }}</span>&nbsp;
                                {% endfor %}
                            </small>
                            <h3 class="font-serif text-xl leading-6 font-bold">{{ article.title }}</h3>

                            {% if not article.image or not article.show_image_on_homepage %}
                                <p class="font-serif leading-5 grow">
                                    {{ article.shortened_perex }}
                                </p>
                            {% endif %}

                            <small class="font-serif">
                                Přidáno {{ article.date }}
                            </small>
                        </div>
                    </a>
                </li>
            {% endfor %}
        </ul>
    </div>
</main>
{% endblock %}
+49 −0
Original line number Diff line number Diff line
{% extends "base.html" %}
{% load static wagtailcore_tags %}

{% block content %}
<main class="flex flex-col items-center gap-10 pt-14">
    <div class="container">
        <h1 class="font-bebas text-4xl">{{ page.title }}</h1>

        <div class="flex flex-col gap-1 mt-3 text-gray-700">
            {% if page.date %}
                <div class="flex gap-2 items-center">
                    <i class="ico--calendar"></i>
                    <div>{{ page.date }}</div>
                </div>
            {% endif %}

            {% if page.author_page %}
                <a
                    class="flex gap-2 items-center"
                    href="{{ page.author_page.url }}"
                >
                    <i class="ico--user"></i>
                    <div>{{ page.author_page.title }}</div>
                </a>
            {% elif page.author %}
                <div class="flex gap-2 items-center">
                    <i class="ico--user"></i>
                    <div>{{ page.author }}</div>
                </div>
            {% endif %}
        </div>

        <div class="mt-5 prose max-w-screen-md font-serif">
            {{ page.content|richtext }}
        </div>

        <div class="mt-4">
            <a
                class="text-lg font-bold flex gap-2 items-center"
                href="{{ page.document.url }}"
                target="_blank"
            >
                <i class="ico--download"></i>
                <div class="underline">Stáhnout</div>
            </a>
        </div>
    </div>
</main>
{% endblock %}
+29 −0
Original line number Diff line number Diff line
{% extends "base.html" %}
{% load static wagtailcore_tags %}

{% block content %}
<main class="flex flex-col items-center gap-10 pt-14">
    <div class="container">
        <h1 class="font-bebas text-4xl mb-4">{{ page.title }}</h1>

        {% if page.content %}
            <div class="prose font-serif mb-3">
                {{ page.content|richtext }}
            </div>
        {% endif %}

        <ul class="flex flex-col gap-2 list-disc ml-3 font-serif">
            {% for document in page.documents %}
                <li>
                    <a
                        class="underline"
                        href="{{ document.url }}"
                    >
                        {{ document.title }}
                    </a>
                </li>
            {% endfor %}
        </ul>
    </div>
</main>
{% endblock %}
+45 −0
Original line number Diff line number Diff line
{% extends "base.html" %}
{% load static wagtailcore_tags %}

{% block content %}
<main class="flex flex-col items-center gap-10 pt-14">
    <div class="container">
        <h1 class="font-bebas text-4xl">{{ page.title }}</h1>

        <div class="flex flex-col gap-1 mt-3 text-gray-700">
            {% if page.date %}
                <div class="flex gap-2 items-center">
                    <i class="ico--calendar"></i>
                    <div>{{ page.date }}</div>
                </div>
            {% endif %}

            {% if page.location %}
                <div class="flex gap-2 items-center">
                    <i class="ico--location"></i>
                    <div>{{ page.location }}</div>
                </div>
            {% endif %}

            {% if page.author_page %}
                <a
                    class="flex gap-2 items-center"
                    href="{{ page.author_page.url }}"
                >
                    <i class="ico--user"></i>
                    <div>{{ page.author_page.title }}</div>
                </a>
            {% elif page.author %}
                <div class="flex gap-2 items-center">
                    <i class="ico--user"></i>
                    <div>{{ page.author }}</div>
                </div>
            {% endif %}
        </div>

        <div class="mt-5 prose max-w-screen-md font-serif">
            {{ page.content|richtext }}
        </div>
    </div>
</main>
{% endblock %}
+33 −0
Original line number Diff line number Diff line
{% extends "base.html" %}
{% load static wagtailcore_tags %}

{% block content %}
<main class="flex flex-col items-center gap-10 pt-14">
    <div class="container">
        <h1 class="font-bebas text-4xl mb-4">{{ page.title }}</h1>

        {% if page.content %}
            <div class="prose font-serif mb-3">
                {{ page.content|richtext }}
            </div>
        {% endif %}

        <ul class="flex flex-col gap-2 list-disc ml-3 font-serif">
            {% for event in page.events %}
                <li class="text-gray-500">
                    <a
                        class="flex flex-col flex-wrap"
                        href="{{ event.url }}"
                    >
                        <div class="underline text-black">{{ event.title }}</div>
                        <div>
                            {{ event.date }}{% if event.location %},
                                {{ event.location }}{% endif %}
                        </div>
                    </a>
                </li>
            {% endfor %}
        </ul>
    </div>
</main>
{% endblock %}
+327 −80
Original line number Diff line number Diff line
{% extends "base.html" %}
{% load static %}
{% load static wagtailcore_tags wagtailimages_tags %}

{% block content %}

<nav class="bg-grey-800 py-8 flex justify-center">
    <div class="flex gap-7 container text-white items-center">
        <a
            href="/"
        >
            <img
                class="h-9"
                src="{% static 'images/logo.png' %}"
                alt="Logo"
            >
        </a>

        <div
            class="w-px h-6 bg-white"
        ></div>

        <div class="flex gap-4">
            <a class="nav__item" href="#uvod">Úvod</a>
            <a class="nav__item" href="#aktualne">Aktuálně</a>
            <a class="nav__item" href="#akce">Akce</a>
            <a class="nav__item" href="#dokumenty">Dokumenty</a>
            <a class="nav__item" href="#dary">Dary</a>
            <a class="nav__item" href="#kontakty">Kontakty</a>
            <a class="nav__item" href="#lide">Lidé</a>
        </div>
    </div>
</nav>

<main class="flex flex-col items-center gap-5 pt-14">
<main class="flex flex-col items-center gap-10 pt-14">
    <div class="container flex gap-10">
        <figure class="w-32 flex flex-col gap-2">
        <figure class="w-32 flex-col gap-2 hidden lg:flex">
            <img
                src="{% static 'images/logo_big.png' %}"
                src="{% static 'home/images/logo_big.png' %}"
                alt="Logo"
            >
            <figcaption class="font-sans leading-4">
@@ -44,58 +15,334 @@
                </small>
            </figcaption>
        </figure>
        <div class="prose font-serif leading-6 text-black">
            <h2>Co je naším úkolem?</h2>
        <section class="prose font-serif leading-6 text-black w-full max-w-full lg:max-w-prose" id="uvod">
            {{ page.heading_text|richtext }}
        </section>
    </div>

            <p>
                Politika se často omezuje na dobu výkonu mandátu a na tvorbu komplexních
                a dlouhodobých řešení tak nezbývá vůle ani čas. Institut π ve spolupráci s akademickou
                obcí i dobrovolníky z řad expertů i širší veřejnosti se proto přesně tomu bude věnovat.
            </p>
    <section class="flex justify-center bg-pii-cyan w-full p-10" id="aktualne">
        <div class="container flex flex-col gap-2">
            <h2 class="font-bebas text-white text-3xl uppercase leading-7">Aktuálně</h2>

            <p>
                Institut π iniciuje a rozvíjí diskurz o obtížných a pro životaschopnost demokratické
                společnosti důležitých otázkách. Podílí se na nacházení možných řešení, analyzuje
                výhody a nevýhody různých přístupů a alternativ, otevírá diskuzi o nich a pomáhá je
                uskutečňovat.
            </p>
            <ul class="flex gap-4 lg:h-96 lg:flex-nowrap flex-wrap">
                {% for article in page.latest_articles %}
                    <li class="bg-white lg:w-80">
                        <a href="{{ article.url }}">
                            {% if article.image and article.show_image_on_homepage %}
                                {% image article.image max-400x400 as article_image %}
                                <img
                                    class="w-full max-h-48 object-cover"
                                    src="{{ article_image.url }}"
                                    alt="Náhledový obrázek článku"
                                >
                            {% endif %}

            <p>
                Práce institutu je otevřená a inkluzivní a opírá se především o akademickou radu
                a dobrovolnický kruh. Institut vytváří živnou půdu pro práci a iniciativu odborníků
                i dobrovolníků napříč obory, včetně spolupráce s občanskými aktivisty a organizacemi,
                a to i mezinárodně.
                            <div class="p-7 flex flex-col gap-2 h-full">
                                <small class="text-pii-cyan uppercase font-bold">
                                    {% for tag in article.tags.all %}
                                        <span
                                            class="px-2 py-0.5 rounded-sm"
                                            style="background-color:{{ tag.bg_color }};color:{{ tag.fg_color }}"
                                        >{{ tag.name }}</span>&nbsp;
                                    {% endfor %}
                                </small>
                                <h3 class="font-serif text-xl leading-6 font-bold">{{ article.title }}</h3>

                                {% if not article.image or not article.show_image_on_homepage %}
                                    <p class="font-serif leading-5 grow">
                                        {{ article.shortened_perex }}
                                    </p>
                                {% endif %}

                                <small class="font-serif">
                                    Přidáno {{ article.date }}
                                </small>
                            </div>
                        </a>
                    </li>
                {% endfor %}
            </ul>

            <div class="mt-3">
                <a
                    class="flex gap-2 font-bebas text-white text-2xl uppercase"
                    href="{{ page.articles_page.url }}"
                >
                    <i class="ico--chevron-right"></i>
                    <div>Další články</div>
                </a>
            </div>
        </div>
    </section>

    <div class="flex justify-center bg-pii-cyan w-full p-5">
        <div class="container flex flex-col gap-2">
            <h2 class="font-bebas text-white uppercase">Aktuálně</h2>

            <ul class="flex gap-4 h-80 w-72">
                <li class="bg-white p-5">
                    <a class="flex flex-col gap-2">
                        <small class="text-pii-cyan uppercase font-bold">Společnost</small>
                        <h3 class="font-serif text-lg font-bold">Současný stranický systém v ČR</h3>
                        <p class="font-serif leading-5">
                            Prvního března 2023 proběhla
                            v Pirátském centru v Praze diskuse,
                            organizovaná Institutem Π
                            a věnovaná Pirátům na politické
                            mapě ČR. A to jak ve smyslu
                            geograficko-demografickém, tak ve
                            smyslu čistě politickém
                        </p>
    <section class="container flex flex-col gap-3" id="akce">
        <h2 class="font-bebas text-3xl uppercase leading-7">Akce s naší účastí</h2>

                        <small class="font-serif">
                            Přidáno 23. srpna 2022
        <ul class="flex gap-14">
            <div class="flex flex-col gap-3">
                {% for event in page.latest_events|slice:"0:4" %}
                    <a href="{{ event.url }}" target="_blank">
                        <li class="flex flex-col">
                            {% if event.date or event.location %}
                                <small class="text-pii-cyan uppercase">
                                    {% if event.date %}
                                        {{ event.date.day }}. {{ event.date.month }}. {{ event.date.year }}
                                    {% endif %}
                                    {% if event.location %}
                                        {% if event.date %}
                                            &nbsp;|&nbsp;
                                        {% endif %}
                                        {{ event.location }}
                                    {% endif %}
                                </small>
                            {% endif %}

                            <span
                                class="font-bold font-serif text-xl"
                            >{{ event.title }}</span>
                        </li>
                    </a>
                {% endfor %}
            </div>
            <div class="hidden lg:block">
                {% if page.latest_events|length > 4 %}
                    <div class="flex flex-col gap-3 border-l-2 pl-14 border-pii-cyan">
                        {% for event in page.latest_events|slice:"4:8" %}
                            <a href="{{ event.url }}" target="_blank">
                                <li class="flex flex-col">
                                    {% if event.date or event.location %}
                                        <small class="text-pii-cyan uppercase">
                                            {% if event.date %}
                                                {{ event.date.day }}. {{ event.date.month }}. {{ event.date.year }}
                                            {% endif %}
                                            {% if event.location %}
                                                {% if event.date %}
                                                    &nbsp;|&nbsp;
                                                {% endif %}
                                                {{ event.location }}
                                            {% endif %}
                                        </small>
                                    {% endif %}

                                    <span
                                        class="font-bold font-serif text-xl"
                                    >{{ event.title }}</span>
                                </li>
                            </a>
                        {% endfor %}
                    </div>
                {% endif %}
            </div>
        </ul>

        <a
            class="flex gap-2 font-bebas text-2xl uppercase mt-4"
            href="{{ page.events_page.url }}"
        >
            <i class="ico--chevron-right"></i>
            <div>Další akce</div>
        </a>
    </section>

    <section class="flex justify-center bg-grey-50 p-10 w-full lg:flex-nowrap flex-wrap" id="dokumenty">
        <div class="container">
            <div class="flex flex-col gap-3">
                <h2 class="font-bebas text-3xl uppercase leading-7">Dokumenty</h2>

                <ul class="flex flex-col lg:grid lg:grid-cols-3 lg:grid-rows-2 gap-y-3 gap-x-6 grid-flow-col">
                    {% for document in page.latest_documents %}
                        <li>
                            <a
                                href="{{ document.url }}"
                                target="_blank"
                            >
                                <h3 class="font-serif leading-4">
                                    {{ document.title }}
                                </h3>
                                {% if document.date %}
                                    <small class="font-serif">Přidáno {{ document.date }}</small>
                                {% endif %}
                            </a>
                        </li>
                    {% endfor %}
                </ul>
            </div>
            <a
                class="flex gap-2 font-bebas text-2xl uppercase mt-4"
                href="{{ page.documents_page.url }}"
            >
                <i class="ico--chevron-right"></i>
                <div>Další dokumenty</div>
            </a>
        </div>
</main>
    </section>

    <section class="container flex flex-col gap-3">
        <span class="invisible relative top-[-8rem]" id="finance"></span>

        <h2 class="font-bebas text-3xl uppercase leading-7">Finance</h2>

        <div>
            <h3 class="font-serif text-2xl font-bold">Podpořte institut π</h3>

{% endblock content %}
            <div class="prose font-serif leading-5 max-w-4xl">
                {{ self.donation_text|richtext }}
            </div>
        </div>
    </section>

    <section class="flex justify-center bg-grey-50 p-10 w-full">
        <span class="invisible relative top-[-8rem]" id="kontakty"></span>

        <div class="container flex flex-col gap-3">
            <h2 class="font-bebas text-3xl uppercase leading-7">Kontakty</h2>

            <ul class="flex flex-col lg:grid lg:grid-cols-3 lg:grid-rows-2 lg:grid-flow-col gap-y-3 gap-x-20">
                <li>
                    <h3 class="text-pii-cyan uppercase leading-3 text-sm">Sídlo</h3>
                    <span class="font-serif">{{ page.address }}</span>
                </li>
                <li>
                    <h3 class="text-pii-cyan uppercase leading-3 text-sm">Pobočka</h3>
                    <span class="font-serif">{{ page.branch }}</span>
                </li>
                <li>
                    <h3 class="text-pii-cyan uppercase leading-3 text-sm">Email</h3>
                    <a
                        href="mailto:{{ page.email }}"
                        class="font-serif flex gap-2"
                    >
                        <div>{{ page.email }}</div>

                        <div class="flex items-center">
                            <i class="ico--at text-xl text-pii-cyan"></i>
                        </div>
                    </a>
                </li>
                <li>
                    <h3 class="text-pii-cyan uppercase leading-3 text-sm">Datová schránka</h3>
                    <span class="font-serif">{{ page.ds_id }}</span>
                </li>
            </ul>
        </div>
    </section>

    <section class="container flex flex-col gap-3">
        <span class="invisible relative top-[-8rem]" id="lide"></span>

        <h2 class="font-bebas text-3xl uppercase leading-7">Lidé</h2>

        <div class="flex flex-col lg:grid lg:grid-cols-3 gap-20 min-h-screen">
            <div class="flex flex-col gap-5 font-serif">
                <section class="flex flex-col gap-4">
                    <h3 class="text-2xl font-bold">Ředitel</h3>
                    <div>
                        {{ page.director_description|richtext }}
                    </div>

                    <ul class="flex flex-col gap-3">
                        {% for block in page.director %}
                            {% if block.block_type == "person" %}
                                {% include_block block %}
                            {% else %}
                                {% include "home/blocks/person_page_block.html" with page=block.value %}
                            {% endif %}
                        {% endfor %}
                    </ul>
                </section>

                <section class="flex flex-col gap-4">
                    <h3 class="text-2xl font-bold">Akademická rada</h3>
                    <div>
                        {{ page.academic_council_description|richtext }}
                    </div>

                    <ul class="flex flex-col gap-3">
                        {% for block in page.academic_council %}
                            {% if block.block_type == "person" %}
                                {% include_block block %}
                            {% else %}
                                {% include "home/blocks/person_page_block.html" with page=block.value %}
                            {% endif %}
                        {% endfor %}
                    </ul>
                </section>
            </div>

            <div class="flex flex-col gap-5 font-serif">
                <section class="flex flex-col gap-4">
                    <h3 class="text-2xl font-bold">Kontrolor</h3>
                    <div>
                        {{ page.controller_description|richtext }}
                    </div>

                    <ul class="flex flex-col gap-3">
                        {% for block in page.controller %}
                            {% if block.block_type == "person" %}
                                {% include_block block %}
                            {% else %}
                                {% include "home/blocks/person_page_block.html" with page=block.value %}
                            {% endif %}
                        {% endfor %}
                    </ul>
                </section>
                <section class="flex flex-col gap-4">
                    <h3 class="text-2xl font-bold">Správní rada</h3>

                    <div>
                        {{ page.council_members_description|richtext }}
                    </div>

                    <ul class="flex flex-col gap-3">
                        {% for block in page.council_members %}
                            {% if block.block_type == "person" %}
                                {% include_block block %}
                            {% else %}
                                {% include "home/blocks/person_page_block.html" with page=block.value %}
                            {% endif %}
                        {% endfor %}
                    </ul>
                </section>
            </div>
            <div class="font-serif">
                <section class="flex flex-col gap-4">
                    <h3 class="text-2xl font-bold">Dobrovolnický kruh</h3>
                    <div>
                        {{ page.volunteers_description|richtext }}
                    </div>
                    <h4>
                        <strong>Členové dobrovolnického kruhu</strong>
                    </h4>
                    <ul class="flex flex-col leading-5">
                        {% for block in page.volunteers %}
                            {% if block.block_type == "person" %}
                                {% include_block block %}
                            {% else %}
                                {% include "home/blocks/person_page_block.html" with page=block.value %}
                            {% endif %}
                        {% endfor %}
                    </ul>
                </section>
            </div>
        </div>

        <section class="flex flex-col gap-3 mb-16">
            <h3 class="font-bold font-serif text-2xl">Zaměstnanci</h3>

            <ul class="flex flex-col lg:grid lg:grid-cols-3 lg:grid-rows-3 gap-y-2 gap-x-4 grid-flow-col font-serif">
                <div class="leading-5">
                    {{ page.employees_description|richtext }}
                </div>

                {% for block in page.employees %}
                    {% if block.block_type == "person" %}
                        {% include_block block %}
                    {% else %}
                        {% include "home/blocks/person_page_block.html" with page=block.value %}
                    {% endif %}
                {% endfor %}
            </ul>
        </section>
    </section>
</main>
{% endblock %}
+33 −0
Original line number Diff line number Diff line
{% extends "base.html" %}
{% load static wagtailcore_tags %}

{% block content %}
<main class="flex flex-col items-center gap-10 pt-14">
    <div class="container">
        <h1 class="font-bebas text-4xl mb-4">{{ page.title }}</h1>

        {% if page.content %}
            <div class="prose font-serif mb-3">
                {{ page.content|richtext }}
            </div>
        {% endif %}

        <ul class="flex flex-col gap-2 list-disc ml-3 font-serif">
            {% for person in page.people %}
                <li>
                    <div class="flex flex-col">
                        <a
                            class="underline"
                            href="{{ person.url }}"
                        >{{ person.full_name }}</a>

                        {% if person.position %}
                            <span class="text-gray-500">{{ person.inline_position }}</span>
                        {% endif %}
                    </div>
                </li>
            {% endfor %}
        </ul>
    </div>
</main>
{% endblock %}
+44 −0
Original line number Diff line number Diff line
{% extends "base.html" %}
{% load static wagtailcore_tags wagtailimages_tags %}

{% block content %}
<main class="flex justify-center pt-14">
    <div class="container flex flex-col gap-5">
        <div class="flex gap-3">
            {% if page.image %}
                {% image page.image max-400x400 as profile_image %}

                <img
                    class="rounded-full w-40 h-40"
                    src="{{ profile_image.url }}"
                    alt="Profilový obrázek osoby {{ page.full_name }}"
                >
            {% endif %}
            <div class="flex flex-col">
                <h1 class="font-bebas text-4xl">{{ page.full_name }}</h1>

                {% if page.position %}
                    <div class="text-gray-500 whitespace-pre-line font-serif">{{ page.position }}</div>
                {% endif %}

                {% if page.email %}
                    <hr class="my-2">

                    <a class="flex gap-2 font-serif text-gray-500" href="mailto:{{ page.email }}">
                        <div class="flex items-center">
                            <i class="ico--at text-xl"></i>
                        </div>
                        <span>{{ page.email }}</span>
                    </a>
                {% endif %}
            </div>
        </div>

        {% if page.description %}
            <div class="prose max-w-screen-md font-serif">
                {{ page.description|richtext }}
            </div>
        {% endif %}
    </div>
</main>
{% endblock %}
+50 −0
Original line number Diff line number Diff line
{% extends "base.html" %}
{% load static wagtailcore_tags %}

{% block content %}
<main class="flex flex-col items-center gap-10 pt-14">
    <div class="container">
        <h1 class="font-bebas text-4xl">{{ page.title }}</h1>

        <div class="flex flex-col gap-1 mt-3 text-gray-700">
            {% if page.date %}
                <div class="flex gap-2 items-center">
                    <i class="ico--calendar"></i>
                    <div>{{ page.date }}</div>
                </div>
            {% endif %}

            {% if page.author_page %}
                <a
                    class="flex gap-2 items-center"
                    href="{{ page.author_page.url }}"
                >
                    <i class="ico--user"></i>
                    <div>{{ page.author_page.title }}</div>
                </a>
            {% elif page.author %}
                <div class="flex gap-2 items-center">
                    <i class="ico--user"></i>
                    <div>{{ page.author }}</div>
                </div>
            {% endif %}
        </div>

        {% if page.content %}
            <div class="mt-5 prose max-w-screen-md font-serif">
                {{ page.content|richtext }}
            </div>
        {% endif %}

        <div class="mt-5 lg:mt-7 flex justify-center">
            <iframe
                class="lg:w-[850px] lg:h-[478px] md:w-[600px] md:h-[366px] w-full h-[200px]"
                src="{{ page.embed_url }}"
                frameborder="0"
                allowfullscreen=""
                sandbox="allow-same-origin allow-scripts allow-popups"
            ></iframe>
        </div>
    </div>
</main>
{% endblock %}
+42 −0
Original line number Diff line number Diff line
{% extends "base.html" %}
{% load static wagtailcore_tags wagtailimages_tags %}

{% block content %}
<main class="flex flex-col items-center gap-10 pt-14">
    <div class="container">
        <h1 class="font-bebas text-4xl mb-4">{{ page.title }}</h1>

        {% if page.content %}
            <div class="prose font-serif mb-5">
                {{ page.content|richtext }}
            </div>
        {% endif %}

        <ul class="flex flex-col gap-5 font-serif">
            {% for video in page.videos %}
                <a href="{{ video.url }}">
                    <li class="
                        flex gap-6 md:flex-row flex-col
                        {% if not forloop.last %}
                            border-b border-gray-100 pb-5
                        {% endif %}
                    ">
                        <div class="drop-shadow-lg bg-white">
                            {% image video.thumbnail max-500x500 as thumbnail_image %}
                            <img
                                class="md:h-40 md:w-64 w-full max-h-48 object-cover"
                                src="{{ thumbnail_image.url }}"
                                alt="Náhledový obrázek videa"
                            >
                        </div>
                        <div class="flex flex-col">
                            <h2 class="text-lg font-bold">{{ video.title }}</h2>
                            <span class="text-gray-500">{{ video.date }}</span>
                        </div>
                    </li>
                </a>
            {% endfor %}
        </ul>
    </div>
</main>
{% endblock %}
+20 −0

File added.

Preview size limit exceeded, changes collapsed.

+43 −0

File added.

Preview size limit exceeded, changes collapsed.

+16 −3

File changed.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Diff line number Diff line
from .base import *

DEBUG = False
SECRET_KEY = env.str("SECRET_KEY")
ALLOWED_HOSTS = env.list("ALLOWED_HOSTS")

try:
    from .local import *
−5.32 KiB

5.32 KiB

+11 −7

File changed.

Preview size limit exceeded, changes collapsed.

+13 −12

File changed.

Preview size limit exceeded, changes collapsed.

+139 −1

File changed.

Preview size limit exceeded, changes collapsed.

+4 −3

File changed.

Preview size limit exceeded, changes collapsed.

node_modules/.bin/acorn

deleted120000 → 0
+0 −1
Original line number Diff line number Diff line
../acorn/bin/acorn
 No newline at end of file