diff --git a/opentech/public/projects/migrations/0005_remove_projectpage_introduction.py b/opentech/public/projects/migrations/0005_remove_projectpage_introduction.py deleted file mode 100644 index 6db1b7ff346d47753a9d667a61e7db9e6c308ae5..0000000000000000000000000000000000000000 --- a/opentech/public/projects/migrations/0005_remove_projectpage_introduction.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.0.2 on 2018-08-28 09:40 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('projects', '0004_projectpage_categories'), - ] - - operations = [ - migrations.RemoveField( - model_name='projectpage', - name='introduction', - ), - ] diff --git a/opentech/public/projects/models.py b/opentech/public/projects/models.py index 1e239998a90c95fb21b329c0bd4b0ae9c62c71ad..5dc745f13f6722d1b5c88a76aed646d69565411f 100644 --- a/opentech/public/projects/models.py +++ b/opentech/public/projects/models.py @@ -99,6 +99,7 @@ class ProjectPage(FundingMixin, BasePage): subpage_types = [] parent_page_types = ['ProjectIndexPage'] + introduction = models.TextField(blank=True) icon = models.ForeignKey( 'images.CustomImage', null=True, @@ -112,13 +113,15 @@ class ProjectPage(FundingMixin, BasePage): categories = models.TextField(default='{}', blank=True) search_fields = BasePage.search_fields + [ + index.SearchField('introduction'), index.SearchField('body'), ] content_panels = BasePage.content_panels + [ ImageChooserPanel('icon'), - StreamFieldPanel('body'), FieldPanel('status'), + FieldPanel('introduction'), + StreamFieldPanel('body'), InlinePanel('contact_details', label="Contact Details"), ] + FundingMixin.content_panels + [ InlinePanel('related_pages', label="Related Projects"), diff --git a/opentech/public/projects/templates/projects/project_page.html b/opentech/public/projects/templates/projects/project_page.html index 6731a7738dcc157cfa8a18cfccfe7f87df8f8b0f..40a87ce4729c77351392ee912607270d83b191ba 100644 --- a/opentech/public/projects/templates/projects/project_page.html +++ b/opentech/public/projects/templates/projects/project_page.html @@ -5,16 +5,17 @@ <div class="wrapper wrapper--small wrapper--inner-space-large"> <div class="media-box media-box--reverse"> {% include "utils/includes/media_box_icon.html" with page_icon=page.icon %} + {% if page.introduction %} <div class="media-box__content"> - <h5 class="media-box__teaser">{{ page.body }}</h5> + <h4 class="media-box__teaser media-box__teaser--projectpage-introduction">{{ page.introduction }}</h4> </div> + {% endif %} </div> <div class="wrapper wrapper--sidebar wrapper--inner-space-small"> <div> - {% include "utils/includes/funding.html" %} + {{ page.body }} </div> - <div> {% with contact_details=page.contact_details.all %} {% if contact_details %} @@ -29,8 +30,18 @@ </div> </div> + + {% include "projects/includes/project_status.html" %} + <div class="wrapper wrapper--inner-space-small"> + <div> + {% include "utils/includes/funding.html" %} + </div> + + </div> + + {% if page.category_options.all %} <div class="grid grid--two grid--small-gap"> {% regroup page.category_options by category as categories %} diff --git a/opentech/static_src/src/sass/public/components/_media-box.scss b/opentech/static_src/src/sass/public/components/_media-box.scss index 47b8e2d7e623c41f05fe9916eb33b85f4cd31462..ace24b8e98d9a1818f351edd69ddafc55cc36cf1 100644 --- a/opentech/static_src/src/sass/public/components/_media-box.scss +++ b/opentech/static_src/src/sass/public/components/_media-box.scss @@ -126,8 +126,12 @@ } .media-box--reverse & { - @extend %h5; + @include responsive-font-sizes(15px, map-get($font-sizes, epsilon)); display: block; + + &--projectpage-introduction { + @include responsive-font-sizes(18px, map-get($font-sizes, delta)); + } } .media-box--reverse:hover & {