govuk_publishing_components 35.9.0 → 35.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d14e21647dbbbe8c13a60c4ec7aaf3e1058cf97d9e52abb27e749eb63ec0725
|
|
4
|
+
data.tar.gz: 76f8f7c6c2b641eb874b59f5b73b4c43c21ee3b834c36bd35a2e561fb25993e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e55ee7ba5da82893c875901e389f4017d8f0b3a30ed3da20d1f9eda6fca500447a0efe4d0cbc78b37c2c4a422e2a74131ece944c95fcbc8d55dbe143046b4db
|
|
7
|
+
data.tar.gz: 77f9962cda4b334df7d09c40d5c57f17881de115b3feabc5081202ad2179a193d943303548881375502f7adeb484ddb12caca2b3280adb95bbee7264949dc05a
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
data_attributes ||= {}
|
|
10
10
|
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
|
11
11
|
|
|
12
|
+
container_class_names = %w[gem-c-attachment govuk-!-display-none-print]
|
|
13
|
+
container_class_names << shared_helper.get_margin_bottom if local_assigns.key?(:margin_bottom)
|
|
14
|
+
|
|
12
15
|
case attachment.type
|
|
13
16
|
when "file"
|
|
14
17
|
if attachment.content_type_name
|
|
@@ -48,7 +51,7 @@
|
|
|
48
51
|
end
|
|
49
52
|
|
|
50
53
|
%>
|
|
51
|
-
<%= tag.section class:
|
|
54
|
+
<%= tag.section class: class_names(container_class_names) do %>
|
|
52
55
|
<%= tag.div class: "gem-c-attachment__thumbnail" do %>
|
|
53
56
|
<%= link_to attachment.url,
|
|
54
57
|
class: "govuk-link",
|
|
@@ -86,6 +86,16 @@ examples:
|
|
|
86
86
|
file_size: 20000
|
|
87
87
|
data_attributes:
|
|
88
88
|
gtm: "attachment-preview"
|
|
89
|
+
with_margin_bottom:
|
|
90
|
+
description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). It defaults to no margin bottom.
|
|
91
|
+
data:
|
|
92
|
+
attachment:
|
|
93
|
+
title: "Department for Transport information asset register"
|
|
94
|
+
url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/747661/department-for-transport-information-asset-register.csv
|
|
95
|
+
filename: department-for-transport-information-asset-register.csv
|
|
96
|
+
content_type: application/pdf
|
|
97
|
+
file_size: 20000
|
|
98
|
+
margin_bottom: 9
|
|
89
99
|
command_paper_numbered:
|
|
90
100
|
description: |
|
|
91
101
|
Command paper, numbered
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: govuk_publishing_components
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 35.
|
|
4
|
+
version: 35.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GOV.UK Dev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-07-
|
|
11
|
+
date: 2023-07-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: govuk_app_config
|