This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

2configs.nixcon-quiz: 20s per question

+205 -1
+1 -1
2configs/nixcon-quiz.nix
··· 22 22 enable = true; 23 23 host = "127.0.0.1"; 24 24 inherit port domain; 25 - questionSeconds = 40; 25 + questionSeconds = 20; 26 26 }; 27 27 28 28 # One address may hold a few tabs (players and a spectator screen) and
+140
2configs/websites/where.is.lassul.us/at.html
··· 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" /> 6 + <title>lassulus was here</title> 7 + <link rel="stylesheet" href="/leaflet/leaflet.css" /> 8 + <style> 9 + html, 10 + body { 11 + margin: 0; 12 + height: 100%; 13 + background: #111; 14 + color: #eee; 15 + font: 16px/1.4 monospace; 16 + } 17 + body { 18 + display: flex; 19 + flex-direction: column; 20 + } 21 + #map { 22 + flex: 1; 23 + min-height: 40vh; 24 + } 25 + #panel { 26 + padding: 1em; 27 + } 28 + #when, 29 + #coords { 30 + margin: 0 0 0.75em; 31 + } 32 + #coords { 33 + user-select: all; 34 + color: #aaa; 35 + } 36 + #open { 37 + display: grid; 38 + grid-template-columns: 1fr 1fr; 39 + gap: 0.5em; 40 + } 41 + #open a { 42 + display: block; 43 + padding: 0.8em; 44 + border-radius: 0.4em; 45 + text-align: center; 46 + text-decoration: none; 47 + color: #fff; 48 + background: #333; 49 + } 50 + #open a:active { 51 + background: #39f; 52 + } 53 + #live { 54 + display: block; 55 + margin-top: 1em; 56 + color: #9cf; 57 + } 58 + </style> 59 + </head> 60 + <body> 61 + <div id="map"></div> 62 + <div id="panel"> 63 + <p id="when"></p> 64 + <p id="coords"></p> 65 + <div id="open"></div> 66 + <a id="live" href="/">live location →</a> 67 + </div> 68 + <script src="/leaflet/leaflet.js"></script> 69 + <script> 70 + (function () { 71 + // /at#LAT,LON[@UNIXTIME]; the fragment never reaches the server 72 + var m = /^#(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)(?:@(\d+))?$/.exec( 73 + location.hash, 74 + ); 75 + var lat = m && parseFloat(m[1]), 76 + lon = m && parseFloat(m[2]); 77 + var when = document.getElementById("when"); 78 + if (!m || Math.abs(lat) > 90 || Math.abs(lon) > 180) { 79 + document.getElementById("map").remove(); 80 + when.textContent = "no location in this link"; 81 + return; 82 + } 83 + 84 + var map = L.map("map").setView([lat, lon], 16); 85 + L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", { 86 + maxZoom: 19, 87 + attribution: 88 + '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors', 89 + }).addTo(map); 90 + L.marker([lat, lon]).addTo(map); 91 + 92 + if (m[3]) { 93 + var t = new Date(parseInt(m[3], 10) * 1000); 94 + when.textContent = "lassulus was here at " + t.toLocaleString(); 95 + } else { 96 + when.textContent = "lassulus was here"; 97 + } 98 + document.getElementById("coords").textContent = lat + ", " + lon; 99 + 100 + // iOS has no handler for geo: (iPadOS reports itself as a Mac) 101 + var ios = 102 + /iPad|iPhone|iPod/.test(navigator.userAgent) || 103 + (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1); 104 + var ll = lat + "," + lon; 105 + var links = [ 106 + [ 107 + "Google Maps", 108 + "https://www.google.com/maps/search/?api=1&query=" + 109 + encodeURIComponent(ll), 110 + ], 111 + [ 112 + "Apple Maps", 113 + "https://maps.apple.com/?ll=" + ll + "&q=lassulus", 114 + ], 115 + // android: app chooser incl. OsmAnd, Organic Maps, ... 116 + ios ? null : ["other app", "geo:" + ll + "?q=" + ll + "(lassulus)"], 117 + [ 118 + "OpenStreetMap", 119 + "https://www.openstreetmap.org/?mlat=" + 120 + lat + 121 + "&mlon=" + 122 + lon + 123 + "#map=16/" + 124 + lat + 125 + "/" + 126 + lon, 127 + ], 128 + ]; 129 + var open = document.getElementById("open"); 130 + links.forEach(function (l) { 131 + if (!l) return; 132 + var a = document.createElement("a"); 133 + a.textContent = l[0]; 134 + a.href = l[1]; 135 + open.appendChild(a); 136 + }); 137 + })(); 138 + </script> 139 + </body> 140 + </html>
+23
2configs/websites/where.is.lassul.us/maps.css
··· 1 + /* button grid for "open in" links; shared by index.html and at.html */ 2 + .open { 3 + display: grid; 4 + grid-template-columns: 1fr 1fr; 5 + gap: 0.5em; 6 + } 7 + .open a, 8 + .open button { 9 + display: block; 10 + padding: 0.8em; 11 + border: 0; 12 + border-radius: 0.4em; 13 + text-align: center; 14 + text-decoration: none; 15 + font: inherit; 16 + color: #fff; 17 + background: #333; 18 + cursor: pointer; 19 + } 20 + .open a:active, 21 + .open button:active { 22 + background: #39f; 23 + }
+41
2configs/websites/where.is.lassul.us/maps.js
··· 1 + // "open in" links for a coordinate; shared by index.html and at.html. 2 + // There is no single url every maps app opens, so offer one per app. 3 + function mapLinks(lat, lon) { 4 + // iOS has no handler for geo: (iPadOS reports itself as a Mac) 5 + var ios = 6 + /iPad|iPhone|iPod/.test(navigator.userAgent) || 7 + (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1); 8 + var ll = lat + "," + lon; 9 + var links = [ 10 + [ 11 + "Google Maps", 12 + "https://www.google.com/maps/search/?api=1&query=" + 13 + encodeURIComponent(ll), 14 + ], 15 + ["Apple Maps", "https://maps.apple.com/?ll=" + ll + "&q=lassulus"], 16 + ]; 17 + // android: app chooser incl. Google Maps, OsmAnd, Organic Maps, ... 18 + if (!ios) links.push(["choose app…", "geo:" + ll + "?q=" + ll + "(lassulus)"]); 19 + links.push([ 20 + "OpenStreetMap", 21 + "https://www.openstreetmap.org/?mlat=" + 22 + lat + 23 + "&mlon=" + 24 + lon + 25 + "#map=16/" + 26 + lat + 27 + "/" + 28 + lon, 29 + ]); 30 + return links; 31 + } 32 + 33 + function renderMapLinks(container, lat, lon) { 34 + container.replaceChildren(); 35 + mapLinks(lat, lon).forEach(function (l) { 36 + var a = document.createElement("a"); 37 + a.textContent = l[0]; 38 + a.href = l[1]; 39 + container.appendChild(a); 40 + }); 41 + }