site: give echo services its own page + navbar entry; frame it as a separate S2S-linked package, not native to the daemon
This commit is contained in:
parent
149ab69afe
commit
c4836c7dd1
7 changed files with 104 additions and 20 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -54,6 +54,12 @@ struct ConnectTemplate {
|
|||
active: &'static str,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "services.html")]
|
||||
struct ServicesTemplate {
|
||||
active: &'static str,
|
||||
}
|
||||
|
||||
struct SidePage {
|
||||
slug: &'static str,
|
||||
title: &'static str,
|
||||
|
|
@ -95,6 +101,9 @@ async fn features() -> Response {
|
|||
async fn connect() -> Response {
|
||||
page(ConnectTemplate { active: "connect" })
|
||||
}
|
||||
async fn services() -> Response {
|
||||
page(ServicesTemplate { active: "services" })
|
||||
}
|
||||
|
||||
async fn docs_index() -> Response {
|
||||
Redirect::permanent(&format!("/docs/{}", docs::first_slug())).into_response()
|
||||
|
|
@ -177,6 +186,7 @@ async fn main() {
|
|||
.route("/", get(index))
|
||||
.route("/features", get(features))
|
||||
.route("/connect", get(connect))
|
||||
.route("/services", get(services))
|
||||
.route("/docs", get(docs_index))
|
||||
.route("/docs/search.json", get(docs_search))
|
||||
.route("/docs/:slug", get(docs_page))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue