Skip to content

Commit

Permalink
Applied feature request to current version
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon committed Jan 6, 2021
1 parent f7b8e2d commit 007d71f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ log_level: info
upload_path: ~/mango/uploads
plugin_path: ~/mango/plugins
download_timeout_seconds: 30
page_margin: 30
mangadex:
base_url: https://mangadex.org
api_url: https://mangadex.org/api
Expand Down
3 changes: 2 additions & 1 deletion public/js/reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ const getPages = () => {
id: i + 1,
url: `${base_url}api/page/${tid}/${eid}/${i+1}`,
width: d.width,
height: d.height
height: d.height,
style: `margin-top: ${d.margin}px; margin-bottom: ${d.margin}px;`
};
});

Expand Down
1 change: 1 addition & 0 deletions src/config.cr
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Config
property plugin_path : String = File.expand_path "~/mango/plugins",
home: true
property download_timeout_seconds : Int32 = 30
property page_margin : Int32 = 30
property mangadex = Hash(String, String | Int32).new

@[YAML::Field(ignore: true)]
Expand Down
1 change: 1 addition & 0 deletions src/library/entry.cr
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class Entry
sizes << {
"width" => size.width,
"height" => size.height,
"margin" => Config.current.page_margin,
}
rescue e
Logger.warn "Failed to read page #{i} of entry #{zip_path}. #{e}"
Expand Down
1 change: 1 addition & 0 deletions src/views/reader.html.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<img
uk-img
class="uk-align-center"
:style="item.style"
:data-src="item.url"
:width="item.width"
:height="item.height"
Expand Down

0 comments on commit 007d71f

Please sign in to comment.