upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-02 13:59:08 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-02 13:59:08 +0000
commit96a75dedeedb448c3284d74215a5debc06e5ddcd (patch)
treed5c39e744ae701ce4691d3c3069a5b717883968a /templates
parent774d237fec608dd60773b4d88e5893323b79ed24 (diff)
landing page - use correct gitworkshop link
Diffstat (limited to 'templates')
-rw-r--r--templates/landing.html15
1 files changed, 14 insertions, 1 deletions
diff --git a/templates/landing.html b/templates/landing.html
index 6d820c3..f44bdc3 100644
--- a/templates/landing.html
+++ b/templates/landing.html
@@ -220,7 +220,7 @@
220 220
221 <p class="subtitle">{relay_description}</p> 221 <p class="subtitle">{relay_description}</p>
222 222
223 <a href="https://gitworkshop.dev/relay/{domain}" class="browse-link" target="_blank"> 223 <a id="browse-link" href="https://gitworkshop.dev" class="browse-link" target="_blank">
224 Browse Repositories on GitWorkshop.dev &rarr; 224 Browse Repositories on GitWorkshop.dev &rarr;
225 </a> 225 </a>
226 226
@@ -295,5 +295,18 @@
295 Powered by <strong>ngit-grasp</strong> 295 Powered by <strong>ngit-grasp</strong>
296 </div> 296 </div>
297 </main> 297 </main>
298 <script>
299 // Detect protocol and construct gitworkshop relay link
300 const protocol = window.location.protocol; // 'http:' or 'https:'
301 const host = window.location.host; // 'domain.com' or 'domain.com:port'
302
303 // For http, use ws:// prefix and URL encode; for https, just use host (implies wss://)
304 let relayref = host;
305 if (protocol === 'http:') relayref = encodeURIComponent("ws://" + host);
306
307 // Update the browse link to point to the relay on gitworkshop
308 const browseLink = document.getElementById('browse-link');
309 browseLink.setAttribute('href', 'https://gitworkshop.dev/relay/' + relayref);
310 </script>
298</body> 311</body>
299</html> \ No newline at end of file 312</html> \ No newline at end of file