Updated: index page

This commit is contained in:
mskorczak 2024-11-03 20:24:55 +00:00
parent 66ab128f3e
commit fc2094a432

View file

@ -2,51 +2,23 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, inital-scale=1"> <meta name="viewport" content="width=device-width, inital-scale=1">
<meta http-equiv="X-UR-Compatible" content='ie=edge'> <meta http-equiv="X-UR-Compatible" content='ie=edge'>
<title>Newcastle AOC</title> <title>mskor.xyz</title>
<meta name="keywords" content="newcastle, apartheid, campus, university, demands"> <meta name="keywords" content="">
<link rel="stylesheet" id="css" href="style.css"> <link rel="stylesheet" id="css" href="style.css">
<script src="https://unpkg.com/htmx.org@1.9.2" integrity="sha384-L6OqL9pRWyyFU3+/bjdSri+iIphTN/bvYyM37tICVyOJkWZLpP2vGn6VUEXgzg6h" crossorigin="anonymous"></script> <script src="https://unpkg.com/htmx.org@2.0.3" integrity="sha384-0895/pl2MU10Hqc6jd4RvrthNlDiE9U1tWmX7WRESftEDRosgxNsQG/Ze9YMRzHq" crossorigin="anonymous"></script>
</head> </head>
<body> <body>
<div id="header"> <div id="header">
<a href="/index"> <a href="" hx-target="#content" hx-swap="innerHTML" hx-get="/home" hx-trigger="load">
<img src="logo.png" id="logo"> <h1>mskor.xyz</h1>
<h1>Newcastle Apartheid Off Campus</h1>
</a> </a>
<nav> <nav>
<a href="/demands">Demands</a> <a href="" hx-target="#content" hx-swap="innerHTML" hx-get="/about">about</a>
<a href="/facts">Facts</a> <a href="/git">git</a>
<a href="/resources">Resources</a> <a href="" hx-target="#content" hx-swap="innerHTML" hx-get="/blog">blog</a>
<a href="/join_us">Join us!</a>
<a href="/faqs">FAQs</a>
</nav> </nav>
</div> </div>
<div id="content"> <div id="content">
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{
.thread_safe = true,
}){};
const allocator = gpa.allocator();
var router = zap.Router.init(allocator, .{
.not_found = not_found,
});
defer router.deinit();
var web_router = WebRouter.init(allocator);
try router.handle_func("/home", &web_router, &WebRouter.home);
try router.handle_func("/index", &web_router, &WebRouter.index);
try router.handle_func("/", &web_router, &WebRouter.index);
var listener = zap.HttpListener.init(.{ .port = 3000, .on_request = router.on_request_handler(), .log = true, .max_clients = 100000, .public_folder = "src/public" });
try listener.listen();
std.debug.print("Listening on 0.0.0.0:3000\n", .{});
zap.start(.{
.threads = 2,
.workers = 1, // 1 worker enables sharing state between threads
});
}
</div> </div>
</body> </body>
</html> </html>