Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
73 additions
and
0 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
28 changes: 28 additions & 0 deletions
28
network-api/networkapi/wagtailpages/migrations/0030_auto_20180619_1746.py
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,28 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.12 on 2018-06-19 17:46 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
import wagtail.core.blocks | ||
import wagtail.core.fields | ||
import wagtail.images.blocks | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('wagtailpages', '0029_auto_20180618_2116'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='modularpage', | ||
name='body', | ||
field=wagtail.core.fields.StreamField((('heading', wagtail.core.blocks.CharBlock()), ('paragraph', wagtail.core.blocks.RichTextBlock(features=['bold', 'italic', 'h2', 'h3', 'h4', 'h5', 'ol', 'ul', 'link', 'hr'])), ('image', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('altText', wagtail.core.blocks.CharBlock(help_text='Image description (for screen readers).', required=True)), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('captionURL', wagtail.core.blocks.CharBlock(help_text='Optional URL that this caption should link out to.', required=False))))), ('image_text', wagtail.core.blocks.StructBlock((('text', wagtail.core.blocks.RichTextBlock(features=['bold', 'italic', 'link'])), ('image', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('altText', wagtail.core.blocks.CharBlock(help_text='Image description (for screen readers).', required=True))))), ('ordering', wagtail.core.blocks.ChoiceBlock(choices=[('left', 'Image on the left'), ('right', 'Image on the right')]))))), ('image_text2', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('altText', wagtail.core.blocks.CharBlock(help_text='Image description (for screen readers).', required=True)), ('text', wagtail.core.blocks.RichTextBlock(features=['link', 'h2', 'h3', 'h4', 'h5', 'h6'])), ('url', wagtail.core.blocks.CharBlock(help_text='Optional URL that this image should link out to.', required=False)), ('small', wagtail.core.blocks.BooleanBlock(help_text='Use smaller, fixed image size (eg: icon)', required=False))))), ('figure', wagtail.core.blocks.StructBlock((('figure', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('altText', wagtail.core.blocks.CharBlock(help_text='Image description (for screen readers).', required=True)), ('alignment', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Do not apply any explicit alignment classes.'), ('left-align', 'Left-align this image with the page content.'), ('right-align', 'Right-align this image with the page content.'), ('center', 'Center this image with the page content.'), ('full-width', 'Make this image full-width.')], required=False))))), ('caption', wagtail.core.blocks.CharBlock(help_text='Please remember to properly attribute any images we use.', required=False)), ('url', wagtail.core.blocks.CharBlock(help_text='Optional URL that this figure should link out to.', required=False))))), ('figuregrid', wagtail.core.blocks.StructBlock((('grid_items', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock((('figure', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('altText', wagtail.core.blocks.CharBlock(help_text='Image description (for screen readers).', required=True)), ('alignment', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Do not apply any explicit alignment classes.'), ('left-align', 'Left-align this image with the page content.'), ('right-align', 'Right-align this image with the page content.'), ('center', 'Center this image with the page content.'), ('full-width', 'Make this image full-width.')], required=False))))), ('caption', wagtail.core.blocks.CharBlock(help_text='Please remember to properly attribute any images we use.', required=False)), ('url', wagtail.core.blocks.CharBlock(help_text='Optional URL that this figure should link out to.', required=False)))))),))), ('figuregrid2', wagtail.core.blocks.StructBlock((('grid_items', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('caption', wagtail.core.blocks.CharBlock(help_text='Please remember to properly attribute any images we use.', required=False)), ('url', wagtail.core.blocks.CharBlock(help_text='Optional URL that this figure should link out to.', required=False)))))),))), ('video', wagtail.core.blocks.StructBlock((('url', wagtail.core.blocks.CharBlock(help_text='Please make sure this is a proper embed URL, or your video will not show up on the page.')), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('captionURL', wagtail.core.blocks.CharBlock(help_text='Optional URL for caption to link to.', required=False))))), ('iframe', wagtail.core.blocks.StructBlock((('url', wagtail.core.blocks.CharBlock(help_text='Please note that only URLs from white-listed domains will work.')), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('captionURL', wagtail.core.blocks.CharBlock(help_text='Optional URL that this caption should link out to.', required=False))))), ('linkbutton', wagtail.core.blocks.StructBlock((('label', wagtail.core.blocks.CharBlock()), ('URL', wagtail.core.blocks.CharBlock()), ('styling', wagtail.core.blocks.ChoiceBlock(choices=[('btn-primary', 'Primary button'), ('btn-secondary', 'Secondary button'), ('btn-success', 'Success button'), ('btn-info', 'Info button'), ('btn-warning', 'Warning button'), ('btn-danger', 'Danger button'), ('btn-ghost', 'Ghost button')])), ('outline', wagtail.core.blocks.BooleanBlock(default=False, required=False))))), ('spacer', wagtail.core.blocks.StructBlock((('size', wagtail.core.blocks.ChoiceBlock(choices=[('1', 'quarter spacing'), ('2', 'half spacing'), ('3', 'single spacing'), ('4', 'one and a half spacing'), ('5', 'triple spacing')])),))), ('quote', wagtail.core.blocks.StructBlock((('quotes', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock((('quote', wagtail.core.blocks.CharBlock()), ('attribution', wagtail.core.blocks.CharBlock()))))),))), ('pulse_listing', wagtail.core.blocks.StructBlock((('search_terms', wagtail.core.blocks.CharBlock(help_text='Fill in any number of pulse entry search terms (separated by spaces).')), ('max_number_of_results', wagtail.core.blocks.IntegerBlock(default=0, help_text='The maximum number of results to fetch (use 0 for default maximum of 48)', min_value=0, required=False)), ('newest_first', wagtail.core.blocks.BooleanBlock(default=True, help_text='Check this box to list entries "newest first".', required=False)), ('only_featured_entries', wagtail.core.blocks.BooleanBlock(default=False, help_text='Check this box to only get results from the featured entry list.', required=False))))))), | ||
), | ||
migrations.AlterField( | ||
model_name='primarypage', | ||
name='body', | ||
field=wagtail.core.fields.StreamField((('heading', wagtail.core.blocks.CharBlock()), ('paragraph', wagtail.core.blocks.RichTextBlock(features=['bold', 'italic', 'h2', 'h3', 'h4', 'h5', 'ol', 'ul', 'link', 'hr'])), ('image', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('altText', wagtail.core.blocks.CharBlock(help_text='Image description (for screen readers).', required=True)), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('captionURL', wagtail.core.blocks.CharBlock(help_text='Optional URL that this caption should link out to.', required=False))))), ('image_text', wagtail.core.blocks.StructBlock((('text', wagtail.core.blocks.RichTextBlock(features=['bold', 'italic', 'link'])), ('image', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('altText', wagtail.core.blocks.CharBlock(help_text='Image description (for screen readers).', required=True))))), ('ordering', wagtail.core.blocks.ChoiceBlock(choices=[('left', 'Image on the left'), ('right', 'Image on the right')]))))), ('image_text2', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('altText', wagtail.core.blocks.CharBlock(help_text='Image description (for screen readers).', required=True)), ('text', wagtail.core.blocks.RichTextBlock(features=['link', 'h2', 'h3', 'h4', 'h5', 'h6'])), ('url', wagtail.core.blocks.CharBlock(help_text='Optional URL that this image should link out to.', required=False)), ('small', wagtail.core.blocks.BooleanBlock(help_text='Use smaller, fixed image size (eg: icon)', required=False))))), ('figure', wagtail.core.blocks.StructBlock((('figure', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('altText', wagtail.core.blocks.CharBlock(help_text='Image description (for screen readers).', required=True)), ('alignment', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Do not apply any explicit alignment classes.'), ('left-align', 'Left-align this image with the page content.'), ('right-align', 'Right-align this image with the page content.'), ('center', 'Center this image with the page content.'), ('full-width', 'Make this image full-width.')], required=False))))), ('caption', wagtail.core.blocks.CharBlock(help_text='Please remember to properly attribute any images we use.', required=False)), ('url', wagtail.core.blocks.CharBlock(help_text='Optional URL that this figure should link out to.', required=False))))), ('figuregrid', wagtail.core.blocks.StructBlock((('grid_items', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock((('figure', wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('altText', wagtail.core.blocks.CharBlock(help_text='Image description (for screen readers).', required=True)), ('alignment', wagtail.core.blocks.ChoiceBlock(choices=[('', 'Do not apply any explicit alignment classes.'), ('left-align', 'Left-align this image with the page content.'), ('right-align', 'Right-align this image with the page content.'), ('center', 'Center this image with the page content.'), ('full-width', 'Make this image full-width.')], required=False))))), ('caption', wagtail.core.blocks.CharBlock(help_text='Please remember to properly attribute any images we use.', required=False)), ('url', wagtail.core.blocks.CharBlock(help_text='Optional URL that this figure should link out to.', required=False)))))),))), ('figuregrid2', wagtail.core.blocks.StructBlock((('grid_items', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock((('image', wagtail.images.blocks.ImageChooserBlock()), ('caption', wagtail.core.blocks.CharBlock(help_text='Please remember to properly attribute any images we use.', required=False)), ('url', wagtail.core.blocks.CharBlock(help_text='Optional URL that this figure should link out to.', required=False)))))),))), ('video', wagtail.core.blocks.StructBlock((('url', wagtail.core.blocks.CharBlock(help_text='Please make sure this is a proper embed URL, or your video will not show up on the page.')), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('captionURL', wagtail.core.blocks.CharBlock(help_text='Optional URL for caption to link to.', required=False))))), ('iframe', wagtail.core.blocks.StructBlock((('url', wagtail.core.blocks.CharBlock(help_text='Please note that only URLs from white-listed domains will work.')), ('caption', wagtail.core.blocks.CharBlock(required=False)), ('captionURL', wagtail.core.blocks.CharBlock(help_text='Optional URL that this caption should link out to.', required=False))))), ('linkbutton', wagtail.core.blocks.StructBlock((('label', wagtail.core.blocks.CharBlock()), ('URL', wagtail.core.blocks.CharBlock()), ('styling', wagtail.core.blocks.ChoiceBlock(choices=[('btn-primary', 'Primary button'), ('btn-secondary', 'Secondary button'), ('btn-success', 'Success button'), ('btn-info', 'Info button'), ('btn-warning', 'Warning button'), ('btn-danger', 'Danger button'), ('btn-ghost', 'Ghost button')])), ('outline', wagtail.core.blocks.BooleanBlock(default=False, required=False))))), ('spacer', wagtail.core.blocks.StructBlock((('size', wagtail.core.blocks.ChoiceBlock(choices=[('1', 'quarter spacing'), ('2', 'half spacing'), ('3', 'single spacing'), ('4', 'one and a half spacing'), ('5', 'triple spacing')])),))), ('quote', wagtail.core.blocks.StructBlock((('quotes', wagtail.core.blocks.ListBlock(wagtail.core.blocks.StructBlock((('quote', wagtail.core.blocks.CharBlock()), ('attribution', wagtail.core.blocks.CharBlock()))))),))), ('pulse_listing', wagtail.core.blocks.StructBlock((('search_terms', wagtail.core.blocks.CharBlock(help_text='Fill in any number of pulse entry search terms (separated by spaces).')), ('max_number_of_results', wagtail.core.blocks.IntegerBlock(default=0, help_text='The maximum number of results to fetch (use 0 for default maximum of 48)', min_value=0, required=False)), ('newest_first', wagtail.core.blocks.BooleanBlock(default=True, help_text='Check this box to list entries "newest first".', required=False)), ('only_featured_entries', wagtail.core.blocks.BooleanBlock(default=False, help_text='Check this box to only get results from the featured entry list.', required=False))))))), | ||
), | ||
] |
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
25 changes: 25 additions & 0 deletions
25
network-api/networkapi/wagtailpages/templates/wagtailpages/blocks/image_text_block2.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,25 @@ | ||
{% load wagtailcore_tags wagtailimages_tags %} | ||
|
||
<div class="row my-default"> | ||
{% if value.small %} | ||
<div class="col-12 d-flex flex-nowrap"> | ||
<div class="mr-3" style="width:50px; flex-shrink:0;"> | ||
{% if value.url %}<a href="{{ value.url }}">{% endif %} | ||
{% image value.image fill-100x100-c100 format-jpeg class="w-100" %} | ||
{% if value.url %}</a>{% endif %} | ||
</div> | ||
<div> | ||
{{ value.text|richtext }} | ||
</div> | ||
</div> | ||
{% else %} | ||
<div class="col-12 col-md-3 mb-3 mb-md-0"> | ||
{% if value.url %}<a href="{{ value.url }}">{% endif %} | ||
{% image value.image fill-760x760-c100 format-jpeg class="w-100" %} | ||
{% if value.url %}</a>{% endif %} | ||
</div> | ||
<div class="col-12 col-md-9"> | ||
{{ value.text|richtext }} | ||
</div> | ||
{% endif %} | ||
</div> |