Diff -- /var/www/vhosts/webstls.com/httpdocs/TEMPLATES/webstls_marketing.html

O Operator
Diff

/var/www/vhosts/webstls.com/httpdocs/TEMPLATES/webstls_marketing.html

added on WebSTLs (webstls.com) at 2026-07-11 08:17:25

Added
+113
lines
Removed
-0
lines
Context
0
unchanged
Blobs
from
to ebb4108b04e5
Restore this content →
Unified diff
Naive LCS-based line diff. Additions in emerald, deletions in rose. Both sides decompressed live from BLOB_STORE.
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6<meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate, max-age=0">
7<meta http-equiv="Pragma" content="no-cache">
8<meta http-equiv="Expires" content="0">
9 <link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg">
10 <title>$title &middot; $website_title</title>
11$meta_tags
12 <link rel="preconnect" href="https://fonts.googleapis.com">
13 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
14 <link href="https://fonts.googleapis.com/css2?family=Inter:wght\@400;500;600;700&family=Space+Grotesk:wght\@500;600;700&family=JetBrains+Mono:wght\@400;600&display=swap" rel="stylesheet">
15 <link rel="stylesheet" href="$assets_css/site.css">
16 $extra_css
17</head>
18<body>
19 $body
20 <script src="$assets_js/site.js"></script>
21 <!-- In-app popup helper (confirm/alert/prompt/toast). Same script the
22 dashboard uses, loaded on marketing/storefront pages too so
23 buyer-side flows (cart, checkout) get consistent overlays
24 instead of native alert(). -->
25 <script src="$assets_js/confirm.js?v=1"></script>
26 <!-- Visitor tracking + customer chat widget.
27 Loaded on every page that uses the marketing wrapper -- which is
28 all logged-out marketing pages, every public storefront, plus the
29 buyer-facing cart / checkout / my_orders pages. NOT loaded on the
30 seller dashboard (webstls_wrapper.html) -- admins control and read
31 the chat from /admin_chat.cgi and /admin_visitors.cgi instead.
32 Also suppressed when an admin is previewing this page inside the
33 /admin_heatmap.cgi iframe (heatmap_view=1) so their preview
34 clicks don't get recorded as real visitor activity. -->
35 [if:!$heatmap_view]<script src="$assets_js/track.js?v=5"></script>[/if]
36 $extra_js
37
38<!-- Anonymous path tracker. Only included from the marketing wrapper, so
39 logged-in app pages never call /t.cgi. -->
40<script>
41(function(){
42 try {
43 var u = new URLSearchParams(location.search);
44 var qs = '?p=' + encodeURIComponent(location.pathname + location.search)
45 + '&r=' + encodeURIComponent(document.referrer || '')
46 + '&us=' + encodeURIComponent(u.get('utm_source') || '')
47 + '&um=' + encodeURIComponent(u.get('utm_medium') || '')
48 + '&uc=' + encodeURIComponent(u.get('utm_campaign') || '');
49 var img = new Image();
50 img.referrerPolicy = 'no-referrer-when-downgrade';
51 img.src = '/t.cgi' + qs;
52 } catch (e) { /* silent */ }
53})();
54</script>
55<script>
56/* sidebar-scroll-preserve: keeps .sidebar scrollTop across page loads */
57(function(){
58 var sb = document.querySelector('.sidebar');
59 if (!sb) return;
60 var KEY = 'webstls.com-sidebar-scroll';
61 try { var s = parseInt(localStorage.getItem(KEY), 10) || 0; if (s > 0) sb.scrollTop = s; } catch(e){}
62 var t = null;
63 sb.addEventListener('scroll', function(){
64 if (t) clearTimeout(t);
65 t = setTimeout(function(){ try { localStorage.setItem(KEY, sb.scrollTop); } catch(e){} }, 80);
66 }, { passive: true });
67})();
68</script>
69<!-- Viewer-local timestamp renderer (portfolio-canonical).
70 Server emits `<span class="ts" data-ts="EPOCH" data-fmt="…">FALLBACK</span>`.
71 Formats: datetime | date | date-short | time | relative
72 Original text is the no-JS fallback. Re-run via window.tzLocalize() after AJAX. -->
73<script>
74(function(){
75 function fmt(el){
76 var e = parseInt(el.getAttribute('data-ts'), 10);
77 if (!e) return;
78 var d = new Date(e * 1000);
79 var kind = el.getAttribute('data-fmt') || 'datetime';
80 var out;
81 switch (kind) {
82 case 'date': out = d.toLocaleDateString(undefined, {year:'numeric',month:'short',day:'numeric'}); break;
83 case 'date-short': out = d.toLocaleDateString(undefined, {month:'short',day:'numeric'}); break;
84 case 'time': out = d.toLocaleTimeString(undefined, {hour:'2-digit',minute:'2-digit'}); break;
85 case 'relative': out = rel(e); break;
86 default: out = d.toLocaleDateString(undefined, {year:'numeric',month:'short',day:'numeric'})
87 + ' ' + d.toLocaleTimeString(undefined, {hour:'2-digit',minute:'2-digit'});
88 }
89 el.textContent = out;
90 if (!el.title) el.title = d.toString();
91 }
92 function rel(e){
93 var s = Math.floor(Date.now()/1000) - e, future = s < 0; s = Math.abs(s);
94 var n, u;
95 if (s < 60) { n = s; u = 'second'; }
96 else if (s < 3600) { n = Math.floor(s/60); u = 'minute'; }
97 else if (s < 86400) { n = Math.floor(s/3600); u = 'hour'; }
98 else if (s < 2592000){ n = Math.floor(s/86400); u = 'day'; }
99 else if (s < 31536000){n = Math.floor(s/2592000); u = 'month'; }
100 else { n = Math.floor(s/31536000);u = 'year'; }
101 var p = n === 1 ? '' : 's';
102 return future ? ('in ' + n + ' ' + u + p) : (n + ' ' + u + p + ' ago');
103 }
104 function localize(root){ (root||document).querySelectorAll('span.ts[data-ts], time[data-ts]').forEach(fmt); }
105 window.tzLocalize = localize;
106 if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', function(){ localize(); });
107 else localize();
108 window.addEventListener('ts-refresh', function(){ localize(); });
109})();
110</script>
111
112</body>
113</html>