slimmer 15.4.1 → 15.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9198a64c1829a19f7f0a89e3b0e7ae4b504b728cac13f935398343e962e1d63c
4
- data.tar.gz: 6baeb15e0d17b8f3b3f9bd51b8ebe3a324a7c7511372d37d0f8713ef4785c518
3
+ metadata.gz: cc08f967bc13790ee7db7c1ee0b8ef0aaf07f5d7fb904c6ef1f3e6ce16650287
4
+ data.tar.gz: 8807bcfc49959843c3c1beeae148aa3c3a89e2dce1bb1ecbaf450543de62049f
5
5
  SHA512:
6
- metadata.gz: 11ec9e71961fd062c4a7b3378134fc090f9e574ea487093d81b4eb8a3b0a6a31e38633c93cedd9efdde3848971cc429aea0666bb01048edcac1d6587a54689b5
7
- data.tar.gz: e412a52f54e6d1eee23769a6aa0d6b9a3a3bec0b6147f349cde5f448886c70fb283db165d5794d4dae8068ec4aff84c086d0474c511a54bef1a8fff730df57ca
6
+ metadata.gz: b2f694bacade80d4c78994adc2df5a0e9feaa202ca27bcf982cfa68142a31642ebbdde19fc7a2ef0222411a0a632ebbae969244f43d625644b25fb4bfd0fed85
7
+ data.tar.gz: 063ee728d14b6342bbb53247a7bb231a5fea95f4f7aebc839cc67117a6ca104c8fdea8ce5dcdb2ab83f18dfebc7397d9dab6143bd384b9b13367b91e4d79d50e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 15.5.0
2
+ * Add support for gem layout in static (#265)
3
+
1
4
  # 15.4.1
2
5
 
3
6
  * Add support for layout header component in static (#263)
@@ -8,9 +8,10 @@ module Slimmer::Processors
8
8
  header_value = @headers[Slimmer::Headers::SHOW_ACCOUNTS_HEADER]
9
9
  layout_header = dest.at_css(".gem-c-layout-header")
10
10
  static_header = dest.at_css("#global-header")
11
+
11
12
  if header_value && layout_header
12
13
  static_header.remove if static_header
13
- elsif !header_value
14
+ elsif !header_value && !is_gem_layout?
14
15
  layout_header.remove if layout_header
15
16
  end
16
17
 
@@ -43,5 +44,11 @@ module Slimmer::Processors
43
44
  link.parent.remove
44
45
  end
45
46
  end
47
+
48
+ private
49
+
50
+ def is_gem_layout?
51
+ @headers[Slimmer::Headers::TEMPLATE_HEADER]&.starts_with?("gem_layout")
52
+ end
46
53
  end
47
54
  end
@@ -11,6 +11,9 @@ module Slimmer::Processors
11
11
 
12
12
  search_link = dest.at_css("#global-header .search-toggle")
13
13
  search_link.remove if search_link
14
+
15
+ gem_search = dest.at_css(".gem-c-layout-header__search")
16
+ gem_search.remove if gem_search
14
17
  end
15
18
  end
16
19
  end
@@ -1,3 +1,3 @@
1
1
  module Slimmer
2
- VERSION = "15.4.1".freeze
2
+ VERSION = "15.5.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slimmer
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.4.1
4
+ version: 15.5.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: 2021-02-16 00:00:00.000000000 Z
11
+ date: 2021-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport