Files
TaroTime/app/stellarium-now-wrapper.html

140 lines
3.4 KiB
HTML
Raw Normal View History

2026-03-08 03:52:25 -07:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Stellarium NOW Wrapper</title>
<style>
2026-03-14 00:45:15 -07:00
:root {
--sky-embed-width: 100%;
--sky-embed-height: 106%;
--sky-embed-left: 0%;
--sky-embed-top: -2%;
--sky-brand-mask-width: 0%;
}
2026-03-08 03:52:25 -07:00
html,
body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
background: #000;
}
body {
position: relative;
font-family: sans-serif;
}
#sky-shell {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background:
radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.08), transparent 36%),
radial-gradient(circle at 20% 12%, rgba(120, 160, 255, 0.12), transparent 28%),
#000;
}
#sky-embed {
position: absolute;
2026-03-14 00:45:15 -07:00
left: var(--sky-embed-left);
top: var(--sky-embed-top);
width: var(--sky-embed-width);
height: var(--sky-embed-height);
2026-03-08 03:52:25 -07:00
border: 0;
background: #000;
}
2026-03-14 00:45:15 -07:00
#sky-brand-mask {
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: var(--sky-brand-mask-width);
pointer-events: none;
background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.96) 58%, rgba(0, 0, 0, 0) 100%);
z-index: 3;
}
@media (max-width: 760px) {
:root {
--sky-embed-width: 122%;
--sky-embed-height: 112%;
--sky-embed-left: -10%;
--sky-embed-top: -3%;
--sky-brand-mask-width: 12%;
}
}
@media (max-width: 480px) {
:root {
--sky-embed-width: 126%;
--sky-embed-height: 116%;
--sky-embed-left: -12%;
--sky-embed-top: -4%;
--sky-brand-mask-width: 15%;
}
}
2026-03-08 03:52:25 -07:00
#sky-shell::before {
content: "";
position: absolute;
inset: 0;
pointer-events: none;
background:
radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 42%),
linear-gradient(to bottom, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.38));
z-index: 1;
}
#sky-shell::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 30%;
pointer-events: none;
background:
linear-gradient(
to top,
rgba(0, 0, 0, 1) 0%,
rgba(0, 0, 0, 1) 14%,
rgba(0, 0, 0, 0.94) 34%,
rgba(0, 0, 0, 0.74) 56%,
rgba(0, 0, 0, 0.24) 80%,
rgba(0, 0, 0, 0) 100%
);
z-index: 2;
}
</style>
</head>
<body>
<div id="sky-shell">
<iframe id="sky-embed" title="Decorative sky background" scrolling="no" allow="geolocation"></iframe>
2026-03-14 00:45:15 -07:00
<div id="sky-brand-mask" aria-hidden="true"></div>
2026-03-08 03:52:25 -07:00
</div>
<script>
(function () {
"use strict";
const HOSTED_STELLARIUM_URL = "https://stellarium-web.org/";
const FORWARDED_PARAMS = ["lat", "lng", "elev", "date", "az", "alt", "fov"];
const wrapperParams = new URLSearchParams(window.location.search);
const hostedUrl = new URL(HOSTED_STELLARIUM_URL);
FORWARDED_PARAMS.forEach((key) => {
const value = wrapperParams.get(key);
if (value !== null && value !== "") {
hostedUrl.searchParams.set(key, value);
}
});
document.getElementById("sky-embed").src = hostedUrl.toString();
})();
</script>
</body>
</html>