Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a loader #1575

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions article/migrations/0029_alter_articlepage_content_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 4.2 on 2024-11-17 04:03

from django.db import migrations, models
import images.models
import wagtail.blocks
import wagtail.documents.blocks
import wagtail.embeds.blocks
import wagtail.fields
import wagtail.images.blocks
import wagtail.snippets.blocks


class Migration(migrations.Migration):

dependencies = [
('article', '0028_articlepage_subtitle'),
]

operations = [
migrations.AlterField(
model_name='articlepage',
name='content',
field=wagtail.fields.StreamField([('richtext', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('plaintext', wagtail.blocks.TextBlock(help_text='Warning: Rich Text Blocks preferred! Plain text primarily exists for importing old Dispatch text.', label='Plain Text Block')), ('dropcap', wagtail.blocks.TextBlock(help_text='Create a block where special dropcap styling with be applied to the first letter and the first letter only.\n\nThe contents of this block will be enclosed in a <p class="drop-cap">...</p> element, allowing its targetting for styling.\n\nNo RichText allowed.', label='Dropcap Block', template='article/stream_blocks/dropcap.html')), ('video', wagtail.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('audio', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='File format: .m4a, .mp4, .mp, .wav, or .ogg', required=True))])), ('image', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('click_to_enlarge', wagtail.blocks.BooleanBlock(default=True, help_text='Leaving this checked means readers will be able to click on the image to see it enlarged', required=False)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False))])), ('raw_html', wagtail.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('quote', wagtail.blocks.StructBlock([('content', wagtail.blocks.CharBlock(required=True)), ('source', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='Optional, file format: .m4a, .mp4, .mp, .wav, or .ogg', required=False))])), ('gallery', wagtail.snippets.blocks.SnippetChooserBlock(target_model=images.models.GallerySnippet, template='article/stream_blocks/gallery.html')), ('gallery_block', wagtail.blocks.StructBlock([('id', wagtail.blocks.CharBlock(help_text='No numbers or spaces. Must be different from other ids defined in this article.', required=True)), ('images', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('click_to_enlarge', wagtail.blocks.BooleanBlock(default=True, help_text='Leaving this checked means readers will be able to click on the image to see it enlarged', required=False)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False))])))])), ('header_link', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a page link button so that clicking the button will scroll the user to this header'))])), ('header_menu', wagtail.blocks.StructBlock([('list', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a header so that this button will send the user to the section of the page with said header')), ('colour', wagtail.blocks.CharBlock(default='0071c9'))], label='Page Link')))])), ('visual_essay', wagtail.blocks.StructBlock([('view', wagtail.blocks.StructBlock([('view', wagtail.blocks.ChoiceBlock(choices=[('vs-side-by-side', 'Side By Side'), ('vs-over-image', 'Text Over Image')]))])), ('content', wagtail.blocks.StreamBlock([('rich_text', wagtail.blocks.StructBlock([('block', wagtail.blocks.RichTextBlock(help_text='Write your article contents here. See documentation: https://docs.wagtail.io/en/latest/editor_manual/new_pages/creating_body_content.html#rich-text-fields', label='Rich Text Block')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='doc-full')), ('image', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('click_to_enlarge', wagtail.blocks.BooleanBlock(default=True, help_text='Leaving this checked means readers will be able to click on the image to see it enlarged', required=False)), ('style', wagtail.blocks.ChoiceBlock(choices=[('default', 'Default'), ('left', 'Left'), ('right', 'Right')])), ('width', wagtail.blocks.ChoiceBlock(choices=[('full', 'Full'), ('small', 'Small'), ('medium', 'Medium'), ('large', 'Large')])), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255, required=False))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='image')), ('video', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('video_embed', wagtail.embeds.blocks.EmbedBlock(blank=False, null=False)), ('title', wagtail.blocks.CharBlock(max_length=255, required=False)), ('caption', wagtail.blocks.CharBlock(max_length=255, required=False)), ('credit', wagtail.blocks.CharBlock(max_length=255, required=False))], help_text='Use this to credit or caption videos that will only be associated with this current article, rather than entered into our video library. You can also embed videos in a Rich Text Block.', label='Credited/Captioned One-Off Video')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='media')), ('audio', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('caption', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='File format: .m4a, .mp4, .mp, .wav, or .ogg', required=True))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='media')), ('raw_html', wagtail.blocks.StructBlock([('block', wagtail.blocks.RawHTMLBlock(help_text="WARNING: DO NOT use this unless you really know what you're doing!", label='Raw HTML Block')), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='code')), ('quote', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('content', wagtail.blocks.CharBlock(required=True)), ('source', wagtail.blocks.CharBlock(required=False)), ('audio', wagtail.documents.blocks.DocumentChooserBlock(help_text='Optional, file format: .m4a, .mp4, .mp, .wav, or .ogg', required=False))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='openquote')), ('header_link', wagtail.blocks.StructBlock([('block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('id', wagtail.blocks.CharBlock(help_text='Intended to be shared with a page link button so that clicking the button will scroll the user to this header'))])), ('side', wagtail.blocks.ChoiceBlock(choices=[('left', 'Left'), ('right', 'Right')]))], icon='title')), ('gap', wagtail.blocks.StructBlock([('id', wagtail.blocks.CharBlock(required=False)), ('height', wagtail.blocks.IntegerBlock(default=0, min_value=0, required=True))])), ('switch_view', wagtail.blocks.StructBlock([('view', wagtail.blocks.ChoiceBlock(choices=[('vs-side-by-side', 'Side By Side'), ('vs-over-image', 'Text Over Image')]))]))]))]))], blank=True, null=True, use_json_field=True),
),
migrations.AlterField(
model_name='articlepage',
name='primary_tag_slug',
field=models.CharField(blank=True, default='', help_text="IF USED, SHOULD ALSO BE IN TAGS FIELD. Enter the slug of the tag to be used for linking at the end of the article. For example, the slug of the tag 'blue chip' is 'blue-chip'.", max_length=255, null=True),
),
]
18 changes: 18 additions & 0 deletions authors/migrations/0020_alter_authorpage_main_media_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2 on 2024-11-17 04:03

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('authors', '0019_alter_authorpage_short_bio_description'),
]

operations = [
migrations.AlterField(
model_name='authorpage',
name='main_media_type',
field=models.CharField(choices=[('articles', 'Articles'), ('photos', 'Gallery'), ('videos', 'Videos'), ('visuals', 'Visual Bylines')], default='articles', max_length=20),
),
]
21 changes: 21 additions & 0 deletions home/migrations/0027_alter_homepage_middle_stream.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 4.2 on 2024-11-17 04:03

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


class Migration(migrations.Migration):

dependencies = [
('home', '0026_remove_homepage_links_homepage_middle_stream_and_more'),
]

operations = [
migrations.AlterField(
model_name='homepage',
name='middle_stream',
field=wagtail.fields.StreamField([('links', wagtail.blocks.StructBlock([('links', wagtail.blocks.ListBlock(wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('url', wagtail.blocks.URLBlock(required=False)), ('description', wagtail.blocks.TextBlock(required=False))])))])), ('section', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('section/objects/section_bulleted.html', 'Default'), ('section/objects/section_timeline.html', 'Timeline'), ('section/objects/section_landing.html', 'Landing')])), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('category', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('section/objects/section_bulleted.html', 'Default'), ('section/objects/section_timeline.html', 'Timeline'), ('section/objects/section_landing.html', 'Landing')])), ('category', wagtail.snippets.blocks.SnippetChooserBlock('section.CategorySnippet'))])), ('landing', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('section/objects/section_bulleted.html', 'Default'), ('section/objects/section_timeline.html', 'Timeline'), ('section/objects/section_landing.html', 'Landing')])), ('landing', wagtail.blocks.PageChooserBlock(page_type=['specialfeaturelanding.SpecialLandingPage']))])), ('tag', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('section/objects/section_bulleted.html', 'Default'), ('section/objects/section_timeline.html', 'Timeline'), ('section/objects/section_landing.html', 'Landing')])), ('tag_slug', wagtail.blocks.CharBlock(help_text="Enter tag slug. For example for 'Christmas Movie' the slug would be 'christmas-movie'."))])), ('article_promo', wagtail.blocks.StructBlock([('article', wagtail.blocks.PageChooserBlock(page_type=['article.ArticlePage']))]))], blank=True, null=True, use_json_field=True),
),
]
22 changes: 22 additions & 0 deletions home/migrations/0028_alter_homepage_sidebar_stream.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 4.2 on 2024-12-25 20:33

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


class Migration(migrations.Migration):

dependencies = [
('home', '0027_alter_homepage_middle_stream'),
]

operations = [
migrations.AlterField(
model_name='homepage',
name='sidebar_stream',
field=wagtail.fields.StreamField([('sidebar_advertisement_block', wagtail.blocks.StructBlock([])), ('sidebar_issues_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('issues', wagtail.blocks.StreamBlock([('issue', wagtail.blocks.StructBlock([('date', wagtail.blocks.DateBlock(required=True)), ('image', wagtail.images.blocks.ImageChooserBlock(required=False)), ('show_image', wagtail.blocks.BooleanBlock(required=False)), ('link', wagtail.blocks.URLBlock(required=True))]))]))])), ('sidebar_category_block', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('infinitefeed/sidebar/sidebar_section_block.html', 'Default'), ('infinitefeed/sidebar/sidebar_latest_block.html', 'Latest')])), ('category', wagtail.snippets.blocks.SnippetChooserBlock('section.CategorySnippet'))])), ('sidebar_section_block', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('infinitefeed/sidebar/sidebar_section_block.html', 'Default'), ('infinitefeed/sidebar/sidebar_latest_block.html', 'Latest')])), ('section', wagtail.blocks.PageChooserBlock(page_type=['section.SectionPage']))])), ('sidebar_flex_stream_block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('stream', wagtail.blocks.StreamBlock([('image_link', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('link', wagtail.blocks.URLBlock(required=False)), ('alt_text', wagtail.blocks.CharBlock(help_text='For accessibility to screen reader users, enter a description of this image. Included any relevant text inside the image.', max_length=255))]))]))])), ('sidebar_latest', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('infinitefeed/sidebar/sidebar_section_block.html', 'Default'), ('infinitefeed/sidebar/sidebar_latest_block.html', 'Latest')])), ('title', wagtail.blocks.CharBlock(max_length=255, required=True))])), ('sidebar_manual', wagtail.blocks.StructBlock([('template', wagtail.blocks.ChoiceBlock(choices=[('infinitefeed/sidebar/sidebar_section_block.html', 'Default'), ('infinitefeed/sidebar/sidebar_latest_block.html', 'Latest')])), ('title', wagtail.blocks.CharBlock(max_length=255, required=True)), ('articles', wagtail.blocks.ListBlock(wagtail.blocks.PageChooserBlock(page_type=['article.ArticlePage'])))]))], blank=True, null=True, use_json_field=True),
),
]
2 changes: 1 addition & 1 deletion infinitefeed/templates/infinitefeed/infinitefeed.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@


<div id="loader" class="hide" {% if inactive %}inactive="True"{%endif%}>
<ion-icon name="refresh" class="spin"></ion-icon>
<img src="{% static '/ubyssey/images/throbber.svg' %}" class="spin" alt="Loading icon">
</div>
Loading
Loading