Web Share Target 実装(のためにPWA対応)
This commit is contained in:
parent
b961956b63
commit
c229947080
30
public/manifest.json
Normal file
30
public/manifest.json
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "Tissue",
|
||||
"short_name": "Tissue",
|
||||
"description": "気持ちよくティッシュを使った、そのあとの感想戦。",
|
||||
"display": "minimal-ui",
|
||||
"start_url": "/",
|
||||
"share_target": {
|
||||
"action": "/checkin",
|
||||
"method": "GET",
|
||||
"enctype": "application/x-www-form-urlencoded",
|
||||
"url_template": "/checkin?link={url}",
|
||||
"params": {
|
||||
"title": "",
|
||||
"text": "link",
|
||||
"url": "link"
|
||||
}
|
||||
},
|
||||
"icons": [
|
||||
{
|
||||
"src": "apple-touch-icon.png",
|
||||
"type": "image/png",
|
||||
"sizes": "180x180"
|
||||
},
|
||||
{
|
||||
"src": "chrome-touch-icon-192x192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
}
|
||||
]
|
||||
}
|
1
public/sw.js
vendored
Normal file
1
public/sw.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
self.addEventListener('fetch', function() {});
|
@ -12,6 +12,7 @@
|
||||
<title>{{ config('app.name', 'Tissue') }}</title>
|
||||
@endif
|
||||
|
||||
<link href="{{ asset('manifest.json') }}" rel="manifest">
|
||||
<link href="{{ asset('css/bootstrap.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('css/open-iconic-bootstrap.min.css') }}" rel="stylesheet">
|
||||
<link href="{{ asset('css/tissue.css') }}" rel="stylesheet">
|
||||
@ -236,6 +237,9 @@
|
||||
});
|
||||
}
|
||||
@endguest
|
||||
if (navigator.serviceWorker) {
|
||||
navigator.serviceWorker.register('/sw.js');
|
||||
}
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
$('.alert').alert();
|
||||
$('.tis-page-selector').pageSelector();
|
||||
|
Loading…
Reference in New Issue
Block a user