update
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
JMARyA 2024-12-27 04:28:05 +01:00
parent fcd3d6ffca
commit ac07105bf7
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
6 changed files with 87 additions and 29 deletions

View file

@ -8,6 +8,7 @@
use based::page::{Shell, render_page};
use based::request::{RequestContext, StringResponse};
use maud::html;
use pkg::Repository;
use rocket::get;
use rocket::routes;
@ -16,13 +17,18 @@ pub mod routes;
#[get("/")]
pub async fn index_page(ctx: RequestContext) -> StringResponse {
let repos: Vec<String> = Repository::list();
let content = html!(
h1 { "Hello World!" };
h1 { "Repositories" };
@for repo in repos {
p { (repo) };
};
);
render_page(
content,
"Hello World",
"Repositories",
ctx,
&Shell::new(html! {}, html! {}, Some(String::new())),
)