pageflow-progress-navigation-bar 0.1.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 +15 -0
- data/.gitignore +22 -0
- data/.jshintrc +18 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +10 -0
- data/README.md +45 -0
- data/Rakefile +7 -0
- data/app/assets/images/pageflow/progress_navigation_bar/indicator.png +0 -0
- data/app/assets/images/pageflow/progress_navigation_bar/volume_control_sprite.png +0 -0
- data/app/assets/javascript/pageflow/progress_navigation_bar.js +8 -0
- data/app/assets/javascript/pageflow/progress_navigation_bar/widget.js +342 -0
- data/app/assets/stylesheets/pageflow/cross_dependant_styles.css.scss +29 -0
- data/app/assets/stylesheets/pageflow/progress_navigation_bar.css.scss +676 -0
- data/app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default.css.scss +338 -0
- data/app/views/pageflow/progress_navigation_bar/_widget.html.erb +15 -0
- data/app/views/pageflow/progress_navigation_bar/widget/_bar_top.html.erb +79 -0
- data/app/views/pageflow/progress_navigation_bar/widget/_credits_box_content.html.erb +5 -0
- data/app/views/pageflow/progress_navigation_bar/widget/_home_button.html.erb +8 -0
- data/app/views/pageflow/progress_navigation_bar/widget/_page.html.erb +16 -0
- data/config/locales/de.yml +26 -0
- data/config/locales/en.yml +26 -0
- data/lib/pageflow-progress-navigation-bar.rb +9 -0
- data/lib/pageflow/progress_navigation_bar/engine.rb +9 -0
- data/lib/pageflow/progress_navigation_bar/widget_type.rb +13 -0
- data/pageflow-progress-navigation-bar.gemspec +21 -0
- metadata +110 -0
@@ -0,0 +1,338 @@
|
|
1
|
+
$nav-color: $main-color;
|
2
|
+
$nav-font: $standard-font;
|
3
|
+
|
4
|
+
$nav-active-chapter: desaturate($main-color, 50%);
|
5
|
+
$nav-active-page: $main-color;
|
6
|
+
|
7
|
+
$nav-active-chapter-beginning: desaturate($main-color, 40%);
|
8
|
+
|
9
|
+
$nav-hint-color: #A9A9A9 !default;
|
10
|
+
$nav-display-header-button: false !default;
|
11
|
+
|
12
|
+
$nav-chapter-beginning: #afafaf;
|
13
|
+
$nav-dot-even: #9B9B9B;
|
14
|
+
$nav-dot-odd: #afafaf;
|
15
|
+
|
16
|
+
$nav-bg-color: $basic-background-color;
|
17
|
+
$bg-color: $nav-bg-color;
|
18
|
+
$nav-bg-color-transparent: $basic-background-color-transparent;
|
19
|
+
|
20
|
+
@mixin pageflow-progress-navigation-bar-small-height {
|
21
|
+
@media screen and (max-height: 870px) {
|
22
|
+
@content;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
.progress_navigation_bar {
|
27
|
+
@if $nav-display-header-button {
|
28
|
+
.navigation_button_area .navigation_bar_buttons li {
|
29
|
+
height: 11.11%;
|
30
|
+
|
31
|
+
&.mute {
|
32
|
+
height: 22.22%;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
&.with_home_button {
|
37
|
+
.navigation_button_area .navigation_bar_buttons li {
|
38
|
+
height: 10%;
|
39
|
+
|
40
|
+
&.mute {
|
41
|
+
height: 20%;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
@else {
|
47
|
+
.navigation_button_area .navigation_bar_buttons li {
|
48
|
+
height: 12.25%;
|
49
|
+
|
50
|
+
&.menu_li {
|
51
|
+
display: none;
|
52
|
+
}
|
53
|
+
|
54
|
+
&.mute {
|
55
|
+
height: 25%;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
&.with_home_button {
|
60
|
+
.navigation_button_area .navigation_bar_buttons li {
|
61
|
+
height: 11.11%;
|
62
|
+
|
63
|
+
&.mute {
|
64
|
+
height: 22.22%;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
.navigation_button_area .navigation_bar_buttons {
|
71
|
+
&:after {
|
72
|
+
background-color: $nav-bg-color;
|
73
|
+
background-color: $nav-bg-color-transparent;
|
74
|
+
}
|
75
|
+
|
76
|
+
.navigation_credits_box a{
|
77
|
+
color: $main-color;
|
78
|
+
}
|
79
|
+
|
80
|
+
.navigation_bullet, .navigation_menu > a {
|
81
|
+
position: absolute;
|
82
|
+
text-decoration: none;
|
83
|
+
|
84
|
+
.button {
|
85
|
+
text-decoration: none;
|
86
|
+
font-size: 16px;
|
87
|
+
width: 28px;
|
88
|
+
height: 28px;
|
89
|
+
display: block;
|
90
|
+
background: -webkit-linear-gradient(-75deg, rgba(255, 255, 255, 0.71), rgba(0, 0, 0, 0.32));
|
91
|
+
background-color: #03818c !important;
|
92
|
+
box-shadow: 1px 2px 1px 0px rgba(0,0,0,0.2);
|
93
|
+
border-radius: 18px;
|
94
|
+
color: rgba(0, 0, 0, 0.75);
|
95
|
+
cursor: pointer;
|
96
|
+
margin: -25px auto 0 30px;
|
97
|
+
position: relative;
|
98
|
+
background-color: rgb(219, 219, 219) !important;
|
99
|
+
@include shine-gradient;
|
100
|
+
|
101
|
+
@include pageflow-progress-navigation-bar-small-height {
|
102
|
+
margin: -14px auto 0 30px;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
&:hover .button, &.active .button {
|
107
|
+
background-color: $nav-color !important;
|
108
|
+
-webkit-mask-image: none;
|
109
|
+
color: rgba(255,255,255,0.9);
|
110
|
+
text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.2);
|
111
|
+
|
112
|
+
.button, .navigation_mute, .navigation_share {
|
113
|
+
color: rgba(255,255,255,0.9);
|
114
|
+
text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.2);
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
.navi_hint {
|
119
|
+
color: $nav-hint-color;
|
120
|
+
}
|
121
|
+
|
122
|
+
&:hover, &.active, &:active {
|
123
|
+
.navi_hint {
|
124
|
+
color: $nav-color;
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
&:active .button{
|
129
|
+
box-shadow: 0px 1px 1px 0px rgba(0,0,0,0.2);
|
130
|
+
-webkit-transform: translate(1px,1px);
|
131
|
+
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%,rgba(0,0,0,0.2) 40%,rgba(0,0,0,0.2) 100%);
|
132
|
+
}
|
133
|
+
}
|
134
|
+
|
135
|
+
.button, .navigation_mute, .navigation_share {
|
136
|
+
font-family: "FontAwesome";
|
137
|
+
font-size: 1em;
|
138
|
+
color: rgba(0,0,0,0.75);
|
139
|
+
text-shadow: -1px -1px 1px rgba(255, 255, 255, 0.6);
|
140
|
+
|
141
|
+
display: inline-block;
|
142
|
+
width: 100%;
|
143
|
+
text-align: center;
|
144
|
+
line-height: 28px;
|
145
|
+
border-bottom: 0px !important;
|
146
|
+
|
147
|
+
}
|
148
|
+
|
149
|
+
.navigation_bullet.navigation_main {
|
150
|
+
.button {
|
151
|
+
@include fa-reorder-icon;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
155
|
+
.navigation_bullet.navigation_top {
|
156
|
+
padding-top: 0;
|
157
|
+
.button {
|
158
|
+
border-bottom: 0;
|
159
|
+
font-weight: bold;
|
160
|
+
|
161
|
+
@include fa-arrow-circle-up-icon;
|
162
|
+
}
|
163
|
+
}
|
164
|
+
.navigation_bullet.navigation_home {
|
165
|
+
padding-top: 0;
|
166
|
+
.button {
|
167
|
+
border-bottom: 0;
|
168
|
+
font-weight: bold;
|
169
|
+
|
170
|
+
@include fa-home-icon;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
.navigation_bullet.navigation_index {
|
174
|
+
.button {
|
175
|
+
@include fa-th-icon;
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
&.js .navigation_bar_bottom li.fullscreen {
|
180
|
+
height: auto;
|
181
|
+
}
|
182
|
+
|
183
|
+
&.js a.scroll_indicator {
|
184
|
+
background-image: image-url('pageflow/themes/default/scroll_indicator_sprite.png');
|
185
|
+
}
|
186
|
+
|
187
|
+
.navigation_bullet.navigation_fullscreen {
|
188
|
+
|
189
|
+
.button {
|
190
|
+
font-weight: bold;
|
191
|
+
@include fa-expand-icon;
|
192
|
+
}
|
193
|
+
}
|
194
|
+
.navigation_bullet.navigation_hide_text {
|
195
|
+
.button {
|
196
|
+
font-weight: bold;
|
197
|
+
|
198
|
+
@include fa-photo-icon;
|
199
|
+
}
|
200
|
+
}
|
201
|
+
.navigation_menu {
|
202
|
+
.navigation_mute {
|
203
|
+
font-weight: bold;
|
204
|
+
|
205
|
+
@include fa-volume-up-icon;
|
206
|
+
|
207
|
+
&.muted {
|
208
|
+
@include fa-volume-off-icon;
|
209
|
+
}
|
210
|
+
&.muted:before {
|
211
|
+
margin-right: 2px;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
}
|
215
|
+
.navigation_menu {
|
216
|
+
.navigation_share {
|
217
|
+
font-weight: bold;
|
218
|
+
|
219
|
+
@include fa-share-icon;
|
220
|
+
|
221
|
+
&:before {
|
222
|
+
margin-left: 1px;
|
223
|
+
}
|
224
|
+
}
|
225
|
+
}
|
226
|
+
.navigation_menu {
|
227
|
+
.navigation_credits {
|
228
|
+
font-weight: bold;
|
229
|
+
@include fa-info-icon;
|
230
|
+
}
|
231
|
+
}
|
232
|
+
|
233
|
+
.navigation_share_box {
|
234
|
+
a {
|
235
|
+
text-align: center;
|
236
|
+
|
237
|
+
p {
|
238
|
+
font-family: SourceSansPro;
|
239
|
+
font-size: 12px;
|
240
|
+
}
|
241
|
+
}
|
242
|
+
|
243
|
+
.share_google, .share_facebook, .share_twitter {
|
244
|
+
font-size: 1.5em;
|
245
|
+
&:before {
|
246
|
+
font-family: "FontAwesome";
|
247
|
+
color: white;
|
248
|
+
text-shadow: none;
|
249
|
+
}
|
250
|
+
}
|
251
|
+
|
252
|
+
a:hover {
|
253
|
+
p {
|
254
|
+
color: $nav-color;
|
255
|
+
}
|
256
|
+
|
257
|
+
.share_google, .share_facebook, .share_twitter {
|
258
|
+
&:before {
|
259
|
+
color: $nav-color;
|
260
|
+
}
|
261
|
+
}
|
262
|
+
}
|
263
|
+
|
264
|
+
.share_google {
|
265
|
+
@include fa-google-plus-icon;
|
266
|
+
}
|
267
|
+
.share_facebook {
|
268
|
+
@include fa-facebook-icon;
|
269
|
+
}
|
270
|
+
.share_twitter {
|
271
|
+
@include fa-twitter-icon;
|
272
|
+
}
|
273
|
+
}
|
274
|
+
}
|
275
|
+
|
276
|
+
&.js .scroller:after {
|
277
|
+
background-color: $nav-bg-color;
|
278
|
+
background-color: $nav-bg-color-transparent;
|
279
|
+
}
|
280
|
+
|
281
|
+
.scroller ul, &.js .scroller ul {
|
282
|
+
a {
|
283
|
+
position: absolute;
|
284
|
+
top: 0;
|
285
|
+
left: 0;
|
286
|
+
height: 100%;
|
287
|
+
width: 100%;
|
288
|
+
background-color: $nav-dot-even;
|
289
|
+
border-bottom: 1px solid $nav-bg-color;
|
290
|
+
border-bottom: 1px solid $nav-bg-color-transparent;
|
291
|
+
box-sizing: border-box;
|
292
|
+
|
293
|
+
&.in_active_chapter {
|
294
|
+
background-color: $nav-active-chapter;
|
295
|
+
}
|
296
|
+
|
297
|
+
&.active {
|
298
|
+
cursor: default;
|
299
|
+
background-color: $nav-active-page;
|
300
|
+
|
301
|
+
|
302
|
+
img {
|
303
|
+
border-left: 5px solid $nav-active-page;
|
304
|
+
}
|
305
|
+
}
|
306
|
+
}
|
307
|
+
|
308
|
+
li.chapter_beginning a {
|
309
|
+
background-color: $nav-chapter-beginning;
|
310
|
+
|
311
|
+
&.in_active_chapter {
|
312
|
+
background-color: $nav-active-chapter-beginning;
|
313
|
+
}
|
314
|
+
|
315
|
+
&.active {
|
316
|
+
background-color: $main-color;
|
317
|
+
}
|
318
|
+
}
|
319
|
+
|
320
|
+
img {
|
321
|
+
display: block;
|
322
|
+
}
|
323
|
+
|
324
|
+
&.no_chapters {
|
325
|
+
li.chapter_beginning a, li a.in_active_chapter, li.chapter_beginning a.in_active_chapter {
|
326
|
+
background-color: $nav-dot-even;
|
327
|
+
|
328
|
+
&.active {
|
329
|
+
background-color: $nav-active-page;
|
330
|
+
}
|
331
|
+
}
|
332
|
+
}
|
333
|
+
}
|
334
|
+
|
335
|
+
&.js .volume-control .volume-level {
|
336
|
+
background-color: $nav-color;
|
337
|
+
}
|
338
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%= content_tag(:div,
|
2
|
+
class: ["progress_navigation_bar", entry.home_button.enabled? ? 'with_home_button' : nil].compact.join(' '),
|
3
|
+
data: {widget: 'progress_navigation_bar'}) do %>
|
4
|
+
|
5
|
+
<div class="navigation_button_area">
|
6
|
+
<%= render 'pageflow/progress_navigation_bar/widget/bar_top', :entry => entry %>
|
7
|
+
</div>
|
8
|
+
<div class="scroller">
|
9
|
+
<ul class="navigation_dots <%= entry.chapters.count > 1 ? '' : 'no_chapters' %>">
|
10
|
+
<%= render :partial => 'pageflow/progress_navigation_bar/widget/page',
|
11
|
+
:collection => entry.pages.displayed_in_navigation,
|
12
|
+
:locals => {:image_style => :navigation_thumbnail_small, :image_width => 85, :chapters_count => entry.chapters.count} %>
|
13
|
+
</ul>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
@@ -0,0 +1,79 @@
|
|
1
|
+
<ul class="navigation_bar_buttons">
|
2
|
+
<li class="menu_li">
|
3
|
+
<a id="navigation" class="navigation_bullet navigation_main" tabindex="2" title="<%= t('.display_header') %>" data-active-title="<%= t('.hide_header') %>">
|
4
|
+
<span class="button"></span>
|
5
|
+
<span class="navi_hint"><%= t('.header') %></span>
|
6
|
+
</a>
|
7
|
+
</li>
|
8
|
+
<%= render('pageflow/progress_navigation_bar/widget/home_button', home_button: entry.home_button) %>
|
9
|
+
<li>
|
10
|
+
<a class="navigation_bullet navigation_top" <%= "href=##{entry.pages.first.perma_id} data-link=#{entry.pages.first.id}" unless entry.pages.nil? || entry.pages.first.nil? %> tabindex="2" title="<%= t('.first_page_title') %>">
|
11
|
+
<span class="button"></span>
|
12
|
+
<span class="navi_hint"><%= t('.first_page') %></span>
|
13
|
+
</a>
|
14
|
+
</li>
|
15
|
+
<li>
|
16
|
+
<a class="navigation_bullet navigation_index" tabindex="2" title="<%= t('.display_overview') %>" data-active-title="<%= t('.hide_overview') %>">
|
17
|
+
<span class="button"></span>
|
18
|
+
<span class="navi_hint"><%= t('.overview') %></span>
|
19
|
+
</a>
|
20
|
+
</li>
|
21
|
+
<li class="fullscreen">
|
22
|
+
<a class="navigation_bullet navigation_fullscreen" tabindex="2" title="<%= t('.enter_fullscreen') %>" data-active-title="<%= t('.leave_fullscreen') %>">
|
23
|
+
<span class="button"></span>
|
24
|
+
<span class="navi_hint"><%= t('.fullscreen') %></span>
|
25
|
+
</a>
|
26
|
+
</li>
|
27
|
+
<li class="hide_text">
|
28
|
+
<a class="navigation_bullet navigation_hide_text" tabindex="2" title="<%= t('.hide_text') %>" data-active-title="<%= t('.show_text') %>">
|
29
|
+
<span class="button"></span>
|
30
|
+
<span class="navi_hint"><%= t('.hide_text') %></span>
|
31
|
+
</a>
|
32
|
+
</li>
|
33
|
+
<li class="navigation_menu mute">
|
34
|
+
<div class="navigation_volume_box" title="<%= t('.volume') %>">
|
35
|
+
<div class="volume-control" style="display: block;">
|
36
|
+
<div class="volume-slider">
|
37
|
+
<div class="volume-level" style="width: 100%;"><span class="volume-control-text"></span></div>
|
38
|
+
<div class="volume-handle" style="left: 100%;"></div>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
</li>
|
43
|
+
<li class="navigation_menu share" tabindex="2">
|
44
|
+
<div class="navigation_menu_box navigation_share_box">
|
45
|
+
<%= link_to "http://www.facebook.com/sharer/sharer.php?s=100&p%5Burl%5D=#{ERB::Util.url_encode(pretty_entry_url(entry))}&p%5Btitle%5D=#{ERB::Util.url_encode(entry.title)}", :target => "_blank", :tabindex => "2", :class => "share facebook", :data => { :"share-page" => "http://www.facebook.com/sharer/sharer.php?s=100&p%5Burl%5D=#{ERB::Util.url_encode(pretty_entry_url(entry))}%3Fpage%3DpermaId" } do %>
|
46
|
+
<span class="hint"><%= t('pageflow.widgets.share_menu.share_with_facebook') %></span>
|
47
|
+
<span class="share_facebook button"></span>
|
48
|
+
<p>facebook</p>
|
49
|
+
<% end %>
|
50
|
+
<%= link_to "http://twitter.com/home?status=#{ERB::Util.url_encode(pretty_entry_url(entry))}", :target => "_blank", :tabindex => "2", :class => "share twitter", :data => { :"share-page" => "http://twitter.com/home?status=#{ERB::Util.url_encode(pretty_entry_url(entry))}%3Fpage%3DpermaId" } do %>
|
51
|
+
<span class="hint"><%= t('pageflow.widgets.share_menu.share_with_twitter') %></span>
|
52
|
+
<span class="share_twitter button"></span>
|
53
|
+
<p>twitter</p>
|
54
|
+
<% end %>
|
55
|
+
<%= link_to "https://plus.google.com/share?url=#{ERB::Util.url_encode(pretty_entry_url(entry))}", :target => "_blank", :tabindex => "2", :class => "share google", :data => { :"share-page" => "https://plus.google.com/share?url=#{ERB::Util.url_encode(pretty_entry_url(entry))}%3Fpage%3DpermaId" } do %>
|
56
|
+
<span class="hint"><%= t('pageflow.widgets.share_menu.share_with_google') %></span>
|
57
|
+
<span class="share_google button"></span>
|
58
|
+
<p>google</p>
|
59
|
+
<% end %>
|
60
|
+
<div class="sub_share">
|
61
|
+
<a tabindex="2" target="_blank"><%= t('pageflow.widgets.share_menu.entry') %></a>
|
62
|
+
<a tabindex="2" target="_blank"><%= t('pageflow.widgets.share_menu.current_page') %></a>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
<a title="<%= t('.share') %>">
|
66
|
+
<span class="navigation_bg navigation_share button"></span>
|
67
|
+
<span class="navi_hint"><%= t('.share') %></span>
|
68
|
+
</a>
|
69
|
+
</li>
|
70
|
+
<li class="navigation_menu" tabindex="2">
|
71
|
+
<div class="navigation_menu_box navigation_credits_box">
|
72
|
+
<%= render 'pageflow/entries/navigation/credits_box_content', :entry => entry %>
|
73
|
+
</div>
|
74
|
+
<a class="navigation_credits_button" title="<%= t('.imprint') %>">
|
75
|
+
<span class="navigation_bg navigation_credits button"></span>
|
76
|
+
<span class="navi_hint"><%= t('.imprint') %></span>
|
77
|
+
</a>
|
78
|
+
</li>
|
79
|
+
</ul>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% if home_button.enabled? %>
|
2
|
+
<li>
|
3
|
+
<%= link_to(home_button.url, class: "navigation_bullet navigation_home", tabindex: "2", title: t('.home_title')) do %>
|
4
|
+
<span class="button"></span>
|
5
|
+
<span class="navi_hint"><%= t('.home') %></span>
|
6
|
+
<% end %>
|
7
|
+
</li>
|
8
|
+
<% end %>
|