Added adjustable page gaps via config

This commit is contained in:
Simon 2021-01-06 15:27:48 +01:00
parent dcdcf29114
commit e086bec9da
4 changed files with 5 additions and 1 deletions

View File

@ -25,7 +25,8 @@ const readerComponent = () => {
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;`
};
});

View File

@ -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 disable_login = false
property default_username = ""
property mangadex = Hash(String, String | Int32).new

View File

@ -117,6 +117,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}"

View File

@ -25,6 +25,7 @@
<img
uk-img
class="uk-align-center"
:style="item.style"
:data-src="item.url"
:width="item.width"
:height="item.height"