diff --git a/gulpfile.js b/gulpfile.js index 4496b8c..b1634e6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -55,7 +55,7 @@ gulp.task('minify-css', () => { gulp.task('copy-files', () => { return gulp.src([ 'public/*.*', - 'public/img/*', + 'public/img/**', 'public/webfonts/*', 'public/js/*.min.js' ], { diff --git a/public/img/icon.png b/public/img/icon.png deleted file mode 100644 index 7a25f21..0000000 Binary files a/public/img/icon.png and /dev/null differ diff --git a/public/img/icons/icon.png b/public/img/icons/icon.png new file mode 100644 index 0000000..87fdc9b Binary files /dev/null and b/public/img/icons/icon.png differ diff --git a/public/img/icons/icon_x192.png b/public/img/icons/icon_x192.png new file mode 100644 index 0000000..1d3bfea Binary files /dev/null and b/public/img/icons/icon_x192.png differ diff --git a/public/img/icons/icon_x512.png b/public/img/icons/icon_x512.png new file mode 100644 index 0000000..ef62dfb Binary files /dev/null and b/public/img/icons/icon_x512.png differ diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..c3c868a --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,18 @@ +{ + "name": "Mango", + "description": "Mango: A self-hosted manga server and web reader", + "icons": [ + { + "src": "/img/icons/icon_x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/img/icons/icon_x512.png", + "sizes": "512x512", + "type": "image/png" + } + ], + "display": "fullscreen", + "start_url": "/" +} diff --git a/src/library/entry.cr b/src/library/entry.cr index ceaa531..d72ed69 100644 --- a/src/library/entry.cr +++ b/src/library/entry.cr @@ -108,7 +108,7 @@ class Entry end def cover_url - return "#{Config.current.base_url}img/icon.png" if @err_msg + return "#{Config.current.base_url}img/icons/icon.png" if @err_msg unless @book.entry_cover_url_cache TitleInfo.new @book.dir do |info| diff --git a/src/library/title.cr b/src/library/title.cr index 539f114..b76a2ba 100644 --- a/src/library/title.cr +++ b/src/library/title.cr @@ -411,7 +411,7 @@ class Title cached_cover_url = @cached_cover_url return cached_cover_url unless cached_cover_url.nil? - url = "#{Config.current.base_url}img/icon.png" + url = "#{Config.current.base_url}img/icons/icon.png" readable_entries = @entries.select &.err_msg.nil? if readable_entries.size > 0 url = readable_entries[0].cover_url diff --git a/src/views/components/head.html.ecr b/src/views/components/head.html.ecr index 2126ab5..abd5af5 100644 --- a/src/views/components/head.html.ecr +++ b/src/views/components/head.html.ecr @@ -6,6 +6,7 @@ + diff --git a/src/views/layout.html.ecr b/src/views/layout.html.ecr index c32bfb5..fc5adb7 100644 --- a/src/views/layout.html.ecr +++ b/src/views/layout.html.ecr @@ -36,7 +36,7 @@