scrollytelling-pageflow-navigation 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/scrollytelling/pageflow/navigation/audio.js +13 -0
- data/app/assets/javascripts/scrollytelling/pageflow/navigation/counter.js +2 -2
- data/app/assets/javascripts/scrollytelling/pageflow/navigation/invert.js +1 -1
- data/app/assets/javascripts/scrollytelling/pageflow/navigation/sharing.js +18 -0
- data/app/assets/javascripts/scrollytelling/pageflow/navigation.js +2 -0
- data/app/assets/stylesheets/scrollytelling/pageflow/navigation/_navigation.scss +135 -0
- data/app/assets/stylesheets/scrollytelling/pageflow/navigation/_options.scss +84 -0
- data/app/assets/stylesheets/scrollytelling/pageflow/navigation.scss +2 -135
- data/app/views/scrollytelling/pageflow/navigation/_widget.html.erb +10 -0
- data/lib/scrollytelling/pageflow/navigation/version.rb +1 -1
- data/lib/scrollytelling/pageflow/navigation.rb +0 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e73da3524cfef7831008ab684173db1011cf75c
|
4
|
+
data.tar.gz: e025e5aa31885da6eafb01e24574bf08fc86b097
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5787b75dc8a59d71a0a8dd9f687f3ba4cbfe50e358f30b86dc1cbe376a8c6b769919632b9c7c1b7459fc14a3baf5e288a95beb8c0c4977bb0e77f51d4e3b3b5a
|
7
|
+
data.tar.gz: ae06178b329dabf474c61b21833c6e4a27f6dcdc0bc8cfd8934f19e0184f3db3a5bba5e5bfa481be5f194e62c8d93c178160acfea610b9c1dfc259110d4f991c
|
@@ -0,0 +1,13 @@
|
|
1
|
+
$(document).on('click', '#mute-audio', function(event) {
|
2
|
+
event.preventDefault();
|
3
|
+
pageflow.settings.set('volume', 0);
|
4
|
+
$('#mute-audio').css({display: "none"});
|
5
|
+
$('#play-audio').css({display: "inline-block"});
|
6
|
+
});
|
7
|
+
|
8
|
+
$(document).on('click', '#play-audio', function(event) {
|
9
|
+
event.preventDefault();
|
10
|
+
pageflow.settings.set('volume', 1);
|
11
|
+
$('#mute-audio').css({display: "inline-block"});
|
12
|
+
$('#play-audio').css({display: "none"});
|
13
|
+
});
|
@@ -14,7 +14,7 @@ pageflow.Counter = {
|
|
14
14
|
|
15
15
|
init: function() {
|
16
16
|
// Init active dot
|
17
|
-
this.setActive(pageflow.
|
17
|
+
this.setActive(pageflow.slides.currentPage()[0]);
|
18
18
|
|
19
19
|
// Listen to page changes
|
20
20
|
pageflow.events.on('page:change', this.updateActive.bind(this));
|
@@ -28,7 +28,7 @@ pageflow.Counter = {
|
|
28
28
|
|
29
29
|
var page_id = $(this).attr('data-page-id');
|
30
30
|
|
31
|
-
pageflow.
|
31
|
+
pageflow.slides.goToById(page_id);
|
32
32
|
}
|
33
33
|
}
|
34
34
|
|
@@ -14,7 +14,7 @@ pageflow.Invert = {
|
|
14
14
|
init: function() {
|
15
15
|
|
16
16
|
// Set inverted class on first load
|
17
|
-
this.setInvert(pageflow.
|
17
|
+
this.setInvert(pageflow.slides.currentPage()[0]);
|
18
18
|
|
19
19
|
// Listen to page changes
|
20
20
|
pageflow.events.on('page:change', this.changeInvert.bind(this));
|
@@ -0,0 +1,18 @@
|
|
1
|
+
$(document).on('click', '#share-fb', function(event) {
|
2
|
+
event.preventDefault();
|
3
|
+
var fbSharer = window.open(
|
4
|
+
"//www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(location.href.replace(location.hash,"")),
|
5
|
+
"Facebook",
|
6
|
+
"width=600,height=300"
|
7
|
+
);
|
8
|
+
});
|
9
|
+
|
10
|
+
$(document).on('click', '#share-tw', function(event) {
|
11
|
+
event.preventDefault();
|
12
|
+
var summary = $("meta[name='description']").attr('content');
|
13
|
+
var twSharer = window.open(
|
14
|
+
"//twitter.com/intent/tweet?text="+encodeURIComponent(summary)+"&via=Scrollytellio&url="+encodeURIComponent(location.href.replace(location.hash,"")),
|
15
|
+
"Twitter",
|
16
|
+
"width=600,height=260"
|
17
|
+
)
|
18
|
+
});
|
@@ -0,0 +1,135 @@
|
|
1
|
+
@media screen and (max-width: 768px) {
|
2
|
+
#scrollytelling-pageflow-navigation {
|
3
|
+
display: none;
|
4
|
+
}
|
5
|
+
}
|
6
|
+
|
7
|
+
#scrollytelling-pageflow-navigation {
|
8
|
+
right: 2.3%;
|
9
|
+
position: fixed;
|
10
|
+
z-index: 100;
|
11
|
+
top: 50%;
|
12
|
+
opacity: 1;
|
13
|
+
transform: translateY(-50%);
|
14
|
+
|
15
|
+
ul {
|
16
|
+
margin: 0;
|
17
|
+
padding: 0;
|
18
|
+
list-style: none;
|
19
|
+
}
|
20
|
+
|
21
|
+
li {
|
22
|
+
display: block;
|
23
|
+
width: 14px;
|
24
|
+
height: 13px;
|
25
|
+
margin: 7px;
|
26
|
+
position: relative;
|
27
|
+
}
|
28
|
+
|
29
|
+
li:hover {
|
30
|
+
a span {
|
31
|
+
width: 10px;
|
32
|
+
height: 10px;
|
33
|
+
margin: -5px 0 0 -5px;
|
34
|
+
}
|
35
|
+
|
36
|
+
.scrollytelling-pageflow-navigation-tooltip {
|
37
|
+
transition: opacity 0.2s ease-in;
|
38
|
+
width: auto;
|
39
|
+
opacity: 1;
|
40
|
+
display: block;
|
41
|
+
|
42
|
+
&:empty {
|
43
|
+
display: none;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
a {
|
49
|
+
display: block;
|
50
|
+
position: relative;
|
51
|
+
z-index: 1;
|
52
|
+
width: 100%;
|
53
|
+
height: 100%;
|
54
|
+
cursor: pointer;
|
55
|
+
text-decoration: none;
|
56
|
+
|
57
|
+
span {
|
58
|
+
border-radius: 50%;
|
59
|
+
position: absolute;
|
60
|
+
z-index: 1;
|
61
|
+
height: 4px;
|
62
|
+
width: 4px;
|
63
|
+
border: 0;
|
64
|
+
background: white;
|
65
|
+
left: 50%;
|
66
|
+
top: 50%;
|
67
|
+
margin: -2px 0 0 -2px;
|
68
|
+
transition: all 0.1s ease-in-out;
|
69
|
+
}
|
70
|
+
|
71
|
+
&.active span {
|
72
|
+
height: 12px;
|
73
|
+
width: 12px;
|
74
|
+
margin: -6px 0 0 -6px;
|
75
|
+
border-radius: 100%;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
.scrollytelling-pageflow-navigation-tooltip {
|
80
|
+
$bg-color: #000;
|
81
|
+
|
82
|
+
right: 20px;
|
83
|
+
position: absolute;
|
84
|
+
top: -7px;
|
85
|
+
color: white;
|
86
|
+
font-size: 14px;
|
87
|
+
white-space: nowrap;
|
88
|
+
max-width: 220px;
|
89
|
+
opacity: 0;
|
90
|
+
width: 0;
|
91
|
+
cursor: pointer;
|
92
|
+
line-height: 1;
|
93
|
+
display: none;
|
94
|
+
|
95
|
+
background-color: $bg-color;
|
96
|
+
padding: 6px;
|
97
|
+
padding-right: 20px;
|
98
|
+
border-radius: 3px;
|
99
|
+
|
100
|
+
&:after {
|
101
|
+
left: 100%;
|
102
|
+
top: 50%;
|
103
|
+
border: solid transparent;
|
104
|
+
content: " ";
|
105
|
+
height: 0;
|
106
|
+
width: 0;
|
107
|
+
position: absolute;
|
108
|
+
pointer-events: none;
|
109
|
+
border-color: rgba(255, 255, 255, 0);
|
110
|
+
border-left-color: $bg-color;
|
111
|
+
border-width: 5px;
|
112
|
+
margin-top: -5px;
|
113
|
+
}
|
114
|
+
|
115
|
+
}
|
116
|
+
|
117
|
+
.page-invert & {
|
118
|
+
a span {
|
119
|
+
background: black;
|
120
|
+
}
|
121
|
+
|
122
|
+
.scrollytelling-pageflow-navigation-tooltip {
|
123
|
+
|
124
|
+
$bg-color: #fff;
|
125
|
+
|
126
|
+
color: black;
|
127
|
+
background-color: $bg-color;
|
128
|
+
|
129
|
+
&:after {
|
130
|
+
border-left-color: $bg-color;
|
131
|
+
}
|
132
|
+
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
ul.scrollytelling-sharing,
|
2
|
+
ul.scrollytelling-options {
|
3
|
+
|
4
|
+
$size: 40px;
|
5
|
+
|
6
|
+
a {
|
7
|
+
width: $size;
|
8
|
+
height: $size;
|
9
|
+
|
10
|
+
text-decoration: none;
|
11
|
+
position: relative;
|
12
|
+
display: inline-block;
|
13
|
+
|
14
|
+
font-family: "FontAwesome";
|
15
|
+
font-size: inherit;
|
16
|
+
text-rendering: auto;
|
17
|
+
-webkit-font-smoothing: antialiased;
|
18
|
+
-moz-osx-font-smoothing: grayscale;
|
19
|
+
|
20
|
+
opacity: 0.8;
|
21
|
+
transition: opacity 0.2s;
|
22
|
+
|
23
|
+
&:hover {
|
24
|
+
opacity: 1;
|
25
|
+
}
|
26
|
+
|
27
|
+
&:before {
|
28
|
+
color: #fff;
|
29
|
+
font-size: 28px;
|
30
|
+
line-height: $size;
|
31
|
+
width: $size;
|
32
|
+
text-align: center;
|
33
|
+
position: absolute;
|
34
|
+
left: 0;
|
35
|
+
|
36
|
+
.page-invert & {
|
37
|
+
color: #000;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
}
|
43
|
+
|
44
|
+
ul.scrollytelling-sharing {
|
45
|
+
|
46
|
+
position: absolute;
|
47
|
+
top: 2%;
|
48
|
+
right: 2%;
|
49
|
+
width: 200px;
|
50
|
+
max-width: 80%;
|
51
|
+
height: 40px;
|
52
|
+
z-index: 5;
|
53
|
+
text-align: right;
|
54
|
+
margin: 0;
|
55
|
+
|
56
|
+
li {
|
57
|
+
display: inline;
|
58
|
+
}
|
59
|
+
|
60
|
+
#share-tw:before { content: "\f099"; }
|
61
|
+
#share-fb:before { content: "\f082"; }
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
ul.scrollytelling-options {
|
66
|
+
|
67
|
+
position: absolute;
|
68
|
+
bottom: 2%;
|
69
|
+
right: 2%;
|
70
|
+
z-index: 5;
|
71
|
+
list-style-type: none;
|
72
|
+
margin: 0;
|
73
|
+
|
74
|
+
#mute-audio:before { content: "\f028"; }
|
75
|
+
#play-audio:before { content: "\f026"; }
|
76
|
+
|
77
|
+
}
|
78
|
+
|
79
|
+
@media screen and (max-width: 768px) {
|
80
|
+
ul.scrollytelling-sharing,
|
81
|
+
ul.scrollytelling-options #back-to-top {
|
82
|
+
display: none;
|
83
|
+
}
|
84
|
+
}
|
@@ -1,135 +1,2 @@
|
|
1
|
-
@
|
2
|
-
|
3
|
-
display: none;
|
4
|
-
}
|
5
|
-
}
|
6
|
-
|
7
|
-
#scrollytelling-pageflow-navigation {
|
8
|
-
right: 2.3%;
|
9
|
-
position: fixed;
|
10
|
-
z-index: 100;
|
11
|
-
top: 50%;
|
12
|
-
opacity: 1;
|
13
|
-
transform: translateY(-50%);
|
14
|
-
|
15
|
-
ul {
|
16
|
-
margin: 0;
|
17
|
-
padding: 0;
|
18
|
-
list-style: none;
|
19
|
-
}
|
20
|
-
|
21
|
-
li {
|
22
|
-
display: block;
|
23
|
-
width: 14px;
|
24
|
-
height: 13px;
|
25
|
-
margin: 7px;
|
26
|
-
position: relative;
|
27
|
-
}
|
28
|
-
|
29
|
-
li:hover {
|
30
|
-
a span {
|
31
|
-
width: 10px;
|
32
|
-
height: 10px;
|
33
|
-
margin: -5px 0 0 -5px;
|
34
|
-
}
|
35
|
-
|
36
|
-
.scrollytelling-pageflow-navigation-tooltip {
|
37
|
-
transition: opacity 0.2s ease-in;
|
38
|
-
width: auto;
|
39
|
-
opacity: 1;
|
40
|
-
display: block;
|
41
|
-
|
42
|
-
&:empty {
|
43
|
-
display: none;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
}
|
47
|
-
|
48
|
-
a {
|
49
|
-
display: block;
|
50
|
-
position: relative;
|
51
|
-
z-index: 1;
|
52
|
-
width: 100%;
|
53
|
-
height: 100%;
|
54
|
-
cursor: pointer;
|
55
|
-
text-decoration: none;
|
56
|
-
|
57
|
-
span {
|
58
|
-
border-radius: 50%;
|
59
|
-
position: absolute;
|
60
|
-
z-index: 1;
|
61
|
-
height: 4px;
|
62
|
-
width: 4px;
|
63
|
-
border: 0;
|
64
|
-
background: white;
|
65
|
-
left: 50%;
|
66
|
-
top: 50%;
|
67
|
-
margin: -2px 0 0 -2px;
|
68
|
-
transition: all 0.1s ease-in-out;
|
69
|
-
}
|
70
|
-
|
71
|
-
&.active span {
|
72
|
-
height: 12px;
|
73
|
-
width: 12px;
|
74
|
-
margin: -6px 0 0 -6px;
|
75
|
-
border-radius: 100%;
|
76
|
-
}
|
77
|
-
}
|
78
|
-
|
79
|
-
.scrollytelling-pageflow-navigation-tooltip {
|
80
|
-
$bg-color: #000;
|
81
|
-
|
82
|
-
right: 20px;
|
83
|
-
position: absolute;
|
84
|
-
top: -7px;
|
85
|
-
color: white;
|
86
|
-
font-size: 14px;
|
87
|
-
white-space: nowrap;
|
88
|
-
max-width: 220px;
|
89
|
-
opacity: 0;
|
90
|
-
width: 0;
|
91
|
-
cursor: pointer;
|
92
|
-
line-height: 1;
|
93
|
-
display: none;
|
94
|
-
|
95
|
-
background-color: $bg-color;
|
96
|
-
padding: 6px;
|
97
|
-
padding-right: 20px;
|
98
|
-
border-radius: 3px;
|
99
|
-
|
100
|
-
&:after {
|
101
|
-
left: 100%;
|
102
|
-
top: 50%;
|
103
|
-
border: solid transparent;
|
104
|
-
content: " ";
|
105
|
-
height: 0;
|
106
|
-
width: 0;
|
107
|
-
position: absolute;
|
108
|
-
pointer-events: none;
|
109
|
-
border-color: rgba(255, 255, 255, 0);
|
110
|
-
border-left-color: $bg-color;
|
111
|
-
border-width: 5px;
|
112
|
-
margin-top: -5px;
|
113
|
-
}
|
114
|
-
|
115
|
-
}
|
116
|
-
|
117
|
-
.page-invert & {
|
118
|
-
a span {
|
119
|
-
background: black;
|
120
|
-
}
|
121
|
-
|
122
|
-
.scrollytelling-pageflow-navigation-tooltip {
|
123
|
-
|
124
|
-
$bg-color: #fff;
|
125
|
-
|
126
|
-
color: black;
|
127
|
-
background-color: $bg-color;
|
128
|
-
|
129
|
-
&:after {
|
130
|
-
border-left-color: $bg-color;
|
131
|
-
}
|
132
|
-
|
133
|
-
}
|
134
|
-
}
|
135
|
-
}
|
1
|
+
@import "./navigation/navigation";
|
2
|
+
@import "./navigation/options";
|
@@ -5,3 +5,13 @@
|
|
5
5
|
<% end %>
|
6
6
|
</ul>
|
7
7
|
</nav>
|
8
|
+
|
9
|
+
<ul class="scrollytelling-sharing">
|
10
|
+
<li><a href="#" id="share-tw"></a></li>
|
11
|
+
<li><a href="#" id="share-fb"></a></li>
|
12
|
+
</ul>
|
13
|
+
|
14
|
+
<ul class="scrollytelling-options">
|
15
|
+
<li><a href="#" id="mute-audio"></a></li>
|
16
|
+
<li><a href="#" id="play-audio" style="display: none;"></a></li>
|
17
|
+
</ul>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrollytelling-pageflow-navigation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joost Baaij
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pageflow
|
@@ -95,9 +95,13 @@ files:
|
|
95
95
|
- README.md
|
96
96
|
- Rakefile
|
97
97
|
- app/assets/javascripts/scrollytelling/pageflow/navigation.js
|
98
|
+
- app/assets/javascripts/scrollytelling/pageflow/navigation/audio.js
|
98
99
|
- app/assets/javascripts/scrollytelling/pageflow/navigation/counter.js
|
99
100
|
- app/assets/javascripts/scrollytelling/pageflow/navigation/invert.js
|
101
|
+
- app/assets/javascripts/scrollytelling/pageflow/navigation/sharing.js
|
100
102
|
- app/assets/stylesheets/scrollytelling/pageflow/navigation.scss
|
103
|
+
- app/assets/stylesheets/scrollytelling/pageflow/navigation/_navigation.scss
|
104
|
+
- app/assets/stylesheets/scrollytelling/pageflow/navigation/_options.scss
|
101
105
|
- app/views/scrollytelling/pageflow/navigation/_widget.html.erb
|
102
106
|
- bin/console
|
103
107
|
- bin/setup
|