diff --git a/app/core/migrations/0014_errorpage.py b/app/core/migrations/0014_errorpage.py new file mode 100644 index 0000000..182844e --- /dev/null +++ b/app/core/migrations/0014_errorpage.py @@ -0,0 +1,25 @@ +# Generated by Django 4.2.7 on 2024-09-03 17:59 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('wagtailcore', '0089_log_entry_data_json_null_to_object'), + ('core', '0013_delete_partnertype'), + ] + + operations = [ + migrations.CreateModel( + name='ErrorPage', + 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')), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page',), + ), + ] diff --git a/app/core/models.py b/app/core/models.py index 3b6b7fb..638183c 100644 --- a/app/core/models.py +++ b/app/core/models.py @@ -4,10 +4,15 @@ from wagtail.models import Page from wagtail.fields import StreamField, RichTextField from wagtail.blocks import CharBlock, StreamBlock, StructBlock, URLBlock, RichTextBlock, PageChooserBlock +from wagtail.documents.blocks import DocumentChooserBlock from wagtail.snippets.models import register_snippet from wagtail.admin.panels import FieldPanel, MultiFieldPanel, InlinePanel +class ErrorPage(Page): + max_count = 1 + + @register_snippet class Partner(models.Model): partner_name = models.CharField() @@ -38,6 +43,7 @@ class Meta: class LinkOrPageBlock(StreamBlock): page = PageChooserBlock() url = URLBlock() + document = DocumentChooserBlock() class Meta: max_num = 1 diff --git a/app/core/templates/core/error_page.html b/app/core/templates/core/error_page.html new file mode 100644 index 0000000..1a176c3 --- /dev/null +++ b/app/core/templates/core/error_page.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} + +{% block title %} + Page not found +{% endblock title %} +{% block body_class %} + template-404 +{% endblock body_class %} +{% block content %} +
+

404

+ {% include "home/components/404Content.html" %} +
+{% endblock content %} \ No newline at end of file diff --git a/app/impact_areas/migrations/0020_alter_individualimpactareapage_use_cases.py b/app/impact_areas/migrations/0020_alter_individualimpactareapage_use_cases.py new file mode 100644 index 0000000..f5709e5 --- /dev/null +++ b/app/impact_areas/migrations/0020_alter_individualimpactareapage_use_cases.py @@ -0,0 +1,21 @@ +# Generated by Django 4.2.7 on 2024-09-03 21:39 + +from django.db import migrations +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('impact_areas', '0019_alter_individualimpactareapage_intro'), + ] + + operations = [ + migrations.AlterField( + model_name='individualimpactareapage', + name='use_cases', + field=wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('description', wagtail.blocks.RichTextBlock()), ('link_text', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, null=True))]))], blank=True, null=True, use_json_field=True), + ), + ] diff --git a/app/mapping_hubs/migrations/0018_alter_individualmappinghubpage_contact_section_links_and_more.py b/app/mapping_hubs/migrations/0018_alter_individualmappinghubpage_contact_section_links_and_more.py new file mode 100644 index 0000000..cef9d24 --- /dev/null +++ b/app/mapping_hubs/migrations/0018_alter_individualmappinghubpage_contact_section_links_and_more.py @@ -0,0 +1,76 @@ +# Generated by Django 4.2.7 on 2024-09-03 21:39 + +from django.db import migrations +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('mapping_hubs', '0017_individualmappinghubpage_external_description_long'), + ] + + operations = [ + migrations.AlterField( + model_name='individualmappinghubpage', + name='contact_section_links', + field=wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('link_text', wagtail.blocks.CharBlock(required=True)), ('link_url', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, required=False))]))], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='individualmappinghubpage', + name='dogear_boxes', + field=wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(required=True)), ('description', wagtail.blocks.RichTextBlock(required=False)), ('link_text', wagtail.blocks.CharBlock(required=True)), ('link_url', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, required=False))]))], blank=True, help_text="These are, for example, the 'Grants' and 'Map and Chat Hour' boxes in the Asia-Pacific page. Please only add these in pairs of 2!", use_json_field=True), + ), + migrations.AlterField( + model_name='individualmappinghubpage', + name='events_section_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='individualmappinghubpage', + name='header_project_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='individualmappinghubpage', + name='news_section_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='individualmappinghubpage', + name='project_section_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='individualmappinghubpage', + name='subscribe_box_signup_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='mappinghubprojectspage', + name='black_box_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='mappinghubprojectspage', + name='red_box_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='openmappinghubspage', + name='header_events_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='openmappinghubspage', + name='header_news_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='openmappinghubspage', + name='partners_section_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + ] diff --git a/app/misc/migrations/0015_contactuspage.py b/app/misc/migrations/0015_contactuspage.py new file mode 100644 index 0000000..d4ca60d --- /dev/null +++ b/app/misc/migrations/0015_contactuspage.py @@ -0,0 +1,52 @@ +# Generated by Django 4.2.7 on 2024-08-26 20:58 + +from django.db import migrations, models +import django.db.models.deletion +import wagtail.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('wagtailimages', '0025_alter_image_file_alter_rendition_file'), + ('wagtailcore', '0089_log_entry_data_json_null_to_object'), + ('misc', '0014_alter_documentcollectionpage_documents'), + ] + + operations = [ + migrations.CreateModel( + name='ContactUsPage', + 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')), + ('global_office_title', models.CharField(default='Global Office')), + ('global_office_text', wagtail.fields.RichTextField(blank=True)), + ('send_message_title', models.CharField(default='Send us a message!')), + ('first_name_text', models.CharField(default='First Name')), + ('last_name_text', models.CharField(default='Last Name')), + ('email_text', models.CharField(default='Email Address')), + ('subject_text', models.CharField(default='Subject')), + ('message_text', models.CharField(default='Message')), + ('first_name_field_text', models.CharField(default='Enter your first name...')), + ('last_name_field_text', models.CharField(default='Enter your last name...')), + ('email_field_text', models.CharField(default='Enter your email address...')), + ('subject_field_placeholder', models.CharField(default='Select')), + ('subject_field_options', wagtail.fields.StreamField([('block', wagtail.blocks.StructBlock([('subject', wagtail.blocks.CharBlock(blank=True, null=True, required=False))]))], blank=True, null=True, use_json_field=True)), + ('message_field_text', models.CharField(default='Enter your message...')), + ('submit_button_text', models.CharField(default='Submit')), + ('inquiries_title', models.CharField(default='Inquiries')), + ('inquiries_text', models.CharField(blank=True)), + ('office_locations_title', models.CharField(default='Office Locations')), + ('office_locations_visit_page_text', models.CharField(default='Visit Page')), + ('office_locations', wagtail.fields.StreamField([('block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(blank=True, null=True, required=False)), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock())], blank=True, null=True, required=False)), ('description', wagtail.blocks.RichTextBlock(blank=True, null=True, required=False))]))], blank=True, null=True, use_json_field=True)), + ('dogear_box_title', models.CharField(default='We want to know what you think about HOT and our work.')), + ('dogear_box_link_text', models.CharField(default='Send us your feedback')), + ('dogear_box_link', wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock())], blank=True, use_json_field=True)), + ('header_image', models.ForeignKey(blank=True, help_text='Header image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page',), + ), + ] diff --git a/app/misc/migrations/0016_alter_contactuspage_inquiries_text.py b/app/misc/migrations/0016_alter_contactuspage_inquiries_text.py new file mode 100644 index 0000000..488cdff --- /dev/null +++ b/app/misc/migrations/0016_alter_contactuspage_inquiries_text.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.7 on 2024-08-26 21:10 + +from django.db import migrations +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('misc', '0015_contactuspage'), + ] + + operations = [ + migrations.AlterField( + model_name='contactuspage', + name='inquiries_text', + field=wagtail.fields.RichTextField(blank=True), + ), + ] diff --git a/app/misc/migrations/0017_remove_contactuspage_inquiries_text_and_more.py b/app/misc/migrations/0017_remove_contactuspage_inquiries_text_and_more.py new file mode 100644 index 0000000..66d03df --- /dev/null +++ b/app/misc/migrations/0017_remove_contactuspage_inquiries_text_and_more.py @@ -0,0 +1,24 @@ +# Generated by Django 4.2.7 on 2024-08-27 17:56 + +from django.db import migrations +import wagtail.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('misc', '0016_alter_contactuspage_inquiries_text'), + ] + + operations = [ + migrations.RemoveField( + model_name='contactuspage', + name='inquiries_text', + ), + migrations.AddField( + model_name='contactuspage', + name='inquiries_blocks', + field=wagtail.fields.StreamField([('block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(blank=True, null=True, required=False)), ('email', wagtail.blocks.EmailBlock(blank=True, null=True, required=False))]))], blank=True, null=True, use_json_field=True), + ), + ] diff --git a/app/misc/migrations/0018_workforhotpage.py b/app/misc/migrations/0018_workforhotpage.py new file mode 100644 index 0000000..b96072d --- /dev/null +++ b/app/misc/migrations/0018_workforhotpage.py @@ -0,0 +1,33 @@ +# Generated by Django 4.2.7 on 2024-08-28 16:11 + +from django.db import migrations, models +import django.db.models.deletion +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('wagtailimages', '0025_alter_image_file_alter_rendition_file'), + ('wagtailcore', '0089_log_entry_data_json_null_to_object'), + ('misc', '0017_remove_contactuspage_inquiries_text_and_more'), + ] + + operations = [ + migrations.CreateModel( + name='WorkForHotPage', + 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')), + ('header_text', wagtail.fields.RichTextField(blank=True)), + ('our_values_title', models.CharField(default='Our Values')), + ('our_values_text', wagtail.fields.RichTextField(blank=True)), + ('work_culture_title', models.CharField(default='Work Culture & Benefits')), + ('work_culture_description', wagtail.fields.RichTextField(blank=True)), + ('header_image', models.ForeignKey(blank=True, help_text='Header image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page',), + ), + ] diff --git a/app/misc/migrations/0019_workforhotpage_opportunities_button_link_and_more.py b/app/misc/migrations/0019_workforhotpage_opportunities_button_link_and_more.py new file mode 100644 index 0000000..4e61224 --- /dev/null +++ b/app/misc/migrations/0019_workforhotpage_opportunities_button_link_and_more.py @@ -0,0 +1,73 @@ +# Generated by Django 4.2.7 on 2024-08-28 21:04 + +from django.db import migrations, models +import django.db.models.deletion +import wagtail.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('wagtailimages', '0025_alter_image_file_alter_rendition_file'), + ('misc', '0018_workforhotpage'), + ] + + operations = [ + migrations.AddField( + model_name='workforhotpage', + name='opportunities_button_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock())], blank=True, use_json_field=True), + ), + migrations.AddField( + model_name='workforhotpage', + name='opportunities_button_text', + field=models.CharField(default='See all job opportunities'), + ), + migrations.AddField( + model_name='workforhotpage', + name='opportunities_description', + field=wagtail.fields.RichTextField(blank=True), + ), + migrations.AddField( + model_name='workforhotpage', + name='opportunities_image', + field=models.ForeignKey(blank=True, help_text='Opportunities image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image'), + ), + migrations.AddField( + model_name='workforhotpage', + name='opportunities_title', + field=models.CharField(default='See Our Job Opportunities'), + ), + migrations.AddField( + model_name='workforhotpage', + name='our_values_youtube_subtitle', + field=models.CharField(blank=True), + ), + migrations.AddField( + model_name='workforhotpage', + name='our_values_youtube_url', + field=models.URLField(blank=True), + ), + migrations.AddField( + model_name='workforhotpage', + name='testimonials', + field=wagtail.fields.StreamField([('block', wagtail.blocks.StructBlock([('description', wagtail.blocks.RichTextBlock(blank=True, null=True, required=False)), ('member', wagtail.blocks.PageChooserBlock(page_type=['members.IndividualMemberPage'], required=False)), ('image_override', wagtail.images.blocks.ImageChooserBlock(required=False)), ('name_override', wagtail.blocks.CharBlock(required=False)), ('title_override', wagtail.blocks.CharBlock(required=False)), ('hub_override', wagtail.blocks.PageChooserBlock(page_type=['mapping_hubs.IndividualMappingHubPage'], required=False))]))], blank=True, help_text="For any given testimonial, you can choose a member to be displayed, or you can alternatively manually provide the member's details; if both are provided, the manually-entered details will override any details fetched from the member's page.", null=True, use_json_field=True), + ), + migrations.AddField( + model_name='workforhotpage', + name='testimonials_title', + field=models.CharField(default='What Our Staff Say'), + ), + migrations.AddField( + model_name='workforhotpage', + name='work_culture_youtube_subtitle', + field=models.CharField(blank=True), + ), + migrations.AddField( + model_name='workforhotpage', + name='work_culture_youtube_url', + field=models.URLField(blank=True), + ), + ] diff --git a/app/misc/migrations/0020_alter_workforhotpage_our_values_youtube_url_and_more.py b/app/misc/migrations/0020_alter_workforhotpage_our_values_youtube_url_and_more.py new file mode 100644 index 0000000..a9034da --- /dev/null +++ b/app/misc/migrations/0020_alter_workforhotpage_our_values_youtube_url_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.7 on 2024-08-28 23:49 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('misc', '0019_workforhotpage_opportunities_button_link_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='workforhotpage', + name='our_values_youtube_url', + field=models.URLField(blank=True, help_text="The YouTube link provided should be in the following format: 'https://www.youtube.com/embed/[slug]'. You can get this by right-clicking on the YouTube video player and pressing 'Copy embed code'; this will give you a full embed code, which you will need to take the embed URL from."), + ), + migrations.AlterField( + model_name='workforhotpage', + name='work_culture_youtube_subtitle', + field=models.CharField(blank=True, help_text="The YouTube link provided should be in the following format: 'https://www.youtube.com/embed/[slug]'. You can get this by right-clicking on the YouTube video player and pressing 'Copy embed code'; this will give you a full embed code, which you will need to take the embed URL from."), + ), + ] diff --git a/app/misc/migrations/0021_alter_codeofconductpage_our_policies_links_and_more.py b/app/misc/migrations/0021_alter_codeofconductpage_our_policies_links_and_more.py new file mode 100644 index 0000000..cf485ab --- /dev/null +++ b/app/misc/migrations/0021_alter_codeofconductpage_our_policies_links_and_more.py @@ -0,0 +1,94 @@ +# Generated by Django 4.2.7 on 2024-09-03 21:39 + +from django.db import migrations, models +import django.db.models.deletion +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('wagtailimages', '0025_alter_image_file_alter_rendition_file'), + ('wagtailcore', '0089_log_entry_data_json_null_to_object'), + ('misc', '0020_alter_workforhotpage_our_values_youtube_url_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='codeofconductpage', + name='our_policies_links', + field=wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())]))]))], blank=True, help_text='Links to be shown under the Our Policies section.', null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='codeofconductpage', + name='question_block_button_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='contactuspage', + name='dogear_box_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='contactuspage', + name='office_locations', + field=wagtail.fields.StreamField([('block', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock(blank=True, null=True, required=False)), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, null=True, required=False)), ('description', wagtail.blocks.RichTextBlock(blank=True, null=True, required=False))]))], blank=True, null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='dataprinciplespage', + name='footer_button_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='documentcollectionpage', + name='sidebar_box_button_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='joinourconversationpage', + name='black_box_link_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='joinourconversationpage', + name='code_of_conduct_link_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='joinourconversationpage', + name='red_box_link_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='privacypolicypage', + name='our_policies_links', + field=wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())]))]))], blank=True, help_text='Links to be shown under the Our Policies section.', null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='privacypolicypage', + name='question_block_button_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='workforhotpage', + name='opportunities_button_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.CreateModel( + name='LivingStrategyPage', + 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')), + ('desktop_size_non_full_body_width', models.BooleanField()), + ('download_title', models.CharField(default='Download our Living Strategy Summary')), + ('downloads', wagtail.fields.StreamField([('block', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], required=False))]))], blank=True, use_json_field=True)), + ('description', wagtail.fields.RichTextField(blank=True)), + ('banner_image', models.ForeignKey(blank=True, help_text='Header image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), + ], + options={ + 'abstract': False, + }, + bases=('wagtailcore.page',), + ), + ] diff --git a/app/misc/models.py b/app/misc/models.py index 8b5aff3..5c6dbd9 100644 --- a/app/misc/models.py +++ b/app/misc/models.py @@ -3,7 +3,7 @@ from wagtail.admin.panels import FieldPanel, MultiFieldPanel from wagtail.fields import RichTextField, StreamField -from wagtail.blocks import CharBlock, StreamBlock, StructBlock, URLBlock, RichTextBlock, PageChooserBlock +from wagtail.blocks import CharBlock, StreamBlock, StructBlock, URLBlock, RichTextBlock, PageChooserBlock, EmailBlock from wagtail.images.blocks import ImageChooserBlock from wagtail.models import Page from wagtail.documents.blocks import DocumentChooserBlock @@ -294,3 +294,213 @@ def get_context(self, request, *args, **kwargs): FieldPanel('sidebar_box_button_link'), ], heading="Sidebar"), ] + + +class ContactUsPage(Page): + max_count = 1 + + header_image = models.ForeignKey( + "wagtailimages.Image", + null=True, + blank=True, + on_delete=models.SET_NULL, + related_name="+", + help_text="Header image" + ) + + global_office_title = models.CharField(default="Global Office") + global_office_text = RichTextField(blank=True) + + send_message_title = models.CharField(default="Send us a message!") + + first_name_text = models.CharField(default="First Name") + last_name_text = models.CharField(default="Last Name") + email_text = models.CharField(default="Email Address") + subject_text = models.CharField(default="Subject") + message_text = models.CharField(default="Message") + + first_name_field_text = models.CharField(default="Enter your first name...") + last_name_field_text = models.CharField(default="Enter your last name...") + email_field_text = models.CharField(default="Enter your email address...") + subject_field_placeholder = models.CharField(default="Select") + subject_field_options = StreamField([ + ('block', StructBlock([ + ('subject', CharBlock(blank=True, null=True, required=False)), + ])) + ], use_json_field=True, null=True, blank=True) + message_field_text = models.CharField(default="Enter your message...") + + submit_button_text = models.CharField(default="Submit") + + inquiries_title = models.CharField(default="Inquiries") + inquiries_blocks = StreamField([ + ('block', StructBlock([ + ('title', CharBlock(blank=True, null=True, required=False)), + ('email', EmailBlock(blank=True, null=True, required=False)), + ])) + ], use_json_field=True, null=True, blank=True) + + office_locations_title = models.CharField(default="Office Locations") + office_locations_visit_page_text = models.CharField(default="Visit Page") + office_locations = StreamField([ + ('block', StructBlock([ + ('title', CharBlock(blank=True, null=True, required=False)), + ('link', LinkOrPageBlock(blank=True, null=True, required=False)), + ('description', RichTextBlock(blank=True, null=True, required=False)), + ])) + ], use_json_field=True, null=True, blank=True) + + dogear_box_title = models.CharField(default="We want to know what you think about HOT and our work.") + dogear_box_link_text = models.CharField(default="Send us your feedback") + dogear_box_link = StreamField(LinkOrPageBlock(), use_json_field=True, blank=True) + + content_panels = Page.content_panels + [ + FieldPanel('header_image'), + MultiFieldPanel([ + FieldPanel('global_office_title'), + FieldPanel('global_office_text'), + ], heading="Global Office"), + MultiFieldPanel([ + FieldPanel('send_message_title'), + FieldPanel('submit_button_text'), + MultiFieldPanel([ + FieldPanel('first_name_text'), + FieldPanel('last_name_text'), + FieldPanel('email_text'), + FieldPanel('subject_text'), + FieldPanel('message_text'), + ], heading="Form Headers"), + MultiFieldPanel([ + FieldPanel('first_name_field_text'), + FieldPanel('last_name_field_text'), + FieldPanel('email_field_text'), + FieldPanel('subject_field_placeholder'), + FieldPanel('subject_field_options'), + FieldPanel('message_field_text'), + ], heading="Form Placeholders"), + ], heading="Form"), + MultiFieldPanel([ + FieldPanel('inquiries_title'), + FieldPanel('inquiries_blocks'), + ], heading="Inquiries"), + MultiFieldPanel([ + FieldPanel('office_locations_title'), + FieldPanel('office_locations_visit_page_text'), + FieldPanel('office_locations'), + ], heading="Office Locations"), + MultiFieldPanel([ + FieldPanel('dogear_box_title'), + FieldPanel('dogear_box_link_text'), + FieldPanel('dogear_box_link'), + ], heading="Dogear Box"), + ] + + +class WorkForHotPage(Page): + max_count = 1 + + header_image = models.ForeignKey( + "wagtailimages.Image", + null=True, + blank=True, + on_delete=models.SET_NULL, + related_name="+", + help_text="Header image" + ) + header_text = RichTextField(blank=True) + + our_values_title = models.CharField(default="Our Values") + our_values_text = RichTextField(blank=True) + our_values_youtube_url = models.URLField(blank=True, help_text="The YouTube link provided should be in the following format: 'https://www.youtube.com/embed/[slug]'. You can get this by right-clicking on the YouTube video player and pressing 'Copy embed code'; this will give you a full embed code, which you will need to take the embed URL from.") + our_values_youtube_subtitle = models.CharField(blank=True) + + work_culture_title = models.CharField(default="Work Culture & Benefits") + work_culture_description = RichTextField(blank=True) + work_culture_youtube_url = models.URLField(blank=True) + work_culture_youtube_subtitle = models.CharField(blank=True, help_text="The YouTube link provided should be in the following format: 'https://www.youtube.com/embed/[slug]'. You can get this by right-clicking on the YouTube video player and pressing 'Copy embed code'; this will give you a full embed code, which you will need to take the embed URL from.") + + testimonials_title = models.CharField(default="What Our Staff Say") + testimonials = StreamField([ + ('block', StructBlock([ + ('description', RichTextBlock(blank=True, null=True, required=False)), + ('member', PageChooserBlock(page_type="members.IndividualMemberPage", required=False)), + ('image_override', ImageChooserBlock(required=False)), + ('name_override', CharBlock(required=False)), + ('title_override', CharBlock(required=False)), + ('hub_override', PageChooserBlock(page_type="mapping_hubs.IndividualMappingHubPage", required=False)) + ])) + ], use_json_field=True, null=True, blank=True, help_text="For any given testimonial, you can choose a member to be displayed, or you can alternatively manually provide the member's details; if both are provided, the manually-entered details will override any details fetched from the member's page.") + + opportunities_image = models.ForeignKey( + "wagtailimages.Image", + null=True, + blank=True, + on_delete=models.SET_NULL, + related_name="+", + help_text="Opportunities image" + ) + opportunities_title = models.CharField(default="See Our Job Opportunities") + opportunities_description = RichTextField(blank=True) + opportunities_button_text = models.CharField(default="See all job opportunities") + opportunities_button_link = StreamField(LinkOrPageBlock(), use_json_field=True, blank=True) + + content_panels = Page.content_panels + [ + MultiFieldPanel([ + FieldPanel('header_image'), + FieldPanel('header_text'), + ], heading="Header"), + MultiFieldPanel([ + FieldPanel('our_values_title'), + FieldPanel('our_values_text'), + FieldPanel('our_values_youtube_url'), + FieldPanel('our_values_youtube_subtitle'), + ], heading="Our Values"), + MultiFieldPanel([ + FieldPanel('work_culture_title'), + FieldPanel('work_culture_description'), + FieldPanel('work_culture_youtube_url'), + FieldPanel('work_culture_youtube_subtitle'), + ], heading="Work Culture"), + MultiFieldPanel([ + FieldPanel('testimonials_title'), + FieldPanel('testimonials'), + ], heading="Testimonials"), + MultiFieldPanel([ + FieldPanel('opportunities_image'), + FieldPanel('opportunities_title'), + FieldPanel('opportunities_description'), + FieldPanel('opportunities_button_text'), + FieldPanel('opportunities_button_link'), + ], heading="Opportunities"), + ] + + +class LivingStrategyPage(Page): + max_count = 1 + + desktop_size_non_full_body_width = models.BooleanField() + + banner_image = models.ForeignKey( + "wagtailimages.Image", + null=True, + blank=True, + on_delete=models.SET_NULL, + related_name="+", + help_text="Header image" + ) + + download_title = models.CharField(default="Download our Living Strategy Summary") + downloads = StreamField([('block', StructBlock([ + ('text', CharBlock()), + ('link', LinkOrPageBlock(required=False)), + ]))], use_json_field=True, blank=True) + + description = RichTextField(blank=True) + + content_panels = Page.content_panels + [ + FieldPanel('desktop_size_non_full_body_width'), + FieldPanel('banner_image'), + FieldPanel('download_title'), + FieldPanel('downloads'), + FieldPanel('description'), + ] diff --git a/app/misc/templates/misc/contact_us_page.html b/app/misc/templates/misc/contact_us_page.html new file mode 100644 index 0000000..a7de22d --- /dev/null +++ b/app/misc/templates/misc/contact_us_page.html @@ -0,0 +1,96 @@ +{% extends "base.html" %} +{% load static %} +{% load wagtailcore_tags %} +{% load wagtailimages_tags %} +{% load compress %} +{% block body_class %}template-contactuspage{% endblock %} +{% block extra_css %} + {% compress css %} + {% endcompress css %} +{% endblock extra_css %} + +{% block content %} + {% include "ui/components/BasePageHeader.html" with title=page.title image=page.header_image endinlarge=True full_length=True %} + +
+
+
+
+ {% include "ui/components/SectionHeadingWithUnderline.html" with title=page.global_office_title %} +
+ {{page.global_office_text|richtext}} +
+
+
+

+ {{page.send_message_title}} +

+ +
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ + {% include "ui/components/icon_svgs/LinkCaret.html" with class="mr-4 text-hot-red rotate-90" %} +
+
+
+ {% for subject in page.subject_field_options %} +

+ {{subject.value.subject}} +

+ {% endfor %} +
+
+
+
+ + +
+
+ +
+
+
+
+
+
+ {% include "ui/components/SectionHeadingWithUnderline.html" with title=page.inquiries_title %} +
+ {% for block in page.inquiries_blocks %} +
+

{{block.value.title}}

+

{{block.value.email}}

+
+ {% endfor %} +
+
+
+ {% include "ui/components/SectionHeadingWithUnderline.html" with title=page.office_locations_title %} +
+ {% for location in page.office_locations %} +
+

{{location.value.title}}

+

{% include "ui/components/BaseLinkNoUnderline.html" with linktext=page.office_locations_visit_page_text linkurl=location.value.link %}

+

{{location.value.description}}

+
+ {% endfor %} +
+
+
+
+
+{% endblock %} diff --git a/app/misc/templates/misc/living_strategy_page.html b/app/misc/templates/misc/living_strategy_page.html new file mode 100644 index 0000000..62d8350 --- /dev/null +++ b/app/misc/templates/misc/living_strategy_page.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} +{% load static %} +{% load wagtailcore_tags %} +{% load wagtailimages_tags %} +{% load compress %} +{% block body_class %}template-livingstrategypage{% endblock %} +{% block extra_css %} + {% compress css %} + {% endcompress css %} +{% endblock extra_css %} + +{% block content %} +
+
+
+

{{page.title}}

+ {% image page.banner_image original %} + +

{{page.download_title}}

+
+ {% for download in page.downloads %} + {% include "ui/components/BaseLink.html" with linktext=download.value.text linkurl=download.value.link %} + {% endfor %} +
+
+ {{page.description|richtext}} +
+
+
+
+{% endblock %} diff --git a/app/misc/templates/misc/work_for_hot_page.html b/app/misc/templates/misc/work_for_hot_page.html new file mode 100644 index 0000000..8121b48 --- /dev/null +++ b/app/misc/templates/misc/work_for_hot_page.html @@ -0,0 +1,59 @@ +{% extends "base.html" %} +{% load static %} +{% load wagtailcore_tags %} +{% load wagtailimages_tags %} +{% load compress %} +{% block body_class %}template-workforhotpage{% endblock %} +{% block extra_css %} + {% compress css %} + {% endcompress css %} +{% endblock extra_css %} + +{% block content %} + {% include "ui/components/PageHeaderWithBlur.html" with title=page.title subtitle=page.header_text image=page.header_image full_length=True %} + +
+
+ {% comment %} OUR VALUES {% endcomment %} +
+
+ {% include "ui/components/SectionHeadingWithUnderline.html" with title=page.our_values_title %} +
+ {{ page.our_values_text|richtext }} +
+
+ {% if page.our_values_youtube_url %} +
+ +

{{page.our_values_youtube_subtitle}}

+
+ {% endif %} +
+ + {% comment %} WORK CULTURE & BENEFITS {% endcomment %} +
+ {% if page.work_culture_youtube_url %} +
+ +

{{page.work_culture_youtube_subtitle}}

+
+ {% endif %} +
+ {% include "ui/components/SectionHeadingWithUnderline.html" with title=page.work_culture_title %} +
+ {{ page.work_culture_description|richtext }} +
+
+
+ + {% comment %} STAFF TESTIMONIALS {% endcomment %} +
+ {% include "ui/components/carousel/CarouselStaffTestimonial.html" with title=page.testimonials_title items=page.testimonials %} +
+
+
+ +
+ {% include "ui/components/sections/NavyBackgroundWithImage.html" with image=page.opportunities_image title=page.opportunities_title description=page.opportunities_description button_text=page.opportunities_button_text button_link=page.opportunities_button_link imageright=True %} +
+{% endblock %} diff --git a/app/our_work/migrations/0004_alter_ourworkpage_black_box_link_and_more.py b/app/our_work/migrations/0004_alter_ourworkpage_black_box_link_and_more.py new file mode 100644 index 0000000..9860c72 --- /dev/null +++ b/app/our_work/migrations/0004_alter_ourworkpage_black_box_link_and_more.py @@ -0,0 +1,31 @@ +# Generated by Django 4.2.7 on 2024-09-03 21:39 + +from django.db import migrations +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('our_work', '0003_ourworkpage_no_projects_found_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='ourworkpage', + name='black_box_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='ourworkpage', + name='red_box_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='ourworkpage', + name='view_all_programs_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + ] diff --git a/app/partners/migrations/0011_alter_ourpartnerspage_black_box_link_url_and_more.py b/app/partners/migrations/0011_alter_ourpartnerspage_black_box_link_url_and_more.py new file mode 100644 index 0000000..c8421a8 --- /dev/null +++ b/app/partners/migrations/0011_alter_ourpartnerspage_black_box_link_url_and_more.py @@ -0,0 +1,46 @@ +# Generated by Django 4.2.7 on 2024-09-03 21:39 + +from django.db import migrations +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('partners', '0010_remove_ourpartnerspage_call_to_action_description_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='ourpartnerspage', + name='black_box_link_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='ourpartnerspage', + name='red_box_link_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='partnerwithuspage', + name='call_to_action_link_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='partnerwithuspage', + name='red_box_link_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='partnerwithuspage', + name='view_all_partners_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='partnerwithuspage', + name='view_partners_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + ] diff --git a/app/rfp/templates/rfp/request_for_proposal_owner_page.html b/app/rfp/templates/rfp/request_for_proposal_owner_page.html index 96a9722..7367231 100644 --- a/app/rfp/templates/rfp/request_for_proposal_owner_page.html +++ b/app/rfp/templates/rfp/request_for_proposal_owner_page.html @@ -57,7 +57,7 @@

- {% include "ui/components/sections/NavyBackgroundWithImage.html" with image=page.job_opportunities_image title=page.job_opportunities_title description=page.job_opportunities_description button_text=page.job_opportunities_button_text button_link=page.job_opportunities_button_link %} + {% include "ui/components/sections/NavyBackgroundWithImage.html" with image=page.job_opportunities_image title=page.job_opportunities_title description=page.job_opportunities_description button_text=page.job_opportunities_button_text button_link=page.job_opportunities_button_link imageright=True %}
diff --git a/app/tech/migrations/0004_alter_individualtechstackpage_link_blocks_and_more.py b/app/tech/migrations/0004_alter_individualtechstackpage_link_blocks_and_more.py new file mode 100644 index 0000000..85362ba --- /dev/null +++ b/app/tech/migrations/0004_alter_individualtechstackpage_link_blocks_and_more.py @@ -0,0 +1,41 @@ +# Generated by Django 4.2.7 on 2024-09-03 21:39 + +from django.db import migrations +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('tech', '0003_techproductsuitepage_product_suite_learn_more_text_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='individualtechstackpage', + name='link_blocks', + field=wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('linktext', wagtail.blocks.CharBlock()), ('linkurl', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())]))]))], blank=True, null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='techproductsuitepage', + name='black_box_link_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='techproductsuitepage', + name='go_back_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='techproductsuitepage', + name='red_box_link_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='techproductsuitepage', + name='tech_stack_cta_button_link_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + ] diff --git a/app/tools_and_resources/migrations/0006_alter_openmappingsolutionspage_cta_button_link_and_more.py b/app/tools_and_resources/migrations/0006_alter_openmappingsolutionspage_cta_button_link_and_more.py new file mode 100644 index 0000000..21f0733 --- /dev/null +++ b/app/tools_and_resources/migrations/0006_alter_openmappingsolutionspage_cta_button_link_and_more.py @@ -0,0 +1,37 @@ +# Generated by Django 4.2.7 on 2024-09-03 21:39 + +from django.db import migrations +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields +import wagtail.images.blocks + + +class Migration(migrations.Migration): + + dependencies = [ + ('tools_and_resources', '0005_alter_openmappingsolutionspage_solutions'), + ] + + operations = [ + migrations.AlterField( + model_name='openmappingsolutionspage', + name='cta_button_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='openmappingsolutionspage', + name='solutions', + field=wagtail.fields.StreamField([('solution', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('banner', wagtail.images.blocks.ImageChooserBlock()), ('description', wagtail.blocks.RichTextBlock()), ('items', wagtail.blocks.StreamBlock([('item', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('description', wagtail.blocks.RichTextBlock()), ('links', wagtail.blocks.StreamBlock([('link', wagtail.blocks.StructBlock([('linktext', wagtail.blocks.CharBlock()), ('linkurl', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], required=False))]))], required=False))]))]))]))], blank=True, null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='resourceandlearningpage', + name='large_panels', + field=wagtail.fields.StreamField([('panel', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('title', wagtail.blocks.CharBlock()), ('description', wagtail.blocks.RichTextBlock()), ('link_text', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], required=False))]))], blank=True, null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='toolsandresourcespage', + name='large_panels', + field=wagtail.fields.StreamField([('panel', wagtail.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock()), ('title', wagtail.blocks.CharBlock()), ('description', wagtail.blocks.RichTextBlock()), ('link_text', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], required=False))]))], blank=True, null=True, use_json_field=True), + ), + ] diff --git a/app/ui/templates/ui/components/BaseLinkNoUnderline.html b/app/ui/templates/ui/components/BaseLinkNoUnderline.html new file mode 100644 index 0000000..a956ca3 --- /dev/null +++ b/app/ui/templates/ui/components/BaseLinkNoUnderline.html @@ -0,0 +1,4 @@ + + {{linktext}} + {% include "ui/components/icon_svgs/LinkCaret.html" with class="ml-2" %} + \ No newline at end of file diff --git a/app/ui/templates/ui/components/carousel/CarouselShellGeneric.html b/app/ui/templates/ui/components/carousel/CarouselShellGeneric.html new file mode 100644 index 0000000..ca1f692 --- /dev/null +++ b/app/ui/templates/ui/components/carousel/CarouselShellGeneric.html @@ -0,0 +1,55 @@ +{% load wagtailimages_tags %} +
+
+ {% if title %} +
+ {% include "ui/components/SectionHeadingWithUnderline.html" %} +
+ {% endif %} + +
+ +
+ {% for item in items %} +
+ {% block individual_item %} + {% endblock %} +
+ {% endfor %} +
+ +
+
+
+ {% include "ui/components/icon_svgs/LinkCaret.html" with class="rotate-180" %} +
+
+
+
+ {% include "ui/components/icon_svgs/LinkCaret.html" %} +
+
+
+
\ No newline at end of file diff --git a/app/ui/templates/ui/components/carousel/CarouselStaffTestimonial.html b/app/ui/templates/ui/components/carousel/CarouselStaffTestimonial.html new file mode 100644 index 0000000..946c820 --- /dev/null +++ b/app/ui/templates/ui/components/carousel/CarouselStaffTestimonial.html @@ -0,0 +1,72 @@ +{% extends "ui/components/carousel/CarouselShellGeneric.html" %} +{% load wagtailimages_tags %} + +{% block individual_item %} +
+

+
{{item.value.description}}
+
+ {% if item.value.image_override %} + {% image item.value.image_override original class="rounded-full aspect-square object-cover w-12 h-12" %} + {% else %} + {% if item.value.member %} + {% image item.value.member.image original class="rounded-full aspect-square object-cover w-12 h-12" %} + {% endif %} + {% endif %} +
+

+ {% if item.value.name_override %}{{item.value.name_override}}{% else %}{% if item.value.member %}{{item.value.member.title}}{% endif %}{% endif %} + + {% comment %} it's times like these that you really wish django let you use brackets in if statements. but alas {% endcomment %} + {% if item.value.title_override or item.value.hub_override %} + , + {% else %} + {% if item.value.member %} + {% if item.value.member.location_hub or item.value.member.position %} + , + {% endif %} + {% endif %} + {% endif %} + + {% if item.value.title_override %} + {{item.value.title_override}} + {% if item.value.hub_override or item.value.member and item.value.member.position %}-{% endif %} + {% else %} + {% if item.value.member and item.value.member.position %} + {{item.value.member.position}} + {% if item.value.hub_override or item.value.member and item.value.member.position %}-{% endif %} + {% endif %} + {% endif %} + + {% if item.value.hub_override %} + {{item.value.hub_override.title}} + {% else %} + {% if item.value.member and item.value.member.location_hub %} + {{item.value.member.location_hub.title}} + {% endif %} + {% endif %} + +

+ +
+
+
+{% endblock %} \ No newline at end of file diff --git a/app/ui/templates/ui/components/events/EventPreviewBlockEvent.html b/app/ui/templates/ui/components/events/EventPreviewBlockEvent.html index 791d142..0335714 100644 --- a/app/ui/templates/ui/components/events/EventPreviewBlockEvent.html +++ b/app/ui/templates/ui/components/events/EventPreviewBlockEvent.html @@ -40,10 +40,7 @@

- - {{event.get_parent.specific.event_read_more_text}} - {% include "ui/components/icon_svgs/LinkCaret.html" with class="ml-2" %} - + {% include "ui/components/BaseLinkNoUnderline.html" with linktext=event.get_parent.specific.event_read_more_text linkurl=event.url %}

{% if event.rsvp_link %} diff --git a/app/ui/templates/ui/components/sections/LinkListSection.html b/app/ui/templates/ui/components/sections/LinkListSection.html index f06fe00..4aff05a 100644 --- a/app/ui/templates/ui/components/sections/LinkListSection.html +++ b/app/ui/templates/ui/components/sections/LinkListSection.html @@ -19,7 +19,7 @@

{{title}}

{% else %} {{link.value.text}} - {% include "ui/components/icon_svgs/ExternalLinkIcon.html" with class="mb-1" %} + {% include "ui/components/icon_svgs/ExternalLinkIcon.html" with class="mb-1" %} {% endif %}

diff --git a/app/who_we_are/migrations/0006_alter_whowearepage_black_box_link_and_more.py b/app/who_we_are/migrations/0006_alter_whowearepage_black_box_link_and_more.py new file mode 100644 index 0000000..2a40e58 --- /dev/null +++ b/app/who_we_are/migrations/0006_alter_whowearepage_black_box_link_and_more.py @@ -0,0 +1,56 @@ +# Generated by Django 4.2.7 on 2024-09-03 21:39 + +from django.db import migrations +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('who_we_are', '0005_remove_whowearepage_black_box_link_url_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='whowearepage', + name='black_box_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='whowearepage', + name='learn_more_button_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='whowearepage', + name='our_approach_button_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='whowearepage', + name='our_people_links', + field=wagtail.fields.StreamField([('link_block', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, required=False))]))], blank=True, null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='whowearepage', + name='our_policies_links', + field=wagtail.fields.StreamField([('link_block', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, required=False))]))], blank=True, null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='whowearepage', + name='partners_view_all_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='whowearepage', + name='red_box_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='whowearepage', + name='work_hot_button_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + ] diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index 36fb3b6..7aa816e 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -31,6 +31,7 @@ module.exports = { archivo: "var(--font-archivo)", }, fontSize: { + hxl: "var(--font-size-hxl)", h1: "var(--font-size-h1)", // 56pt h2: "var(--font-size-h2)", // 48pt h3: "var(--font-size-h3)", // 38pt diff --git a/home/migrations/0034_alter_homepage_carousel_alter_homepage_e404_links_and_more.py b/home/migrations/0034_alter_homepage_carousel_alter_homepage_e404_links_and_more.py new file mode 100644 index 0000000..6661291 --- /dev/null +++ b/home/migrations/0034_alter_homepage_carousel_alter_homepage_e404_links_and_more.py @@ -0,0 +1,66 @@ +# Generated by Django 4.2.7 on 2024-09-03 21:39 + +from django.db import migrations +import wagtail.blocks +import wagtail.documents.blocks +import wagtail.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('home', '0033_remove_homepage_get_involved_button_link_and_more'), + ] + + operations = [ + migrations.AlterField( + model_name='homepage', + name='carousel', + field=wagtail.fields.StreamField([('slides', wagtail.blocks.StructBlock([('header', wagtail.blocks.CharBlock(help_text='Slide header', required=True)), ('body', wagtail.blocks.CharBlock(help_text='Slide body', required=True)), ('action_button', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock(help_text='Text to display on the button', required=True)), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, help_text='URL to link to', required=False))], help_text='Button to display on the slide', required=False))]))], blank=True, use_json_field=True, verbose_name='Carousel'), + ), + migrations.AlterField( + model_name='homepage', + name='e404_links', + field=wagtail.fields.StreamField([('link', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], required=False))]))], blank=True, help_text='Links to be shown on the 404 page.', null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='homepage', + name='footer_bottom_links', + field=wagtail.fields.StreamField([('link', wagtail.blocks.StructBlock([('text', wagtail.blocks.CharBlock()), ('link', wagtail.blocks.StreamBlock([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], required=False))]))], blank=True, help_text='The links which show in the bottom right corner of the footer; Privacy Policy, Terms and Conditions, etc.', null=True, use_json_field=True), + ), + migrations.AlterField( + model_name='homepage', + name='get_involved_button_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='homepage', + name='mapping_hubs_link_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='homepage', + name='partner_with_us_button_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='homepage', + name='tools_resources_button_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='homepage', + name='view_all_news_link', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='homepage', + name='view_all_programs_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + migrations.AlterField( + model_name='homepage', + name='who_we_are_button_url', + field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock()), ('document', wagtail.documents.blocks.DocumentChooserBlock())], blank=True, use_json_field=True), + ), + ] diff --git a/home/models.py b/home/models.py index 31f5352..c72b59e 100644 --- a/home/models.py +++ b/home/models.py @@ -88,7 +88,7 @@ def get_context(self, request, *args, **kwargs): e404_links = StreamField([ ('link', StructBlock([ ('text', CharBlock()), - ('link', CharBlock(required=False)) + ('link', LinkOrPageBlock(required=False)) ])) ], use_json_field=True, null=True, blank=True, help_text="Links to be shown on the 404 page.") diff --git a/home/templates/home/components/404Content.html b/home/templates/home/components/404Content.html index e045c80..a7e8087 100644 --- a/home/templates/home/components/404Content.html +++ b/home/templates/home/components/404Content.html @@ -6,7 +6,7 @@

{{home_page.e404_title}}

{% for link in home_page.e404_links %}

- {% include "ui/components/BaseLink.html" with linktext=link.value.text linkurl=link.value.url %} + {% include "ui/components/BaseLink.html" with linktext=link.value.text linkurl=link.value.link %}

{% endfor %}
\ No newline at end of file diff --git a/hot_osm/static/css/hot_osm.css b/hot_osm/static/css/hot_osm.css index 587bc93..74be538 100644 --- a/hot_osm/static/css/hot_osm.css +++ b/hot_osm/static/css/hot_osm.css @@ -22,6 +22,8 @@ font-family: var(--font-archivo); /* Font Size */ + --font-size-hxl: 3.11rem; + --font-size-h1: 2.55rem; --font-size-h1: 2.55rem; --font-size-h2: 2.11rem; --font-size-h3: 1.77rem; diff --git a/hot_osm/templates/404.html b/hot_osm/templates/404.html index 256e653..55b5242 100644 --- a/hot_osm/templates/404.html +++ b/hot_osm/templates/404.html @@ -1,8 +1,5 @@ {% extends "base.html" %} -{% load homepage_tags %} -{% get_home_page as home_page %} - {% block title %} Page not found {% endblock title %} @@ -12,6 +9,8 @@ {% block content %}

404

- {% include "home/components/404Content.html" %}
+ {% endblock content %} \ No newline at end of file