-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from hotosm/feat/data-principles-tech-stack
data principles, tech product suite, and individual tech stack pages
- Loading branch information
Showing
22 changed files
with
682 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Generated by Django 4.2.7 on 2024-07-29 17:38 | ||
|
||
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'), | ||
('wagtailcore', '0089_log_entry_data_json_null_to_object'), | ||
('misc', '0005_joinourconversationpage_black_box_link_url_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='DataPrinciplesPage', | ||
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')), | ||
('intro', wagtail.fields.RichTextField(blank=True)), | ||
('body_text', wagtail.fields.RichTextField(blank=True)), | ||
('info_blocks', wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('icon', wagtail.images.blocks.ImageChooserBlock()), ('title', wagtail.blocks.CharBlock()), ('description', wagtail.blocks.RichTextBlock())]))], blank=True, null=True, use_json_field=True)), | ||
('footer_text', wagtail.fields.RichTextField(blank=True)), | ||
('footer_button_text', models.CharField(blank=True)), | ||
('footer_button_link', wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock())], blank=True, use_json_field=True)), | ||
('body_image', models.ForeignKey(blank=True, help_text='Body image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image')), | ||
('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',), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
app/misc/migrations/0007_alter_dataprinciplespage_footer_button_text.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,18 @@ | ||
# Generated by Django 4.2.7 on 2024-07-29 17:51 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('misc', '0006_dataprinciplespage'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='dataprinciplespage', | ||
name='footer_button_text', | ||
field=models.CharField(default='View the Principles as a Presentation'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{% extends "base.html" %} | ||
{% load static %} | ||
{% load wagtailcore_tags %} | ||
{% load wagtailimages_tags %} | ||
{% load compress %} | ||
{% block body_class %}template-dataprinciplespage{% endblock %} | ||
{% block extra_css %} | ||
{% compress css %} | ||
{% endcompress css %} | ||
{% endblock extra_css %} | ||
|
||
{% block content %} | ||
{% include "ui/components/PageHeaderWithBlur.html" with title=page.title image=page.header_image endinlarge=True full_length=True %} | ||
|
||
<div class="max-w-7xl mx-auto my-10"> | ||
<div class="px-6 md:px-10"> | ||
<div class="lg:grid lg:grid-cols-6 mb-10"> | ||
<div class="col-span-5 text-intro font-medium"> | ||
{{page.intro|safe}} | ||
</div> | ||
</div> | ||
|
||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8"> | ||
<div class="base-article-m"> | ||
{{page.body_text|safe}} | ||
</div> | ||
<div class="base-article-m"> | ||
{% image page.body_image original %} | ||
</div> | ||
</div> | ||
|
||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8 my-10"> | ||
{% for block in page.info_blocks %} | ||
<div class="bg-hot-off-white p-8"> | ||
<h1 class="flex items-center gap-8 text-h3 font-bold pb-4"> | ||
{% image block.value.icon original class="inline" %} | ||
<span> | ||
{{block.value.title}} | ||
</span> | ||
</h1> | ||
<div class="base-article-m [&_p]:mb-4"> | ||
{{block.value.description}} | ||
</div> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
|
||
<div class="lg:grid lg:grid-cols-6 my-20"> | ||
<div class="col-span-5"> | ||
{{page.footer_text|safe}} | ||
|
||
<div class="mt-8"> | ||
<a href="{%include 'ui/components/PageOrLinkHrefText.html' with linkurl=page.footer_button_link%}"> | ||
{% include "components/branded_elements/button.html" with text=page.footer_button_text %} | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
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,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
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,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class TechConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'app.tech' |
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,68 @@ | ||
# Generated by Django 4.2.7 on 2024-07-30 19:04 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import wagtail.blocks | ||
import wagtail.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
('wagtailcore', '0089_log_entry_data_json_null_to_object'), | ||
('wagtailimages', '0025_alter_image_file_alter_rendition_file'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='TechProductSuitePage', | ||
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')), | ||
('intro', wagtail.fields.RichTextField(blank=True)), | ||
('tech_principles_title', models.CharField(default='Tech Principles')), | ||
('tech_principle_blocks', wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('description', wagtail.blocks.RichTextBlock())]))], blank=True, help_text='Blocks to be shown under the Tech Principles section.', null=True, use_json_field=True)), | ||
('product_suite_title', models.CharField(default='Product Suite')), | ||
('red_box_title', models.CharField(default='Join a working group')), | ||
('red_box_link_text', models.CharField(default='Working Groups')), | ||
('red_box_link_url', wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock())], blank=True, use_json_field=True)), | ||
('black_box_title', models.CharField(default='Contact a mapping community')), | ||
('black_box_link_text', models.CharField(default='Community Contact')), | ||
('black_box_link_url', wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock())], blank=True, use_json_field=True)), | ||
('go_back_text', models.CharField(default='Go Back to Tools & Resources')), | ||
('go_back_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',), | ||
), | ||
migrations.CreateModel( | ||
name='IndividualTechStackPage', | ||
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')), | ||
('intro', wagtail.fields.RichTextField(blank=True)), | ||
('body_text', wagtail.fields.RichTextField(blank=True)), | ||
('info_blocks', wagtail.fields.StreamField([('blocks', wagtail.blocks.StructBlock([('title', wagtail.blocks.CharBlock()), ('description', wagtail.blocks.RichTextBlock())]))], blank=True, null=True, use_json_field=True)), | ||
('section_title', models.CharField(blank=True)), | ||
('section_intro', wagtail.fields.RichTextField(blank=True)), | ||
('section_description', wagtail.fields.RichTextField(blank=True)), | ||
('links_title', models.CharField(default='Link')), | ||
('link_blocks', 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())]))]))], blank=True, null=True, use_json_field=True)), | ||
('cta_title', models.CharField(blank=True)), | ||
('cta_description', wagtail.fields.RichTextField(blank=True)), | ||
('cta_button_link_text', models.CharField(blank=True)), | ||
('cta_button_link_url', wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock())], blank=True, use_json_field=True)), | ||
('go_back_text', models.CharField(default='Go Back to Tech Stack')), | ||
('go_back_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')), | ||
('section_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',), | ||
), | ||
] |
93 changes: 93 additions & 0 deletions
93
app/tech/migrations/0002_remove_individualtechstackpage_cta_button_link_text_and_more.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,93 @@ | ||
# Generated by Django 4.2.7 on 2024-07-30 22:21 | ||
|
||
from django.db import migrations, models | ||
import wagtail.blocks | ||
import wagtail.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('tech', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='individualtechstackpage', | ||
name='cta_button_link_text', | ||
), | ||
migrations.RemoveField( | ||
model_name='individualtechstackpage', | ||
name='cta_button_link_url', | ||
), | ||
migrations.RemoveField( | ||
model_name='individualtechstackpage', | ||
name='cta_description', | ||
), | ||
migrations.RemoveField( | ||
model_name='individualtechstackpage', | ||
name='cta_title', | ||
), | ||
migrations.RemoveField( | ||
model_name='individualtechstackpage', | ||
name='go_back_link', | ||
), | ||
migrations.RemoveField( | ||
model_name='individualtechstackpage', | ||
name='go_back_text', | ||
), | ||
migrations.RemoveField( | ||
model_name='individualtechstackpage', | ||
name='links_title', | ||
), | ||
migrations.AddField( | ||
model_name='techproductsuitepage', | ||
name='tech_stack_cta_button_link_text', | ||
field=models.CharField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='techproductsuitepage', | ||
name='tech_stack_cta_button_link_url', | ||
field=wagtail.fields.StreamField([('page', wagtail.blocks.PageChooserBlock()), ('url', wagtail.blocks.URLBlock())], blank=True, use_json_field=True), | ||
), | ||
migrations.AddField( | ||
model_name='techproductsuitepage', | ||
name='tech_stack_cta_description', | ||
field=wagtail.fields.RichTextField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='techproductsuitepage', | ||
name='tech_stack_cta_title', | ||
field=models.CharField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='techproductsuitepage', | ||
name='tech_stack_go_back_text', | ||
field=models.CharField(default='Go Back to'), | ||
), | ||
migrations.AddField( | ||
model_name='techproductsuitepage', | ||
name='tech_stack_links_title', | ||
field=models.CharField(default='Links'), | ||
), | ||
migrations.AlterField( | ||
model_name='techproductsuitepage', | ||
name='black_box_link_text', | ||
field=models.CharField(default='View tech news'), | ||
), | ||
migrations.AlterField( | ||
model_name='techproductsuitepage', | ||
name='black_box_title', | ||
field=models.CharField(default='Tech News'), | ||
), | ||
migrations.AlterField( | ||
model_name='techproductsuitepage', | ||
name='red_box_link_text', | ||
field=models.CharField(default="View HOT's GitHub"), | ||
), | ||
migrations.AlterField( | ||
model_name='techproductsuitepage', | ||
name='red_box_title', | ||
field=models.CharField(default='HOT GitHub'), | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
app/tech/migrations/0003_techproductsuitepage_product_suite_learn_more_text_and_more.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,23 @@ | ||
# Generated by Django 4.2.7 on 2024-07-31 17:21 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('tech', '0002_remove_individualtechstackpage_cta_button_link_text_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='techproductsuitepage', | ||
name='product_suite_learn_more_text', | ||
field=models.CharField(default='Learn more about', help_text="Prefix text to be shown in page previews for the product suite section; if the page being previewed is named 'Tasking Manager', and this field is 'Learn more about', they would combine to be 'Learn more about Tasking Manager'."), | ||
), | ||
migrations.AlterField( | ||
model_name='techproductsuitepage', | ||
name='tech_stack_go_back_text', | ||
field=models.CharField(default='Go Back to', help_text="Prefix text to be shown at the bottom of page for going back; this will always refer to the parent page, so if the parent page is 'Tools & Resources', and this field is 'Go Back to', they would combine to be 'Go Back to Tools & Resources'."), | ||
), | ||
] |
Empty file.
Oops, something went wrong.