pageflow-progress-navigation-bar 1.2.0 → 1.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bc3ada5ee1ebf8e36e163d8f415f1f43db7e4c1fe622b2e88444dfe076faaf88
4
- data.tar.gz: 761f973c0b17e09bdb8525c533af54b7d6ea932737465f16ff4c139da7a0ed28
3
+ metadata.gz: cf06426b17ba444d42299f2943c94c7c75984c68e00a9a98401ca4df592036d2
4
+ data.tar.gz: 21ca0c8f998db2699389c30a40a1743764b8d7241f7166335c2c85d52e37fd35
5
5
  SHA512:
6
- metadata.gz: c3f74b6a6fedb9d6895e5975ce36c848f982fd45668e8680827f81f5e150ec21b037577a0980fa22fe7b57c640347d0ad099983c4eaf7f36ed2fd98ef54fbedb
7
- data.tar.gz: 836438dc00c023d1086fed00509772d0f9be5cba2067706a523a3524c4f15d4757176f4843bb2b28bb0e7dced76f6f79014b824e4750325fdc4092a998dcce2e
6
+ metadata.gz: 6642b276844f2840532a6798e96a2ccf69670443bf7911cd77c99059e4127e7861bb92c39f429d18b8273b87123153dd0b842a20bab12c97f69f496eb7367edc
7
+ data.tar.gz: 36c3a96f76318fb727ce9cd2935d1e6bd3b126b316ec11f9a8c20c74f9b7e143720da5f41a35307fb6d0d2ffc5f6f842c26aa8acb6ec2ee8fb1af4ae28d67c03
data/CHANGELOG.md CHANGED
@@ -1,15 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 1.2.0
3
+ ### Version 1.7.0
4
4
 
5
- 2019-02-08
5
+ 2021-06-07
6
6
 
7
- [Compare changes](https://github.com/codevise/pageflow-progress-navigation-bar/compare/1-1-stable...v1.2.0)
7
+ [Compare changes](https://github.com/codevise/pageflow-progress-navigation-bar/compare/1-6-stable...v1.7.0)
8
8
 
9
- - Prevent loading of invisible thumbnails before load event
10
- ([#37](https://github.com/codevise/pageflow-progress-navigation-bar/pull/37),
11
- [#38](https://github.com/codevise/pageflow-progress-navigation-bar/pull/38))
9
+ - Add theme option to use custom indicator image
10
+ ([#47](https://github.com/codevise/pageflow-progress-navigation-bar/pull/47))
12
11
 
13
12
  See
14
- [1-1-stable branch](https://github.com/codevise/pageflow-progress-navigation-bar/blob/1-1-stable/CHANGELOG.md)
13
+ [1-6-stable branch](https://github.com/codevise/pageflow-progress-navigation-bar/blob/1-6-stable/CHANGELOG.md)
15
14
  for previous changes.
@@ -44,6 +44,21 @@
44
44
  }
45
45
  },
46
46
 
47
+ _toggleChapterDisplay: function() {
48
+ var dots = $('.navigation_dots a', this.element),
49
+ chaptersInCurrentStoryLine;
50
+
51
+ chaptersInCurrentStoryLine = dots.filter(':not(.filtered)').get().map(function(pageLink) {
52
+ return $(pageLink).data('chapterId');
53
+ });
54
+
55
+ if (_.uniq(chaptersInCurrentStoryLine).length == 1) {
56
+ this.element.addClass('no_chapters');
57
+ } else {
58
+ this.element.removeClass('no_chapters');
59
+ }
60
+ },
61
+
47
62
  _create: function() {
48
63
  var overlays = this.element.find('.navigation_site_detail'),
49
64
  that = this,
@@ -123,11 +138,11 @@
123
138
  });
124
139
 
125
140
  var shareBox = $('.navigation_share_box', this.element),
126
- links = $('> a', shareBox);
141
+ links = $('.share_box_icons > a', shareBox);
127
142
  shareBox.shareMenu({
128
143
  subMenu: $('.sub_share', shareBox),
129
144
  links: links,
130
- insertAfter: links.last(),
145
+ insertAfter: $('.share_box_icons'),
131
146
  closeOnMouseLeaving: shareBox
132
147
  });
133
148
 
@@ -221,7 +236,10 @@
221
236
  scroller: scroller,
222
237
  scrollToActive: true,
223
238
  animationDuration: 400,
224
- onFilterChange: that._resizeDots()
239
+ onFilterChange: function() {
240
+ that._resizeDots();
241
+ that._toggleChapterDisplay();
242
+ }
225
243
  });
226
244
 
227
245
  });
@@ -4,15 +4,8 @@ $nav-color: #9c9c9c;
4
4
  $nav-hint-color: #A9A9A9;
5
5
  $nav-hint-hover-color: #b4c552;
6
6
 
7
- $nav-dot-even: #afafaf;
8
- $nav-dot-odd: #afafaf;
9
-
10
7
  $nav-button-hr: #6f6f6f;
11
8
 
12
- $nav-active-page: #b4c552;
13
- $nav-active-chapter-beginning: #879438;
14
- $nav-active-chapter: #6D772E;
15
-
16
9
  $progressbar-mobile-width: 14px;
17
10
 
18
11
  @import "./progress_navigation_bar/cross_dependant_styles";
@@ -72,7 +65,6 @@ $progressbar-mobile-width: 14px;
72
65
  display: block;
73
66
  width: 28px;
74
67
  height: 28px;
75
- background-image: image-url('pageflow/progress_navigation_bar/indicator.png');
76
68
  position: absolute;
77
69
  right: 60px;
78
70
  @include transition(opacity 0.3s linear);
@@ -256,6 +248,7 @@ $progressbar-mobile-width: 14px;
256
248
  .navigation_dots a {
257
249
  position: relative;
258
250
  outline: none;
251
+ @include hide-text;
259
252
 
260
253
  &:focus:after {
261
254
  content: " ";
@@ -301,30 +294,6 @@ $progressbar-mobile-width: 14px;
301
294
  }
302
295
  }
303
296
 
304
- .navigation_share_box {
305
- $size: 28px;
306
- width: 210px;
307
-
308
- a {
309
- @include float-start;
310
- text-decoration: none;
311
- padding: 0 15px 0 15px;
312
- width: 39px;
313
-
314
- p {
315
- color: $nav-color;
316
- margin-bottom: 0;
317
- text-align: center;
318
- }
319
-
320
- .button {
321
- width: $size;
322
- height: $size;
323
- margin: auto;
324
- }
325
- }
326
- }
327
-
328
297
  .navigation_credits_box {
329
298
  min-width: 230px;
330
299
  min-height: 4px;
@@ -446,17 +415,11 @@ $progressbar-mobile-width: 14px;
446
415
  left: 0;
447
416
  height: 100%;
448
417
  width: 100%;
449
- background-color: $nav-dot-even;
450
418
  border-bottom: 1px solid $bg-color;
451
419
  @include box-sizing(border-box);
452
420
 
453
- &.in_active_chapter {
454
- background-color: $nav-active-chapter;
455
- }
456
-
457
421
  &.active {
458
422
  cursor: default;
459
- background-color: $nav-active-page;
460
423
 
461
424
  img {
462
425
  border-left: 5px solid #A6D513;
@@ -464,25 +427,14 @@ $progressbar-mobile-width: 14px;
464
427
  }
465
428
  }
466
429
 
467
- li.chapter_beginning a {
468
- background-color: $nav-color;
469
-
470
- &.in_active_chapter {
471
- background-color: $nav-active-chapter-beginning;
472
- }
473
- }
474
-
475
430
  img {
476
431
  display: block;
477
432
  }
478
433
  }
479
434
  }
480
- .no_chapters li.chapter_beginning a, .no_chapters li a.in_active_chapter, .scroller ul.no_chapters li.chapter_beginning a.in_active_chapter {
481
- background-color: $nav-dot-even;
482
435
 
483
- &.active {
484
- background-color: $nav-active-page;
485
- }
436
+ &.no_chapters .navigation_site_detail .chapter {
437
+ display: none;
486
438
  }
487
439
 
488
440
  .navigation_menu_box {
@@ -551,7 +503,7 @@ $progressbar-mobile-width: 14px;
551
503
  }
552
504
  }
553
505
 
554
- .navigation_site_detail.progress_navigation h2 {
506
+ .navigation_site_detail.progress_navigation .chapter {
555
507
  > span {
556
508
  display: block;
557
509
  }
@@ -6,6 +6,7 @@ $thumbnail-small-width: 50px;
6
6
  left: 0;
7
7
  height: 30px;
8
8
  width: 100%;
9
+ z-index: 2;
9
10
 
10
11
  @include pageflow-progress-mobile-variant {
11
12
  height: $progressbar-mobile-width;
@@ -56,7 +57,7 @@ $thumbnail-small-width: 50px;
56
57
  }
57
58
 
58
59
  .navigation_share_box {
59
- right: -62.5px;
60
+ right: -45px;
60
61
  }
61
62
 
62
63
  .navigation_credits_box {
@@ -48,8 +48,8 @@ $nav-bg-color-transparent: $basic-background-color-transparent;
48
48
  @import "./default/credits";
49
49
  @import "./default/icons/icon_font";
50
50
  @import "./default/icons/sprite";
51
+ @import "./default/indicator";
51
52
  @import "./default/menu_boxes";
52
- @import "./default/share_box";
53
53
  @import "./default/typography";
54
54
 
55
55
  @if $progress-navigation-bar-icons == "sprite" {
@@ -155,7 +155,7 @@ $nav-bg-color-transparent: $basic-background-color-transparent;
155
155
  }
156
156
 
157
157
  @if not $progress-navigation-bar-display-share-button {
158
- .navigation_menu.share {
158
+ .navigation_button_area .navigation_bar_buttons li.navigation_menu.share {
159
159
  display: none;
160
160
  }
161
161
  }
@@ -186,6 +186,13 @@ $nav-bg-color-transparent: $basic-background-color-transparent;
186
186
  }
187
187
  }
188
188
 
189
+ &.without_sharing_button,
190
+ &.mobile_sharing_only {
191
+ .navigation_button_area .navigation_bar_buttons li.navigation_menu.share {
192
+ display: none;
193
+ }
194
+ }
195
+
189
196
  .navigation_button_area .navigation_bar_buttons {
190
197
  &:after {
191
198
  background-color: $nav-bg-color-transparent;
@@ -198,12 +205,6 @@ $nav-bg-color-transparent: $basic-background-color-transparent;
198
205
  &.js a.scroll_indicator {
199
206
  background-image: image-url('pageflow/themes/default/scroll_indicator_sprite.png');
200
207
  }
201
-
202
- .navigation_share_box {
203
- a {
204
- text-align: center;
205
- }
206
- }
207
208
  }
208
209
 
209
210
  &.js .scroller:after {
@@ -250,8 +251,11 @@ $nav-bg-color-transparent: $basic-background-color-transparent;
250
251
  img {
251
252
  display: block;
252
253
  }
254
+ }
253
255
 
254
- &.no_chapters {
256
+ &.no_chapters,
257
+ &.no_chapters.js {
258
+ .scroller ul.navigation_dots {
255
259
  li.chapter_beginning a, li a.in_active_chapter, li.chapter_beginning a.in_active_chapter {
256
260
  background-color: $progress-navigation-bar-inactive-chapter-color;
257
261
 
@@ -4,10 +4,7 @@
4
4
 
5
5
  $button-icon-color,
6
6
  $active-button-icon-color,
7
- $deactivated-button-icon-color,
8
-
9
- $share-icon-color: $widget-text-color,
10
- $active-share-icon-color: $main-color
7
+ $deactivated-button-icon-color
11
8
  ) {
12
9
  .navigation_button_area .navigation_bar_buttons {
13
10
 
@@ -135,44 +132,6 @@
135
132
  @include fa-info-icon;
136
133
  }
137
134
  }
138
-
139
- .share_google,
140
- .share_facebook,
141
- .share_twitter {
142
- font-size: 1.5em;
143
- &:before {
144
- font-family: "FontAwesome";
145
- color: $share-icon-color;
146
- text-shadow: none;
147
- }
148
- }
149
-
150
- .share_google {
151
- @include fa-google-plus-icon;
152
- }
153
- .share_facebook {
154
- @include fa-facebook-icon;
155
- }
156
- .share_twitter {
157
- @include fa-twitter-icon;
158
- }
159
-
160
- .navigation_share_box {
161
- a.active,
162
- a:hover {
163
- p {
164
- color: $active-share-icon-color;
165
- }
166
-
167
- .share_google,
168
- .share_facebook,
169
- .share_twitter {
170
- &:before {
171
- color: $active-share-icon-color;
172
- }
173
- }
174
- }
175
- }
176
135
  }
177
136
 
178
137
  .volume-control:before,
@@ -66,30 +66,6 @@
66
66
  @include pageflow-sprite-icon-credits($target: ".button");
67
67
  }
68
68
 
69
- .share.google {
70
- @include pageflow-sprite-icon-google($offset: -5px, $target: ".button");
71
-
72
- &.active {
73
- @include pageflow-sprite-icon-google("active", $offset: -5px, $target: ".button");
74
- }
75
- }
76
-
77
- .share.twitter {
78
- @include pageflow-sprite-icon-twitter($offset: -5px, $target: ".button");
79
-
80
- &.active {
81
- @include pageflow-sprite-icon-twitter("active", $offset: -5px, $target: ".button");
82
- }
83
- }
84
-
85
- .share.facebook {
86
- @include pageflow-sprite-icon-facebook($offset: -5px, $target: ".button");
87
-
88
- &.active {
89
- @include pageflow-sprite-icon-facebook("active", $offset: -5px, $target: ".button");
90
- }
91
- }
92
-
93
69
  .volume-control {
94
70
  &:before,
95
71
  &:after {
@@ -0,0 +1,16 @@
1
+ /// Images to use as indicator to expand navigation bar.
2
+ ///
3
+ /// Possible values:
4
+ ///
5
+ /// - `"default"`: Use default image.
6
+ /// - `"custom"`: Use `progress_navigation_bar/indicator.png` from
7
+ /// current theme directory.
8
+ $progress-navigation-bar-indicator-image: "default" !default;
9
+
10
+ &::before {
11
+ @if $progress-navigation-bar-indicator-image == "custom" {
12
+ background-image: image-url("pageflow/themes/#{$theme-name}/progress_navigation_bar/indicator.png");
13
+ } @else {
14
+ background-image: image-url("pageflow/progress_navigation_bar/indicator.png");
15
+ }
16
+ }
@@ -42,11 +42,12 @@ $progress-navigation-bar-credits-box-typography: () !default;
42
42
  )
43
43
  );
44
44
 
45
- h2 {
45
+ .chapter {
46
46
  @include typography(
47
47
  $progress-navigation-bar-chapter-header-typography,
48
48
  (
49
49
  font-size: 1em,
50
+ font-weight: bold,
50
51
  line-height: 1.2em,
51
52
  margin: 0
52
53
  )
@@ -5,7 +5,7 @@
5
5
  <%= render 'pageflow/progress_navigation_bar/widget/bar_top', :entry => entry %>
6
6
  </div>
7
7
  <div class="scroller">
8
- <ul class="navigation_dots <%= entry.chapters.count > 1 ? '' : 'no_chapters' %>">
8
+ <ul class="navigation_dots">
9
9
  <%= render :partial => 'pageflow/progress_navigation_bar/widget/page',
10
10
  :collection => entry.pages.displayed_in_navigation,
11
11
  :locals => {:image_style => :navigation_thumbnail_small, :image_width => 85, :chapters_count => entry.chapters.count} %>
@@ -38,9 +38,11 @@
38
38
  </li>
39
39
  <li class="navigation_menu share" tabindex="2">
40
40
  <div class="navigation_menu_box navigation_share_box">
41
- <%= render 'pageflow/entries/share_menu/facebook_link', entry: entry %>
42
- <%= render 'pageflow/entries/share_menu/twitter_link', entry: entry %>
43
- <%= render 'pageflow/entries/share_menu/google_link', entry: entry %>
41
+ <div class="share_box_icons">
42
+ <% entry.active_share_providers.each do |provider| %>
43
+ <%= render "pageflow/entries/share_menu/#{provider}_link", entry: entry %>
44
+ <% end %>
45
+ </div>
44
46
  <div class="sub_share">
45
47
  <a tabindex="2" target="_blank"><%= t('pageflow.public.share_this_entry') %></a>
46
48
  <a tabindex="2" target="_blank"><%= t('pageflow.public.share_this_page') %></a>
@@ -1,17 +1,18 @@
1
1
  <%= content_tag(:li, :class => page_navigation_css_class(page)) do %>
2
2
  <%= link_to "##{page.perma_id}", :data => {:link => page.id, :chapter_id => page.chapter_id} do %>
3
+ <%= page.title %>
3
4
  <% end %>
4
5
  <div class="navigation_site_detail progress_navigation">
5
6
  <% if chapters_count > 1 %>
6
- <h2>
7
+ <div class="chapter">
7
8
  <span class="chapter_number"><%= "#{I18n.t('pageflow.public.chapter')} #{page.chapter.position + 1}" %></span>
8
9
  <span class="chapter_title"><%= page.chapter.title %></span>
9
- </h2>
10
- <hr />
10
+ <hr />
11
+ </div>
11
12
  <% end %>
12
13
  <%= page.title %>
13
14
  <div class="thumbnail is_<%= page.template %>">
14
- <%= image_tag('', data: {src: asset_path(page.thumbnail_url(:navigation_thumbnail_large))}) %>
15
+ <%= image_tag('', data: {src: asset_path(page_thumbnail_url(page, :navigation_thumbnail_large))}) %>
15
16
  </div>
16
17
  </div>
17
18
  <% end %>
@@ -1,5 +1,5 @@
1
1
  module Pageflow
2
2
  module ProgressNavigationBar
3
- VERSION = '1.2.0'.freeze
3
+ VERSION = '1.7.0'.freeze
4
4
  end
5
5
  end
@@ -18,10 +18,10 @@ Gem::Specification.new do |spec|
18
18
 
19
19
  spec.required_ruby_version = '~> 2.1'
20
20
 
21
- spec.add_runtime_dependency 'pageflow', ['>= 12.5.x', '< 14']
21
+ spec.add_runtime_dependency 'pageflow', '~> 15.x'
22
22
  spec.add_runtime_dependency 'pageflow-public-i18n', '~> 1.0'
23
23
 
24
- spec.add_development_dependency 'bundler', '~> 1.0'
24
+ spec.add_development_dependency 'bundler', '>=1.0', '<3.0'
25
25
  spec.add_development_dependency 'rake', '~> 12.0'
26
26
 
27
27
  # Semantic versioning rake tasks
metadata CHANGED
@@ -1,35 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow-progress-navigation-bar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-08 00:00:00.000000000 Z
11
+ date: 2021-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pageflow
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: 12.5.x
20
- - - "<"
17
+ - - "~>"
21
18
  - !ruby/object:Gem::Version
22
- version: '14'
19
+ version: 15.x
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- version: 12.5.x
30
- - - "<"
24
+ - - "~>"
31
25
  - !ruby/object:Gem::Version
32
- version: '14'
26
+ version: 15.x
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: pageflow-public-i18n
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -48,16 +42,22 @@ dependencies:
48
42
  name: bundler
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
- - - "~>"
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '1.0'
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '3.0'
54
51
  type: :development
55
52
  prerelease: false
56
53
  version_requirements: !ruby/object:Gem::Requirement
57
54
  requirements:
58
- - - "~>"
55
+ - - ">="
59
56
  - !ruby/object:Gem::Version
60
57
  version: '1.0'
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: '3.0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rake
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -115,8 +115,8 @@ files:
115
115
  - app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/credits.scss
116
116
  - app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/icons/icon_font.scss
117
117
  - app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/icons/sprite.scss
118
+ - app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/indicator.scss
118
119
  - app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/menu_boxes.scss
119
- - app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/share_box.scss
120
120
  - app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/typography.scss
121
121
  - app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/widget_margin.scss
122
122
  - app/assets/stylesheets/pageflow/progress_navigation_bar/vertical.scss
@@ -154,8 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubyforge_project:
158
- rubygems_version: 2.7.5
157
+ rubygems_version: 3.0.8
159
158
  signing_key:
160
159
  specification_version: 4
161
160
  summary: Pageflow navigation widget.
@@ -1,9 +0,0 @@
1
- $navigation-share-link-color: #9c9c9c !default;
2
-
3
- $progress-navigation-bar-share-link-color: $navigation-share-link-color !default;
4
-
5
- .navigation_share_box {
6
- a p {
7
- color: $progress-navigation-bar-share-link-color;
8
- }
9
- }