Skip to content

Commit

Permalink
Er 918 submodule content footer component for cdt (#756)
Browse files Browse the repository at this point in the history
* Create new content footer component for CDT

* Update content footer

- Rename component
- Update component to pull data correctly from Contentful

* Govspeak and CDT style quotes concurrently (#760)

* Fix two_thirds tag and introduce image_card mimicking CDTs about page (#761)

* ER-957 Downloadable media (#762)

Custom tag using manual variables as MVP.
Dynamic variables require model association with media.

* Bump azure/login from 1 to 2 (#732)

Bumps [azure/login](https://github.com/azure/login) from 1 to 2.
- [Release notes](https://github.com/azure/login/releases)
- [Commits](Azure/login@v1...v2)

---
updated-dependencies:
- dependency-name: azure/login
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update styling for content footer

* Update styling

* Update content footer based on PR comments

* Update content footer and hr logic

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Katherine Martin <[email protected]>
Co-authored-by: Peter Hamilton <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Apr 10, 2024
1 parent b0b8909 commit 86e9fd8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/helpers/content_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ def feedback
Resource.by_name('ctas.feedback') || null_resource('ctas.feedback')
end

def child_development_training
Resource.by_name('ctas.child_development_training') || null_resource('ctas.child_development_training')
def content_footer
Resource.by_name('ctas.content_footer') || null_resource('ctas.content_footer')
end

def other_useful_resources
Expand Down
7 changes: 6 additions & 1 deletion app/views/pages/default.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@
dd.gem-c-metadata__definition
a.govuk-link href="https://www.gov.uk/government/organisations/department-for-education" Department for Education
dt.gem-c-metadata__term Published:
dd.gem-c-metadata__definition #{page.created_at.to_s(:long)}
dd.gem-c-metadata__definition = page.created_at.to_s(:long)
dt.gem-c-metadata__term Updated:
dd.gem-c-metadata__definition data-module="ga4-link-tracker" data-ga4-track-links-only="" data-ga4-link="{&quot;event_name&quot;:&quot;navigation&quot;,&quot;type&quot;:&quot;content history&quot;,&quot;section&quot;:&quot;Top&quot;,&quot;action&quot;:&quot;opened&quot;}" data-ga4-link-tracker-module-started="true" #{page.updated_at.to_s(:long)}

- if page.content_list.present?
= render 'shared/print'

.govuk-grid-column-full
hr.govuk-section-break.govuk-section-break--xl.govuk-section-break--visible

= render 'shared/ctas'

= render 'shared/content_footer'
5 changes: 5 additions & 0 deletions app/views/pages/side_nav.slim
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,9 @@
- if page.content_list.present?
= render 'shared/print'

.govuk-grid-column-full
hr.govuk-section-break.govuk-section-break--xl.govuk-section-break--visible

= render 'shared/ctas'

= render 'shared/content_footer'
13 changes: 13 additions & 0 deletions app/views/shared/_content_footer.html.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
section class='govuk-!-margin-top-7 govuk-!-margin-bottom-7'
.govuk-grid-row
.govuk-grid-column-full
.cta-banner
.cta-banner-text
span.govuk-caption-m Other early years resources from the Department for Education
h2.govuk-heading-l
= content_footer.title
= m(content_footer.body)
p
= govuk_link_to content_footer.link_to_text, content_footer.link_to, class: 'govuk-!-font-weight-bold'
.cta-banner-img
= image_tag content_footer.image.url, class: 'full-width-image', alt: content_footer.image.description, title: content_footer.image.title

0 comments on commit 86e9fd8

Please sign in to comment.