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, id: i + 1,
url: `${base_url}api/page/${tid}/${eid}/${i+1}`, url: `${base_url}api/page/${tid}/${eid}/${i+1}`,
width: d.width, 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", property plugin_path : String = File.expand_path "~/mango/plugins",
home: true home: true
property download_timeout_seconds : Int32 = 30 property download_timeout_seconds : Int32 = 30
property page_margin : Int32 = 30
property disable_login = false property disable_login = false
property default_username = "" property default_username = ""
property mangadex = Hash(String, String | Int32).new property mangadex = Hash(String, String | Int32).new

View File

@ -117,6 +117,7 @@ class Entry
sizes << { sizes << {
"width" => size.width, "width" => size.width,
"height" => size.height, "height" => size.height,
"margin" => Config.current.page_margin,
} }
rescue e rescue e
Logger.warn "Failed to read page #{i} of entry #{zip_path}. #{e}" Logger.warn "Failed to read page #{i} of entry #{zip_path}. #{e}"

View File

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