storys 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/app/css/app.css +57 -5
- data/app/index.html +5 -3
- data/app/js/app.js +21 -10
- data/app/js/controllers.index.js +3 -1
- data/app/js/jquery.twoup.js +1 -1
- data/lib/storys/version.rb +1 -1
- metadata +5 -16
- data/app/js/lib/jquery.hammer.js +0 -1529
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MmU5NjNkYWNlODkzYzkxYzcxZTZhODBkN2E0YjMwNjU2MWU5M2Q0OA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YzYwZDM1N2I2ODI2YWEwZTA1ZDM5OWVkNGQ0ZTAzMjRhOGJjNzg4Ng==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NDc2ZmY5YTdlOTNkYTc2ZDQ3OGY5NTc2ODg4ODFlNjY4ZGQwZDg1ZDcwNjIy
|
10
|
+
MzBiODkxZWQ1OWVmMDI4ZDM3YzE1NjcwYjE1Y2Y0NTk4ZDNhMjEzNTg0YmFj
|
11
|
+
ZGQ4ZjA2MjRjYzI3ZTNiMzZmZGM2MmVhODAyNzk1Y2Y4NDhmOWU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
OTI1ZDU0ZGZlNmVhNGM1Y2I5YjViZDMxZTIwMjdjOTljYWVmZDBmNjRmNDhk
|
14
|
+
YWUyMTY0NzdlYmEyNGM0NjU0Nzc3NjhiNDZmNzhjOGQ0YzYwODkyZTAwZGU5
|
15
|
+
ODIzYzIwZGFmOGQ0YTZlMTkwNWJhODZmOGQxMWE5ZjAwZjZjMzg=
|
data/app/css/app.css
CHANGED
@@ -27,24 +27,76 @@ h4 { font-size: 20px; margin-bottom: 0.6em; text-align: left; font-weight: bold;
|
|
27
27
|
user-select: none;
|
28
28
|
}
|
29
29
|
|
30
|
-
|
30
|
+
.paginator {
|
31
31
|
position: fixed;
|
32
|
-
top: 0;
|
33
|
-
bottom: 0;
|
34
32
|
width: 100px;
|
35
33
|
z-index: 10000;
|
34
|
+
|
35
|
+
opacity: 0;
|
36
|
+
font-size: 20px;
|
37
|
+
font-weight: bold;
|
38
|
+
text-align: center;
|
39
|
+
color: #ffffff;
|
40
|
+
|
41
|
+
/* Internet Explorer 10 */
|
42
|
+
display: -ms-flexbox;
|
43
|
+
-ms-flex-pack: center;
|
44
|
+
-ms-flex-align: center;
|
45
|
+
|
46
|
+
/* Firefox */
|
47
|
+
display: -moz-box;
|
48
|
+
-moz-box-pack: center;
|
49
|
+
-moz-box-align: center;
|
50
|
+
|
51
|
+
/* Safari, Opera, and Chrome */
|
52
|
+
display: -webkit-box;
|
53
|
+
-webkit-box-pack: center;
|
54
|
+
-webkit-box-align: center;
|
55
|
+
|
56
|
+
/* W3C */
|
57
|
+
display: box;
|
58
|
+
box-pack: center;
|
59
|
+
box-align: center;
|
36
60
|
}
|
37
61
|
|
38
|
-
|
62
|
+
.paginator:active, body.pagination-active .paginator {
|
39
63
|
background-color: #000000;
|
40
|
-
opacity: 0.
|
64
|
+
opacity: 0.4;
|
65
|
+
}
|
66
|
+
|
67
|
+
.paginator:hover {
|
68
|
+
cursor: pointer;
|
41
69
|
}
|
42
70
|
|
43
71
|
#page-back {
|
72
|
+
top: 0;
|
73
|
+
bottom: 0;
|
44
74
|
left: 0;
|
45
75
|
}
|
46
76
|
|
47
77
|
#page-next {
|
78
|
+
top: 0;
|
79
|
+
bottom: 0;
|
80
|
+
right: 0;
|
81
|
+
}
|
82
|
+
|
83
|
+
#page-back-10 {
|
84
|
+
bottom: 0;
|
85
|
+
left: 0;
|
86
|
+
height: 100px;
|
87
|
+
z-index: 10001;
|
88
|
+
}
|
89
|
+
|
90
|
+
#page-next-10 {
|
91
|
+
bottom: 0;
|
48
92
|
right: 0;
|
93
|
+
height: 100px;
|
94
|
+
z-index: 10001;
|
49
95
|
}
|
50
96
|
|
97
|
+
#page-home {
|
98
|
+
top: 0;
|
99
|
+
left: 0;
|
100
|
+
height: 100px;
|
101
|
+
z-index: 10001;
|
102
|
+
}
|
data/app/index.html
CHANGED
@@ -9,7 +9,6 @@
|
|
9
9
|
<link href="css/views.show.css" rel="stylesheet" type="text/css">
|
10
10
|
|
11
11
|
<script src="js/lib/jquery-2.0.3.js" type="text/javascript"></script>
|
12
|
-
<script src="js/lib/jquery.hammer.js" type="text/javascript"></script>
|
13
12
|
<script src="js/lib/underscore.js" type="text/javascript"></script>
|
14
13
|
<script src="js/lib/jquery.browser.js" type="text/javascript"></script>
|
15
14
|
<script src="js/jquery.twoup.js" type="text/javascript"></script>
|
@@ -51,7 +50,10 @@
|
|
51
50
|
</div>
|
52
51
|
</div>
|
53
52
|
|
54
|
-
<div id="page-back"
|
55
|
-
<div id="page-next"
|
53
|
+
<div id="page-back" class="paginator">◀</div>
|
54
|
+
<div id="page-next" class="paginator">▶</div>
|
55
|
+
<div id="page-back-10" class="paginator">◀◀</div>
|
56
|
+
<div id="page-next-10" class="paginator">▶▶</div>
|
57
|
+
<div id="page-home" class="paginator">❌</div>
|
56
58
|
</body>
|
57
59
|
</html>
|
data/app/js/app.js
CHANGED
@@ -5,20 +5,31 @@ $(function() {
|
|
5
5
|
|
6
6
|
$("#wrapper").twoup("none");
|
7
7
|
|
8
|
-
|
8
|
+
|
9
|
+
$(document).click(function() {
|
10
|
+
$("body").toggleClass("pagination-active");
|
11
|
+
});
|
12
|
+
|
13
|
+
$("#page-back").click(function(e) {
|
14
|
+
e.stopPropagation();
|
9
15
|
$.twoup.page(-1, true);
|
10
16
|
});
|
11
|
-
$("#page-
|
17
|
+
$("#page-back-10").click(function(e) {
|
18
|
+
e.stopPropagation();
|
19
|
+
$.twoup.page(-10, true);
|
20
|
+
});
|
21
|
+
$("#page-next").click(function(e) {
|
22
|
+
e.stopPropagation();
|
12
23
|
$.twoup.page(1, true);
|
13
24
|
});
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
})
|
25
|
+
$("#page-next-10").click(function(e) {
|
26
|
+
e.stopPropagation();
|
27
|
+
$.twoup.page(10, true);
|
28
|
+
});
|
29
|
+
$("#page-home").click(function(e) {
|
30
|
+
e.stopPropagation();
|
31
|
+
location.hash = lastControllerLocation;
|
32
|
+
});
|
22
33
|
|
23
34
|
$.getJSON("data.json").done(function(data) {
|
24
35
|
if(data.length == 0) alert("No data.json, or data invalid.");
|
data/app/js/controllers.index.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
var lastControllerLocation = "#index!1";
|
2
|
+
|
1
3
|
controllers.index = function(search, sort, sortDirection) {
|
2
4
|
var _this = this;
|
3
5
|
|
@@ -75,6 +77,7 @@ controllers.index = function(search, sort, sortDirection) {
|
|
75
77
|
}
|
76
78
|
|
77
79
|
this.render = function() {
|
80
|
+
lastControllerLocation = location.hash;
|
78
81
|
}
|
79
82
|
|
80
83
|
this.destroy = function() {
|
@@ -84,7 +87,6 @@ controllers.index = function(search, sort, sortDirection) {
|
|
84
87
|
$("a.sort").unbind("click");
|
85
88
|
$("a.sort-direction").unbind("click");
|
86
89
|
$("#stories").empty();
|
87
|
-
$("#view-index").hammer().off("swiperight").off("swipeleft").off("drag");
|
88
90
|
$("#view-index").hide().removeClass("current-view");
|
89
91
|
}
|
90
92
|
}
|
data/app/js/jquery.twoup.js
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
$(window).resize(twoup.layout).resize();
|
27
27
|
|
28
28
|
$(window).bind('hashchange', function() {
|
29
|
-
slider.
|
29
|
+
slider.css({ "margin-left": -((twoup.page() - 1) * scroll_width) + "px" });
|
30
30
|
}).trigger('hashchange');
|
31
31
|
|
32
32
|
$(window).keydown(function(event) {
|
data/lib/storys/version.rb
CHANGED
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: storys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Brenton "B-Train" Fletcher
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-11-13 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: addressable
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: naturally
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ! '>='
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ! '>='
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,7 +55,6 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: nsf
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ! '>='
|
68
60
|
- !ruby/object:Gem::Version
|
@@ -70,7 +62,6 @@ dependencies:
|
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ! '>='
|
76
67
|
- !ruby/object:Gem::Version
|
@@ -1107,7 +1098,6 @@ files:
|
|
1107
1098
|
- app/js/lib/jquery.ba-bbq.js
|
1108
1099
|
- app/js/lib/jquery.browser.js
|
1109
1100
|
- app/js/lib/jquery.colorbox.js
|
1110
|
-
- app/js/lib/jquery.hammer.js
|
1111
1101
|
- app/js/lib/underscore.js
|
1112
1102
|
- bin/storys
|
1113
1103
|
- lib/storys.rb
|
@@ -1122,27 +1112,26 @@ files:
|
|
1122
1112
|
- storys.gemspec
|
1123
1113
|
homepage: http://github.com/bloopletech/storys
|
1124
1114
|
licenses: []
|
1115
|
+
metadata: {}
|
1125
1116
|
post_install_message:
|
1126
1117
|
rdoc_options: []
|
1127
1118
|
require_paths:
|
1128
1119
|
- lib
|
1129
1120
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1130
|
-
none: false
|
1131
1121
|
requirements:
|
1132
1122
|
- - ! '>='
|
1133
1123
|
- !ruby/object:Gem::Version
|
1134
1124
|
version: '0'
|
1135
1125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
1136
|
-
none: false
|
1137
1126
|
requirements:
|
1138
1127
|
- - ! '>='
|
1139
1128
|
- !ruby/object:Gem::Version
|
1140
1129
|
version: 1.3.6
|
1141
1130
|
requirements: []
|
1142
1131
|
rubyforge_project: storys
|
1143
|
-
rubygems_version: 1.
|
1132
|
+
rubygems_version: 2.1.10
|
1144
1133
|
signing_key:
|
1145
|
-
specification_version:
|
1134
|
+
specification_version: 4
|
1146
1135
|
summary: Storys indexes a collection of stories and generates a SPA that browses the
|
1147
1136
|
collection.
|
1148
1137
|
test_files: []
|