|
| 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 | + <title>Register — Brarner.M.Alete™</title> |
| 7 | + <link rel="stylesheet" href="css/style.css"/> |
| 8 | + <link rel="stylesheet" href="css/expandable.css"/> |
| 9 | +</head> |
| 10 | +<body> |
| 11 | +<nav class="nav"><div class="nav-inner"> |
| 12 | + <a href="index.xhtml" class="nav-brand">Brarner.M.Alete™</a> |
| 13 | + <ul class="nav-links"> |
| 14 | + <li><a href="index.xhtml">Overview</a></li> |
| 15 | + <li><a href="species.xhtml">Species</a></li> |
| 16 | + <li><a href="postal.xhtml">Postal</a></li> |
| 17 | + <li><a href="art.xhtml">Art</a></li> |
| 18 | + <li><a href="science.xhtml">Science</a></li> |
| 19 | + <li><a href="status.xhtml">Status</a></li> |
| 20 | + </ul> |
| 21 | + <div class="nav-actions"> |
| 22 | + <a href="register.xhtml" class="nav-cta">Register</a> |
| 23 | + <a href="javascript:void(0)" class="nav-cta" onclick="enterGuest()">Guest</a> |
| 24 | + <a href="admin/login.xhtml" class="nav-cta">Admin →</a> |
| 25 | + </div> |
| 26 | +</div></nav> |
| 27 | + |
| 28 | +<section class="hero" style="padding:4rem 2rem;"> |
| 29 | + <div class="hero-inner"> |
| 30 | + <span class="hero-tag">Account Registration</span> |
| 31 | + <h1>Register</h1> |
| 32 | + <p>Register your IP address to save settings across sessions. 24-hour cookie with automatic renewal on visit.</p> |
| 33 | + </div> |
| 34 | +</section> |
| 35 | + |
| 36 | +<section class="section"> |
| 37 | + <div class="section-inner" style="max-width:480px;"> |
| 38 | + <h3>Registration</h3> |
| 39 | + <p>Your IP address will be recorded for session identification. No password required.</p> |
| 40 | + <form id="register-form" onsubmit="return handleRegister(event)"> |
| 41 | + <div style="margin-bottom:1rem;"> |
| 42 | + <label style="display:block;font-size:0.8rem;color:var(--text-secondary);margin-bottom:0.35rem;">Display Name</label> |
| 43 | + <input type="text" id="reg-name" required style="width:100%;padding:0.6rem 0.75rem;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);color:var(--text-primary);font-size:0.9rem;"/> |
| 44 | + </div> |
| 45 | + <div style="margin-bottom:1rem;"> |
| 46 | + <label style="display:block;font-size:0.8rem;color:var(--text-secondary);margin-bottom:0.35rem;">Your IP Address</label> |
| 47 | + <input type="text" id="reg-ip" readonly style="width:100%;padding:0.6rem 0.75rem;background:var(--bg-dark);border:1px solid var(--border);border-radius:var(--radius);color:var(--text-muted);font-size:0.9rem;"/> |
| 48 | + </div> |
| 49 | + <button type="submit" class="btn btn-primary" style="width:100%;">Register</button> |
| 50 | + </form> |
| 51 | + <p id="reg-status" style="margin-top:1rem;font-size:0.85rem;"></p> |
| 52 | + </div> |
| 53 | +</section> |
| 54 | + |
| 55 | +<footer class="footer"><div class="footer-bottom" style="border:none;padding:0;"> |
| 56 | + <span>© 2026 MEARVK LLC. All rights reserved.</span> |
| 57 | +</div></footer> |
| 58 | + |
| 59 | +<script src="js/session.js"></script> |
| 60 | +<script> |
| 61 | +// Fetch user IP on load |
| 62 | +fetch('https://api.ipify.org?format=json') |
| 63 | + .then(function(r){return r.json();}) |
| 64 | + .then(function(data){ document.getElementById('reg-ip').value = data.ip; }) |
| 65 | + .catch(function(){ document.getElementById('reg-ip').value = '127.0.0.1'; }); |
| 66 | + |
| 67 | +function handleRegister(e) { |
| 68 | + e.preventDefault(); |
| 69 | + var name = document.getElementById('reg-name').value.trim(); |
| 70 | + var ip = document.getElementById('reg-ip').value; |
| 71 | + if (!name) return false; |
| 72 | + // Set registered session cookie (24h) |
| 73 | + var session = setSession('registered', ip, { displayName: name }); |
| 74 | + updateNavForSession(session); |
| 75 | + document.getElementById('reg-status').textContent = 'Registered successfully as "' + name + '" (IP: ' + ip + '). Session valid for 24 hours.'; |
| 76 | + document.getElementById('reg-status').style.color = '#22c55e'; |
| 77 | + return false; |
| 78 | +} |
| 79 | +</script> |
| 80 | +</body> |
| 81 | +</html> |
0 commit comments