Skip to content

Commit

Permalink
ディレクトリ構成の見直し
Browse files Browse the repository at this point in the history
  • Loading branch information
ta-kon committed Jul 28, 2018
1 parent 7fba08d commit 828a302
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 21 deletions.
File renamed without changes.
Binary file added img/kintaro-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
15 changes: 8 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta charset="UTF-8" lang="ja">
<meta http-equiv="content-language" content="ja">
<link rel="manifest" href="manifest.json">
<link rel="icon" type="image/png" href="/img/kintaro-icon.png">
<meta name="author" content="ta-kon">
<meta name="theme-color" content="#4E5D6C">
<meta name="description" content="作業時間の計算を行います。">
Expand Down Expand Up @@ -51,12 +52,12 @@
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/decimal.js/10.0.1/decimal.min.js"></script>

<!-- original source -->
<script defer src="kintaroCommonFunc.js"></script>
<script defer src="kintaroModel.js"></script>
<script defer src="kintaroCalc.js"></script>
<script defer src="kintaroView.js"></script>
<script defer src="kintaroNotify.js"></script>
<link rel="stylesheet" href="kintaro.css">
<script defer src="js/kintaroCommonFunc.js"></script>
<script defer src="js/kintaroModel.js"></script>
<script defer src="js/kintaroCalc.js"></script>
<script defer src="js/kintaroView.js"></script>
<script defer src="js/kintaroNotify.js"></script>
<link rel="stylesheet" href="css/kintaro.css">

<!-- Created: 2018/06/13 21:13 -->
<title>勤太郎</title>
Expand Down Expand Up @@ -234,4 +235,4 @@ <h2>休憩</h2>
</script>
</body>

</html>
</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 16 additions & 12 deletions kintaroServiceWorker.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@
'use strict';

const CashVersion = '20180722';
// 作成日: 2018/07/22
const CashVersion = '201807282350';

const CashFiles = [
// CDN
'https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/bootswatch/4.1.1/superhero/bootstrap.min.css',
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-datetimepicker/2.7.1/css/bootstrap-material-datetimepicker.min.css',
'https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-material-datetimepicker/2.7.1/js/bootstrap-material-datetimepicker.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/push.js/1.0.5/push.min.js',
'https://cdnjs.cloudflare.com/ajax/libs/decimal.js/10.0.1/decimal.min.js',

// github.io
'https://pages-themes.github.io/slate/assets/images/blacktocat.png',
'./kintaroCommonFunc.js',
'./kintaroModel.js',
'./kintaroCalc.js',
'./kintaroView.js',
'./kintaroNotify.js',
'./kintaro.css',

// Site Source
'./js/kintaroCommonFunc.js',
'./js/kintaroModel.js',
'./js/kintaroCalc.js',
'./js/kintaroView.js',
'./js/kintaroNotify.js',
'./css/kintaro.css',
'./img/kintaro-icon.png',
'./',
];

let ExistFileUrl = {};
CashFiles.forEach(function (fileName) { ExistFileUrl[fileName] = true; });

self.addEventListener('install', function (event) {
event.waitUntil(
caches.open(CashVersion).then(function (cache) {
Expand All @@ -34,14 +38,14 @@ self.addEventListener('install', function (event) {
});

self.addEventListener('activate', function (event) {
console.log('activate');
console.log('Service Worker activate');
});

self.addEventListener('fetch', function (event) {
event.respondWith(
caches.match(event.request)
.then(function (response) {
// キャッシュがあったのでそのレスポンスを返す
// キャッシュがあったなら、そのレスポンスを返す
if (response) {
return response;
}
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"name": "勤太郎",
"icons": [
{
"src": "kintaro_192.png",
"src": "img/kintaro_192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "kintaro_512.png",
"src": "img/kintaro_512.png",
"sizes": "512x512",
"type": "image/png"
}
Expand Down

0 comments on commit 828a302

Please sign in to comment.