add projects view and template

This commit is contained in:
2024-11-10 04:47:40 +01:00
parent 5eb0246863
commit a3de4dcb43
21 changed files with 350 additions and 65 deletions

View File

@@ -14,9 +14,9 @@ pub async fn index(v: impl ViewRenderer, ctx: &AppContext) -> Result<impl IntoRe
}
pub async fn projects(v: impl ViewRenderer, ctx: &AppContext) -> Result<impl IntoResponse> {
// let projects = services::projects::get_all_projects(ctx).await?;
let projects = services::projects::get_all_projects_dto(ctx).await?;
format::render().view(&v, "website/projects.html", data!({"projects": {}}))
format::render().view(&v, "website/projects.html", data!({"projects": projects}))
}
pub async fn about(v: impl ViewRenderer) -> Result<impl IntoResponse> {