Skip to content
Snippets Groups Projects
Commit 8f794034 authored by OndraPetrzilka's avatar OndraPetrzilka
Browse files

tags on work_article_preview, main article page with tag edited, contact box...

tags on work_article_preview, main article page with tag edited, contact box block with image, program page icon changed to image
parent 5964e6f0
Branches
No related tags found
3 merge requests!607Pirati.cz,!589Feature/pirati cz ondra,!575Feature/pirati cz
Pipeline #9427 passed
...@@ -125,6 +125,7 @@ class PersonContactBlock(StructBlock): ...@@ -125,6 +125,7 @@ class PersonContactBlock(StructBlock):
class PersonContactBoxBlock(CTAMixin, StructBlock): class PersonContactBoxBlock(CTAMixin, StructBlock):
title = CharBlock(label="Titulek") title = CharBlock(label="Titulek")
image = ImageChooserBlock(label="Ikona")
subtitle = CharBlock(label="Podtitulek") subtitle = CharBlock(label="Podtitulek")
......
# Generated by Django 4.0.7 on 2022-08-25 05:55
from django.db import migrations
import wagtail.blocks
import wagtail.fields
import wagtail.images.blocks
class Migration(migrations.Migration):
dependencies = [
('main', '0020_alter_mainhomepage_content'),
]
operations = [
migrations.AlterField(
model_name='maincontactpage',
name='contact_boxes',
field=wagtail.fields.StreamField([('item', wagtail.blocks.StructBlock([('button_link', wagtail.blocks.URLBlock(label='Odkaz tlačítka')), ('button_text', wagtail.blocks.CharBlock(label='Text tlačítka')), ('title', wagtail.blocks.CharBlock(label='Titulek')), ('image', wagtail.images.blocks.ImageChooserBlock(label='Ikona')), ('subtitle', wagtail.blocks.CharBlock(label='Podtitulek'))]))], blank=True, use_json_field=None, verbose_name='Kontaktní boxy'),
),
]
...@@ -7,9 +7,10 @@ ...@@ -7,9 +7,10 @@
{{ article_page.title }} {{ article_page.title }}
</h2> </h2>
<div class="flex font-bold mb-4 text-xs text-white uppercase"> <div class="flex font-bold mb-4 text-xs text-white uppercase">
{# TODO tags #} <span class="bg-green-400 mr-1 p-2">{{ article_page.date }}</span>
{# <span class="bg-green-400 mr-1 p-2">Duben 2022</span>#} {% for tag in article_page.tags.all %}
{# <span class="bg-violet-400 mr-1 p-2">#ENERGETIKA</span>#} <span class="bg-violet-400 mr-1 p-2">{{ tag }}</span>
{% endfor %}
</div> </div>
<p class="mb-8"> <p class="mb-8">
{{ article_page.perex }} {{ article_page.perex }}
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block content %} {% block content %}
{% image page.image max-1920x800 as main_img %} {% image page.image max-1920x800 as main_img %}
{% with before_title=page.date after_title=page.after_name subtitle=page.position image_url=main_img.url %} {% with before_title=page.date image_url=main_img.url %}
{% include 'main/includes/layout/photo_page_header.html' %} {% include 'main/includes/layout/photo_page_header.html' %}
{% endwith %} {% endwith %}
{# {% routablepageurl page.root_page.articles_page "tags" as articles_tag_page_url %}#} {# {% routablepageurl page.root_page.articles_page "tags" as articles_tag_page_url %}#}
......
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
<div class="contact-box"> <div class="contact-box">
<div> <div>
<div class="h-16 mx-auto w-16"> <div class="h-16 mx-auto w-16">
hm, image... {% image contact_block.value.image fill-150x150 as contact_box_image %}
<img src="{{ contact_box_image.url }}" alt="{{ contact_block.title }}">
</div> </div>
<h3 class="font-alt mb-3 text-xl"> <h3 class="font-alt mb-3 text-xl">
{{ contact_block.value.title }} {{ contact_block.value.title }}
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
{% for program_group in page.program %} {% for program_group in page.program %}
{% for item in program_group.value.point_list %} {% for item in program_group.value.point_list %}
<div class="flex mb-6"> <div class="flex mb-6">
<i class="{{ item.icon }} mr-6 text-6xl"></i> {% image item.icon fill-150x150 as icon %}
<img src="{{ icon.url }}" alt="{{ item.title }}" class="mr-6 text-6xl">
<div class="flex flex-col"> <div class="flex flex-col">
<h3 class="font-alt mb-4 text-4xl"> <h3 class="font-alt mb-4 text-4xl">
{{ item.title }} {{ item.title }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment