From cc1274d7c5538245311964fb08e058c76adb4d19 Mon Sep 17 00:00:00 2001 From: posimai Date: Sat, 21 Mar 2026 10:57:57 +0900 Subject: [PATCH] feat: initial implementation of Posimai Veil MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - アプリDB 50件(SNS/メディア/ニュース/ショッピング/マップ/ツール/Posimai) - Android intent:// + iOS URL scheme + web フォールバック - カテゴリフィルタ・検索・編集モード(表示/非表示トグル) - localStorage で設定保存 - posimai-ui v1 適用・PWA 対応(manifest + SW) --- index.html | 704 ++++++++++++++++++++++++++++++++++++++++++++++++++ manifest.json | 22 ++ package.json | 8 + sw.js | 28 ++ 4 files changed, 762 insertions(+) create mode 100644 index.html create mode 100644 manifest.json create mode 100644 package.json create mode 100644 sw.js diff --git a/index.html b/index.html new file mode 100644 index 0000000..7eb6052 --- /dev/null +++ b/index.html @@ -0,0 +1,704 @@ + + + + + + + + + + + + + + + + + + + Posimai Veil + + + + + + + + + + + + + + + +
+
+ + Veil +
+ +
+ +
+ +
+
+ + + + +
+
+ +
+ +
+ + +
+ +
+ +
+ +
+ + + + + diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..391255c --- /dev/null +++ b/manifest.json @@ -0,0 +1,22 @@ +{ + "name": "Posimai Veil", + "short_name": "Veil", + "description": "ホーム画面をシンプルに保つアプリランチャー", + "start_url": "/", + "display": "standalone", + "background_color": "#0D0D0D", + "theme_color": "#0D0D0D", + "orientation": "portrait", + "icons": [ + { + "src": "/logo.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/logo.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..52d897a --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "posimai-veil", + "version": "1.0.0", + "private": true, + "scripts": { + "deploy": "git push gitea main && git push github main" + } +} diff --git a/sw.js b/sw.js new file mode 100644 index 0000000..f24de09 --- /dev/null +++ b/sw.js @@ -0,0 +1,28 @@ +const CACHE = 'posimai-veil-v1'; +const ASSETS = ['/', '/index.html', '/manifest.json']; +const ORIGIN = self.location.origin; + +self.addEventListener('install', e => { + e.waitUntil( + caches.open(CACHE).then(c => c.addAll(ASSETS)) + ); + self.skipWaiting(); +}); + +self.addEventListener('activate', e => { + e.waitUntil( + caches.keys().then(keys => + Promise.all(keys.filter(k => k !== CACHE).map(k => caches.delete(k))) + ) + ); + self.clients.claim(); +}); + +self.addEventListener('fetch', e => { + // クロスオリジンリクエストはキャッシュしない(API等が古いデータを返すのを防ぐ) + if (!e.request.url.startsWith(ORIGIN)) return; + + e.respondWith( + caches.match(e.request).then(cached => cached || fetch(e.request)) + ); +});