mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 10:55:30 -04:00
Add simple manifest.json (closes #262)
This commit is contained in:
parent
3c399fac4e
commit
91561ecd6b
@ -55,7 +55,7 @@ gulp.task('minify-css', () => {
|
|||||||
gulp.task('copy-files', () => {
|
gulp.task('copy-files', () => {
|
||||||
return gulp.src([
|
return gulp.src([
|
||||||
'public/*.*',
|
'public/*.*',
|
||||||
'public/img/*',
|
'public/img/**',
|
||||||
'public/webfonts/*',
|
'public/webfonts/*',
|
||||||
'public/js/*.min.js'
|
'public/js/*.min.js'
|
||||||
], {
|
], {
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 11 KiB |
BIN
public/img/icons/icon.png
Normal file
BIN
public/img/icons/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
public/img/icons/icon_x192.png
Normal file
BIN
public/img/icons/icon_x192.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
BIN
public/img/icons/icon_x512.png
Normal file
BIN
public/img/icons/icon_x512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
18
public/manifest.json
Normal file
18
public/manifest.json
Normal 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": "/"
|
||||||
|
}
|
@ -108,7 +108,7 @@ class Entry
|
|||||||
end
|
end
|
||||||
|
|
||||||
def cover_url
|
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
|
unless @book.entry_cover_url_cache
|
||||||
TitleInfo.new @book.dir do |info|
|
TitleInfo.new @book.dir do |info|
|
||||||
|
@ -411,7 +411,7 @@ class Title
|
|||||||
cached_cover_url = @cached_cover_url
|
cached_cover_url = @cached_cover_url
|
||||||
return cached_cover_url unless cached_cover_url.nil?
|
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?
|
readable_entries = @entries.select &.err_msg.nil?
|
||||||
if readable_entries.size > 0
|
if readable_entries.size > 0
|
||||||
url = readable_entries[0].cover_url
|
url = readable_entries[0].cover_url
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="<%= base_url %>css/mango.css" />
|
<link rel="stylesheet" href="<%= base_url %>css/mango.css" />
|
||||||
<link rel="icon" href="<%= base_url %>favicon.ico">
|
<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://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>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<div class="uk-navbar-toggle" uk-navbar-toggle-icon="uk-navbar-toggle-icon" uk-toggle="target: #mobile-nav"></div>
|
<div class="uk-navbar-toggle" uk-navbar-toggle-icon="uk-navbar-toggle-icon" uk-toggle="target: #mobile-nav"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-navbar-left uk-visible@m">
|
<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">
|
<ul class="uk-navbar-nav">
|
||||||
<li><a href="<%= base_url %>">Home</a></li>
|
<li><a href="<%= base_url %>">Home</a></li>
|
||||||
<li><a href="<%= base_url %>library">Library</a></li>
|
<li><a href="<%= base_url %>library">Library</a></li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user