aboutsummaryrefslogtreecommitdiff
path: root/apps/servers/octopus/src/pages/repo/about.rs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/servers/octopus/src/pages/repo/about.rs')
-rw-r--r--apps/servers/octopus/src/pages/repo/about.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/apps/servers/octopus/src/pages/repo/about.rs b/apps/servers/octopus/src/pages/repo/about.rs
new file mode 100644
index 000000000000..1f207e2d56a5
--- /dev/null
+++ b/apps/servers/octopus/src/pages/repo/about.rs
@@ -0,0 +1,26 @@
+use crate::templ_data::repo::*;
+use actix_web::{web, HttpRequest, HttpResponse, Result};
+use askama::Template;
+
+/// Renders the "repository/about" subpage
+pub async fn render(req: HttpRequest, path: web::Path<String>) -> Result<HttpResponse> {
+ let repo = pages::About {
+ readme: include_str!("../../../README").to_string(),
+ repo: RepoData {
+ owner: "spacekookie".into(),
+ name: "octopus".into(),
+ tagline: "A lightweight web frontend for git repositories".into(),
+ num_commit: 141,
+ num_branch: 1,
+ num_tag: 0,
+ num_contributor: 3,
+ size: "13.12M".into(),
+ logo: "fakeavi.png".into(),
+ },
+ base: Default::default(),
+ }
+ .render()
+ .unwrap();
+
+ Ok(HttpResponse::Ok().content_type("text/html").body(repo))
+}