content_block_tools 1.1.2 → 1.2.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/assets/stylesheets/content_block_tools.scss +14 -13
- data/app/components/content_block_tools/contact_component.html.erb +19 -14
- data/app/components/content_block_tools/contacts/address_component.html.erb +1 -1
- data/app/components/content_block_tools/contacts/contact_link_component.html.erb +1 -1
- data/app/components/content_block_tools/contacts/email_address_component.html.erb +1 -1
- data/app/components/content_block_tools/contacts/telephone_component.html.erb +5 -5
- data/lib/content_block_tools/version.rb +1 -1
- metadata +1 -2
- data/app/assets/stylesheets/blocks/_contact.scss +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31aa623f594711bad29bb3e3dcd8540565f469a3432d9fd4a2d6d01e00cbef99
|
4
|
+
data.tar.gz: dbe0f54e0ed010a2cb110259ca56d81cadd782373119aa632d7b447c03fd10c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8f105b4fda9c8680ebf69f1bc48f79278e861050035a5febeac7d0cc932f1dc96dfcc793f1cb4c12161b57e24d17bc55da55b13ce125efe7d0118bd0648bc58
|
7
|
+
data.tar.gz: 868af6b530f82d1bc74877aa6baca6f20ebd86c07cd62b1ce233ddae724865676bca53d249ecce791a75377411761f073b094aa14265b6899baf7c36f1ebab3b
|
@@ -1,25 +1,26 @@
|
|
1
|
-
@import "govuk/core/links";
|
2
1
|
@import "govuk/core/lists";
|
3
2
|
@import "govuk/core/typography";
|
4
3
|
|
5
|
-
@import "blocks/contact";
|
6
|
-
|
7
4
|
.content-block {
|
8
|
-
&
|
9
|
-
|
5
|
+
&__contact-key, &__contact-value, &__contact-list {
|
6
|
+
margin: 0;
|
7
|
+
padding: 0;
|
10
8
|
}
|
11
9
|
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
&__contact-list {
|
11
|
+
.content-block__contact-key {
|
12
|
+
@extend %govuk-heading-m;
|
13
|
+
}
|
15
14
|
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
&--nested {
|
16
|
+
.content-block__contact-key {
|
17
|
+
@extend %govuk-heading-s;
|
18
|
+
}
|
19
19
|
}
|
20
20
|
}
|
21
21
|
|
22
|
-
|
23
|
-
@extend %govuk-
|
22
|
+
ul.content-block__list {
|
23
|
+
@extend %govuk-list;
|
24
|
+
margin-left: 0;
|
24
25
|
}
|
25
26
|
}
|
@@ -1,18 +1,23 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
4
|
-
<% if !block_type.present? && content_block.details[:description] %>
|
5
|
-
<%= render_govspeak(content_block.details[:description]) %>
|
6
|
-
<% end %>
|
1
|
+
<dl class="vcard content-block__contact-list">
|
2
|
+
<dt class="content-block__contact-key fn org"><%= content_block.title %></dt>
|
7
3
|
|
8
4
|
<% if block_type.nil? %>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
5
|
+
<dd class="content-block__contact-value">
|
6
|
+
<%= render_govspeak(content_block.details[:description]) if content_block.details[:description] %>
|
7
|
+
<dl class="content-block__contact-list--nested">
|
8
|
+
<% BLOCK_TYPES.each do |block_type| %>
|
9
|
+
<% content_for_block_type(block_type).each do |item| %>
|
10
|
+
<dt class="content-block__contact-key"><%= item[:title] %></dt>
|
11
|
+
<dd class="content-block__contact-value">
|
12
|
+
<%= component_for_block_type(block_type).new(item:).render.html_safe %>
|
13
|
+
</dd>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
16
|
+
</dl>
|
17
|
+
</dd>
|
15
18
|
<% else %>
|
16
|
-
|
19
|
+
<dd class="content-block__contact-value">
|
20
|
+
<%= component_for_block_type(block_type).new(item: item_to_render).render.html_safe %>
|
21
|
+
</dd>
|
17
22
|
<% end %>
|
18
|
-
</
|
23
|
+
</dl>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% if item[:description] %>
|
2
|
-
<%= render_govspeak(item[:description]
|
2
|
+
<%= render_govspeak(item[:description]) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<ul class="content-block__list">
|
@@ -16,16 +16,16 @@
|
|
16
16
|
<% end %>
|
17
17
|
|
18
18
|
<% if show_bsl_guidance? %>
|
19
|
-
<%= render_govspeak(bsl_guidance[:value]
|
19
|
+
<%= render_govspeak(bsl_guidance[:value]) %>
|
20
20
|
<% end %>
|
21
21
|
|
22
22
|
<% if show_opening_hours? %>
|
23
|
-
<%= render_govspeak(opening_hours[:opening_hours]
|
23
|
+
<%= render_govspeak(opening_hours[:opening_hours]) %>
|
24
24
|
<% end %>
|
25
25
|
|
26
26
|
<% if show_call_charges? %>
|
27
|
-
<p
|
28
|
-
<a href="<%= call_charges[:call_charges_info_url] %>"
|
27
|
+
<p>
|
28
|
+
<a href="<%= call_charges[:call_charges_info_url] %>">
|
29
29
|
<%= call_charges[:label] %>
|
30
30
|
</a>
|
31
31
|
</p>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: content_block_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
@@ -142,7 +142,6 @@ extensions: []
|
|
142
142
|
extra_rdoc_files: []
|
143
143
|
files:
|
144
144
|
- README.md
|
145
|
-
- app/assets/stylesheets/blocks/_contact.scss
|
146
145
|
- app/assets/stylesheets/content_block_tools.scss
|
147
146
|
- app/components/content_block_tools/base_component.rb
|
148
147
|
- app/components/content_block_tools/contact_component.html.erb
|