scrollytelling-pageflow-navigation 1.7.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8676011abe15d4d7559ff5ab5ceb7a78363b45a
4
- data.tar.gz: 3f5552e6c481206a944615bc42e60fcc6b9ee50e
3
+ metadata.gz: 6a7b49c0fe4c76f183b792e22552b1c29e9e0eef
4
+ data.tar.gz: 231b701b4e049bc6cb4c9c410c2b407a241285f3
5
5
  SHA512:
6
- metadata.gz: 7c8c08d53732992248133cc96b56ee549467ec14361b2fd6f06b1d77c81dc9bb47bf077238c2be45e5b3a0f6e75ce0c731c0a22981cc0136fee49003f1c19e6d
7
- data.tar.gz: 7d60475aca0d9dbf89fc512f094d654613ad38de724be30f9ebad94910c491d20047f21c23d4a76e0f63ec26dbe4465ae852ba1663fd6fd685a7c3c92aa915bb
6
+ metadata.gz: 724705a25f72be18557bcdcd9c8b0779f49e95f5f0efde2e8abc7f8a499d2811c0487271c837e538a2f23cd0783a6c684995c2c543403b86af671c8c9d3fee35
7
+ data.tar.gz: 43c1096ae15d692015da4aee6f5aca2ee40a04f833c8e4462999818c915af857b3ba6d4eed2d12663c32cc05c8bbf910778b74d6da5096026954f44a603c580c
@@ -6,6 +6,11 @@ pageflow.widgetTypes.register('scrollytelling_pageflow_navigation', {
6
6
  element.twitterSharing();
7
7
  element.audioControl();
8
8
 
9
+ // Enable the parent page globally (Pageflow enables it only in mobile nav).
10
+ $('.parent_page', element).parentPageButton({
11
+ visibleClass: 'is_visible'
12
+ })
13
+
9
14
  // hacky: if the entry URL matches 'onsite', push onsite class on the navigation.
10
15
  // this allows us to hide the sharing widgets for onsite productions.
11
16
  if($('head link[href*="onsite"]').length > 0) {
@@ -2,8 +2,10 @@
2
2
  $scrollytelling-tooltip-bg-color: black !default;
3
3
  $scrollytelling-invert-tooltip-bg-color: white !default;
4
4
  $scrollytelling-sharing-size: 40px !default;
5
+ $scrollytelling-fa-size: 30px !default;
5
6
 
6
7
  @import "./navigation/navigation";
7
8
  @import "./navigation/mobile";
8
9
  @import "./navigation/options";
9
10
  @import "./navigation/entry";
11
+ @import "./navigation/parent_page";
@@ -1,17 +1,17 @@
1
1
  .entry {
2
2
  .indicator {
3
- left: 12px;
3
+ left: 2%;
4
4
  bottom: 2%;
5
5
  height: 40px;
6
6
  padding: 0 0 0 40px;
7
- line-height: 30px;
7
+ line-height: $scrollytelling-fa-size;
8
8
  }
9
9
 
10
10
  .scroll_indicator:before {
11
11
  content: "\f0ab";
12
12
  font-family: "FontAwesome";
13
13
  font-size: 26px;
14
- padding-left: 9px;
14
+ margin-right: .5em;
15
15
  background-image: none;
16
16
  }
17
17
 
@@ -1,22 +1,6 @@
1
1
  .navigation_mobile {
2
2
  .parent_page {
3
- position: absolute;
4
- top: auto;
5
- right: auto;
6
- bottom: 6%;
7
- left: 12px;
8
- width: 40px;
9
- height: 40px;
10
- }
11
-
12
- .parent_page:before {
13
- content: "\f0a8";
14
- font-family: "FontAwesome";
15
- font-size: 26px;
16
- }
17
-
18
- .parent_page:after {
19
- display: none;
3
+ display: none; /* hide here because we include it in all nav */
20
4
  }
21
5
 
22
6
  .overview_mobile .credits a,
@@ -32,7 +16,7 @@
32
16
  &:before {
33
17
  font-family: "FontAwesome";
34
18
  content: "\f00d";
35
- font-size: 30px;
19
+ font-size: $scrollytelling-fa-size;
36
20
  }
37
21
  }
38
22
  }
@@ -50,7 +34,7 @@
50
34
  &:before {
51
35
  font-family: "FontAwesome";
52
36
  content: "\f0c9";
53
- font-size: 30px;
37
+ font-size: $scrollytelling-fa-size;
54
38
  }
55
39
  }
56
40
 
@@ -58,7 +42,7 @@
58
42
  &:before {
59
43
  font-family: "FontAwesome";
60
44
  content: "\f045";
61
- font-size: 30px;
45
+ font-size: $scrollytelling-fa-size;
62
46
  }
63
47
  }
64
48
 
@@ -66,7 +50,7 @@
66
50
  &:before {
67
51
  font-family: "FontAwesome";
68
52
  content: "\f05a";
69
- font-size: 30px;
53
+ font-size: $scrollytelling-fa-size;
70
54
  }
71
55
  }
72
56
  }
@@ -0,0 +1,33 @@
1
+ .parent_page {
2
+ position: absolute;
3
+ bottom: 6%;
4
+ left: 2%;
5
+ height: $scrollytelling-sharing-size;
6
+ line-height: $scrollytelling-fa-size;
7
+ visibility: hidden;
8
+ @include transform(translate3d(0, -100px, 0));
9
+ @include transition(transform 0.4s ease, visibility 0.4s, right 250ms);
10
+ color: white;
11
+ text-transform: uppercase;
12
+ text-shadow: 1px 1px 4px black #2b2b2b;
13
+ font-size: 0.92em;
14
+ letter-spacing: 0.2em;
15
+ font-family: sourcesanspro;
16
+ cursor: pointer;
17
+
18
+ &:before {
19
+ content: "\f0a8";
20
+ font-family: "FontAwesome";
21
+ font-size: 26px;
22
+ margin-right: .5em;
23
+ }
24
+
25
+ &.is_visible {
26
+ visibility: visible;
27
+ @include transform(translate3d(0, 0, 0));
28
+ }
29
+ }
30
+
31
+ .page-invert .parent_page {
32
+ color: black;
33
+ }
@@ -1,6 +1,7 @@
1
1
  <div data-widget="scrollytelling_pageflow_navigation">
2
+ <div class="parent_page"><%= t('pageflow.public.back') %></div>
3
+
2
4
  <nav id="scrollytelling-pageflow-navigation">
3
- <div class="parent_page" title="<%= t('pageflow.public.back') %>"></div>
4
5
  <ul>
5
6
  <% entry.pages.
6
7
  displayed_in_navigation.
@@ -1,7 +1,7 @@
1
1
  module Scrollytelling
2
2
  module Pageflow
3
3
  module Navigation
4
- VERSION = "1.7.0"
4
+ VERSION = "1.8.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrollytelling-pageflow-navigation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joost Baaij
@@ -105,6 +105,7 @@ files:
105
105
  - app/assets/stylesheets/scrollytelling/pageflow/navigation/_mobile.scss
106
106
  - app/assets/stylesheets/scrollytelling/pageflow/navigation/_navigation.scss
107
107
  - app/assets/stylesheets/scrollytelling/pageflow/navigation/_options.scss
108
+ - app/assets/stylesheets/scrollytelling/pageflow/navigation/_parent_page.scss
108
109
  - app/views/scrollytelling/pageflow/navigation/_widget.html.erb
109
110
  - bin/console
110
111
  - bin/setup