pageflow-outline-navigation-bar 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +23 -0
- data/.jshintrc +13 -0
- data/.rubocop.yml +24 -0
- data/.rubocop_hound.yml +1065 -0
- data/.scss-lint.yml +145 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +4 -0
- data/README.md +42 -0
- data/Rakefile +10 -0
- data/app/assets/images/pageflow/outline_navigation_bar/indicator.png +0 -0
- data/app/assets/images/pageflow/outline_navigation_bar/volume_control_sprite.png +0 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar.js +26 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/events.js +30 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/expander.js +34 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/fullscreen_button.js +24 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/hide_text_button.js +17 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/menu_item.js +41 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/navigator.js +35 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/panels.js +54 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/resizer.js +32 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/scroller.js +144 -0
- data/app/assets/javascript/pageflow/outline_navigation_bar/widget.js +227 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default.scss +87 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/credits_box.scss +28 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/cross_dependant_styles.css.scss +6 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/icons/icon_font.scss +177 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/icons/sprite.scss +140 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/menu_item.scss +107 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/menu_items.scss +33 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/mixins.scss +5 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/mobile_images.scss +54 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/mobile_panel.scss +61 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/mobile_sharing.scss +57 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/panel.scss +19 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/parent_page_button.scss +46 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/prevent_focus_rect_on_pointer_down.scss +4 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/scroller.scss +93 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/share_box.scss +20 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/toggle.scss +73 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/volume_box.scss +48 -0
- data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/widget_margin.scss +27 -0
- data/app/views/pageflow/outline_navigation_bar/_widget.html.erb +12 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_buttons.html.erb +71 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_chapter.html.erb +5 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_home_button.html.erb +8 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_link.html.erb +3 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_mobile_panels.html.erb +28 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_overview_button.html.erb +8 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_scroller.html.erb +13 -0
- data/app/views/pageflow/outline_navigation_bar/widget/_toggles.html.erb +32 -0
- data/config/locales/de.yml +8 -0
- data/config/locales/en.yml +8 -0
- data/lib/pageflow-outline-navigation-bar.rb +17 -0
- data/lib/pageflow/outline_navigation_bar/engine.rb +9 -0
- data/lib/pageflow/outline_navigation_bar/expandable_widget_type.rb +17 -0
- data/lib/pageflow/outline_navigation_bar/fixed_widget_type.rb +17 -0
- data/lib/pageflow/outline_navigation_bar/plugin.rb +12 -0
- data/lib/pageflow/outline_navigation_bar/version.rb +5 -0
- data/lib/pageflow/outline_navigation_bar/widget_type.rb +14 -0
- data/pageflow-outline-navigation-bar.gemspec +26 -0
- metadata +160 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
/// Display social share menu
|
2
|
+
$outline-navigation-bar-display-share-button: $navigation-display-share-button !default;
|
3
|
+
|
4
|
+
/// Display hide text menu button
|
5
|
+
$outline-navigation-bar-display-hide-text-button: $navigation-display-hide-text-button !default;
|
6
|
+
|
7
|
+
.menu_items {
|
8
|
+
margin: 0;
|
9
|
+
padding: 0;
|
10
|
+
position: absolute;
|
11
|
+
top: 20px;
|
12
|
+
bottom: 0;
|
13
|
+
right: 0;
|
14
|
+
width: 65px;
|
15
|
+
|
16
|
+
.volume {
|
17
|
+
height: 25%;
|
18
|
+
min-height: 100px;
|
19
|
+
max-height: 200px;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
@if not $outline-navigation-bar-display-share-button {
|
24
|
+
.menu_item.share {
|
25
|
+
display: none;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
@if not $outline-navigation-bar-display-hide-text-button {
|
30
|
+
.menu_item.hide_text {
|
31
|
+
display: none;
|
32
|
+
}
|
33
|
+
}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
/// Images to use to for icons in mobile navigation.
|
2
|
+
///
|
3
|
+
/// Possible values:
|
4
|
+
///
|
5
|
+
/// - `"default"`: Use images from default theme.
|
6
|
+
/// - `"custom"`: Use images from current theme directory.
|
7
|
+
///
|
8
|
+
/// Custom images have to placed in a `mobile_navigation` directory
|
9
|
+
/// inside the theme's image directory. See images in
|
10
|
+
/// `pageflow/themes/default/mobile_navigation` for samples of the
|
11
|
+
/// required images.
|
12
|
+
$outline-navigation-bar-mobile-images: $mobile-navigation-images !default;
|
13
|
+
|
14
|
+
$image-dir: "pageflow/themes/default/mobile_navigation";
|
15
|
+
|
16
|
+
@if $outline-navigation-bar-mobile-images == "custom" {
|
17
|
+
$image-dir: "pageflow/themes/#{$theme-name}/mobile_navigation";
|
18
|
+
}
|
19
|
+
|
20
|
+
.toggle {
|
21
|
+
a {
|
22
|
+
background-position: -45px 0;
|
23
|
+
background-size: auto 100%;
|
24
|
+
display: block;
|
25
|
+
width: 45px;
|
26
|
+
height: 45px;
|
27
|
+
|
28
|
+
&.active {
|
29
|
+
background-position: 0 0;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
&.chapters a {
|
34
|
+
background-image: image-url("#{$image-dir}/index_sprite.png");
|
35
|
+
}
|
36
|
+
|
37
|
+
&.credits a {
|
38
|
+
background-image: image-url("#{$image-dir}/imprint_sprite.png");
|
39
|
+
}
|
40
|
+
|
41
|
+
&.share a {
|
42
|
+
@if $navigation-display-share-button {
|
43
|
+
background-image: image-url("#{$image-dir}/sharing_sprite.png");
|
44
|
+
} @else {
|
45
|
+
display: none;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
.mobile_sharing a {
|
51
|
+
&::before {
|
52
|
+
background-image: image-url("#{$image-dir}/sharing_icons_sprite.png");
|
53
|
+
}
|
54
|
+
}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
.mobile_panel {
|
2
|
+
position: absolute;
|
3
|
+
|
4
|
+
.wrapper {
|
5
|
+
position: absolute;
|
6
|
+
top: 0;
|
7
|
+
width: 100%;
|
8
|
+
height: 100%;
|
9
|
+
overflow: hidden;
|
10
|
+
}
|
11
|
+
|
12
|
+
ul {
|
13
|
+
width: 100%;
|
14
|
+
padding: 0;
|
15
|
+
margin: 0;
|
16
|
+
position: absolute;
|
17
|
+
list-style: none;
|
18
|
+
}
|
19
|
+
|
20
|
+
li {
|
21
|
+
position: relative;
|
22
|
+
|
23
|
+
&.touched {
|
24
|
+
&:after {
|
25
|
+
background-position: -38px 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
&:before {
|
29
|
+
content: " ";
|
30
|
+
position: absolute;
|
31
|
+
width: 100%;
|
32
|
+
height: 100%;
|
33
|
+
top: 0;
|
34
|
+
left: 0;
|
35
|
+
background-color: #fff;
|
36
|
+
opacity: 0.2;
|
37
|
+
z-index: 1;
|
38
|
+
pointer-events: none;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
.credits {
|
44
|
+
font-family: "sourcesanspro";
|
45
|
+
padding: 15px;
|
46
|
+
color: #fff;
|
47
|
+
|
48
|
+
a {
|
49
|
+
margin-top: 1em;
|
50
|
+
color: $main-color;
|
51
|
+
|
52
|
+
&:hover {
|
53
|
+
color: white;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
> a {
|
58
|
+
display: block;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/mobile_sharing.scss
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
.mobile_sharing {
|
2
|
+
li {
|
3
|
+
> a {
|
4
|
+
display: block;
|
5
|
+
margin-left: 78px;
|
6
|
+
color: white;
|
7
|
+
text-decoration: none;
|
8
|
+
font-size: 24px;
|
9
|
+
padding-top: 12px;
|
10
|
+
border: 0;
|
11
|
+
height: 80px;
|
12
|
+
|
13
|
+
&:before {
|
14
|
+
content: "";
|
15
|
+
position: absolute;
|
16
|
+
width: 42px;
|
17
|
+
height: 37px;
|
18
|
+
background-size: 100% auto;
|
19
|
+
left: 20px;
|
20
|
+
top: 30px;
|
21
|
+
}
|
22
|
+
|
23
|
+
&.facebook:before {
|
24
|
+
background-position: center top;
|
25
|
+
}
|
26
|
+
|
27
|
+
&.twitter:before {
|
28
|
+
background-position: center 122px;
|
29
|
+
}
|
30
|
+
|
31
|
+
&.google:before {
|
32
|
+
background-position: center bottom;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.sub_share a {
|
38
|
+
color: white;
|
39
|
+
font-family: SourceSansPro;
|
40
|
+
font-size: 13px;
|
41
|
+
text-align: center;
|
42
|
+
background-color: rgba(0, 0, 0, 0.3);
|
43
|
+
text-decoration: none;
|
44
|
+
width: auto;
|
45
|
+
display: block;
|
46
|
+
margin: 0 1em 1em 1em;
|
47
|
+
padding: 1em 0;
|
48
|
+
|
49
|
+
&:hover {
|
50
|
+
background-color: rgba(0, 0, 0, 0.6);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
.sub_share {
|
56
|
+
display: none;
|
57
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.panel {
|
2
|
+
opacity: 0;
|
3
|
+
visibility: hidden;
|
4
|
+
position: absolute;
|
5
|
+
right: 0;
|
6
|
+
width: 100%;
|
7
|
+
bottom: 0;
|
8
|
+
top: 5px;
|
9
|
+
@include transition(opacity 0.2s ease, visibility 0.2s ease);
|
10
|
+
|
11
|
+
@include desktop {
|
12
|
+
top: 60px;
|
13
|
+
}
|
14
|
+
|
15
|
+
&.active {
|
16
|
+
opacity: 1;
|
17
|
+
visibility: visible;
|
18
|
+
}
|
19
|
+
}
|
data/app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/parent_page_button.scss
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
.parent_page {
|
2
|
+
@include background-icon-center($color: #ddd);
|
3
|
+
@include fa-arrow-left-icon;
|
4
|
+
cursor: pointer;
|
5
|
+
pointer-events: all;
|
6
|
+
position: absolute;
|
7
|
+
top: 0;
|
8
|
+
left: -105px;
|
9
|
+
width: 45px;
|
10
|
+
height: 45px;
|
11
|
+
visibility: hidden;
|
12
|
+
display: none;
|
13
|
+
@include transform(translate3d(0, -100px, 0));
|
14
|
+
@include transition(transform 0.4s ease, visibility 0.4s, right 250ms);
|
15
|
+
|
16
|
+
&.is_visible {
|
17
|
+
visibility: visible;
|
18
|
+
@include transform(translate3d(0, 0, 0));
|
19
|
+
}
|
20
|
+
|
21
|
+
@include phone {
|
22
|
+
display: block;
|
23
|
+
}
|
24
|
+
|
25
|
+
@include pad_portrait {
|
26
|
+
display: block;
|
27
|
+
}
|
28
|
+
|
29
|
+
&:before {
|
30
|
+
z-index: 2;
|
31
|
+
}
|
32
|
+
|
33
|
+
&:after {
|
34
|
+
content: '';
|
35
|
+
display: block;
|
36
|
+
position: absolute;
|
37
|
+
top: 6px;
|
38
|
+
left: 6px;
|
39
|
+
width: 34px;
|
40
|
+
height: 34px;
|
41
|
+
border-radius: 17px;
|
42
|
+
background-color: rgba(53, 53, 53, 0.9);
|
43
|
+
@include box-shadow(0 0 7px #ccc);
|
44
|
+
z-index: 1;
|
45
|
+
}
|
46
|
+
}
|
@@ -0,0 +1,93 @@
|
|
1
|
+
.chapters_panel {
|
2
|
+
overflow: hidden;
|
3
|
+
|
4
|
+
.scroller {
|
5
|
+
position: absolute;
|
6
|
+
overflow: hidden;
|
7
|
+
top: 0;
|
8
|
+
bottom: 5px;
|
9
|
+
width: 100%;
|
10
|
+
|
11
|
+
&.animated {
|
12
|
+
@include transition(top 0.5s ease);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
ul {
|
17
|
+
padding: 0;
|
18
|
+
margin: 0;
|
19
|
+
list-style: none;
|
20
|
+
position: absolute;
|
21
|
+
|
22
|
+
@include mobile {
|
23
|
+
width: 100%;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
li {
|
28
|
+
margin-left: 6px;
|
29
|
+
padding-bottom: 2px;
|
30
|
+
}
|
31
|
+
|
32
|
+
a {
|
33
|
+
display: block;
|
34
|
+
padding: 0 12px 0 6px;
|
35
|
+
|
36
|
+
text-decoration: none;
|
37
|
+
color: $basic-text-color;
|
38
|
+
font-weight: normal;
|
39
|
+
font-size: 17px;
|
40
|
+
line-height: 20px;
|
41
|
+
border-left: solid 6px rgba(255, 255, 255, 0.3);
|
42
|
+
white-space: nowrap;
|
43
|
+
|
44
|
+
height: 10px;
|
45
|
+
@include transition(height 0.5s ease);
|
46
|
+
}
|
47
|
+
|
48
|
+
span {
|
49
|
+
padding: 10px 0;
|
50
|
+
display: block;
|
51
|
+
}
|
52
|
+
|
53
|
+
a.in_active_chapter {
|
54
|
+
color: $outline-navigation-bar-active-chapter-color;
|
55
|
+
border-left: solid 6px $outline-navigation-bar-active-chapter-color;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
&.fixed {
|
60
|
+
.chapters_panel {
|
61
|
+
li {
|
62
|
+
margin-left: 3px;
|
63
|
+
}
|
64
|
+
|
65
|
+
a {
|
66
|
+
border-left-width: 2px;
|
67
|
+
padding: 0 10px 0 6px;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
&.expandable {
|
73
|
+
.chapters_panel {
|
74
|
+
span {
|
75
|
+
opacity: 0;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
&.fixed,
|
81
|
+
&.expanded {
|
82
|
+
.chapters_panel {
|
83
|
+
a {
|
84
|
+
height: 40px !important;
|
85
|
+
}
|
86
|
+
|
87
|
+
span {
|
88
|
+
opacity: 1;
|
89
|
+
@include transition(opacity 0.5s ease);
|
90
|
+
@include transition-delay(0.3s);
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
@@ -0,0 +1,73 @@
|
|
1
|
+
.toggle {
|
2
|
+
height: 45px;
|
3
|
+
position: absolute;
|
4
|
+
|
5
|
+
&.share,
|
6
|
+
&.credits {
|
7
|
+
opacity: 0;
|
8
|
+
visibility: hidden;
|
9
|
+
@include transition(opacity 0.5s ease, visibility 0.5s ease);
|
10
|
+
}
|
11
|
+
|
12
|
+
&.share {
|
13
|
+
top: 80px;
|
14
|
+
}
|
15
|
+
|
16
|
+
&.credits {
|
17
|
+
bottom: 10px;
|
18
|
+
}
|
19
|
+
|
20
|
+
&.mobile_only {
|
21
|
+
display: none;
|
22
|
+
left: -55px;
|
23
|
+
|
24
|
+
.has_mobile_platform & {
|
25
|
+
display: block;
|
26
|
+
}
|
27
|
+
|
28
|
+
@include mobile {
|
29
|
+
display: block;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
&.desktop_only {
|
34
|
+
right: 15px;
|
35
|
+
|
36
|
+
.has_mobile_platform & {
|
37
|
+
display: none;
|
38
|
+
}
|
39
|
+
|
40
|
+
@include mobile {
|
41
|
+
display: none;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
.button {
|
46
|
+
position: relative;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
&.fixed .toggle,
|
51
|
+
&.buttons_active .toggle {
|
52
|
+
&.buttons {
|
53
|
+
right: 10px;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
&.expanded .toggle {
|
58
|
+
&.share,
|
59
|
+
&.credits {
|
60
|
+
opacity: 1;
|
61
|
+
visibility: visible;
|
62
|
+
}
|
63
|
+
}
|
64
|
+
|
65
|
+
&.expandable {
|
66
|
+
.toggle.desktop_only {
|
67
|
+
@include menu-item-shadow;
|
68
|
+
}
|
69
|
+
|
70
|
+
&.expanded .toggle.desktop_only {
|
71
|
+
@include menu-item-shadow-off;
|
72
|
+
}
|
73
|
+
}
|