Skip to content

Commit 1b4c3b9

Browse files
author
Dilwoar Hussain
committed
Add print button to html publications
1 parent 57bb9b8 commit 1b4c3b9

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

app/assets/stylesheets/views/_html-publication.scss

+6
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@
5656
display: none;
5757
}
5858

59+
.govuk-sticky-element {
60+
.govuk-sticky-element__print-link {
61+
margin-left: govuk-spacing(3);
62+
}
63+
}
64+
5965
@include govuk-media-query($until: desktop) {
6066
.govuk-sticky-element--enabled {
6167
position: static;

app/views/content_items/html_publication.html.erb

+10
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
<% if @content_item.contents.any? %>
4444
<div class="govuk-grid-column-one-quarter-from-desktop contents-list-container">
4545
<%= render 'govuk_publishing_components/components/contents_list', contents: @content_item.contents, format_numbers: true %>
46+
<%= render "govuk_publishing_components/components/print_link", {
47+
margin_top: 0,
48+
margin_bottom: 6,
49+
} %>
4650
</div>
4751
<% end %>
4852

@@ -58,5 +62,11 @@
5862

5963
<div data-sticky-element class="govuk-sticky-element">
6064
<%= render 'components/back-to-top', href: "#contents" %>
65+
<div class="govuk-sticky-element__print-link">
66+
<%= render "govuk_publishing_components/components/print_link", {
67+
margin_top: 0,
68+
margin_bottom: 6,
69+
} %>
70+
</div>
6171
</div>
6272
</div>

0 commit comments

Comments
 (0)