slimmer 15.6.1 → 16.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/slimmer/skin.rb +0 -1
- data/lib/slimmer/version.rb +1 -1
- data/lib/slimmer.rb +0 -1
- metadata +2 -3
- data/lib/slimmer/processors/navigation_mover.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 118378e1ad3f656164da144437d42085b0e7d69ffc567d922266e531001aeab5
|
4
|
+
data.tar.gz: e96c1f6bd1fe7d479a217dfa6ec3c76793c140063377d146bc418e0756f46dea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fd17a9971da4ab0c6d43883b9ce7cff0556384e1470c9c26dc4c6e1c97e9a9c7510fd5b938a315d8ead09cb70af05e0e644257849aa15c950bdc31cc6ad373d
|
7
|
+
data.tar.gz: 76d732124e4efc8ec9b62c5ea7747a5316f740f38f2f9e80595bcda08ab3c864bf1bbe89985cade4ee2cdec10d70b866ac081e2b482f851ec7135c5660580c21
|
data/CHANGELOG.md
CHANGED
data/lib/slimmer/skin.rb
CHANGED
@@ -106,7 +106,6 @@ module Slimmer
|
|
106
106
|
processors = [
|
107
107
|
Processors::TitleInserter.new,
|
108
108
|
Processors::TagMover.new,
|
109
|
-
Processors::NavigationMover.new(self),
|
110
109
|
Processors::ConditionalCommentMover.new,
|
111
110
|
Processors::BodyInserter.new(wrapper_id, template_wrapper_id, response.headers),
|
112
111
|
Processors::FeedbackURLSwapper.new(source_request, response.headers),
|
data/lib/slimmer/version.rb
CHANGED
data/lib/slimmer.rb
CHANGED
@@ -36,7 +36,6 @@ module Slimmer
|
|
36
36
|
autoload :MetadataInserter, "slimmer/processors/metadata_inserter"
|
37
37
|
autoload :HeaderContextInserter, "slimmer/processors/header_context_inserter"
|
38
38
|
autoload :InsideHeaderInserter, "slimmer/processors/inside_header_inserter"
|
39
|
-
autoload :NavigationMover, "slimmer/processors/navigation_mover"
|
40
39
|
autoload :SearchPathSetter, "slimmer/processors/search_path_setter"
|
41
40
|
autoload :SearchParameterInserter, "slimmer/processors/search_parameter_inserter"
|
42
41
|
autoload :SearchRemover, "slimmer/processors/search_remover"
|
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:
|
4
|
+
version: 16.0.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:
|
11
|
+
date: 2022-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -260,7 +260,6 @@ files:
|
|
260
260
|
- lib/slimmer/processors/header_context_inserter.rb
|
261
261
|
- lib/slimmer/processors/inside_header_inserter.rb
|
262
262
|
- lib/slimmer/processors/metadata_inserter.rb
|
263
|
-
- lib/slimmer/processors/navigation_mover.rb
|
264
263
|
- lib/slimmer/processors/search_parameter_inserter.rb
|
265
264
|
- lib/slimmer/processors/search_path_setter.rb
|
266
265
|
- lib/slimmer/processors/search_remover.rb
|
@@ -1,24 +0,0 @@
|
|
1
|
-
class Slimmer::Processors::NavigationMover
|
2
|
-
def initialize(skin)
|
3
|
-
@skin = skin
|
4
|
-
end
|
5
|
-
|
6
|
-
def filter(src, dest)
|
7
|
-
proposition_header = src.at_css("#proposition-menu")
|
8
|
-
global_header = dest.at_css("#global-header")
|
9
|
-
if proposition_header && global_header
|
10
|
-
proposition_header.remove
|
11
|
-
|
12
|
-
global_header["class"] = [global_header["class"], "with-proposition"].compact.join(" ")
|
13
|
-
|
14
|
-
header_block = Nokogiri::HTML.fragment(proposition_header_block)
|
15
|
-
header_block.at_css(".content") << proposition_header
|
16
|
-
|
17
|
-
global_header.at_css(".header-wrapper") << header_block
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def proposition_header_block
|
22
|
-
@proposition_header_block ||= @skin.template("proposition_menu")
|
23
|
-
end
|
24
|
-
end
|