|
37 | 37 | radial-gradient(1100px 620px at 72% -8%, rgba(231,181,61,.07), transparent 60%), |
38 | 38 | radial-gradient(900px 520px at -8% 112%, rgba(79,184,154,.07), transparent 55%), |
39 | 39 | radial-gradient(700px 700px at 50% 45%, rgba(11,18,32,.55), rgba(11,18,32,.0) 70%);} |
40 | | - |
| 40 | + |
41 | 41 | .wrap{position:relative; z-index:2; max-width:760px; margin:0 auto; |
42 | 42 | padding:0 16px env(safe-area-inset-bottom) 16px; padding-top:calc(14px + env(safe-area-inset-top));} |
43 | 43 |
|
|
175 | 175 | @media (prefers-reduced-motion: reduce){ |
176 | 176 | *{animation-duration:.001s !important; transition-duration:.05s !important} |
177 | 177 | } |
178 | | - /* ---- visit counter badge ---- */ |
| 178 | + |
| 179 | +/* ---- visit counter badge ---- */ |
179 | 180 | .visits{position:fixed; z-index:40; display:none; align-items:center; gap:8px; |
180 | 181 | top:calc(10px + env(safe-area-inset-top)); right:12px; |
181 | 182 | font-family:var(--mono); font-size:11.5px; color:var(--muted); |
|
186 | 187 | .visits.show{display:inline-flex} |
187 | 188 | .visits i{color:var(--amber); font-size:11px} |
188 | 189 | .visits b{color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums} |
189 | | -.visits .uq{color:var(--faint)} |
190 | 190 | @media(max-width:640px){.visits{font-size:10.5px; padding:6px 9px; right:8px}} |
191 | 191 | </style> |
192 | 192 | </head> |
193 | 193 | <body> |
194 | 194 | <canvas id="mathbg" aria-hidden="true"></canvas> |
195 | 195 | <div class="bgveil" aria-hidden="true"></div> |
| 196 | + |
196 | 197 | <div class="visits" id="visits" title="total page views"> |
197 | | - <i class="fa-solid fa-eye"></i><b id="vCount">—</b> |
198 | | - <span class="uq" id="vUniq"></span> |
| 198 | + <i class="fa-solid fa-eye"></i><b id="vCount">—</b> |
199 | 199 | </div> |
| 200 | + |
200 | 201 | <div class="wrap"> |
201 | 202 | <div class="term"> |
202 | 203 | <div class="termbar"> |
@@ -504,22 +505,27 @@ <h2 id="mTitle">Open this page?</h2> |
504 | 505 | resize(); |
505 | 506 | if(!reduce) raf=requestAnimationFrame(loop); |
506 | 507 | })(); |
507 | | - /* ---------- visit counter (GoatCounter public endpoint) ---------- */ |
| 508 | + |
| 509 | +/* ============================================================================ |
| 510 | + VISIT COUNTER (GoatCounter public endpoint — total pageviews, not unique) |
| 511 | + Requires: Settings -> "Allow adding visitor counts to your website" = ON, |
| 512 | + otherwise the endpoint sends no CORS header and the badge stays hidden. |
| 513 | + ========================================================================== */ |
508 | 514 | (function(){ |
509 | 515 | var box=document.getElementById('visits'), |
510 | | - n=document.getElementById('vCount'), |
511 | | - u=document.getElementById('vUniq'); |
| 516 | + n=document.getElementById('vCount'); |
512 | 517 | fetch('https://realmathmodel.goatcounter.com/counter/TOTAL.json',{cache:'no-store'}) |
513 | 518 | .then(function(r){ if(!r.ok)throw new Error('HTTP '+r.status); return r.json(); }) |
514 | 519 | .then(function(d){ |
515 | 520 | n.textContent=d.count; |
516 | | - if(d.count_unique) u.textContent='· '+d.count_unique+' unique'; |
517 | 521 | box.classList.add('show'); |
518 | 522 | }) |
519 | 523 | .catch(function(){ /* endpoint off or blocked — leave the badge hidden */ }); |
520 | 524 | })(); |
521 | 525 | </script> |
522 | | - <script data-goatcounter="https://realmathmodel.goatcounter.com/count" |
| 526 | + |
| 527 | +<!-- GoatCounter tracking beacon --> |
| 528 | +<script data-goatcounter="https://realmathmodel.goatcounter.com/count" |
523 | 529 | async src="//gc.zgo.at/count.js"></script> |
524 | 530 | </body> |
525 | 531 | </html> |
0 commit comments