page + iso

This commit is contained in:
JMARyA 2025-04-19 03:12:30 +02:00
parent 736d41513b
commit 0825607cf6
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
5 changed files with 174 additions and 3 deletions

5
README.md Normal file
View file

@ -0,0 +1,5 @@
# navOS Site
This repo contains the code for:
- navOS project page
- navOS tar rootfs hosting
- navOS image hosting

View file

@ -5,6 +5,7 @@ services:
- "8080:8000" - "8080:8000"
volumes: volumes:
- ./tar:/tar - ./tar:/tar
- ./iso:/iso
environment: environment:
- "RUST_LOG=info" - "RUST_LOG=info"
- "ROCKET_ADDRESS=0.0.0.0" - "ROCKET_ADDRESS=0.0.0.0"

BIN
src/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View file

@ -2,8 +2,21 @@ use based::request::assets::DataResponse;
use rocket::{get, launch, routes}; use rocket::{get, launch, routes};
#[get("/")] #[get("/")]
pub async fn index() -> String { pub async fn index() -> DataResponse {
String::new() DataResponse::new(
include_str!("page/index.html").as_bytes().to_vec(),
"text/html".to_string(),
Some(60 * 60),
)
}
#[get("/banner")]
pub async fn banner_img() -> DataResponse {
DataResponse::new(
include_bytes!("banner.png").to_vec(),
"image/png".to_string(),
Some(60 * 60),
)
} }
#[get("/rootfs/<arch>/rootfs.tar.xz")] #[get("/rootfs/<arch>/rootfs.tar.xz")]
@ -27,9 +40,25 @@ pub async fn rootfs_tar(arch: &str) -> DataResponse {
} }
} }
#[get("/iso/<arch>")]
pub async fn install_iso(arch: &str) -> DataResponse {
match arch {
"x86_64" | "amd64" => DataResponse::new_file(
"./iso/x86_64.iso",
"application/x-iso9660-image".to_string(),
Some(60 * 60),
),
_ => DataResponse::new(
"Weird arch".as_bytes().to_vec(),
"text/plain".to_string(),
None,
),
}
}
#[launch] #[launch]
async fn rocket() -> _ { async fn rocket() -> _ {
env_logger::init(); env_logger::init();
rocket::build().mount("/", routes![index, rootfs_tar]) rocket::build().mount("/", routes![index, rootfs_tar, banner_img, install_iso])
} }

136
src/page/index.html Normal file
View file

@ -0,0 +1,136 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>navOS</title>
<link href="https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
padding: 0;
background: #0b0b0b;
color: #fdfdfd;
font-family: 'Share Tech Mono', monospace;
overflow-x: hidden;
}
header {
padding: 4rem 2rem;
text-align: center;
background-size: 100%;
background-position: 1rem 1rem 1rem 1rem;
background-repeat: no-repeat;
}
header::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 80%;
background-image: url('/banner');
background-size: cover;
background-position: center;
z-index: -1;
filter: blur(3px);
mask-image: linear-gradient(
to bottom,
rgba(0, 0, 0, 1) 0%, /* fully visible at top */
rgba(0, 0, 0, 1) 30%, /* stay visible until 80% */
rgba(0, 0, 0, 0) 50% /* fade to transparent at bottom */
);
-webkit-mask-image: linear-gradient(
to bottom,
rgba(0, 0, 0, 1) 0%,
rgba(0, 0, 0, 1) 30%,
rgba(0, 0, 0, 0) 50%
);
opacity: 1;
}
header h1 {
font-size: 4rem;
letter-spacing: 0.1rem;
margin: 0;
}
header p {
font-size: 1.2rem;
color: #fbfbfb;
margin-top: 1rem;
}
section {
max-width: 900px;
margin: 4rem auto;
padding: 0 2rem;
}
section h2 {
font-size: 2rem;
border-bottom: 1px solid #333;
padding-bottom: 0.5rem;
margin-bottom: 1rem;
}
section p {
line-height: 1.6;
color: #ccc;
}
.hero {
font-size: 1.5rem;
text-align: center;
font-style: italic;
color: #fbfbfb;
}
footer {
text-align: center;
padding: 4rem 2rem;
font-size: 0.9rem;
color: #666;
}
</style>
</head>
<body>
<header>
<div style="text-align: center;">
<div style="display: inline-flex; align-items: center; gap: 0.5rem;">
<img src="https://git.hydrar.de/avatars/f989a042af87c3b43e4e1685e1beb9939cdfe6b27e201bd93edca3b31656872e?size=200" height="64">
<h1>navOS</h1>
</div>
</div>
<p>everyone is always connected</p>
</header>
<section>
<p class="hero">Welcome to the <a style="text-decoration: none;color: inherit;font-weight: bold;" href="https://git.hydrar.de/navos/-/packages/container/navos/latest"/>Wired</a>.</p>
</section>
<section>
<h2>What is navOS?</h2>
<p>navOS is an experimental operating system born from the aesthetic and philosophy of <em>Serial Experiments Lain</em>. It is designed to provide a unified extensible platform for every device.</p>
</section>
<section>
<h2>arch btw</h2>
<p><strong>you use arch btw.</strong> navOS is built on <a style="text-decoration: none;color: inherit;font-weight: bold;" href="https://archlinux.org/">Arch Linux</a> and the pacman ecosystem.</p>
</section>
<section>
<h2>i have two arms</h2>
<p>navOS supports multiple architectures, including <code>`x86_64`</code> and <code>`aarch64`</code>.</p>
</section>
<section>
<h2>alpha male</h2>
<p>navOS is in very alpha development. So the bugs are really aggressive for now.</p>
</section>
<section>
<h2>download</h2>
<p>You can download a install iso <b>--> <a style="text-decoration: none;color: inherit;font-weight: bold;" href="/iso/amd64"> here </a> <--</b> </p>
<p> Or you can run <code> `navinstall create-iso` if you have it installed. </code> </p>
</section>
<footer>
<p>Present day. Present time.</p>
</footer>
</body>
</html>