Add Korean Japanese and English user interfaces

This commit is contained in:
2026-10-15 18:21:17 +09:00
parent 8fb8c203f0
commit b831003e7d
41 changed files with 3074 additions and 351 deletions

View File

@@ -0,0 +1,32 @@
{
"id": "/",
"name": "hop. — A lighter way between devices.",
"short_name": "hop.",
"description": "Send files, links and text between devices, without signing up.",
"lang": "en",
"start_url": "/",
"scope": "/",
"display": "standalone",
"background_color": "#000000",
"theme_color": "#000000",
"icons": [
{
"src": "/icon-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icon-maskable.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}

View File

@@ -0,0 +1,32 @@
{
"id": "/",
"name": "hop. — デバイスの間を、軽やかに。",
"short_name": "hop.",
"description": "登録せずに、デバイス間でファイル・リンク・テキストを送信。",
"lang": "ja",
"start_url": "/",
"scope": "/",
"display": "standalone",
"background_color": "#000000",
"theme_color": "#000000",
"icons": [
{
"src": "/icon-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icon-maskable.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}

View File

@@ -7,7 +7,7 @@ self.addEventListener('fetch', (event) => {
fetch(event.request).catch(
() =>
new Response(
'<!doctype html><html lang="ko"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>hop.</title><body style="background:#000;color:#f5f5f5;font:16px system-ui;text-align:center;padding:25vh 24px"><h1>hop.</h1><p>인터넷 연결이 필요해요.</p><p>연결한 뒤 다시 열어주세요.</p><a href="/" style="color:inherit">다시 시도</a></body></html>',
'<!doctype html><html lang="ko"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>hop.</title><body style="background:#000;color:#f5f5f5;font:16px system-ui;text-align:center;padding:25vh 24px"><h1>hop.</h1><p>인터넷 연결이 필요해요.</p><p>연결한 뒤 다시 열어주세요.</p><a href="/" style="color:inherit">다시 시도</a><script>try{var l;try{l=localStorage.getItem("hop-language")}catch(e){};var m={ko:["인터넷 연결이 필요해요.","연결한 뒤 다시 열어주세요.","다시 시도"],ja:["インターネット接続が必要です。","接続してから、もう一度hop.を開いてください。","もう一度試す"],en:["An internet connection is required.","Reconnect, then open hop. again.","Try again"]};var b=(navigator.languages||[navigator.language]).map(function(x){return String(x).toLowerCase().split("-")[0]}).find(function(x){return ["ko","ja","en"].includes(x)})||"en";l=["ko","ja","en"].includes(l)?l:b;document.documentElement.lang=l;document.querySelectorAll("p").forEach(function(p,i){p.textContent=m[l][i]});document.querySelector("a").textContent=m[l][2]}catch(e){}</script></body></html>',
{
status: 503,
headers: { 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' },