Repository navigation
Expand file tree
/
Copy pathinstall.html
More file actions
69 lines (67 loc) · 8.74 KB
/
Copy pathinstall.html
File metadata and controls
69 lines (67 loc) · 8.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!doctype html><!-- Comb Code, Copyright (c) 2026 Avi Shor. Free to use, with or without credit. See LICENSE.md. No warranty. -->
<html lang="en"><head><meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://www.googletagmanager.com 'unsafe-inline' 'wasm-unsafe-eval' blob:; worker-src 'self' blob:; style-src 'self' 'unsafe-inline'; img-src 'self' https://www.googletagmanager.com https://*.google-analytics.com data: blob:; font-src 'self' data:; connect-src 'self' https://www.googletagmanager.com https://*.google-analytics.com https://*.analytics.google.com https://combcode-stats.avishorwork.workers.dev data: blob:; media-src 'self' blob: data:; object-src 'none'; base-uri 'self'; form-action 'self'">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-G28TD2G4VG"></script>
<script>(function(){try{var q=location.search;if(/[?&]cc_me=1/.test(q))localStorage.setItem('cc_me','1');if(/[?&]cc_me=0/.test(q))localStorage.removeItem('cc_me');if(localStorage.getItem('cc_me')==='1'){window['ga-disable-G-G28TD2G4VG']=true;return}var v=localStorage.getItem('cc_v');if(!v){v=Math.random().toString(36).slice(2)+Date.now().toString(36);localStorage.setItem('cc_v',v)}var u='https://combcode-stats.avishorwork.workers.dev/hit';function s(t){if(t==='ping'&&document.visibilityState==='hidden')return;fetch(u,{method:'POST',mode:'no-cors',keepalive:true,headers:{'Content-Type':'text/plain'},body:JSON.stringify({v:v,t:t,p:location.pathname})}).catch(function(){})}s('view');setInterval(function(){s('ping')},20000)}catch(e){}})()</script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-G28TD2G4VG');
</script>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Install Comb Code</title><meta name="theme-color" content="#ffffff">
<link rel="manifest" href="manifest.webmanifest"><link rel="icon" href="brand/icon-32.png"><link rel="apple-touch-icon" href="brand/icon-180.png">
<style>[hidden]{display:none!important}
:root{--ink:#1b1b1b;--muted:#585254;--ground:#F4F4F6;--line:#eae9ea}*{box-sizing:border-box}
body{margin:0;font:16px/1.55 system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:#fff}
main{max-width:760px;margin:auto;padding:36px 22px 60px}
.hero{text-align:center;padding:12px 0 28px}.hero img{width:132px;height:132px;border-radius:30px;box-shadow:0 8px 30px #0002}
h1{font-size:40px;letter-spacing:-.03em;margin:18px 0 6px}.sub{color:var(--muted);margin:0 0 22px}
button,.btn{font:700 16px system-ui;border:0;border-radius:14px;padding:15px 26px;background:var(--ink);color:#fff;cursor:pointer;text-decoration:none;display:inline-block;min-height:48px}
.btn.alt{background:var(--ground);color:var(--ink)}
.row{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.card{background:var(--ground);border-radius:20px;padding:20px 22px;margin:18px 0}.card h2{margin:0 0 8px;font-size:19px}
.card.you{outline:2px solid var(--ink)}
.badge{display:inline-block;background:var(--ink);color:#fff;font-size:12px;font-weight:700;border-radius:999px;padding:2px 10px;margin-left:8px;vertical-align:middle}
ol{margin:8px 0 0 20px;padding:0}li{margin:5px 0}
.strip{display:flex;height:8px;border-radius:8px;overflow:hidden;margin:26px 0}.strip i{flex:1}
small{color:var(--muted)}#msg{min-height:22px;margin-top:12px;color:var(--muted)}
</style><link rel="stylesheet" href="site.css"><link rel="stylesheet" href="site-install.css"><link rel="stylesheet" href="a11y.css"><link rel="stylesheet" href="controls-motion.css"><meta property="og:type" content="website"><meta property="og:title" content="Install Comb Code"><meta property="og:description" content="A color code that holds more."><meta name="description" content="A color code that holds more."><meta property="og:url" content="https://getcombcode.github.io/install.html"><meta property="og:image" content="https://getcombcode.github.io/brand/share-banner-1200x630.png?v=2"><meta property="og:image:width" content="1200"><meta property="og:image:height" content="630"><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="Install Comb Code"><meta name="twitter:description" content="A color code that holds more."><meta name="twitter:image" content="https://getcombcode.github.io/brand/share-banner-1200x630.png?v=2"></head><body><div class="sbstrip"><i style="background:#D7263D"></i><i style="background:#F77F00"></i><i style="background:#F5C518"></i><i style="background:#2DB35A"></i><i style="background:#00B8D9"></i><i style="background:#2E5BFF"></i><i style="background:#B5179E"></i></div><div class="sitebar"><div class="sb-in"><a class="brand" href="index.html" aria-label="Comb Code home"><img class="full" src="brand/logo-horizontal.png" alt="Comb Code"><img class="ic" src="brand/icon-192.png" alt=""></a><div class="sl"><a href="index.html">Home</a><a href="use.html">Use</a><a href="comb.html">Advanced</a><a href="docs.html">Docs</a></div><a class="scanpill" href="scan.html"><span class="l">Scan a code</span><span class="s">Scan</span></a></div></div><main>
<div class="hero"><img src="brand/icon-512.png" alt="Comb Code icon"><h1>Comb Code</h1>
<p class="sub">Scan and create color codes. Free. Works offline.</p>
<div class="row"><button id="install" hidden>Install app</button><a class="btn alt" href="scan.html">Scan a code</a><a class="btn alt" href="use.html">Create a code</a></div>
<div id="msg" role="status"></div></div>
<div class="strip"><i style="background:#D7263D"></i><i style="background:#F77F00"></i><i style="background:#F5C518"></i><i style="background:#2DB35A"></i><i style="background:#00B8D9"></i><i style="background:#2E5BFF"></i><i style="background:#B5179E"></i></div>
<div class="card" id="done" hidden><h2>Comb is installed</h2><p>You are running the app. Everything works offline.</p><div class="row"><a class="btn" href="use.html">Open Comb</a><a class="btn alt" href="scan.html">Scan a code</a></div></div>
<div class="card" id="ios"><h2>iPhone or iPad (Safari)</h2><ol><li>Tap the Share button.</li><li>Tap Add to Home Screen.</li><li>Tap Add.</li></ol></div>
<div class="card" id="android"><h2>Android (Chrome)</h2><ol><li>Tap Install app above, or the menu (three dots).</li><li>Tap Install app or Add to Home screen.</li></ol></div>
<div class="card" id="desktop"><h2>Computer (Chrome or Edge)</h2><ol><li>Click Install app above, or the install icon at the right of the address bar.</li></ol></div>
<div class="card"><h2>Put Comb in your own page</h2><p>Link to a reader or paste this button anywhere:</p>
<pre style="white-space:pre-wrap;word-break:break-all;background:#fff;border-radius:12px;padding:12px;font-size:13px"><a href="https://getcombcode.github.io/scan.html">Scan with Comb</a></pre></div>
<p><small>Everything runs on your device, nothing is uploaded.</small></p>
</main>
<script src="comb-pwa.js"></script>
<script>
let dp;const b=document.getElementById('install'),m=document.getElementById('msg');
const standalone=matchMedia('(display-mode: standalone)').matches||navigator.standalone===true;
addEventListener('beforeinstallprompt',e=>{e.preventDefault();if(standalone)return;dp=e;b.hidden=false});
b.onclick=async()=>{if(!dp)return;try{dp.prompt();const r=await dp.userChoice;m.textContent=r.outcome==='accepted'?'Installed.':'No problem, you can install any time.'}catch(e){m.textContent='No problem, you can install any time.'}dp=null;b.hidden=true};
addEventListener('appinstalled',()=>{m.textContent='Installed. Open Comb from your home screen.';installed()});
// Standalone = already installed (Android/desktop PWA or iOS home-screen app): swap instructions for a done state.
function installed(){
document.getElementById('done').hidden=false;
for(const id of['ios','android','desktop']){const c=document.getElementById(id);if(c)c.hidden=true}
b.hidden=true;
}
if(standalone)installed();
// Highlight the instructions for the visitor's own device.
(function(){
const ua=navigator.userAgent||'';
const id=/iPhone|iPad|iPod/.test(ua)||(navigator.platform==='MacIntel'&&navigator.maxTouchPoints>1)?'ios'
:/Android/.test(ua)?'android':'desktop';
const card=document.getElementById(id);if(!card)return;
card.classList.add('you');
const tag=document.createElement('span');tag.className='badge';tag.textContent='This device';
const h=card.querySelector('h2');if(h)h.appendChild(tag);
})();
</script><style>.pcredit{text-align:center;padding:18px 16px 26px;font:400 14px/1.6 Poppins,system-ui,sans-serif;color:#585254}.pcredit a{color:#1b1b1b;font-weight:600;text-decoration:underline}@media print{.pcredit{display:none}}</style><div class="pcredit">Comb Code by <a href="https://getcombcode.github.io/">Avi Shor</a> · <a href="license.html">License</a></div><script src="motion.js"></script></body></html>