mangos 0.0.4 → 0.0.5

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.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ M2E5NWIyODNiNzYxMzFjMjRhZjk4OWM4ZmYzY2Y3ZWJhMTQzNGVhNQ==
5
+ data.tar.gz: !binary |-
6
+ NDhjNGVlYjUzYjQ3MGQ3ZWE5YjY1MWNmODkyNGQ3MDQxNGVmNDgzYg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ Mjc0NzI2YmE1YjhmZmE2NzMzNzhmMzk5OTBhMTU5NzcyOTRjY2M1OTMzMDBl
10
+ NzEyNzljZDQyNDVjMzVmY2VmNmUyMDBiZGM5NDFkZTlhNWQ3Y2Q5ZjdmMjRi
11
+ NmJkZTUxYTY3Yjc2MDM3MzM4OTRjMzFmNjQyM2Q3ZmEwZDI1NWM=
12
+ data.tar.gz: !binary |-
13
+ YjM3MWNlYWJhMjQzOWJkNzlkYjZlN2FmOWRjYjk4NWI0MmM4ZDE2MGMyOGQw
14
+ MGQyNDAyM2Y2YWUxYmFlNmQzMjQyM2QxOWI3NjE5MTljM2I0NmExZDFjNmVj
15
+ ZjFkYzQ3ZDI4ZGNlYmRkMjQxMDcyZTJjMjdiNDNiZmM2ZWNmMzc=
@@ -13,28 +13,75 @@ input[type="text"], select { padding: 1px; }
13
13
  .selector li:last-child { margin-right: 0; }
14
14
  .selector li.selected a { font-weight: bold; text-decoration: none; color: #000000; }
15
15
 
16
- #page-back, #page-next, #page-home {
16
+ .paginator {
17
17
  position: fixed;
18
- top: 0;
19
- bottom: 0;
20
18
  width: 100px;
21
19
  z-index: 10000;
20
+
21
+ opacity: 0;
22
+ font-size: 20px;
23
+ font-weight: bold;
24
+ text-align: center;
25
+ color: #ffffff;
26
+
27
+ /* Internet Explorer 10 */
28
+ display: -ms-flexbox;
29
+ -ms-flex-pack: center;
30
+ -ms-flex-align: center;
31
+
32
+ /* Firefox */
33
+ display: -moz-box;
34
+ -moz-box-pack: center;
35
+ -moz-box-align: center;
36
+
37
+ /* Safari, Opera, and Chrome */
38
+ display: -webkit-box;
39
+ -webkit-box-pack: center;
40
+ -webkit-box-align: center;
41
+
42
+ /* W3C */
43
+ display: box;
44
+ box-pack: center;
45
+ box-align: center;
22
46
  }
23
47
 
24
- #page-back:active, #page-next:active, #page-home:active {
48
+ .paginator:active, body.pagination-active .paginator {
25
49
  background-color: #000000;
26
50
  opacity: 0.4;
27
51
  }
28
52
 
53
+ .paginator:hover {
54
+ cursor: pointer;
55
+ }
56
+
29
57
  #page-back {
58
+ top: 0;
59
+ bottom: 0;
30
60
  left: 0;
31
61
  }
32
62
 
33
63
  #page-next {
64
+ top: 0;
65
+ bottom: 0;
34
66
  right: 0;
35
67
  }
36
68
 
69
+ #page-back-10 {
70
+ bottom: 0;
71
+ left: 0;
72
+ height: 100px;
73
+ z-index: 10001;
74
+ }
75
+
76
+ #page-next-10 {
77
+ bottom: 0;
78
+ right: 0;
79
+ height: 100px;
80
+ z-index: 10001;
81
+ }
82
+
37
83
  #page-home {
84
+ top: 0;
38
85
  left: 0;
39
86
  height: 100px;
40
87
  z-index: 10001;
@@ -47,9 +47,10 @@
47
47
  <img src="img/blank.png" id="image">
48
48
  </div>
49
49
 
50
- <div id="page-back"></div>
51
- <div id="page-next"></div>
52
- <div id="page-home"></div>
53
-
50
+ <div id="page-back" class="paginator">◀</div>
51
+ <div id="page-next" class="paginator">▶</div>
52
+ <div id="page-back-10" class="paginator">◀◀</div>
53
+ <div id="page-next-10" class="paginator">▶▶</div>
54
+ <div id="page-home" class="paginator">❌</div>
54
55
  </body>
55
56
  </html>
@@ -1,13 +1,27 @@
1
1
  var store = null;
2
2
 
3
3
  $(function() {
4
- $("#page-back").click(function() {
4
+ $(document).click(function() {
5
+ $("body").toggleClass("pagination-active");
6
+ });
7
+ $("#page-back").click(function(e) {
8
+ e.stopPropagation();
5
9
  utils.page(utils.page() - 1);
6
10
  });
7
- $("#page-next").click(function() {
11
+ $("#page-back-10").click(function(e) {
12
+ e.stopPropagation();
13
+ utils.page(utils.page() - 10);
14
+ });
15
+ $("#page-next").click(function(e) {
16
+ e.stopPropagation();
8
17
  utils.page(utils.page() + 1);
9
18
  });
10
- $("#page-home").click(function() {
19
+ $("#page-next-10").click(function(e) {
20
+ e.stopPropagation();
21
+ utils.page(utils.page() + 10);
22
+ });
23
+ $("#page-home").click(function(e) {
24
+ e.stopPropagation();
11
25
  location.hash = lastControllerLocation;
12
26
  });
13
27
 
@@ -1,4 +1,4 @@
1
- var lastControllerLocation = null;
1
+ var lastControllerLocation = "#index!1";
2
2
 
3
3
  controllers.index = function(search, sort, sortDirection) {
4
4
  var _this = this;
@@ -32,9 +32,7 @@ controllers.show = function(key) {
32
32
 
33
33
  var index = utils.page();
34
34
 
35
- _(5).times(function() {
36
- $("#image").attr('src', pageUrl(index));
37
- });
35
+ $("#image").attr('src', pageUrl(index));
38
36
 
39
37
  if((index + 1) <= book.pageUrls.length) {
40
38
  preloadImage(index + 1);
@@ -11,7 +11,7 @@ class Pathname
11
11
  end
12
12
 
13
13
  def image?
14
- file? && %w(.jpg .jpeg .png .gif).include?(extname)
14
+ file? && extname && %w(.jpg .jpeg .png .gif).include?(extname.downcase)
15
15
  end
16
16
 
17
17
  def hidden?
@@ -10,6 +10,7 @@ class Mangos::Update
10
10
  #load_data
11
11
  process
12
12
  save_data
13
+ puts "\nDone!"
13
14
  end
14
15
 
15
16
  def load_data
@@ -18,10 +19,18 @@ class Mangos::Update
18
19
 
19
20
  def save_data
20
21
  puts "\nWriting out JSON file"
21
- Mangos::Mangos.save_json(mangos.mangos_path + "data.json", books.map { |b| b.to_hash })
22
+ books_hashes = []
23
+ books.each_with_index do |b, i|
24
+ $stdout.write "\rProcessing #{i + 1} of #{books.length} (#{(((i + 1) / books.length.to_f) * 100.0).round}%)"
25
+ $stdout.flush
26
+
27
+ books_hashes << b.to_hash
28
+ end
29
+ Mangos::Mangos.save_json(mangos.mangos_path + "data.json", books_hashes)
22
30
  end
23
31
 
24
32
  def process
33
+ puts "\nLoading books"
25
34
  @directories.each_with_index do |d, i|
26
35
  $stdout.write "\rProcessing #{i + 1} of #{@directories.length} (#{(((i + 1) / @directories.length.to_f) * 100.0).round}%)"
27
36
  $stdout.flush
@@ -1,3 +1,3 @@
1
1
  module Mangos
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mangos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
5
- prerelease:
4
+ version: 0.0.5
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-10-23 00:00:00.000000000 Z
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: rmagick
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
@@ -1121,27 +1112,26 @@ files:
1121
1112
  - mangos.gemspec
1122
1113
  homepage: http://github.com/bloopletech/mangos
1123
1114
  licenses: []
1115
+ metadata: {}
1124
1116
  post_install_message:
1125
1117
  rdoc_options: []
1126
1118
  require_paths:
1127
1119
  - lib
1128
1120
  required_ruby_version: !ruby/object:Gem::Requirement
1129
- none: false
1130
1121
  requirements:
1131
1122
  - - ! '>='
1132
1123
  - !ruby/object:Gem::Version
1133
1124
  version: '0'
1134
1125
  required_rubygems_version: !ruby/object:Gem::Requirement
1135
- none: false
1136
1126
  requirements:
1137
1127
  - - ! '>='
1138
1128
  - !ruby/object:Gem::Version
1139
1129
  version: 1.3.6
1140
1130
  requirements: []
1141
1131
  rubyforge_project: mangos
1142
- rubygems_version: 1.8.25
1132
+ rubygems_version: 2.1.10
1143
1133
  signing_key:
1144
- specification_version: 3
1134
+ specification_version: 4
1145
1135
  summary: Mangos indexes a collection of manga or comis and generates a SPA that browses
1146
1136
  the collection.
1147
1137
  test_files: []