Skip to content

Commit

Permalink
Merge pull request #1712 from uktrade/release
Browse files Browse the repository at this point in the history
Prod Release
  • Loading branch information
webbyfox authored Jan 20, 2022
2 parents 1dd6028 + b93bd15 commit 90f7039
Show file tree
Hide file tree
Showing 22 changed files with 581 additions and 123,279 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.1.0
hooks:
- id: trailing-whitespace
args: ["--markdown-linebreak-ext=md,markdown"]
Expand Down
34 changes: 32 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
# Changelog

## Pre release

### Bugs fixed

- GLS-38 - fix/update meta descriptions

### Enhancements

- GP2-3859 - Create Profile with optional Phone Number
- GLS-30 - Merge CTA banner into stats component
- GLS-24 - Removed HS code from sample export plan PDF
- GLS-53 - handle 5 stats display
- GLS-54 - Remove Ease of doing business stat from Where to export

### Hotfix

- GP2-3844 - [HOTFIX] saving cms pages
- GP2-3853 - [HOTFIX] tweak homepage hero layout for MIUK campaign

## Pre release

### Hotfix

- GP2-3844 - [HOTFIX] savingcms pages

### Bugs fixed


### Bugs fixed

### Enhancements


## [2.1.0](https://github.com/uktrade/great-cms/releases/tag/2.1.0)
[Full Changelog](https://github.com/uktrade/great-cms/compare/2.00.0...2.1.0)

### Hotfix
- GP2-3844 - [HOTFIX] saving cms pages
- GP2-3853 - [HOTFIX] tweak homepage hero layout for MIUK campaign

### Bugs fixed
- GP2-3881 - Route logged-out calls from SOO Marketplace to Magna login URL
- GP2-3859 - Telephone number validation relaxing
Expand Down Expand Up @@ -59,6 +88,7 @@
- GP2-3832 - Analytics - Create EP Event
- GP2-3803 - Custom Image browser for SEO size.
- GP2-3123 - remove redundant code
- GP2-3859 - Create Profile with optional Phone Number

## [2.00.0](https://github.com/uktrade/great-cms/releases/tag/2.0.0)
[Full Changelog](https://github.com/uktrade/great-cms/compare/1.13.3...2.0.0)
Expand Down
92 changes: 86 additions & 6 deletions core/components/sass/components/statistics/_base.scss
Original file line number Diff line number Diff line change
@@ -1,19 +1,99 @@
@import '../../partials/typography';
@import '../../partials/colours';

.statistics-card-grid {
margin-top: -15px;
// Heading and CTA offset is: 0 - (half line height) - (30px padding)
// Line height is 1.0475 for small screens and 1.1111 for larger ones,
// so using 0.55em is around average for both.
$offset: calc(0px - .55em - 30px);

.statistic-heading {
.statistics-card {
padding: 0 30px;
}

.statistics-card-heading {
margin: 0 0 $offset 0;

& span {
display: inline-block;
padding: 30px;
background: $grey;
color: $white;

@media (min-width: 768px) {
padding: 30px 60px;
}
}
}

.statistics-card-content {
margin: 0 -30px;
background: $white;
padding: 60px 30px;

& .statistic-heading {
margin-bottom: 0.5em;
}

.statistic-number {
margin-bottom: 0.4em;
& .statistic-number {
margin-bottom: 0;
font-family: $brand-font;
}

.statistic-smallprint {
& .statistic-smallprint {
color: $mid-grey;
}

& .flex-grid {
flex-direction: row;
flex-wrap: wrap;
}
}

.statistics-card__column {
flex: 1 0 100%;

@media (min-width: 480px) {
flex-basis: 50%;
max-width: 50%;
}

@media (min-width: 768px) {
flex-basis: 33.3333%;
max-width: 33.3333%;
}

&.statistics-card__column-5 {
@media (min-width: 961px) {
flex-basis: 20%;
max-width: 20%;
}
}

&.statistics-card__column-6 {
@media (min-width: 1024px) {
flex-basis: 16.6666%;
max-width: 16.6666%;
}
}
}


.statistics-card-cta {
margin: $offset 0 0 0;
text-align: right;

& .cta-link {
& span {
text-align: center;
padding: 25px 30px;

@media (min-width: 768px) {
padding: 25px 60px;
}
}

&:after {
margin-right: 15px;
}
}
}
96 changes: 63 additions & 33 deletions core/templates/components/statistics_card_grid.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,69 @@
{% comment %}
Args:
statistics - streamfield of IndividualStatisticBlocks
Args:
statistics - streamfield of IndividualStatisticBlocks
{% endcomment %}

<div class="statistics-card-grid flex-grid underline-active-blue">
{% with statistics|length as num_of_statistics %}
{% load component_tags %}

<div class="statistics-card margin-vertical-30">
<h2 class="statistics-card-heading heading-large">
<span>{{ country }}: at a glance</span>
</h2>

<div class="statistics-card-content">
<div class="flex-grid">
{% with statistics|length as num_of_statistics %}
{% for statistics_block in statistics %}
{% if statistics_block.value.number %}
{% if num_of_statistics >= 6 %}
<figure class="padding-vertical-15 column-half column-third-l column-sixth-xl">
{% elif num_of_statistics == 5 %}
<figure class="padding-vertical-15 column-half column-third-l column-sixth-xl">
{% elif num_of_statistics == 4 %}
<figure class="padding-vertical-15 column-half column-quarter-xl">
{% elif num_of_statistics == 3 %}
<figure class="padding-vertical-15 column-half column-third-l">
{% else %}
<figure class="padding-vertical-15 column-half">
{% endif %}

{% if not number_first %}
<p class="statistic-heading font-xsmall">{{ statistics_block.value.heading }}</p>
{% endif %}
<p class="active-blue-text statistic-number {% if statistics_block.value.number|length > 8 %} bold-medium{% else %} bold-large{% endif %}">
{{ statistics_block.value.number }}
</p>
{% if number_first %}
<p class="statistic-heading font-xsmall">{{ statistics_block.value.heading }}</p>
{% endif %}
<figcaption>
<p class="font-xsmall statistic-smallprint">{{ statistics_block.value.smallprint }}</p>
</figcaption>

</figure>
{% endif %}
{% if statistics_block.value.number %}
<figure
class="padding-vertical-15 statistics-card__column statistics-card__column-{% if num_of_statistics >= 6 %}6{% else %}5{% endif %}"
>

{% if not number_first %}
<p class="statistic-heading font-xsmall">{{ statistics_block.value.heading }}</p>
{% endif %}

<p
class="active-blue-text statistic-number {% if statistics_block.value.number|length > 8 %} bold-medium{% else %} bold-large{% endif %}"
>
{{ statistics_block.value.number }}
</p>

{% if number_first %}
<p class="statistic-heading font-xsmall">{{ statistics_block.value.heading }}</p>
{% endif %}

<figcaption>
<p class="font-xsmall statistic-smallprint">{{ statistics_block.value.smallprint }}</p>
</figcaption>
</figure>
{% endif %}
{% endfor %}
{% endwith %}
{% endwith %}
</div>

<p class="font-medium">
Want to see more on {{ country }}?

{% if sso_is_logged_in %}
View additional market data, content specific to your product or sector and compare {{ country }} side by side
with other markets
{% else %}
Sign up for additional market data, content specific to your product or sector and to compare {{ country }} side
by side with other markets.
{% endif %}
</p>
</div>

<div class="statistics-card-cta">
<a href="/where-to-export/" class="cta-link with-arrow">
<span>
{% if sso_is_logged_in %}
View data
{% else %}
Sign up for free
{% endif %}
</span><br>
</a>
</div>
</div>
44 changes: 19 additions & 25 deletions domestic/templates/domestic/country_guide.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,40 +61,34 @@
</div>
</section>

<section id="country-guide-statistics-section" class="statistics padding-vertical-30">
<div class="container">
{% include 'components/statistics_card_grid.html' with statistics=page.main_statistics %}
</div>
</section>

<section id="country-guide-learning-banner" class="padding-vertical-30">
<section id="country-guide-statistics-section" class="statistics padding-vertical-30 background-stone-30">
<div class="container">
{% include 'components/learning_banner.html' with tag_text="New" heading="Is this market right for you?" sub_heading="Make the right choice by comparing data from other countries." cta_text="Compare now" cta_url="/where-to-export/" cta_alt_text="Compare now" %}
{% include 'components/statistics_card_grid.html' with statistics=page.main_statistics country=page.heading %}
</div>
</section>

{% if page.section_two_heading %}
<section id="country-guide-section-two" class="section-two padding-vertical-60">
<div class="container">
<div class="grid-row">
<div class="column-full column-two-thirds-m column-half-l">
<h2 class="heading-large margin-top-0">{{ page.section_two_heading }}</h2>
<p>{{ page.section_two_teaser }}</p>
{% if page.section_two_heading %}
<section id="country-guide-section-two" class="section-two padding-vertical-60">
<div class="container">
<div class="grid-row">
<div class="column-full column-two-thirds-m column-half-l">
<h2 class="heading-large margin-top-0">{{ page.section_two_heading }}</h2>
<p>{{ page.section_two_teaser }}</p>
</div>
</div>
</div>
</div>
</section>
</section>

{% if page.accordions %} {# This is streamfield #}
<section id="country-guide-accordions" class="accordions padding-vertical-0">
<ul>
{% for industry_block in page.accordions %}
{% if page.accordions %} {# This is streamfield #}
<section id="country-guide-accordions" class="accordions padding-vertical-0">
<ul>
{% for industry_block in page.accordions %}
{% include_block industry_block %}
{% endfor %}
</ul>
</section>
{% endfor %}
</ul>
</section>
{% endif %}
{% endif %}
{% endif %}

{% if page.fact_sheet_title %}
<section id="country-guide-section-three" class="section-three background-stone-30 padding-top-90 padding-bottom-60">
Expand Down
Loading

0 comments on commit 90f7039

Please sign in to comment.