mangos 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,79 +10,4 @@ html, body { height: 100%; }
10
10
  li { margin-left: 30px; }
11
11
  p, ul { margin-bottom: 1.3em; }
12
12
 
13
- .clear { clear: both; }
14
-
15
- .paginator {
16
- position: fixed;
17
- width: 100px;
18
- z-index: 10000;
19
-
20
- opacity: 0;
21
- font-size: 20px;
22
- font-weight: bold;
23
- text-align: center;
24
- color: #ffffff;
25
-
26
- /* Internet Explorer 10 */
27
- display: -ms-flexbox;
28
- -ms-flex-pack: center;
29
- -ms-flex-align: center;
30
-
31
- /* Firefox */
32
- display: -moz-box;
33
- -moz-box-pack: center;
34
- -moz-box-align: center;
35
-
36
- /* Safari, Opera, and Chrome */
37
- display: -webkit-box;
38
- -webkit-box-pack: center;
39
- -webkit-box-align: center;
40
-
41
- /* W3C */
42
- display: box;
43
- box-pack: center;
44
- box-align: center;
45
- }
46
-
47
- .paginator:active {
48
- background-color: #000000;
49
- opacity: 0.4;
50
- }
51
-
52
- .paginator:hover {
53
- cursor: pointer;
54
- }
55
-
56
- #page-back {
57
- top: 0;
58
- bottom: 0;
59
- left: 0;
60
- }
61
-
62
- #page-next {
63
- top: 0;
64
- bottom: 0;
65
- right: 0;
66
- }
67
-
68
- #page-back-10 {
69
- bottom: 0;
70
- left: 0;
71
- height: 100px;
72
- z-index: 10001;
73
- }
74
-
75
- #page-next-10 {
76
- bottom: 0;
77
- right: 0;
78
- height: 100px;
79
- z-index: 10001;
80
- }
81
-
82
- #page-home {
83
- top: 0;
84
- left: 0;
85
- height: 100px;
86
- z-index: 10001;
87
- }
88
-
13
+ .clear { clear: both; }
@@ -4,9 +4,8 @@
4
4
 
5
5
  #header { padding: 12px; }
6
6
  #search { width: 250px; }
7
- #actions { float: right; }
8
7
 
9
- #header > form {
8
+ #header > form {
10
9
  width: 684px;
11
10
  margin-left: auto;
12
11
  margin-right: auto;
@@ -14,34 +13,14 @@
14
13
 
15
14
  #wrapper { position: relative; background-color: #000000; }
16
15
 
17
- #tag_cloud, #header { background-color: #ffffff; }
18
- #tag_cloud { position: absolute; top: 0; right: 0; z-index: 1000; width: 500px; background-color: #ffffff; padding: 15px; }
19
- #tag_cloud .size_1 { font-size: 1.0em; }
20
- #tag_cloud .size_2 { font-size: 1.2em; }
21
- #tag_cloud .size_3 { font-size: 1.4em; }
22
- #tag_cloud .size_4 { font-size: 1.6em; }
23
-
24
- .title { }
25
16
  #items { padding: 2px 0 0 2px; }
26
17
  #items li { margin: 0 2px 2px 0; float: left; list-style-type: none; position: relative; overflow: hidden; width: 197px; height: 310px; }
27
- #items li .emblems, #items li .actions { display: block; position: absolute; top: 0; right: 0; padding: 1px; line-height: 0; background-color: #ffffff; }
28
- #items li .actions { display: none; right: auto; left: 0; width: 32px; }
29
18
  #items li > a { color: #000000; text-decoration: none; }
30
19
  #items li .info-wrapper { position: absolute; bottom: 0; left: 0; right: 0; background-color: #ffffff; }
31
20
  #items li .info { padding: 2px; }
32
21
  #items li .info img { vertical-align: middle; }
33
22
  #items li .info .title { padding-bottom: 3px; }
34
- #items .tag_list { min-height: 1.2em; }
35
- #items .tag_list:hover { background-color: #ffffaa; }
36
- #items input { width: 100%; }
37
23
 
38
24
  #items li.no_results { color: #ffffff; width: auto; float: none; text-align: center; padding: 40px 0; }
39
- /*#items .tags form { display: none; }*/
40
-
41
- #items li:hover .actions { display: block; }
42
25
 
43
26
  #item .title_image { float: left; margin-right: 15px; }
44
- #item #info { float: left; width: 315px; }
45
- #item .actions { margin-top: 15px; border-top: 1px solid #a0a0a0; padding-top: 15px; }
46
-
47
- #collections-index body { padding: 10px; }
@@ -16,6 +16,12 @@
16
16
  margin: 0 auto 0 auto;
17
17
  }
18
18
 
19
+ @media (min-width: 992px) {
20
+ #view-show img {
21
+ max-height: 100%;
22
+ }
23
+ }
24
+
19
25
  #view-show #return-to-index {
20
26
  padding: 5px;
21
27
  }
@@ -23,3 +29,77 @@
23
29
  #view-show #return-to-index a {
24
30
  color: #ffffff;
25
31
  }
32
+
33
+ .paginator {
34
+ position: fixed;
35
+ width: 100px;
36
+ z-index: 10000;
37
+
38
+ opacity: 0;
39
+ font-size: 20px;
40
+ font-weight: bold;
41
+ text-align: center;
42
+ color: #ffffff;
43
+
44
+ /* Internet Explorer 10 */
45
+ display: -ms-flexbox;
46
+ -ms-flex-pack: center;
47
+ -ms-flex-align: center;
48
+
49
+ /* Firefox */
50
+ display: -moz-box;
51
+ -moz-box-pack: center;
52
+ -moz-box-align: center;
53
+
54
+ /* Safari, Opera, and Chrome */
55
+ display: -webkit-box;
56
+ -webkit-box-pack: center;
57
+ -webkit-box-align: center;
58
+
59
+ /* W3C */
60
+ display: box;
61
+ box-pack: center;
62
+ box-align: center;
63
+ }
64
+
65
+ .paginator:active {
66
+ background-color: #000000;
67
+ opacity: 0.4;
68
+ }
69
+
70
+ .paginator:hover {
71
+ cursor: pointer;
72
+ }
73
+
74
+ #page-back {
75
+ top: 0;
76
+ bottom: 0;
77
+ left: 0;
78
+ }
79
+
80
+ #page-next {
81
+ top: 0;
82
+ bottom: 0;
83
+ right: 0;
84
+ }
85
+
86
+ #page-back-10 {
87
+ bottom: 0;
88
+ left: 0;
89
+ height: 100px;
90
+ z-index: 10001;
91
+ }
92
+
93
+ #page-next-10 {
94
+ bottom: 0;
95
+ right: 0;
96
+ height: 100px;
97
+ z-index: 10001;
98
+ }
99
+
100
+ #page-home {
101
+ top: 0;
102
+ left: 0;
103
+ height: 100px;
104
+ z-index: 10001;
105
+ }
@@ -53,12 +53,11 @@
53
53
 
54
54
  <div id="view-show">
55
55
  <img src="img/blank.png" id="image">
56
+ <div id="page-back" class="paginator">◀</div>
57
+ <div id="page-next" class="paginator">▶</div>
58
+ <div id="page-back-10" class="paginator">◀◀</div>
59
+ <div id="page-next-10" class="paginator">▶▶</div>
60
+ <div id="page-home" class="paginator">❌</div>
56
61
  </div>
57
-
58
- <div id="page-back" class="paginator">◀</div>
59
- <div id="page-next" class="paginator">▶</div>
60
- <div id="page-back-10" class="paginator">◀◀</div>
61
- <div id="page-next-10" class="paginator">▶▶</div>
62
- <div id="page-home" class="paginator">❌</div>
63
62
  </body>
64
63
  </html>
@@ -3,44 +3,6 @@ var store = null;
3
3
  $(function() {
4
4
  $(document).on("dragstart", "a, img", false);
5
5
 
6
- $("#page-back").click(function(e) {
7
- e.stopPropagation();
8
- utils.page(utils.page() - 1);
9
- });
10
- $("#page-back-10").click(function(e) {
11
- e.stopPropagation();
12
- utils.page(utils.page() - 10);
13
- });
14
- $("#page-next").click(function(e) {
15
- e.stopPropagation();
16
- utils.page(utils.page() + 1);
17
- });
18
- $("#page-next-10").click(function(e) {
19
- e.stopPropagation();
20
- utils.page(utils.page() + 10);
21
- });
22
- $("#page-home").click(function(e) {
23
- e.stopPropagation();
24
- if(lastControllerLocation != "") {
25
- location.hash = lastControllerLocation;
26
- }
27
- else {
28
- window.close();
29
- }
30
- });
31
-
32
- $(window).keydown(function(event) {
33
- if(event.keyCode == 39 || ((event.keyCode == 32 || event.keyCode == 13)
34
- && utils.scrollDistanceFromBottom() <= 0)) {
35
- event.preventDefault();
36
- utils.page(utils.page() + 1);
37
- }
38
- else if(event.keyCode == 8 || event.keyCode == 37) {
39
- event.preventDefault();
40
- utils.page(utils.page() - 1);
41
- }
42
- });
43
-
44
6
  $.getJSON("data.json").done(function(data) {
45
7
  if(data.length == 0) alert("No data.json, or data invalid.");
46
8
 
@@ -31,16 +31,6 @@ controllers.index = function(search, sort, sortDirection) {
31
31
  if(!sortDirection) sortDirection = "desc";
32
32
  if(sortDirection == "desc") books = books.reverse();
33
33
 
34
- function perPageFromWindow() {
35
- var windowWidth = $(window).width();
36
- if(windowWidth < 1000) return 16;
37
- else if(windowWidth > 1000 && windowWidth < 1500) return 21;
38
- else if(windowWidth > 1500) return 25;
39
- }
40
-
41
- var perPage = perPageFromWindow();
42
- var pages = utils.pages(books, perPage);
43
-
44
34
  this.init = function() {
45
35
  console.log("starting index");
46
36
 
@@ -102,8 +92,7 @@ controllers.index = function(search, sort, sortDirection) {
102
92
  console.log("rendering");
103
93
  window.scrollTo(0, 0);
104
94
 
105
- var booksPage = utils.paginate(books, perPage);
106
- addBooks(booksPage);
95
+ addBooks(_.first(books, 500));
107
96
  lastControllerLocation = location.hash;
108
97
  }
109
98
 
@@ -37,11 +37,52 @@ controllers.show = function(key) {
37
37
  //var image = $("#image")[0];
38
38
  //image.onload = squeezePortraitImage;
39
39
 
40
+ initPaginator();
40
41
  $("#view-show").show().addClass("current-view");
41
42
  $("title").text(book.title + " - Mangos");
42
43
  //setTimeout(preloadImages, 5000);
43
44
  }
44
45
 
46
+ function initPaginator() {
47
+ $("#page-back").click(function(e) {
48
+ e.stopPropagation();
49
+ utils.page(utils.page() - 1);
50
+ });
51
+ $("#page-back-10").click(function(e) {
52
+ e.stopPropagation();
53
+ utils.page(utils.page() - 10);
54
+ });
55
+ $("#page-next").click(function(e) {
56
+ e.stopPropagation();
57
+ utils.page(utils.page() + 1);
58
+ });
59
+ $("#page-next-10").click(function(e) {
60
+ e.stopPropagation();
61
+ utils.page(utils.page() + 10);
62
+ });
63
+ $("#page-home").click(function(e) {
64
+ e.stopPropagation();
65
+ if(lastControllerLocation != "") {
66
+ location.hash = lastControllerLocation;
67
+ }
68
+ else {
69
+ window.close();
70
+ }
71
+ });
72
+
73
+ $(window).keydown(function(event) {
74
+ if(event.keyCode == 39 || ((event.keyCode == 32 || event.keyCode == 13)
75
+ && utils.scrollDistanceFromBottom() <= 0)) {
76
+ event.preventDefault();
77
+ utils.page(utils.page() + 1);
78
+ }
79
+ else if(event.keyCode == 8 || event.keyCode == 37) {
80
+ event.preventDefault();
81
+ utils.page(utils.page() - 1);
82
+ }
83
+ });
84
+ }
85
+
45
86
  this.render = function() {
46
87
  window.scrollTo(0, 0);
47
88
 
@@ -56,7 +97,13 @@ controllers.show = function(key) {
56
97
 
57
98
  this.destroy = function() {
58
99
  console.log("destroying show");
100
+ destroyPaginator();
59
101
  $("#view-show").hide().removeClass("current-view");
60
102
  }
103
+
104
+ function destroyPaginator() {
105
+ $(".paginator").unbind("click");
106
+ $(window).unbind("keydown");
107
+ }
61
108
  }
62
109
 
@@ -1,3 +1,3 @@
1
1
  module Mangos
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,69 +1,78 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mangos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Brenton "B-Train" Fletcher
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-04-28 00:00:00.000000000 Z
12
+ date: 2014-07-15 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - ">="
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: 1.0.0
20
22
  type: :development
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - ">="
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: 1.0.0
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: addressable
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - ">="
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: 2.3.5
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - ">="
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: 2.3.5
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: naturally
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - ">="
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: 1.0.3
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - ">="
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: 1.0.3
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: rmagick
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
- - - ">="
67
+ - - ! '>='
60
68
  - !ruby/object:Gem::Version
61
69
  version: 2.13.1
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
- - - ">="
75
+ - - ! '>='
67
76
  - !ruby/object:Gem::Version
68
77
  version: 2.13.1
69
78
  description: A collection of manga or comics is a directory (the container) containing
@@ -80,7 +89,7 @@ executables:
80
89
  extensions: []
81
90
  extra_rdoc_files: []
82
91
  files:
83
- - ".gitignore"
92
+ - .gitignore
84
93
  - LICENSE
85
94
  - Rakefile
86
95
  - app/css/app.css
@@ -1116,27 +1125,27 @@ files:
1116
1125
  - mangos.gemspec
1117
1126
  homepage: http://github.com/bloopletech/mangos
1118
1127
  licenses: []
1119
- metadata: {}
1120
1128
  post_install_message:
1121
1129
  rdoc_options: []
1122
1130
  require_paths:
1123
1131
  - lib
1124
1132
  required_ruby_version: !ruby/object:Gem::Requirement
1133
+ none: false
1125
1134
  requirements:
1126
- - - ">="
1135
+ - - ! '>='
1127
1136
  - !ruby/object:Gem::Version
1128
1137
  version: '0'
1129
1138
  required_rubygems_version: !ruby/object:Gem::Requirement
1139
+ none: false
1130
1140
  requirements:
1131
- - - ">="
1141
+ - - ! '>='
1132
1142
  - !ruby/object:Gem::Version
1133
1143
  version: 1.3.6
1134
1144
  requirements: []
1135
1145
  rubyforge_project: mangos
1136
- rubygems_version: 2.2.2
1146
+ rubygems_version: 1.8.25
1137
1147
  signing_key:
1138
- specification_version: 4
1148
+ specification_version: 3
1139
1149
  summary: Mangos indexes a collection of manga or comis and generates a SPA that browses
1140
1150
  the collection.
1141
1151
  test_files: []
1142
- has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: b0746c4b67070f9b56de981d6a16394d2936c4ea
4
- data.tar.gz: 4a47f473b5ead7a62a3b1e52860f9ef5e197780f
5
- SHA512:
6
- metadata.gz: e9a04b17f0ee303a06ab969f5968d69f8a6938ca85372842fd8e0f7fcb7f06a7d3f4deb929d6a25a986ad8a1a756083e299f22b3aaad09c9919f946c75566d1c
7
- data.tar.gz: f1597e94001d6157a60578c44dca8386d364e0e88c2bf553b0e6dfc1356651864a008573a34cecb40458b7bc85ac43a3c5e3aeb00cf54391a978fb0f79f86f58