scrollytelling-navigation 1.15.2 → 1.15.3
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 +4 -4
- data/README.md +12 -0
- data/app/assets/javascripts/scrollytelling/navigation/audio.js +15 -6
- data/app/assets/javascripts/scrollytelling/navigation/counter.js +2 -2
- data/app/views/scrollytelling/navigation/_widget.html.erb +2 -2
- data/config/locales/en.yml +4 -2
- data/config/locales/nl.yml +4 -2
- data/lib/scrollytelling/navigation/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a14fd22b5c8fe8f6bf581204fc784faadb937459
|
4
|
+
data.tar.gz: d4ec456e60858083c7da1bf1e4716711aad7a348
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa80ea2ce71c64640e88ef3d33cf8673fd794d3b867ca223e1d0eabd7e5e863e2bd9d41225e76e3b25d20a0094c47db6ebf28b85ce85034601cba2f78618e34f
|
7
|
+
data.tar.gz: 1599a1b032db07e594ac30d508f5bc3e13b4ca635d2816850f9b0fd075c7d901231c5e72ffbdb287762948876944ecf7516b402afbd4b0acd2a95e9325797336
|
data/README.md
CHANGED
@@ -54,6 +54,18 @@ Rails.application.config.assets.version = 'x.x.x'
|
|
54
54
|
|
55
55
|
After all that, restart your application server.
|
56
56
|
|
57
|
+
## Migrate all the things
|
58
|
+
|
59
|
+
Your published entries and all your accounts will still reference the default Pageflow widget. To update the lot in bulk, run this:
|
60
|
+
|
61
|
+
``` ruby
|
62
|
+
Pageflow::Widget.
|
63
|
+
where(role: 'navigation').
|
64
|
+
find_each do |widget|
|
65
|
+
widget.update! type_name: 'scrollytelling_navigation'
|
66
|
+
end
|
67
|
+
```
|
68
|
+
|
57
69
|
## Development
|
58
70
|
|
59
71
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -1,18 +1,27 @@
|
|
1
1
|
$.widget('scrollytelling.audioControl', {
|
2
|
+
showState: function() {
|
3
|
+
var icon = $('#scrollytelling-audio', this.element);
|
4
|
+
|
5
|
+
if(pageflow.settings.get('volume') > 0) {
|
6
|
+
icon.removeClass('audio-playing').addClass('audio-muted');
|
7
|
+
} else {
|
8
|
+
icon.removeClass('audio-muted').addClass('audio-playing');
|
9
|
+
}
|
10
|
+
},
|
11
|
+
|
2
12
|
_create: function() {
|
3
|
-
|
13
|
+
this.showState();
|
14
|
+
$('#scrollytelling-audio', this.element).on('click', this.toggleAudio.bind(this));
|
4
15
|
},
|
5
16
|
|
6
17
|
toggleAudio: function(event) {
|
7
|
-
event.preventDefault();
|
8
|
-
var target = $(event.target);
|
9
|
-
|
10
18
|
if(pageflow.settings.get('volume') > 0) {
|
11
19
|
pageflow.settings.set('volume', 0);
|
12
|
-
target.removeClass('audio-playing').addClass('audio-muted');
|
13
20
|
} else {
|
14
21
|
pageflow.settings.set('volume', 1);
|
15
|
-
target.removeClass('audio-muted').addClass('audio-playing');
|
16
22
|
}
|
23
|
+
|
24
|
+
event.preventDefault();
|
25
|
+
this.showState();
|
17
26
|
}
|
18
27
|
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
$.widget('scrollytelling.scrollytellingNavigationCounter', {
|
2
2
|
setActive: function(page) {
|
3
|
-
|
4
|
-
|
3
|
+
$('nav a', this.element).removeClass('active');
|
4
|
+
$('nav a[href="#' + page.attr('id') + '"]', this.element).addClass('active');
|
5
5
|
},
|
6
6
|
|
7
7
|
updateActive: function(page) {
|
@@ -22,7 +22,7 @@
|
|
22
22
|
|
23
23
|
<% if entry.home_button.enabled? %>
|
24
24
|
<ul class="scrollytelling-home_button scrolly-nav-box">
|
25
|
-
<li><%= link_to t('scrollytelling.navigation.
|
25
|
+
<li><%= link_to t('scrollytelling.navigation.home'),
|
26
26
|
entry.home_button.url,
|
27
27
|
title: t('scrollytelling.navigation.home_title', url: entry.home_button.url) %></li>
|
28
28
|
</ul>
|
@@ -34,6 +34,6 @@
|
|
34
34
|
</ul>
|
35
35
|
|
36
36
|
<ul class="scrollytelling-options scrolly-nav-box">
|
37
|
-
<li><a href="#" id="scrollytelling-audio"
|
37
|
+
<li><a href="#" id="scrollytelling-audio"></a></li>
|
38
38
|
</ul>
|
39
39
|
</div>
|
data/config/locales/en.yml
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
en:
|
2
2
|
pageflow:
|
3
3
|
scrollytelling_navigation:
|
4
|
-
home_link: ' Home'
|
5
|
-
home_title: 'That will take you to %{url}'
|
6
4
|
widget_type_name: Scrollytelling dots with tooltips
|
5
|
+
scrollytelling:
|
6
|
+
navigation:
|
7
|
+
home: ' Home'
|
8
|
+
home_title: 'You‘re a mouse click away from %{url}'
|
data/config/locales/nl.yml
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
nl:
|
2
2
|
pageflow:
|
3
3
|
scrollytelling_navigation:
|
4
|
-
home_link: ' Home'
|
5
|
-
home_title: 'Je gaat dan naar %{url}'
|
6
4
|
widget_type_name: Scrollytelling stippen met tooltips
|
5
|
+
scrollytelling:
|
6
|
+
navigation:
|
7
|
+
home: ' Home'
|
8
|
+
home_title: 'Je bent een muisklik verwijderd van %{url}'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrollytelling-navigation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.15.
|
4
|
+
version: 1.15.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joost Baaij
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pageflow
|