Repository navigation
Expand file tree
/
Copy pathdomain.html
More file actions
210 lines (190 loc) · 10.6 KB
/
Copy pathdomain.html
File metadata and controls
210 lines (190 loc) · 10.6 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Activations — NOT-A-GARMIN Watches</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav data-nav></nav>
<!-- HERO: full-bleed activation photo with a large title on top -->
<header class="ahero" id="ahero">
<div class="ahero-bg" id="aheroBg"></div>
<div class="ahero-scrim"></div>
<div class="ahero-in">
<span class="ahero-kick" id="aKick"></span>
<h1 class="ahero-title" id="aTitle"></h1>
<p class="ahero-lede" id="aLede"></p>
<div class="ahero-meta"><span class="ahero-price" id="aPrice"></span><a class="ahero-cta" href="#aLevels">See what it does ↓</a></div>
</div>
</header>
<!-- STORY: speak to the person, not the spec sheet -->
<section class="astory wrap3" id="aStory"></section>
<!-- LEVELS: sell the activation -->
<section class="alevels" id="aLevels"></section>
<!-- WATCH FACE -->
<section class="aface" id="aFace"></section>
<!-- HARDWARE (diving only) -->
<section class="ahw" id="aHw" style="display:none"></section>
<!-- WATCHES that include / can run it, with photos + prices -->
<section class="awatches" id="aWatches"></section>
<!-- CROSS-LINKS -->
<section class="across" id="aCross"></section>
<footer data-footer></footer>
<script src="catalog.js"></script>
<script src="domain-content.js"></script>
<script>
function hexA(h,a){var n=parseInt(h.slice(1),16);return 'rgba('+((n>>16)&255)+','+((n>>8)&255)+','+(n&255)+','+a+')';}
function money(n){return '$'+n.toLocaleString('en-US');}
var dId = (CATALOG.domains[qp().d] && DOMAIN_CONTENT[qp().d]) ? qp().d : 'golf';
var dom = CATALOG.domains[dId], C = DOMAIN_CONTENT[dId];
var S = (typeof DOMAIN_STORY !== 'undefined' && DOMAIN_STORY[dId]) ? DOMAIN_STORY[dId]
: { hero: dom.name, kicker: '', head: C.intro, body: [C.intro], points: [] };
var arr = dom.type === 'ladder' ? dom.levels : dom.items;
var entryMin = Math.min.apply(null, arr.map(function(l){ return l.price; }));
document.documentElement.style.setProperty('--acc', C.accent);
document.documentElement.style.setProperty('--acc-l', hexA(C.accent, 0.09));
document.documentElement.style.setProperty('--acc-d', hexA(C.accent, 0.85));
document.title = dom.name + ' — NOT-A-GARMIN Watches';
/* ---------- HERO ---------- */
document.getElementById('aheroBg').style.backgroundImage = 'url(img/activations/' + dId + '.jpg)';
document.getElementById('aKick').innerHTML = '<span class="hk-ic">' + C.icon + '</span> ' + dom.name + ' activation';
document.getElementById('aTitle').textContent = S.hero;
document.getElementById('aLede').textContent = C.lede;
document.getElementById('aPrice').textContent = 'From ' + money(entryMin) + ' · one‑time';
/* ---------- STORY ---------- */
(function(){
var pts = (S.points || []).map(function(p){ return '<div class="spt"><b>' + p.t + '</b><span>' + p.d + '</span></div>'; }).join('');
var body = (S.body || []).map(function(t){ return '<p class="sbody">' + t + '</p>'; }).join('');
document.getElementById('aStory').innerHTML =
(S.kicker ? '<div class="skick">' + S.kicker + '</div>' : '') +
'<h2 class="shead">' + S.head + '</h2>' + body +
(pts ? '<div class="spts">' + pts + '</div>' : '');
})();
/* hardware/storage requirement for a leaf, derived from the catalog */
function cheapestFor(lf){
for (var i = 0; i < CATALOG.order.length; i++){
var m = CATALOG.models[CATALOG.order[i]];
if (availLeaves(m, dId).some(function(x){ return x.id === lf.id; })) return m;
}
return null;
}
function reqBody(lf){
var cheapest = cheapestFor(lf);
if (!cheapest) return '';
var everydayHas = availLeaves(CATALOG.models[CATALOG.order[0]], dId).some(function(x){ return x.id === lf.id; });
if (dom.hw === 'dive') return 'a dive‑capable watch — ' + cheapest.short + ' and up';
if (lf.mem) return lf.mem + ' GB of on‑board storage — ' + cheapest.short + ' and up';
if (everydayHas) return '';
return cheapest.short + ' and up';
}
/* ---------- LEVELS (sell the activation) ---------- */
(function(){
var cards = arr.map(function(lf){
var ct = (C.items && C.items[lf.id]) ? C.items[lf.id] : { head: lf.name, body: lf.desc, features: [] };
var tag = (dom.type === 'ladder') ? dom.name + ' · ' + lf.name : lf.name;
var fl = ct.features || [];
var featsHtml;
if (fl.length && typeof fl[0] === 'object'){
// rich features: each one illustrated on its own watch screen
featsHtml = '<div class="lfeatg">' + fl.map(function(f){
return '<div class="lfeatc"><div class="lfeatface">' + faceSVG(C.accent, C.icon, f.face) + '</div>' +
'<div class="lfeatx"><b>' + f.t + '</b><span>' + f.d + '</span></div></div>';
}).join('') + '</div>';
} else {
var feats = fl.map(function(f){ return '<li>' + f + '</li>'; }).join('');
featsHtml = feats ? '<ul class="lfeat">' + feats + '</ul>' : '';
}
var req = reqBody(lf);
var reqHtml = req ? '<div class="lreq"><b>Requires</b><span>' + req + '</span></div>' : '';
return '<div class="lvl"><div class="lvl-top"><span class="lvl-tag">' + tag + '</span><span class="lvl-price">' + money(lf.price) + '</span></div>' +
'<h3>' + ct.head + '</h3><p class="lbody">' + ct.body + '</p>' +
featsHtml + reqHtml + '</div>';
}).join('');
var ladder = dom.type === 'ladder';
var single = arr.length < 2;
var h2 = ladder ? 'Choose how far you take it'
: single ? 'What ' + dom.name + ' unlocks'
: 'Build your ' + dom.name.toLowerCase() + ' kit';
var sub = ladder ? 'Each level builds on the last. Pay once for the level you pick — not the sum of them.'
: single ? 'One activation, everything below — on the watch you already wear.'
: 'Independent tools — add only the ones your role calls for, each priced on its own.';
document.getElementById('aLevels').innerHTML =
'<div class="lhead"><div class="skick">The ' + dom.name + ' activation</div><h2>' + h2 + '</h2><p>' + sub + '</p></div>' +
'<div class="lvls">' + cards + '</div>';
})();
/* ---------- WATCH FACE ---------- */
(function(){
var F = (typeof DOMAIN_FACE !== 'undefined' && DOMAIN_FACE[dId]) ? DOMAIN_FACE[dId] : { metric:'', unit:'', sub:'' };
document.getElementById('aFace').innerHTML =
'<div class="aface-in"><div class="aface-face">' + faceSVG(C.accent, C.icon, F) + '</div>' +
'<div><div class="skick">Dedicated watch face</div><h2>Made yours, down to the watch face</h2>' +
'<p>Every ' + dom.name + ' activation includes a purpose‑built watch face. One glance at your wrist and the watch becomes a dedicated ' + dom.name.toLowerCase() + ' instrument — the numbers that matter, and nothing that doesn’t.</p></div></div>';
})();
/* ---------- HARDWARE (diving) ---------- */
if (dId === 'diving'){
var hw = document.getElementById('aHw'); hw.style.display = 'block';
hw.innerHTML = '<div class="ahw-in"><div class="skick">Hardware · only on Adventure Diving</div>' +
'<h2>SubWave™ sonar — talk underwater</h2>' +
'<p>Some things can’t be unlocked with software. The Adventure Diving watch carries dedicated SubWave sonar that no activation can add to another model:</p>' +
'<ul><li>Air integration — live tank pressure from a Descent™ transceiver</li>' +
'<li>Diver‑to‑diver messaging & buddy location — each watch carries its own transceiver</li>' +
'<li>Diver‑to‑boat link via the Descent S1 Buoy — surface GPS & messages topside</li></ul></div>';
}
/* ---------- WATCHES THAT RUN IT ---------- */
function domainPackage(id){
return CATALOG.packages.filter(function(p){ return p.incl.some(function(x){ return CATALOG.leaves[x].domain === id; }); })[0];
}
function watchCard(mid, badge, cls, acts){
var m = CATALOG.models[mid];
var href = 'buy.html?model=' + mid + (acts ? '&acts=' + acts : '');
return '<a class="wcard" href="' + href + '"><div class="wcard-media" style="background:' + m.bg + '"><img src="' + m.img + '" alt="' + m.name + '" onerror="this.style.display=\'none\'"></div>' +
'<div class="wcard-body"><span class="wcard-seg' + (m.edition ? ' e' : '') + '">' + m.seg + '</span>' +
'<div class="wcard-nm">' + m.name + '</div>' +
(badge ? '<span class="wcard-badge ' + (cls || '') + '">' + badge + '</span>' : '') +
'<div class="wcard-pr">From ' + money(m.price) + '</div>' +
'<span class="wcard-cta">Configure ›</span></div></a>';
}
(function(){
var cards = [], no = [];
CATALOG.order.forEach(function(mid){
var m = CATALOG.models[mid], av = availLeaves(m, dId);
if (av.length === 0){ no.push(m.short); return; }
var isInc = m.included.some(function(id){ return CATALOG.leaves[id].domain === dId; });
var viaPkg = null;
if (!isInc && m.usesPackages){ var pk = domainPackage(dId); if (pk) viaPkg = pk.name; }
if (isInc){ cards.push(watchCard(mid, 'Included', 'inc', null)); }
else if (viaPkg){ cards.push(watchCard(mid, 'With the ' + viaPkg + ' package', 'inc', null)); }
else {
var badge = 'Add‑on';
if (dom.type === 'ladder' && av.length < dom.levels.length) badge = 'Up to ' + av[av.length - 1].name;
cards.push(watchCard(mid, badge, 'add', av[0].id));
}
});
var note;
if (no.length){
var reason = (dom.hw === 'dive') ? 'they need the dive‑computer hardware'
: (arr[0].mem ? 'they don’t have the ' + arr[0].mem + ' GB of on‑board storage it needs'
: 'they need Outdoor‑tier hardware');
note = '<p class="wnote"><b>Not compatible:</b> ' + no.join(', ') + ' — ' + reason + '. Everything else: buy once and the activation ties to your watch for life.</p>';
} else {
note = '<p class="wnote">Buy once — the activation and its watch face tie to your watch for life. No subscription, ever.</p>';
}
document.getElementById('aWatches').innerHTML =
'<div class="whead"><div class="skick">Put it on your wrist</div><h2>The watches that run ' + dom.name + '</h2>' +
'<p>Pick any compatible model and configure it — your ' + dom.name.toLowerCase() + ' activation comes along for the ride.</p></div>' +
'<div class="wcards">' + cards.join('') + '</div>' + note;
})();
/* ---------- CROSS-LINKS ---------- */
document.getElementById('aCross').innerHTML =
'<h3>Explore the other activations</h3><div class="xlinks">' +
CATALOG.domainOrder.filter(function(d){ return d !== dId; }).map(function(d){
return '<a href="domain.html?d=' + d + '">' + DOMAIN_CONTENT[d].icon + ' ' + CATALOG.domains[d].name + '</a>';
}).join('') +
'<a class="cmp" href="compare.html">Compare all watches ›</a></div>';
</script>
<script src="chrome.js"></script>
<script src="cart.js"></script>
</body>
</html>