Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply feature request to current version #1

Merged
merged 1 commit into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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