-
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 #26 from hotosm/feat/home-page-continued
home page done! (for now!)
- Loading branch information
Showing
34 changed files
with
1,051 additions
and
62 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
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
20 changes: 20 additions & 0 deletions
20
app/news/migrations/0015_alter_individualnewspage_article_body.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,20 @@ | ||
# Generated by Django 4.2.7 on 2024-05-27 23:44 | ||
|
||
from django.db import migrations | ||
import wagtail.blocks | ||
import wagtail.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('news', '0014_individualnewspage_news_read_more_text'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='individualnewspage', | ||
name='article_body', | ||
field=wagtail.fields.StreamField([('text_block', wagtail.blocks.RichTextBlock(features=['h1', 'h2', 'h3', 'h4', 'bold', 'italic', 'link', 'ol', 'ul', 'hr', 'document-link', 'image', 'embed', 'code', 'blockquote']))], blank=True, null=True, use_json_field=True), | ||
), | ||
] |
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
20 changes: 20 additions & 0 deletions
20
app/projects/migrations/0014_alter_individualprojectpage_description.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,20 @@ | ||
# Generated by Django 4.2.7 on 2024-05-27 23:44 | ||
|
||
from django.db import migrations | ||
import wagtail.blocks | ||
import wagtail.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('projects', '0013_individualprojectpage_impact_area_list'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='individualprojectpage', | ||
name='description', | ||
field=wagtail.fields.StreamField([('text_block', wagtail.blocks.RichTextBlock(features=['h1', 'h2', 'h3', 'h4', 'bold', 'italic', 'link', 'ol', 'ul', 'hr', 'document-link', 'image', 'embed', 'code', 'blockquote']))], null=True, use_json_field=True), | ||
), | ||
] |
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
26 changes: 26 additions & 0 deletions
26
app/ui/templates/ui/components/programs/ProgramCarouselBlock.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{% load wagtailimages_tags %} | ||
<div x-data="{ partnerIndex: 0, fixedIndex(x) {return ({{programs|length}} + x + this.partnerIndex) % {{programs|length}}}, moveIndex(x) {this.partnerIndex = this.fixedIndex(x)} }" class="{{class}}"> | ||
<div class="text-right mb-4"> | ||
<div x-on:click="moveIndex(1)" class="pr-4 text-hot-red inline-flex flex-col justify-center"> | ||
<div class="border-hot-red border-2 rounded-full h-8 w-8 text-center"> | ||
{% include "ui/components/icon_svgs/LinkCaret.html" with class="rotate-180" %} | ||
</div> | ||
</div> | ||
<div x-on:click="moveIndex(-1)" class="text-hot-red inline-flex flex-col justify-center"> | ||
<div class="border-hot-red border-2 rounded-full h-8 w-8 text-center"> | ||
{% include "ui/components/icon_svgs/LinkCaret.html" %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> | ||
{% for program in programs %} | ||
<div x-show="partnerIndex=={{forloop.counter0}} || fixedIndex(1)=={{forloop.counter0}} || fixedIndex(2)=={{forloop.counter0}} || fixedIndex(3)=={{forloop.counter0}}" | ||
x-bind:class="{'order-1': partnerIndex=={{forloop.counter0}}, 'order-2': fixedIndex(1)=={{forloop.counter0}}, 'order-3 hidden md:block': fixedIndex(2)=={{forloop.counter0}}, 'order-4 hidden lg:block': fixedIndex(3)=={{forloop.counter0}},}" | ||
|
||
> | ||
{% include "ui/components/programs/ProgramPreviewBlockBase.html" with program=program.value %} | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> |
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
137 changes: 137 additions & 0 deletions
137
home/migrations/0009_homepage_get_involved_button_link_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,137 @@ | ||
# Generated by Django 4.2.7 on 2024-05-27 23:44 | ||
|
||
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'), | ||
('home', '0008_blankinaccessiblepage'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='get_involved_button_link', | ||
field=models.URLField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='get_involved_button_text', | ||
field=models.CharField(default='Get Involved'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='highlighted_programs', | ||
field=wagtail.fields.StreamField([('program', wagtail.blocks.PageChooserBlock(page_type=['programs.IndividualProgramPage']))], blank=True, null=True, use_json_field=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='highlighted_programs_description', | ||
field=wagtail.fields.RichTextField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='highlighted_programs_title', | ||
field=models.CharField(default='Highlighted Programs'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='impact_areas_description', | ||
field=wagtail.fields.RichTextField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='impact_areas_title', | ||
field=models.CharField(default='Impact Areas'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='mapping_hubs_description', | ||
field=wagtail.fields.RichTextField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='mapping_hubs_title', | ||
field=wagtail.fields.RichTextField(blank=True, help_text='Any text written in bold will be displayed as red in this title.'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='opportunities_description', | ||
field=wagtail.fields.RichTextField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='opportunities_title', | ||
field=wagtail.fields.RichTextField(blank=True, help_text='Any text written in bold will be displayed as red in this title.'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='our_work_title', | ||
field=models.CharField(default='Our Work'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='partner_with_us_button_link', | ||
field=models.URLField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='partner_with_us_button_text', | ||
field=models.CharField(default='Partner With Us'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='tools_resources_button_text', | ||
field=models.CharField(default='Tools & Resources'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='tools_resources_button_url', | ||
field=models.URLField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='tools_resources_description', | ||
field=wagtail.fields.RichTextField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='tools_resources_image', | ||
field=models.ForeignKey(blank=True, help_text='Tools and Resources section image', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailimages.image'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='tools_resources_title', | ||
field=wagtail.fields.RichTextField(blank=True, help_text='Any text written in bold will be displayed as red in this title.'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='view_all_programs_text', | ||
field=models.CharField(default='View all programs'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='who_we_are_button_link', | ||
field=models.URLField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='who_we_are_button_text', | ||
field=models.CharField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='who_we_are_intro_description', | ||
field=wagtail.fields.RichTextField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='who_we_are_intro_title', | ||
field=wagtail.fields.RichTextField(blank=True, help_text='Any text written in bold will be displayed as red in this title.'), | ||
), | ||
] |
40 changes: 40 additions & 0 deletions
40
home/migrations/0010_homepage_news_title_homepage_related_news_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,40 @@ | ||
# Generated by Django 4.2.7 on 2024-05-28 00:22 | ||
|
||
from django.db import migrations, models | ||
import wagtail.blocks | ||
import wagtail.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('home', '0009_homepage_get_involved_button_link_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='news_title', | ||
field=models.CharField(default='News'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='related_news', | ||
field=wagtail.fields.StreamField([('news_page', wagtail.blocks.PageChooserBlock(page_type=['news.IndividualNewsPage']))], blank=True, null=True, use_json_field=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='view_all_news_text', | ||
field=models.CharField(default='View all news'), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='view_all_news_url', | ||
field=models.URLField(blank=True), | ||
), | ||
migrations.AddField( | ||
model_name='homepage', | ||
name='view_all_programs_link', | ||
field=models.URLField(blank=True), | ||
), | ||
] |
Oops, something went wrong.