219 lines
6.6 KiB
HTML
219 lines
6.6 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>SethPC Astronomy</title>
|
|
<link rel="icon" type="image/png" href="https://storage.googleapis.com/sethfreiberg.com/sethflix/favicon.png">
|
|
<link rel="stylesheet" href="/style.css">
|
|
<style>
|
|
.astro-wrap {
|
|
width: min(540px, 100%);
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
padding: clamp(1rem, 2.5vw, 2rem);
|
|
box-shadow: 0 10px 28px rgb(0 0 0 / 42%);
|
|
}
|
|
.moon-display {
|
|
text-align: center;
|
|
margin: 1.5rem 0 1rem;
|
|
}
|
|
.moon-glyph {
|
|
font-size: 5rem;
|
|
line-height: 1;
|
|
display: block;
|
|
}
|
|
.moon-name {
|
|
font-size: 1.1rem;
|
|
font-weight: 700;
|
|
margin-top: 0.5rem;
|
|
color: var(--text);
|
|
}
|
|
.moon-pct {
|
|
font-size: 0.85rem;
|
|
color: var(--muted);
|
|
margin-top: 0.2rem;
|
|
}
|
|
.astro-head {
|
|
display: grid;
|
|
grid-template-columns: 130px 1fr 1fr;
|
|
gap: 0.35rem 0.9rem;
|
|
font-size: 0.72rem;
|
|
color: #808892;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
margin-top: 0.35rem;
|
|
}
|
|
.astro-grid {
|
|
display: grid;
|
|
grid-template-columns: 130px 1fr 1fr;
|
|
gap: 0.35rem 0.9rem;
|
|
font-size: 0.9rem;
|
|
color: var(--muted);
|
|
margin: 0.45rem 0 1.1rem;
|
|
}
|
|
.astro-label {
|
|
color: var(--text);
|
|
font-weight: 600;
|
|
}
|
|
.date-nav {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 0.5rem;
|
|
margin-bottom: 1.2rem;
|
|
}
|
|
.date-nav h2 {
|
|
margin: 0;
|
|
font-size: clamp(1rem, 2.5vw, 1.3rem);
|
|
text-align: center;
|
|
flex: 1;
|
|
}
|
|
.nav-btn {
|
|
background: #2a2a2a;
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
color: var(--text);
|
|
padding: 0.4rem 0.8rem;
|
|
cursor: pointer;
|
|
font-size: 1rem;
|
|
line-height: 1;
|
|
transition: border-color 0.15s;
|
|
}
|
|
.nav-btn:hover { border-color: var(--accent); color: var(--accent); }
|
|
.section-head {
|
|
font-size: 0.75rem;
|
|
color: var(--accent);
|
|
font-weight: 600;
|
|
letter-spacing: 0.06em;
|
|
text-transform: uppercase;
|
|
margin: 1.2rem 0 0.4rem;
|
|
border-bottom: 1px solid var(--border);
|
|
padding-bottom: 0.2rem;
|
|
}
|
|
.event-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 0.88rem;
|
|
color: var(--muted);
|
|
}
|
|
.event-list li {
|
|
padding: 0.2rem 0;
|
|
border-bottom: 1px solid #2a2a2a;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
gap: 0.5rem;
|
|
}
|
|
.event-list li:last-child { border-bottom: none; }
|
|
.event-name { color: var(--text); }
|
|
.event-dual {
|
|
display: flex;
|
|
flex-direction: column;
|
|
text-align: right;
|
|
gap: 0.04rem;
|
|
font-size: 0.77rem;
|
|
}
|
|
.event-dual span:first-child { color: var(--text); }
|
|
.loc-wrap {
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
padding: 0.7rem;
|
|
margin: 0.2rem 0 1rem;
|
|
background: #171717;
|
|
}
|
|
.loc-head {
|
|
font-size: 0.72rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
color: var(--accent);
|
|
margin-bottom: 0.45rem;
|
|
font-weight: 700;
|
|
}
|
|
.loc-row {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
gap: 0.4rem;
|
|
margin-bottom: 0.4rem;
|
|
}
|
|
.loc-input {
|
|
background: #111;
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
color: var(--text);
|
|
padding: 0.35rem 0.5rem;
|
|
font-size: 0.82rem;
|
|
min-width: 0;
|
|
}
|
|
.loc-status {
|
|
font-size: 0.76rem;
|
|
color: var(--muted);
|
|
min-height: 1.1em;
|
|
}
|
|
@media (max-width: 640px) {
|
|
.loc-row { grid-template-columns: 1fr 1fr; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<main class="astro-wrap">
|
|
<div class="brand-row">
|
|
<img class="logo-img" src="https://storage.googleapis.com/sethfreiberg.com/sethflix/favicon.png" alt="SethPC logo">
|
|
<span class="brand-text">SethPC Astronomy</span>
|
|
</div>
|
|
|
|
<div class="date-nav">
|
|
<button class="nav-btn" id="prevDay">‹</button>
|
|
<h2 id="dateTitle">—</h2>
|
|
<button class="nav-btn" id="nextDay">›</button>
|
|
</div>
|
|
|
|
<div class="loc-wrap">
|
|
<div class="loc-head">Astronomy Location</div>
|
|
<div class="loc-row">
|
|
<input id="locLabel" class="loc-input" type="text" placeholder="Label (Home)" maxlength="64">
|
|
<input id="locZip" class="loc-input" type="text" placeholder="ZIP" inputmode="numeric" maxlength="10">
|
|
<button class="nav-btn" id="locUseZip" type="button">Use ZIP</button>
|
|
</div>
|
|
<div class="loc-row">
|
|
<input id="locLat" class="loc-input" type="number" step="0.0001" min="-90" max="90" placeholder="Latitude">
|
|
<input id="locLon" class="loc-input" type="number" step="0.0001" min="-180" max="180" placeholder="Longitude">
|
|
<button class="nav-btn" id="locGeo" type="button">Use Current</button>
|
|
<button class="nav-btn" id="locSave" type="button">Save</button>
|
|
</div>
|
|
<div id="locStatus" class="loc-status">Using default location.</div>
|
|
</div>
|
|
|
|
<div class="moon-display">
|
|
<span class="moon-glyph" id="moonGlyph">🌑</span>
|
|
<div class="moon-name" id="moonName">—</div>
|
|
<div class="moon-pct" id="moonPct">—</div>
|
|
</div>
|
|
|
|
<div class="astro-head">
|
|
<div></div><div>Seth</div><div>Gregorian</div>
|
|
</div>
|
|
|
|
<div class="section-head">Sun</div>
|
|
<div class="astro-grid">
|
|
<div class="astro-label">Sunrise</div><div id="sunriseSeth">—</div><div id="sunriseGreg">—</div>
|
|
<div class="astro-label">Sunset</div><div id="sunsetSeth">—</div><div id="sunsetGreg">—</div>
|
|
<div class="astro-label">Day length</div><div id="dayLenSeth">—</div><div id="dayLenGreg">—</div>
|
|
<div class="astro-label">Solar noon</div><div id="solarNoonSeth">—</div><div id="solarNoonGreg">—</div>
|
|
</div>
|
|
|
|
<div class="section-head">Moon</div>
|
|
<div class="astro-grid">
|
|
<div class="astro-label">Age</div><div id="moonAgeSeth">—</div><div id="moonAgeGreg">—</div>
|
|
<div class="astro-label">Next new moon</div><div id="nextNewSeth">—</div><div id="nextNewGreg">—</div>
|
|
<div class="astro-label">Next full moon</div><div id="nextFullSeth">—</div><div id="nextFullGreg">—</div>
|
|
</div>
|
|
|
|
<ul class="event-list" id="yearEvents" style="margin-top:1rem;"></ul>
|
|
</main>
|
|
<script src="/astro.js"></script>
|
|
</body>
|
|
</html>
|