sigmund_liquid 1.0.15 → 1.0.16
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTI4MDU5OWE2NGUwY2MyZTAzZDhlNTI0N2Q1NGZiNGRlMzYxODkzZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjcxOWIwMmIxNjhjZDhiNGNkZTk3MTcwNjA1NmMzOGVkMjA2OWI4Yg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTZkMWMxYjZmYmYxODFhMjlkMDk5YzQxNDQ3MmNmY2RkNzFhMTdhMTU2NDM3
|
10
|
+
YjU4MWRhNThiMDVjNDY5ZmVkYmYwMzY4MTJlN2QyYzVjYzkyNzVlNTBlYjYw
|
11
|
+
ZDkwNjViNGQwN2ViYzFhMTk5M2E2ZGQ1Y2Y5Y2I1NTI3OGVmNjI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTI4ZTFlM2M2ZGU2N2ZjMDZlMGFlNGM0NGNmZDY4YmMzYzQyZjRlNzlmMWRk
|
14
|
+
NWVlMGMyYmVjMjU2ZTYzOGZkOWE5MDIwNGY2MDNhNmJmNTRlN2JkYmYzM2Fi
|
15
|
+
ODQxNjgzNGFhZjVlOGY4MDlmNWYxNzY2OWU5ZDNmYjNjMjE0MmI=
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Sigmund
|
2
|
+
module Liquid
|
3
|
+
module Tags
|
4
|
+
class ActiveLink < ::Liquid::Tag
|
5
|
+
include Locomotive::Liquid::Tags::PathHelper
|
6
|
+
include ActionView::Helpers::UrlHelper
|
7
|
+
def render(context)
|
8
|
+
@page = context.registers[:page]
|
9
|
+
render_path(context) do |page, path|
|
10
|
+
if path == '/'
|
11
|
+
return @page.handle == 'index' ? 'active' : ''
|
12
|
+
else
|
13
|
+
@page.fullpath =~ /^#{page.fullpath}(\/.*)?$/ ? 'active' : ''
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
::Liquid::Template.register_tag('active_link', ActiveLink)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sigmund_liquid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- amainguy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -60,6 +60,7 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- lib/sigmund/liquid/filters/color.rb
|
63
|
+
- lib/sigmund/liquid/tags/active_link.rb
|
63
64
|
- lib/sigmund/liquid/tags/children_nav.rb
|
64
65
|
- lib/sigmund/liquid/tags/custom_nav.rb
|
65
66
|
- lib/sigmund/liquid/tags/custom_paginate.rb
|