-
Notifications
You must be signed in to change notification settings - Fork 20
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 #1845 from alphagov/replace-countdown-component
Replace countdown component with sidebar partial
- Loading branch information
Showing
17 changed files
with
91 additions
and
221 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
52 changes: 46 additions & 6 deletions
52
app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss
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 |
---|---|---|
@@ -1,11 +1,51 @@ | ||
@import 'transition-countdown'; | ||
$transition-campaign-red: #ff003b; | ||
$transition-campaign-dark-blue: #1e1348; | ||
|
||
.gem-c-contextual-sidebar__brexit-cta { | ||
.gem-c-contextual-sidebar__brexit-related-links { | ||
border-top: 2px solid $govuk-brand-colour; | ||
|
||
.gem-c-contextual-sidebar__brexit-heading { | ||
@include govuk-font(19, $weight: bold); | ||
padding-top: govuk-spacing(3); | ||
margin-bottom: govuk-spacing(2); | ||
} | ||
} | ||
|
||
.gem-c-contextual-sidebar__brexit-cta { | ||
@include govuk-font(19); | ||
margin-bottom: govuk-spacing(6); | ||
background-color: govuk-colour('light-grey', $legacy: 'grey-4'); | ||
border-top: 4px solid $transition-campaign-red; | ||
display: block; | ||
padding: govuk-spacing(3); | ||
text-decoration: none; | ||
|
||
.gem-c-contextual-sidebar__brexit-heading { | ||
@extend %govuk-heading-m; | ||
color: $transition-campaign-dark-blue; | ||
} | ||
|
||
.gem-c-contextual-sidebar__brexit-text { | ||
@extend %govuk-link; | ||
|
||
margin-top: 0; | ||
margin-bottom: 0; | ||
text-decoration: underline; | ||
|
||
@include govuk-media-query($from: tablet) { | ||
margin-bottom: govuk-spacing(2); | ||
} | ||
} | ||
|
||
@include govuk-compatibility(govuk_template) { | ||
.gem-c-contextual-sidebar__brexit-title { | ||
margin-bottom: govuk-spacing(3); | ||
} | ||
} | ||
} | ||
|
||
.gem-c-contextual-sidebar__brexit-heading { | ||
@include govuk-font(19, $weight: bold); | ||
padding-top: govuk-spacing(3); | ||
margin-bottom: govuk-spacing(2); | ||
.gem-c-contextual-sidebar__brexit-cta:focus { | ||
.gem-c-contextual-sidebar__brexit-text { | ||
text-decoration: none; | ||
} | ||
} |
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
35 changes: 0 additions & 35 deletions
35
app/views/govuk_publishing_components/components/_transition_countdown.html.erb
This file was deleted.
Oops, something went wrong.
20 changes: 17 additions & 3 deletions
20
app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb
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 |
---|---|---|
@@ -1,6 +1,20 @@ | ||
<% shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) %> | ||
<% link_text = t("components.related_navigation.transition.link_text") %> | ||
<% link_path = t("components.related_navigation.transition.link_path") %> | ||
<div class="gem-c-contextual-sidebar__brexit-cta govuk-!-margin-bottom-6" data-module="track-click" lang="en"> | ||
|
||
<% data_attributes = { | ||
"module": "track-click", | ||
"track-category": "relatedLinkClicked", | ||
"track-action": "1.0 Transition", | ||
"track-label": link_path, | ||
"track-dimension": link_text, | ||
"track-dimension-index": "29", | ||
} %> | ||
|
||
<%= link_to link_path, | ||
class: "govuk-link gem-c-contextual-sidebar__brexit-cta", | ||
data: data_attributes, | ||
lang: shared_helper.t_locale("components.related_navigation.transition.title") do %> | ||
<h2 class="gem-c-contextual-sidebar__brexit-heading"><%= t("components.related_navigation.transition.title") %></h2> | ||
<a href="<%= link_path %>" class="govuk-link" data-track-category="relatedLinkClicked" data-track-action="1.0 Transition" data-track-label="<%= link_path %>" data-track-options='{"dimension29":"<%= link_text %>"}'><%= link_text %></a> | ||
</div> | ||
<p class="gem-c-contextual-sidebar__brexit-text"><%= link_text %></p> | ||
<% end %> |
6 changes: 6 additions & 0 deletions
6
.../govuk_publishing_components/components/contextual_sidebar/_brexit_related_links.html.erb
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,6 @@ | ||
<% link_text = t("components.related_navigation.transition.link_text") %> | ||
<% link_path = t("components.related_navigation.transition.link_path") %> | ||
<div class="gem-c-contextual-sidebar__brexit-related-links govuk-!-margin-bottom-6" data-module="track-click" lang="en"> | ||
<h2 class="gem-c-contextual-sidebar__brexit-heading"><%= t("components.related_navigation.transition.title") %></h2> | ||
<a href="<%= link_path %>" class="govuk-link" data-track-category="relatedLinkClicked" data-track-action="1.0 Transition" data-track-label="<%= link_path %>" data-track-options='{"dimension29":"<%= link_text %>"}'><%= link_text %></a> | ||
</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
17 changes: 0 additions & 17 deletions
17
app/views/govuk_publishing_components/components/docs/transition_countdown.yml
This file was deleted.
Oops, something went wrong.
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
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
49 changes: 0 additions & 49 deletions
49
lib/govuk_publishing_components/app_helpers/countdown_helper.rb
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.