mangos 0.0.6 → 0.0.7

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 CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- M2Q3NGFhN2ViZjc3NmE5NDlmMDc3MWEyMTEzOGQxZjk2MmY4MjQ4NQ==
5
- data.tar.gz: !binary |-
6
- NjQ0MjQ2Y2FmYmFkMjgzZGYzMTg3ZGVmODQwNGQxMzk1NDk1ZjQxYQ==
2
+ SHA1:
3
+ metadata.gz: b0746c4b67070f9b56de981d6a16394d2936c4ea
4
+ data.tar.gz: 4a47f473b5ead7a62a3b1e52860f9ef5e197780f
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NGQxNzExNmFmOTdlMDA1ODE5Yjg5MDA0ZWE5NWExNjVkY2RjNWY4YjIwN2Vm
10
- Yjk2NTc5MjEyZjM4Yzc0N2QwYzUwYjM3MjUyM2Q4MzlhYzk3NmYxZmU3NDM4
11
- MzRmNTViZGQ3ODNkMGI2Y2JkODFhYmFmODZjOGFiYTJjZWQ1Yzg=
12
- data.tar.gz: !binary |-
13
- OGZhNDM2MDg5ZDc2Yjg0ZmJmMzI3MmU3MmFlMDJhOGRjNGYwNDA5OWRhZmEx
14
- NzAyNjU4MTdhMGY4YWViMzdjOGI5NzU1ZTUxYzM5MGExODkwMDAwM2FhODE0
15
- NGYwNzk0N2JlYzU4ZjQyYjc0ZmRhYzg5MzA3YjYxZDIxY2Y4YmY=
6
+ metadata.gz: e9a04b17f0ee303a06ab969f5968d69f8a6938ca85372842fd8e0f7fcb7f06a7d3f4deb929d6a25a986ad8a1a756083e299f22b3aaad09c9919f946c75566d1c
7
+ data.tar.gz: f1597e94001d6157a60578c44dca8386d364e0e88c2bf553b0e6dfc1356651864a008573a34cecb40458b7bc85ac43a3c5e3aeb00cf54391a978fb0f79f86f58
@@ -2,6 +2,7 @@
2
2
  display: none;
3
3
  background-color: #333333;
4
4
  min-height: 100%;
5
+ max_width: 100%;
5
6
  -webkit-user-select: none;
6
7
  -moz-user-select: none;
7
8
  -khtml-user-select: none;
@@ -11,7 +11,7 @@ controllers.index = function(search, sort, sortDirection) {
11
11
  return book.pageUrls.length;
12
12
  };
13
13
  if(type == "title") return function(book) {
14
- return book.title;
14
+ return book.title.toLowerCase();
15
15
  };
16
16
  }
17
17
 
@@ -54,6 +54,8 @@ controllers.index = function(search, sort, sortDirection) {
54
54
 
55
55
  $("#clear-search").bind("click", function() {
56
56
  $("#search").val("");
57
+ event.preventDefault();
58
+ location.href = "#index!1";
57
59
  });
58
60
 
59
61
  $(".sort button").bind("click", function(event) {
@@ -72,12 +74,8 @@ controllers.index = function(search, sort, sortDirection) {
72
74
  $(".sort-direction button").removeClass("active");
73
75
  $(".sort-direction button[data-sort-direction=" + sortDirection + "]").addClass("active");
74
76
 
75
- $("#clear-search").bind("click", function(event) {
76
- event.preventDefault();
77
- location.href = "#index!1";
78
- });
79
-
80
77
  $("#view-index").show().addClass("current-view");
78
+ $("title").text("Mangos");
81
79
  }
82
80
 
83
81
  function addBooks(books) {
@@ -113,8 +111,8 @@ controllers.index = function(search, sort, sortDirection) {
113
111
  console.log("destroying index");
114
112
  $("#search").unbind("keydown");
115
113
  $("#clear-search").unbind("click");
116
- $("a.sort").unbind("click");
117
- $("a.sort-direction").unbind("click");
114
+ $(".sort button").unbind("click");
115
+ $(".sort-direction button").unbind("click");
118
116
  $("#items").empty();
119
117
  $("#view-index").hide().removeClass("current-view");
120
118
  }
@@ -9,6 +9,16 @@ controllers.show = function(key) {
9
9
  return book.url + "/" + book.pageUrls[index - 1];
10
10
  }
11
11
 
12
+ function squeezePortraitImage() {
13
+ var image = $("#image")[0];
14
+ if(image.naturalWidth < image.naturalHeight) {
15
+ $("#image").css("max-width", "1000px");
16
+ }
17
+ else {
18
+ $("#image").css("max-width", "100%");
19
+ }
20
+ }
21
+
12
22
  function preloadImage(index) {
13
23
  var image = new Image();
14
24
  image.src = pageUrl(index);
@@ -23,7 +33,12 @@ controllers.show = function(key) {
23
33
  this.init = function() {
24
34
  console.log("starting show");
25
35
  $("#image").attr("src", "img/blank.png");
36
+
37
+ //var image = $("#image")[0];
38
+ //image.onload = squeezePortraitImage;
39
+
26
40
  $("#view-show").show().addClass("current-view");
41
+ $("title").text(book.title + " - Mangos");
27
42
  //setTimeout(preloadImages, 5000);
28
43
  }
29
44
 
@@ -7,7 +7,6 @@ require "digest"
7
7
 
8
8
  #Gems
9
9
  require "addressable/uri"
10
- require "haml"
11
10
  require "naturally"
12
11
  require "RMagick"
13
12
 
@@ -21,4 +20,3 @@ require "mangos/mangos"
21
20
  require "mangos/mangos_package"
22
21
  require "mangos/update"
23
22
  require "mangos/book"
24
- require "mangos/template_helper"
@@ -23,7 +23,9 @@ class Mangos::Book
23
23
  end
24
24
 
25
25
  def title
26
- path.basename.to_s
26
+ title = path.relative_path_from(mangos.root_path).to_s
27
+ title = title.gsub("/", " / ")
28
+ title
27
29
  end
28
30
 
29
31
  def thumbnail_path
@@ -1,3 +1,3 @@
1
1
  module Mangos
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mangos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brenton "B-Train" Fletcher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-26 00:00:00.000000000 Z
11
+ date: 2014-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.0.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: addressable
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.3.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.3.5
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: naturally
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.0.3
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.0.3
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rmagick
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: 2.13.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ! '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.13.1
69
69
  description: A collection of manga or comics is a directory (the container) containing
@@ -80,7 +80,7 @@ executables:
80
80
  extensions: []
81
81
  extra_rdoc_files: []
82
82
  files:
83
- - .gitignore
83
+ - ".gitignore"
84
84
  - LICENSE
85
85
  - Rakefile
86
86
  - app/css/app.css
@@ -1111,8 +1111,6 @@ files:
1111
1111
  - lib/mangos/core_ext/pathname.rb
1112
1112
  - lib/mangos/mangos.rb
1113
1113
  - lib/mangos/mangos_package.rb
1114
- - lib/mangos/template_helper.rb
1115
- - lib/mangos/templates/show.html.haml
1116
1114
  - lib/mangos/update.rb
1117
1115
  - lib/mangos/version.rb
1118
1116
  - mangos.gemspec
@@ -1125,19 +1123,20 @@ require_paths:
1125
1123
  - lib
1126
1124
  required_ruby_version: !ruby/object:Gem::Requirement
1127
1125
  requirements:
1128
- - - ! '>='
1126
+ - - ">="
1129
1127
  - !ruby/object:Gem::Version
1130
1128
  version: '0'
1131
1129
  required_rubygems_version: !ruby/object:Gem::Requirement
1132
1130
  requirements:
1133
- - - ! '>='
1131
+ - - ">="
1134
1132
  - !ruby/object:Gem::Version
1135
1133
  version: 1.3.6
1136
1134
  requirements: []
1137
1135
  rubyforge_project: mangos
1138
- rubygems_version: 2.1.10
1136
+ rubygems_version: 2.2.2
1139
1137
  signing_key:
1140
1138
  specification_version: 4
1141
1139
  summary: Mangos indexes a collection of manga or comis and generates a SPA that browses
1142
1140
  the collection.
1143
1141
  test_files: []
1142
+ has_rdoc:
@@ -1,5 +0,0 @@
1
- module Mangos::TemplateHelper
2
- def assets_url
3
- #what
4
- end
5
- end
@@ -1,17 +0,0 @@
1
- <!DOCTYPE html>
2
- %html
3
- %head
4
- %meta{ charset: "utf-8" }
5
- %title #{directory.title} - Manga Reader
6
- <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
7
- %script{ type: "text/javascript", src: (assets_url + "js/lib/jquery-1.4.4.js") }
8
- %script{ type: "text/javascript", src: (assets_url + "js/lib/jquery.ba-bbq.js") }
9
- %script{ type: "text/javascript", src: (assets_url + "js/show.js") }
10
- %link{ rel: "stylesheet", type: "text/css", href: (assets_url + "css/style.css") }
11
- %link{ rel: "stylesheet", type: "text/css", href: (assets_url + "css/show.css") }
12
- <meta name="HandheldFriendly" content="true" />
13
- <meta name="viewport" content="width=device-width, height=device-height, user-scalable=no" />
14
- :javascript
15
- var pages = #{directory.page_urls.to_json};
16
- %body
17
- %img#image{ src: (assets_url + "img/blank.png") }