-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move common blocks from pages to common, add edition page, minor tweaks.
- Loading branch information
Showing
27 changed files
with
195 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,3 +135,4 @@ assets/webpack_bundles/ | |
assets/bundles/ | ||
node_modules/ | ||
webpack-stats.json | ||
*.old |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Generated by Django 3.1.4 on 2021-02-25 09:41 | ||
|
||
import common.blocks | ||
from django.db import migrations | ||
import wagtail.core.blocks | ||
import wagtail.core.fields | ||
import wagtail.images.blocks | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('agenda', '0009_auto_20210112_1356'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='edition', | ||
name='content', | ||
field=wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('event_index', wagtail.core.blocks.StructBlock([('index', wagtail.core.blocks.PageChooserBlock(page_type=['agenda.EventIndex'])), ('shown_posts', wagtail.core.blocks.IntegerBlock(min_value=1))])), ('header', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock(features=['h1', 'h2', 'h3', 'h4', 'bold', 'italic', 'ol', 'ul', 'link', 'document-link'])), ('buttons', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('name', wagtail.core.blocks.CharBlock(max_length=100)), ('link_page', wagtail.core.blocks.PageChooserBlock(required=False)), ('link_url', wagtail.core.blocks.URLBlock(required=False))]), default=[], required=False))])), ('section_title', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_subtitle', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_divider', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('dropdown', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('content', wagtail.core.blocks.RichTextBlock())])), ('photo_gallery', wagtail.core.blocks.StructBlock([('image_height', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('image_width', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('crop_to_fit', wagtail.core.blocks.BooleanBlock(default=False, required=False)), ('photos', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock(required=False)), ('photo', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.core.blocks.URLBlock(required=False))])))])), ('map', wagtail.core.blocks.StructBlock([('center_longitude', wagtail.core.blocks.FloatBlock()), ('center_latitude', wagtail.core.blocks.FloatBlock()), ('zoom', wagtail.core.blocks.FloatBlock()), ('bearing', wagtail.core.blocks.FloatBlock()), ('pitch', wagtail.core.blocks.FloatBlock()), ('markers', wagtail.core.blocks.ListBlock(common.blocks.MapMarker)), ('placeholder', wagtail.images.blocks.ImageChooserBlock(help_text='Insert a screenshot of the map here'))])), ('raw_html', wagtail.core.blocks.RawHTMLBlock())], blank=True, null=True, verbose_name='content'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.1.4 on 2021-02-25 10:01 | ||
|
||
import common.blocks | ||
from django.db import migrations | ||
import wagtail.core.blocks | ||
import wagtail.core.fields | ||
import wagtail.images.blocks | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('agenda', '0010_edition_content'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='edition', | ||
name='content_en', | ||
field=wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('event_index', wagtail.core.blocks.StructBlock([('index', wagtail.core.blocks.PageChooserBlock(page_type=['agenda.EventIndex'])), ('shown_posts', wagtail.core.blocks.IntegerBlock(min_value=1))])), ('header', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock(features=['h1', 'h2', 'h3', 'h4', 'bold', 'italic', 'ol', 'ul', 'link', 'document-link'])), ('buttons', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('name', wagtail.core.blocks.CharBlock(max_length=100)), ('link_page', wagtail.core.blocks.PageChooserBlock(required=False)), ('link_url', wagtail.core.blocks.URLBlock(required=False))]), default=[], required=False))])), ('section_title', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_subtitle', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_divider', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('dropdown', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('content', wagtail.core.blocks.RichTextBlock())])), ('photo_gallery', wagtail.core.blocks.StructBlock([('image_height', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('image_width', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('crop_to_fit', wagtail.core.blocks.BooleanBlock(default=False, required=False)), ('photos', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock(required=False)), ('photo', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.core.blocks.URLBlock(required=False))])))])), ('map', wagtail.core.blocks.StructBlock([('center_longitude', wagtail.core.blocks.FloatBlock()), ('center_latitude', wagtail.core.blocks.FloatBlock()), ('zoom', wagtail.core.blocks.FloatBlock()), ('bearing', wagtail.core.blocks.FloatBlock()), ('pitch', wagtail.core.blocks.FloatBlock()), ('markers', wagtail.core.blocks.ListBlock(common.blocks.MapMarker)), ('placeholder', wagtail.images.blocks.ImageChooserBlock(help_text='Insert a screenshot of the map here'))])), ('raw_html', wagtail.core.blocks.RawHTMLBlock())], blank=True, null=True, verbose_name='content'), | ||
), | ||
migrations.AddField( | ||
model_name='edition', | ||
name='content_pl', | ||
field=wagtail.core.fields.StreamField([('paragraph', wagtail.core.blocks.RichTextBlock()), ('image', wagtail.images.blocks.ImageChooserBlock()), ('event_index', wagtail.core.blocks.StructBlock([('index', wagtail.core.blocks.PageChooserBlock(page_type=['agenda.EventIndex'])), ('shown_posts', wagtail.core.blocks.IntegerBlock(min_value=1))])), ('header', wagtail.core.blocks.StructBlock([('content', wagtail.core.blocks.RichTextBlock(features=['h1', 'h2', 'h3', 'h4', 'bold', 'italic', 'ol', 'ul', 'link', 'document-link'])), ('buttons', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('name', wagtail.core.blocks.CharBlock(max_length=100)), ('link_page', wagtail.core.blocks.PageChooserBlock(required=False)), ('link_url', wagtail.core.blocks.URLBlock(required=False))]), default=[], required=False))])), ('section_title', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_subtitle', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('section_divider', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock())])), ('dropdown', wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock()), ('content', wagtail.core.blocks.RichTextBlock())])), ('photo_gallery', wagtail.core.blocks.StructBlock([('image_height', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('image_width', wagtail.core.blocks.IntegerBlock(default=200, max_value=2000, min_value=0)), ('crop_to_fit', wagtail.core.blocks.BooleanBlock(default=False, required=False)), ('photos', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock([('title', wagtail.core.blocks.TextBlock(required=False)), ('photo', wagtail.images.blocks.ImageChooserBlock()), ('link', wagtail.core.blocks.URLBlock(required=False))])))])), ('map', wagtail.core.blocks.StructBlock([('center_longitude', wagtail.core.blocks.FloatBlock()), ('center_latitude', wagtail.core.blocks.FloatBlock()), ('zoom', wagtail.core.blocks.FloatBlock()), ('bearing', wagtail.core.blocks.FloatBlock()), ('pitch', wagtail.core.blocks.FloatBlock()), ('markers', wagtail.core.blocks.ListBlock(common.blocks.MapMarker)), ('placeholder', wagtail.images.blocks.ImageChooserBlock(help_text='Insert a screenshot of the map here'))])), ('raw_html', wagtail.core.blocks.RawHTMLBlock())], blank=True, null=True, verbose_name='content'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% extends "common/page.html" %} | ||
{% load wagtailcore_tags %} | ||
|
||
{% block content %} | ||
{% include 'agenda/partials/edition_header.html' %} | ||
|
||
{% if page.content %} | ||
{% include_block page.content %} | ||
{% endif %} | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% extends 'common/post_index_base.html' %} | ||
|
||
{% block single_post %} | ||
{% include 'agenda/partials/edition_index_single.html' with edition=post %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% extends 'common/partials/post_base_header.html' %} | ||
{% load i18n %} | ||
{% load wagtailcore_tags %} | ||
|
||
|
||
{% block details %} | ||
<div class="event-header_details"> | ||
{% if page.start_date %} | ||
<p>{% trans 'Date' %}: <span class="event-header_details_value">{{ page.start_date }}{% if page.end_date %} | ||
- {{ page.end_date }}{% endif %}</span></p> | ||
{% endif %} | ||
</div> | ||
{% endblock details %} |
13 changes: 13 additions & 0 deletions
13
agenda/templates/agenda/partials/edition_index_single.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{% load i18n %} | ||
{% load common_tags %} | ||
|
||
<a href="{{ edition.url }}" class="post_base-list__single-post"> | ||
{% responsive_img edition.get_featured_image 'fill-350x350' 'post_base-list__image' %} | ||
<div class="post_base-list__post-info"> | ||
<div class="post_base-list__info-container"> | ||
<p class="post_base-list__title">{{ edition.title }}</p> | ||
<p class="post_base-list__post-content">{% get_description edition %}</p> | ||
</div> | ||
<p class="post_base-list__read-more">{% trans 'Read more...' %}</p> | ||
</div> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,6 @@ | |
|
||
&--image-link { | ||
transition: 0.3s; | ||
margin: 0 15px; | ||
display: block; | ||
|
||
&:hover { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.