Add simple manifest.json (closes #262)

This commit is contained in:
Alex Ling 2022-03-11 13:44:16 +00:00
parent 3c399fac4e
commit 91561ecd6b
10 changed files with 23 additions and 4 deletions

View File

@ -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'
], {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
public/img/icons/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

18
public/manifest.json Normal file
View File

@ -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": "/"
}

View File

@ -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|

View File

@ -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

View File

@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="<%= base_url %>css/mango.css" />
<link rel="icon" href="<%= base_url %>favicon.ico">
<link rel="manifest" href="<%= base_url %>manifest.json">
<script src="https://polyfill.io/v3/polyfill.min.js?features=MutationObserver%2Cdefault%2CmatchMedia&flats=gated"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

View File

@ -36,7 +36,7 @@
<div class="uk-navbar-toggle" uk-navbar-toggle-icon="uk-navbar-toggle-icon" uk-toggle="target: #mobile-nav"></div>
</div>
<div class="uk-navbar-left uk-visible@m">
<a class="uk-navbar-item uk-logo" href="<%= base_url %>"><img src="<%= base_url %>img/icon.png" style="width:90px;height:90px;"></a>
<a class="uk-navbar-item uk-logo" href="<%= base_url %>"><img src="<%= base_url %>img/icons/icon.png" style="width:90px;height:90px;"></a>
<ul class="uk-navbar-nav">
<li><a href="<%= base_url %>">Home</a></li>
<li><a href="<%= base_url %>library">Library</a></li>