dugway 0.12.1 → 0.12.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dugway/liquid/filters/default_pagination.rb +22 -4
- data/lib/dugway/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f39a4ac63900661151c83b9fb34e373e9df16e5ee4ed6896a4489681592ccc3
|
4
|
+
data.tar.gz: 7fdd8f77279734cd5df737c2fce1fdefd09de681cf7dad3a0434e128fb9d49d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef056b3003a09886d4727ce3d1392abd45d40b2a234fecb1284398e8525060e2366f72002c340bba0cf23aecc42298c335c826bab596e8d4d916d5cca6fada78
|
7
|
+
data.tar.gz: b63d62a8ab48d74226dd851e6cd8ff6f2c9a06bfb53f3bda7ff5dbd14c47cb4548f57198f6b6e501303dbb7173d7682990c44ed578fe77084aa978668edbb085
|
@@ -7,22 +7,22 @@ module Dugway
|
|
7
7
|
|
8
8
|
prev_label = prev_label.blank? ? paginate['previous']['title'] : prev_label
|
9
9
|
if paginate['previous']['is_link']
|
10
|
-
html << %(<a class="previous" href="#{ paginate['previous']['url'] }">#{ prev_label }</a>)
|
10
|
+
html << %(<a class="previous" href="#{ paginate['previous']['url'] }" aria-label="Go to previous page">#{ prev_label }</a>)
|
11
11
|
else
|
12
12
|
html << %(<span class="previous disabled">#{ prev_label }</span>)
|
13
13
|
end
|
14
14
|
|
15
15
|
paginate['parts'].each do |part|
|
16
16
|
if part['is_link']
|
17
|
-
html << %(<a href="#{ part['url'] }">#{ part['title'] }</a>)
|
17
|
+
html << %(<a href="#{ part['url'] }" aria-label="Go to page #{part['title']}">#{ part['title'] }</a>)
|
18
18
|
else
|
19
|
-
html <<
|
19
|
+
html << build_non_link_span(part, paginate)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
next_label = next_label.blank? ? paginate['next']['title'] : next_label
|
24
24
|
if paginate['next']['is_link']
|
25
|
-
html << %(<a class="next" href="#{ paginate['next']['url'] }">#{ next_label }</a>)
|
25
|
+
html << %(<a class="next" href="#{ paginate['next']['url'] }" aria-label="Go to next page">#{ next_label }</a>)
|
26
26
|
else
|
27
27
|
html << %(<span class="next disabled">#{ next_label }</span>)
|
28
28
|
end
|
@@ -30,6 +30,24 @@ module Dugway
|
|
30
30
|
html << %(</div>)
|
31
31
|
}.join(' ')
|
32
32
|
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def build_non_link_span(part, paginate)
|
37
|
+
is_current = is_current_page?(part, paginate)
|
38
|
+
span_class = is_current ? 'current' : 'gap'
|
39
|
+
|
40
|
+
span = %(<span )
|
41
|
+
span << %(class="#{span_class}" )
|
42
|
+
span << %(aria-label="Current page, page #{part['title']}") if is_current
|
43
|
+
span << %(>)
|
44
|
+
span << %(#{ part['title'] }</span>)
|
45
|
+
span
|
46
|
+
end
|
47
|
+
|
48
|
+
def is_current_page?(part, paginate)
|
49
|
+
part['title'] == paginate['current_page'].to_s
|
50
|
+
end
|
33
51
|
end
|
34
52
|
end
|
35
53
|
end
|
data/lib/dugway/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dugway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Big Cartel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -560,7 +560,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
560
560
|
- !ruby/object:Gem::Version
|
561
561
|
version: '0'
|
562
562
|
requirements: []
|
563
|
-
|
563
|
+
rubyforge_project:
|
564
|
+
rubygems_version: 2.7.6
|
564
565
|
signing_key:
|
565
566
|
specification_version: 4
|
566
567
|
summary: Easily build and test Big Cartel themes.
|