govuk_publishing_components 10.2.0 → 11.0.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 +4 -4
- data/app/views/govuk_publishing_components/components/docs/image_card.yml +10 -4
- data/app/views/govuk_publishing_components/components/docs/taxonomy_list.yml +9 -4
- data/lib/govuk_publishing_components/presenters/image_card_helper.rb +16 -1
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 154ec0ba2a3a52f59a7ac5f399812d37b323ae2adc3665e7632324f666d999d2
|
|
4
|
+
data.tar.gz: bd0339d107c6f63330401b89b375337eafe10c434d9c64f30533da52c62af5b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 911320cba45f74c279e24175182f696217cd7df82baf3454eccc8b7d8ba00b9b8551c5c4f3fe549a111690b0e6bcc5991c9cd44b7a908600492e39fd7b1e4058
|
|
7
|
+
data.tar.gz: 3072d1970d946fb3ca9217ad042eb7d5c6e0c591473b6abb8592fb799eca83da3bfe7c4dbd1754b014b5c30d0b670590ba1b569fcc6c284945d2c1f3f20efe4a
|
|
@@ -39,7 +39,9 @@ examples:
|
|
|
39
39
|
href: "/also-not-a-page"
|
|
40
40
|
image_src: "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG"
|
|
41
41
|
image_alt: "some meaningful alt text please"
|
|
42
|
-
context:
|
|
42
|
+
context:
|
|
43
|
+
date: 2016-06-27 10:29:44
|
|
44
|
+
text: "Press release"
|
|
43
45
|
heading_text: "Government does things"
|
|
44
46
|
description: "Following a thorough review of existing procedure, a government body has today announced that further work is necessary."
|
|
45
47
|
with_extra_links:
|
|
@@ -69,7 +71,8 @@ examples:
|
|
|
69
71
|
href: "/government/people/"
|
|
70
72
|
image_src: "http://placekitten.com/215/140"
|
|
71
73
|
image_alt: "some meaningful alt text please"
|
|
72
|
-
context:
|
|
74
|
+
context:
|
|
75
|
+
text: "The Rt Hon"
|
|
73
76
|
heading_text: "John Whiskers MP"
|
|
74
77
|
extra_links: [
|
|
75
78
|
{
|
|
@@ -149,7 +152,9 @@ examples:
|
|
|
149
152
|
href: "/still-not-a-page"
|
|
150
153
|
image_src: "https://assets.publishing.service.gov.uk/frontend/homepage/leaving-the-eu-bc9992ee672a30d8e8a3e195c9afa750e618748130a4e073a593ba36dfc29af9.jpg"
|
|
151
154
|
image_alt: "some meaningful alt text please"
|
|
152
|
-
context:
|
|
155
|
+
context:
|
|
156
|
+
date: 2017-06-14 11:30:00
|
|
157
|
+
text: "Announcement"
|
|
153
158
|
heading_text: "Something has happened nearby possibly"
|
|
154
159
|
description: "Following a news report that something has happened, further details are emerging of the thing that has happened and what that means for you."
|
|
155
160
|
with_tracking:
|
|
@@ -188,7 +193,8 @@ examples:
|
|
|
188
193
|
href: "/government/people/"
|
|
189
194
|
image_src: "http://placekitten.com/215/140"
|
|
190
195
|
image_alt: "some meaningful alt text please"
|
|
191
|
-
context:
|
|
196
|
+
context:
|
|
197
|
+
text: "The Rt Hon"
|
|
192
198
|
heading_text: "John Whiskers MP"
|
|
193
199
|
metadata: "Unpaid"
|
|
194
200
|
extra_links: [
|
|
@@ -67,7 +67,8 @@ examples:
|
|
|
67
67
|
image:
|
|
68
68
|
url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG
|
|
69
69
|
alt: some meaningful alt text please
|
|
70
|
-
context:
|
|
70
|
+
context:
|
|
71
|
+
text: The Rt Hon
|
|
71
72
|
- link:
|
|
72
73
|
path: /not-a-page
|
|
73
74
|
text: News headline
|
|
@@ -75,7 +76,8 @@ examples:
|
|
|
75
76
|
image:
|
|
76
77
|
url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG
|
|
77
78
|
alt: some meaningful alt text please
|
|
78
|
-
context:
|
|
79
|
+
context:
|
|
80
|
+
text: The Rt Hon
|
|
79
81
|
- link:
|
|
80
82
|
path: /not-a-page
|
|
81
83
|
text: News headline
|
|
@@ -83,7 +85,8 @@ examples:
|
|
|
83
85
|
image:
|
|
84
86
|
url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG
|
|
85
87
|
alt: some meaningful alt text please
|
|
86
|
-
context:
|
|
88
|
+
context:
|
|
89
|
+
text: The Rt Hon
|
|
87
90
|
- link:
|
|
88
91
|
path: /not-a-page
|
|
89
92
|
text: News headline
|
|
@@ -91,7 +94,9 @@ examples:
|
|
|
91
94
|
image:
|
|
92
95
|
url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG
|
|
93
96
|
alt: some meaningful alt text please
|
|
94
|
-
context:
|
|
97
|
+
context:
|
|
98
|
+
text: This is a document
|
|
99
|
+
date: 2016-06-27 10:29:44
|
|
95
100
|
document_list:
|
|
96
101
|
items:
|
|
97
102
|
- link:
|
|
@@ -40,7 +40,22 @@ module GovukPublishingComponents
|
|
|
40
40
|
end
|
|
41
41
|
|
|
42
42
|
def context
|
|
43
|
-
|
|
43
|
+
return unless @context
|
|
44
|
+
|
|
45
|
+
content_tag(:p, class: 'gem-c-image-card__context') do
|
|
46
|
+
if @context[:date]
|
|
47
|
+
date = content_tag(:time, l(@context[:date], format: '%e %B %Y'), datetime: @context[:date].iso8601)
|
|
48
|
+
dash = content_tag(:span, ' — ', 'aria-hidden': true)
|
|
49
|
+
|
|
50
|
+
if @context[:text]
|
|
51
|
+
date.concat(dash).concat(@context[:text])
|
|
52
|
+
else
|
|
53
|
+
date
|
|
54
|
+
end
|
|
55
|
+
else
|
|
56
|
+
@context[:text]
|
|
57
|
+
end
|
|
58
|
+
end
|
|
44
59
|
end
|
|
45
60
|
|
|
46
61
|
def heading_tag
|