Files
COSMOS/templates/git.html
T

866 lines
24 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Forge — Sovereign Git Version Control · Cosmos</title>
<meta name="description" content="Self-hosted Git infrastructure engineered for teams that demand total isolation. Branch protection, cryptographic audit logs, SSH/HTTPS push, zero third-party telemetry.">
<link rel="icon" href='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><circle cx="16" cy="16" r="6" fill="%23eef3f8"/><ellipse cx="16" cy="16" rx="14" ry="5.5" fill="none" stroke="%23ffab4d" stroke-width="1.5" transform="rotate(-24 16 16)"/></svg>'>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@1&family=JetBrains+Mono:wght@300;400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
<script src="/three.min.js"></script>
<script>
if (typeof THREE === 'undefined') {
document.write('<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"><\/script>');
}
</script>
<style>
/* ── RESET & DESIGN TOKENS ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #030408;
--bg-card: rgba(14, 12, 10, 0.75);
--bg-card-hover: rgba(22, 18, 14, 0.88);
--ink: #f0f4f8;
--dim: rgba(240, 244, 248, 0.65);
--faint: rgba(240, 244, 248, 0.28);
--line: rgba(240, 244, 248, 0.08);
--line-active: rgba(255, 171, 77, 0.35);
--ac: #ffab4d;
--ac-rgb: 255, 171, 77;
--ac-dark: #e67e22;
--ok: #4ade80;
--mono: 'JetBrains Mono', ui-monospace, monospace;
--sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
--serif: 'Instrument Serif', Georgia, serif;
--pad: clamp(20px, 5vw, 64px);
--ease: cubic-bezier(0.16, 1, 0.3, 1);
}
html {
scroll-behavior: smooth;
background: var(--bg);
color: var(--ink);
overflow-x: hidden;
}
body {
font-family: var(--sans);
background: var(--bg);
color: var(--ink);
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
min-height: 100vh;
}
::selection {
background: rgba(255, 171, 77, 0.35);
color: #fff;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255, 171, 77, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 171, 77, 0.4); }
/* ── 3D CANVAS & ATMOSPHERE ── */
#webgl-bg {
position: fixed;
inset: 0;
width: 100%;
height: 100%;
z-index: 0;
pointer-events: none;
}
.cosmic-grain {
position: fixed;
inset: 0;
z-index: 1;
pointer-events: none;
opacity: 0.035;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.cosmic-vignette {
position: fixed;
inset: 0;
z-index: 1;
pointer-events: none;
background: radial-gradient(circle at 50% 25%, transparent 20%, rgba(3, 4, 8, 0.65) 70%, #030408 100%);
}
/* ── NAVIGATION ── */
nav {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
height: 72px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 var(--pad);
background: rgba(3, 4, 8, 0.55);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border-bottom: 1px solid var(--line);
transition: all 0.35s var(--ease);
}
nav.scrolled {
height: 64px;
background: rgba(3, 4, 8, 0.9);
border-bottom-color: var(--line-active);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.nav-brand {
display: flex;
align-items: center;
gap: 12px;
font-size: 18px;
font-weight: 700;
letter-spacing: -0.02em;
color: var(--ink);
text-decoration: none;
}
.brand-mark {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
}
.brand-mark svg {
width: 100%;
height: 100%;
animation: slowOrbit 24s linear infinite;
}
@keyframes slowOrbit { to { transform: rotate(360deg); } }
.nav-links {
display: flex;
align-items: center;
gap: 32px;
}
.nav-links a {
text-decoration: none;
font-size: 13.5px;
font-weight: 500;
color: var(--dim);
display: flex;
align-items: center;
gap: 8px;
transition: color 0.2s;
padding: 6px 0;
position: relative;
}
.nav-links a.active {
color: #fff;
}
.nav-links a.active::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 1.5px;
background: var(--ac);
}
.nav-links a:hover {
color: var(--ink);
}
.nav-actions {
display: flex;
align-items: center;
gap: 14px;
}
.telemetry-pill {
display: flex;
align-items: center;
gap: 8px;
padding: 5px 12px;
border-radius: 99px;
background: rgba(255, 171, 77, 0.08);
border: 1px solid rgba(255, 171, 77, 0.25);
font-family: var(--mono);
font-size: 10.5px;
font-weight: 500;
letter-spacing: 0.12em;
color: var(--ac);
}
.telemetry-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--ac);
box-shadow: 0 0 10px var(--ac);
animation: pulseDot 2s ease infinite;
}
@keyframes pulseDot {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.4; transform: scale(0.85); }
}
.btn-signin {
font-size: 13px;
font-weight: 600;
color: var(--ink);
text-decoration: none;
padding: 8px 18px;
border-radius: 9px;
background: rgba(255, 255, 255, 0.06);
border: 1px solid var(--line);
backdrop-filter: blur(10px);
transition: all 0.25s var(--ease);
}
.btn-signin:hover {
background: rgba(255, 255, 255, 0.12);
border-color: rgba(255, 171, 77, 0.4);
transform: translateY(-1px);
}
.btn-primary {
font-size: 13px;
font-weight: 600;
color: #030408;
text-decoration: none;
padding: 8px 20px;
border-radius: 9px;
background: var(--ac);
box-shadow: 0 4px 20px rgba(255, 171, 77, 0.3);
transition: all 0.25s var(--ease);
}
.btn-primary:hover {
background: #ffbe76;
transform: translateY(-1px);
box-shadow: 0 6px 28px rgba(255, 171, 77, 0.45);
}
/* ── MAIN CONTENT ── */
main {
position: relative;
z-index: 10;
min-height: 100vh;
}
/* ── HERO ── */
.hero {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 130px var(--pad) 80px;
max-width: 1180px;
margin: 0 auto;
}
.badge-forge {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 6px 16px;
border-radius: 99px;
background: rgba(var(--ac-rgb), 0.08);
border: 1px solid rgba(var(--ac-rgb), 0.25);
font-family: var(--mono);
font-size: 10.5px;
letter-spacing: 0.24em;
text-transform: uppercase;
color: var(--ac);
margin-bottom: 28px;
box-shadow: 0 0 30px rgba(var(--ac-rgb), 0.1);
}
.hero-title {
font-size: clamp(52px, 9vw, 120px);
font-weight: 700;
letter-spacing: -0.04em;
line-height: 0.95;
margin-bottom: 28px;
text-shadow: 0 0 80px rgba(var(--ac-rgb), 0.15);
}
.hero-title em {
font-family: var(--serif);
font-style: italic;
font-weight: 400;
color: var(--ac);
text-shadow: 0 0 40px rgba(var(--ac-rgb), 0.4);
}
.hero-lead {
font-size: clamp(16px, 2vw, 20px);
line-height: 1.68;
color: var(--dim);
max-width: 680px;
margin: 0 auto 44px;
}
.hero-cta-group {
display: flex;
gap: 16px;
justify-content: center;
flex-wrap: wrap;
margin-bottom: 60px;
}
.btn-forge-main {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 14px 34px;
font-size: 15px;
font-weight: 600;
border-radius: 12px;
background: var(--ac);
color: #030408;
text-decoration: none;
box-shadow: 0 10px 30px rgba(var(--ac-rgb), 0.25);
transition: all 0.3s var(--ease);
}
.btn-forge-main:hover {
background: #ffbe76;
transform: translateY(-2px);
box-shadow: 0 14px 40px rgba(var(--ac-rgb), 0.4);
}
.btn-forge-sub {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 14px 30px;
font-size: 15px;
font-weight: 500;
border-radius: 12px;
background: rgba(255, 255, 255, 0.05);
color: var(--ink);
text-decoration: none;
border: 1px solid var(--line);
backdrop-filter: blur(14px);
transition: all 0.3s var(--ease);
}
.btn-forge-sub:hover {
background: rgba(255, 255, 255, 0.1);
border-color: rgba(var(--ac-rgb), 0.4);
transform: translateY(-2px);
}
/* Terminal Snippet Box */
.terminal-snippet {
width: 100%;
max-width: 640px;
background: rgba(8, 7, 6, 0.85);
border: 1px solid rgba(255, 171, 77, 0.2);
border-radius: 14px;
padding: 16px 20px;
backdrop-filter: blur(20px);
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 auto;
}
.term-code {
font-family: var(--mono);
font-size: 13px;
color: var(--ink);
display: flex;
align-items: center;
gap: 10px;
}
.term-prompt {
color: var(--ac);
user-select: none;
}
.btn-copy {
background: rgba(255, 255, 255, 0.06);
border: 1px solid var(--line);
color: var(--dim);
font-family: var(--mono);
font-size: 11px;
padding: 6px 12px;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s;
}
.btn-copy:hover {
color: #fff;
border-color: var(--ac);
background: rgba(var(--ac-rgb), 0.15);
}
/* ── BENTO FEATURES ── */
.section-features {
padding: 100px var(--pad) 80px;
max-width: 1280px;
margin: 0 auto;
}
.section-head {
text-align: center;
margin-bottom: 60px;
}
.sec-tag {
display: inline-flex;
align-items: center;
gap: 10px;
font-family: var(--mono);
font-size: 10px;
letter-spacing: 0.28em;
text-transform: uppercase;
color: var(--ac);
margin-bottom: 16px;
}
.sec-tag::before, .sec-tag::after {
content: '';
width: 24px;
height: 1px;
background: rgba(var(--ac-rgb), 0.4);
}
.sec-title {
font-size: clamp(34px, 5vw, 56px);
font-weight: 700;
letter-spacing: -0.03em;
line-height: 1.05;
}
.sec-title em {
font-family: var(--serif);
font-style: italic;
font-weight: 400;
color: var(--ac);
}
.bento-grid {
display: grid;
grid-template-columns: repeat(12, 1fr);
gap: 24px;
}
.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }
.bento-card {
position: relative;
background: var(--bg-card);
border: 1px solid var(--line);
border-radius: 20px;
padding: 36px 32px;
backdrop-filter: blur(24px) saturate(160%);
-webkit-backdrop-filter: blur(24px) saturate(160%);
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
overflow: hidden;
transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.bento-card:hover {
transform: translateY(-4px);
border-color: rgba(var(--ac-rgb), 0.35);
box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65), 0 0 30px rgba(var(--ac-rgb), 0.1);
}
.card-badge {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 4px 10px;
border-radius: 99px;
background: rgba(var(--ac-rgb), 0.1);
border: 1px solid rgba(var(--ac-rgb), 0.3);
font-family: var(--mono);
font-size: 9px;
letter-spacing: 0.16em;
text-transform: uppercase;
color: var(--ac);
margin-bottom: 20px;
}
.card-h {
font-size: 24px;
font-weight: 600;
letter-spacing: -0.02em;
margin-bottom: 12px;
}
.card-p {
font-size: 14.5px;
line-height: 1.7;
color: var(--dim);
margin-bottom: 20px;
}
.terminal-mock {
background: rgba(4, 3, 2, 0.85);
border: 1px solid rgba(255, 171, 77, 0.15);
border-radius: 10px;
padding: 16px;
font-family: var(--mono);
font-size: 12px;
line-height: 1.8;
color: rgba(240, 244, 248, 0.7);
}
/* ── FOOTER ── */
footer {
position: relative;
z-index: 10;
border-top: 1px solid var(--line);
padding: 40px var(--pad);
display: flex;
align-items: center;
justify-content: space-between;
gap: 24px;
flex-wrap: wrap;
background: rgba(3, 4, 8, 0.8);
backdrop-filter: blur(20px);
}
.ft-brand {
display: flex;
align-items: center;
gap: 10px;
font-size: 16px;
font-weight: 700;
color: var(--ink);
text-decoration: none;
}
.ft-copy {
font-family: var(--mono);
font-size: 10.5px;
letter-spacing: 0.12em;
color: var(--faint);
text-transform: uppercase;
}
.ft-clock {
font-family: var(--mono);
font-size: 11px;
letter-spacing: 0.16em;
color: var(--dim);
}
@media (max-width: 960px) {
.col-8, .col-4, .col-6 { grid-column: span 12; }
.nav-links { display: none; }
}
@media (max-width: 580px) {
.hero-cta-group { flex-direction: column; width: 100%; }
footer { flex-direction: column; text-align: center; }
}
</style>
</head>
<body>
<!-- Three.js Ambient Particle Space Canvas -->
<canvas id="webgl-bg" aria-hidden="true"></canvas>
<div class="cosmic-grain" aria-hidden="true"></div>
<div class="cosmic-vignette" aria-hidden="true"></div>
<!-- Top Navigation -->
<nav id="nav">
<a href="/" class="nav-brand">
<div class="brand-mark">
<svg viewBox="0 0 34 34">
<ellipse cx="17" cy="17" rx="14.5" ry="5.5" fill="none" stroke="rgba(240,244,248,.4)" stroke-width="1.2" transform="rotate(-24 17 17)"/>
<circle cx="17" cy="17" r="4.6" fill="#eef3f8"/>
<circle cx="27.4" cy="12.2" r="1.9" fill="var(--ac)"/>
</svg>
</div>
<span>Cosmos Forge</span>
</a>
<div class="nav-links">
<a href="/git" class="active">Forge Git</a>
<a href="/oort">Oort NAS</a>
<a href="/orbit">Orbit PaaS</a>
</div>
<div class="nav-actions">
<div class="telemetry-pill">
<div class="telemetry-dot"></div>
<span>FORGE NOMINAL</span>
</div>
<a href="/git/login" class="btn-signin">Sign In</a>
<a href="/git/signup" class="btn-primary">Create Account</a>
</div>
</nav>
<main>
<!-- Hero Section -->
<section class="hero">
<div class="badge-forge">
<span>MODULE 01 · SOVEREIGN REPOSITORIES</span>
</div>
<h1 class="hero-title">
Source Code.<br>
<em>Forged in Isolation.</em>
</h1>
<p class="hero-lead">
Self-hosted Git infrastructure engineered for teams that cannot afford exposure. Complete branch protection, cryptographic audit logs, high-speed SSH/HTTPS push, and zero third-party telemetry.
</p>
<div class="hero-cta-group">
<a href="/git/login" class="btn-forge-main">Sign In to Forge →</a>
<a href="/git/signup" class="btn-forge-sub">Create Repository Account</a>
</div>
<!-- Terminal Code Box -->
<div class="terminal-snippet">
<div class="term-code">
<span class="term-prompt">$</span>
<span id="clone-cmd">git clone https://cosmos.local/source/core-engine.git</span>
</div>
<button class="btn-copy" onclick="copyClone()">COPY</button>
</div>
</section>
<!-- Bento Capabilities Grid -->
<section class="section-features">
<div class="section-head">
<div class="sec-tag">REPOSITORY CAPABILITIES</div>
<h2 class="sec-title">Forged for teams that <em>demand sovereignty.</em></h2>
</div>
<div class="bento-grid">
<!-- Card 1: Branch Protection -->
<div class="bento-card col-8">
<span class="card-badge">Governance</span>
<h3 class="card-h">Enforced Branch Protection &amp; Merge Gateways</h3>
<p class="card-p">
Safeguard production code with granular rule sets: require peer reviews, enforce clean linear histories, verify status checks, and restrict direct push privileges.
</p>
<div class="terminal-mock">
<div style="color:var(--ac);margin-bottom:6px"># Direct push to main rejected by sovereign ACL</div>
<div>$ git push origin main</div>
<div style="color:#ef4444">remote: error: GH006: Protected branch update failed for refs/heads/main.</div>
<div style="color:#ef4444">remote: error: At least 1 approving review required from team leads.</div>
</div>
</div>
<!-- Card 2: Orbit CI/CD Integration -->
<div class="bento-card col-4">
<span class="card-badge">PaaS Pipeline</span>
<h3 class="card-h">Orbit Auto Deployments</h3>
<p class="card-p">
Pushing code directly triggers Cosmos Orbit container builds. Multi-stage Docker builds deploy behind edge reverse proxies in seconds.
</p>
<div style="margin-top:20px;padding:12px;background:rgba(255,255,255,0.03);border-radius:8px;font-family:var(--mono);font-size:11.5px;display:flex;justify-content:space-between">
<span>Webhook Pipeline</span>
<span style="color:var(--ok)">✓ 200 OK</span>
</div>
</div>
<!-- Card 3: Cryptographic Integrity -->
<div class="bento-card col-4">
<span class="card-badge">Compliance</span>
<h3 class="card-h">GPG Verification</h3>
<p class="card-p">
Every commit, tag, and merge is cryptographically validated. ScyllaDB authentication records guarantee user audit trails.
</p>
</div>
<!-- Card 4: Architecture Comparison -->
<div class="bento-card col-8">
<span class="card-badge">Airgap Security</span>
<h3 class="card-h">Cosmos Forge vs. Public SaaS Git</h3>
<p class="card-p">
Complete immunity from third-party outages, hidden telemetry, IP scraping, and arbitrary seat licensing fees.
</p>
<div style="display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:16px;text-align:center">
<div style="background:rgba(255,255,255,0.03);padding:14px;border-radius:10px">
<div style="font-family:var(--mono);font-size:18px;font-weight:700;color:var(--ok)">100%</div>
<div style="font-size:11px;color:var(--dim);margin-top:4px">Private &amp; Airgapped</div>
</div>
<div style="background:rgba(255,255,255,0.03);padding:14px;border-radius:10px">
<div style="font-family:var(--mono);font-size:18px;font-weight:700;color:var(--ok)">&lt; 1ms</div>
<div style="font-size:11px;color:var(--dim);margin-top:4px">Push Latency</div>
</div>
<div style="background:rgba(255,255,255,0.03);padding:14px;border-radius:10px">
<div style="font-family:var(--mono);font-size:18px;font-weight:700;color:var(--ok)">$0</div>
<div style="font-size:11px;color:var(--dim);margin-top:4px">Per-Seat Cloud Fees</div>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer>
<a href="/" class="ft-brand">
<svg width="22" height="22" viewBox="0 0 34 34">
<ellipse cx="17" cy="17" rx="14.5" ry="5.5" fill="none" stroke="rgba(240,244,248,.6)" stroke-width="1.2" transform="rotate(-24 17 17)"/>
<circle cx="17" cy="17" r="4.6" fill="#eef3f8"/>
<circle cx="27.4" cy="12.2" r="1.9" fill="var(--ac)"/>
</svg>
Cosmos Forge
</a>
<div class="ft-copy">SOVEREIGN GIT VERSION CONTROL · ALL SYSTEMS OPERATIONAL</div>
<div class="ft-clock" id="live-utc">UTC 00:00:00</div>
</footer>
<script>
function copyClone() {
const text = document.getElementById('clone-cmd').innerText;
navigator.clipboard.writeText(text).then(() => {
const btn = document.querySelector('.btn-copy');
btn.textContent = 'COPIED!';
btn.style.color = 'var(--ok)';
btn.style.borderColor = 'var(--ok)';
setTimeout(() => {
btn.textContent = 'COPY';
btn.style.color = '';
btn.style.borderColor = '';
}, 2000);
});
}
// Three.js Amber Solar Constellation Space Background
(() => {
'use strict';
if (typeof THREE === 'undefined') return;
const canvas = document.getElementById('webgl-bg');
const renderer = new THREE.WebGLRenderer({
canvas: canvas,
alpha: true,
antialias: true,
powerPreference: 'high-performance'
});
renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 2));
renderer.setSize(window.innerWidth, window.innerHeight);
const scene = new THREE.Scene();
scene.fog = new THREE.FogExp2(0x030408, 0.004);
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.set(0, 0, 80);
// Lights
scene.add(new THREE.AmbientLight(0x160f08, 2.5));
const lightAmber = new THREE.PointLight(0xffab4d, 4, 300);
lightAmber.position.set(50, 40, 40);
scene.add(lightAmber);
// Amber Starfield
const starCount = 3000;
const starGeo = new THREE.BufferGeometry();
const starPos = new Float32Array(starCount * 3);
const starCol = new Float32Array(starCount * 3);
const colors = [
[1.0, 0.72, 0.38], // Warm Amber
[1.0, 0.9, 0.75], // Soft White
[1.0, 0.5, 0.2] // Deep Ember
];
for (let i = 0; i < starCount; i++) {
starPos[i * 3] = (Math.random() - 0.5) * 320;
starPos[i * 3 + 1] = (Math.random() - 0.5) * 260;
starPos[i * 3 + 2] = (Math.random() - 0.5) * 260;
const c = colors[Math.floor(Math.random() * colors.length)];
starCol[i * 3] = c[0];
starCol[i * 3 + 1] = c[1];
starCol[i * 3 + 2] = c[2];
}
starGeo.setAttribute('position', new THREE.BufferAttribute(starPos, 3));
starGeo.setAttribute('color', new THREE.BufferAttribute(starCol, 3));
const starMat = new THREE.PointsMaterial({
size: 0.65,
vertexColors: true,
transparent: true,
opacity: 0.85,
blending: THREE.AdditiveBlending,
sizeAttenuation: true
});
const starField = new THREE.Points(starGeo, starMat);
scene.add(starField);
// Off-axis Solar Forge Orbital Accretion Rings (placed to the right & back)
const ringGroup = new THREE.Group();
ringGroup.position.set(40, -12, -25);
scene.add(ringGroup);
function createRing(r, tube, col, op, rx, ry) {
const geo = new THREE.TorusGeometry(r, tube, 16, 128);
const mat = new THREE.MeshBasicMaterial({
color: col,
transparent: true,
opacity: op,
blending: THREE.AdditiveBlending
});
const m = new THREE.Mesh(geo, mat);
m.rotation.x = rx;
m.rotation.y = ry;
return m;
}
const r1 = createRing(22, 0.12, 0xffab4d, 0.45, Math.PI / 2.8, 0.2);
const r2 = createRing(16, 0.09, 0xff8822, 0.35, -Math.PI / 4, 0.4);
const r3 = createRing(28, 0.07, 0xffd29d, 0.25, Math.PI / 3.2, -0.3);
ringGroup.add(r1);
ringGroup.add(r2);
ringGroup.add(r3);
// Mouse Parallax
let mouseX = 0, mouseY = 0;
let targetCamX = 0, targetCamY = 0;
window.addEventListener('mousemove', e => {
mouseX = (e.clientX / window.innerWidth - 0.5) * 2;
mouseY = (e.clientY / window.innerHeight - 0.5) * 2;
targetCamX = mouseX * 7;
targetCamY = -mouseY * 5;
}, { passive: true });
window.addEventListener('scroll', () => {
const nav = document.getElementById('nav');
if (nav) nav.classList.toggle('scrolled', window.scrollY > 40);
}, { passive: true });
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
});
// UTC Clock
const utcEl = document.getElementById('live-utc');
function updateTime() {
if (!utcEl) return;
const d = new Date();
const pad = n => String(n).padStart(2, '0');
utcEl.textContent = `UTC ${pad(d.getUTCHours())}:${pad(d.getUTCMinutes())}:${pad(d.getUTCSeconds())}`;
}
setInterval(updateTime, 1000);
updateTime();
// Render loop
const clock = new THREE.Clock();
function animate() {
requestAnimationFrame(animate);
const dt = clock.getDelta();
const t = clock.getElapsedTime();
camera.position.x += (targetCamX - camera.position.x) * 0.05;
camera.position.y += (targetCamY - camera.position.y) * 0.05;
starField.rotation.y = t * 0.012;
starField.rotation.x = t * 0.006;
r1.rotation.z += 0.005;
r2.rotation.x += 0.007;
r3.rotation.y += 0.004;
ringGroup.rotation.y = t * 0.02;
renderer.render(scene, camera);
}
animate();
})();
</script>
</body>
</html>