-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First pass of international home in great-cms (#2897)
* First pass of international home in great-cms * Styling updates * Refactor styles * Updating model test in EYB index cms page class * Removing views and test_views as no longer used * Adding test_models for international * Adding test coverage to getting international icons on homepage
- Loading branch information
1 parent
59dc9d7
commit 2074154
Showing
34 changed files
with
1,050 additions
and
74 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,26 @@ | ||
from wagtail.admin.panels import FieldPanel, MultiFieldPanel | ||
|
||
|
||
class GreatInternationalHomePagePanels: | ||
content_panels = [ | ||
FieldPanel('title'), | ||
MultiFieldPanel( | ||
heading='Hero', | ||
classname='collapsible', | ||
children=[ | ||
FieldPanel('hero_image'), | ||
FieldPanel('hero_mobile_image'), | ||
FieldPanel('hero_text'), | ||
FieldPanel('hero_subtitle'), | ||
], | ||
), | ||
MultiFieldPanel( | ||
heading='Digital Entry Point CTA', | ||
classname='collapsible', | ||
children=[ | ||
FieldPanel('dep_title'), | ||
FieldPanel('dep_sub_title'), | ||
FieldPanel('dep_cards'), | ||
], | ||
), | ||
] |
Large diffs are not rendered by default.
Oops, something went wrong.
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,58 @@ | ||
from django.db import models | ||
from wagtail.fields import StreamBlock, StreamField | ||
|
||
from core.blocks import SupportTopicCardBlock | ||
from domestic.models import BaseContentPage | ||
from international import cms_panels | ||
|
||
|
||
class GreatInternationalHomePage(cms_panels.GreatInternationalHomePagePanels, BaseContentPage): | ||
# This is the main homepge for Great.gov.uk/international | ||
|
||
parent_page_types = [ | ||
'domestic.GreatDomesticHomePage', | ||
] | ||
|
||
template = 'international/index.html' | ||
|
||
# hero | ||
hero_image = models.ForeignKey( | ||
'core.AltTextImage', | ||
null=True, | ||
blank=True, | ||
on_delete=models.SET_NULL, | ||
related_name='+', | ||
) | ||
|
||
hero_mobile_image = models.ForeignKey( | ||
'core.AltTextImage', | ||
null=True, | ||
blank=True, | ||
on_delete=models.SET_NULL, | ||
related_name='+', | ||
) | ||
|
||
hero_text = models.TextField(null=True, blank=True) | ||
hero_subtitle = models.TextField(null=True, blank=True) | ||
|
||
dep_title = models.TextField(null=True, blank=True) | ||
dep_sub_title = models.TextField(null=True, blank=True) | ||
|
||
dep_cards = StreamField( | ||
[ | ||
( | ||
'cards', | ||
StreamBlock( | ||
[ | ||
('topic_card', SupportTopicCardBlock()), | ||
], | ||
block_counts={ | ||
'topic_card': {'min_num': 1}, | ||
}, | ||
), | ||
), | ||
], | ||
use_json_field=True, | ||
null=True, | ||
blank=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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// Hero banner | ||
|
||
.great-hero { | ||
position: relative; | ||
padding-top: 0; | ||
padding-bottom: 0; | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
background-position: center; | ||
|
||
|
||
& > .container { | ||
min-height: 200px; | ||
overflow: visible; | ||
padding-top: 45px; | ||
} | ||
|
||
.great-hero-no-image { | ||
background-color: $eyb-dark-blue; | ||
} | ||
|
||
.great-hero__container { | ||
@include govuk-media-query($from: desktop) { | ||
display: flex; | ||
} | ||
} | ||
|
||
.great-hero__text { | ||
max-width: 50%; | ||
min-height: 335px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: end; | ||
padding-bottom: 5px; | ||
align-items: flex-start; | ||
|
||
.great-hero-heading { | ||
color: white; | ||
font-size: 32px; | ||
} | ||
|
||
.great-hero-subheading { | ||
color: white; | ||
font-size: 18px; | ||
margin-bottom: 0px; | ||
} | ||
|
||
.great-hero-description { | ||
margin-bottom: 0; | ||
} | ||
|
||
} | ||
|
||
@media (min-width: 641px) { | ||
.great-hero__text { | ||
min-height: 560px; | ||
max-width: 567px; | ||
justify-content: center; | ||
|
||
.great-hero-heading { | ||
font-size: 60px; | ||
} | ||
|
||
.great-hero-subheading { | ||
font-size: 24px; | ||
margin-bottom: 0px; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.great-hero-cards { | ||
background: linear-gradient(270deg, #02022D 0%, #020130 100%); | ||
} |
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
42 changes: 42 additions & 0 deletions
42
international/templates/international/components/landing_hero.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,42 @@ | ||
{% load wagtailimages_tags %} | ||
{% load static %} | ||
{% image hero_image original as rendition %} | ||
{% image page.hero_mobile_image original as mobile_image %} | ||
<style> | ||
.great-hero { | ||
background-image: url({{ mobile_image.url }}); | ||
} | ||
|
||
@media (min-width: 641px) { | ||
.great-hero { | ||
background-image: url({{ rendition.url }}); | ||
} | ||
} | ||
</style> | ||
<section class="great-hero {% if not hero_image %}great-hero-no-image{% endif %}" | ||
id="hero"> | ||
<div class="govuk-width-container"> | ||
<div class="great-hero__container govuk-grid-row"> | ||
<div class="great-hero__text govuk-grid-column-one-half"> | ||
<h1 class="govuk-heading-l great-hero-heading">{{ heading }}</h1> | ||
<p class="govuk-body-m great-hero-subheading">{{ subtitle }}</p> | ||
</div> | ||
<div class="govuk-grid-column-one-half"></div> | ||
</div> | ||
</div> | ||
</section> | ||
<section class="great-hero-cards govuk-!-padding-top-3"> | ||
<div class="govuk-width-container"> | ||
<div class="govuk-grid-row great-card-row govuk-!-padding-bottom-9"> | ||
<div class="govuk-grid-column-one-third"> | ||
{% include 'components/great/card.html' with content="We can guide you every step of the way, to set up and grow your business in the UK" title="How to expand your business" url="/international/expand-your-business-in-the-uk/" show_title_link=True heading_class="govuk-heading-m" classes="international-card--cta" %} | ||
</div> | ||
<div class="govuk-grid-column-one-third"> | ||
{% include 'components/great/card.html' with content="Explore a range of property development and infrastructure projects to suit your investment" title="Find investment opportunities" url="/international/investment/" show_title_link=True heading_class="govuk-heading-m" classes="international-card--cta" %} | ||
</div> | ||
<div class="govuk-grid-column-one-third"> | ||
{% include 'components/great/card.html' with content="Get introduced to UK businesses who can partner with your business to achieve success" title="Buy UK products and services" url="/international/content/trade/how-we-help-you-buy/" show_title_link=True heading_class="govuk-heading-m" classes="international-card--cta" %} | ||
</div> | ||
</div> | ||
</div> | ||
</section> |
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
17 changes: 17 additions & 0 deletions
17
international/templates/international/includes/svg/Icon-clean-growth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.