From 7aa32aabf639f9d762e947d2d3c38e389e1d7093 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 13 Oct 2023 15:10:03 +0200 Subject: [PATCH] networks to contact --- src/main.rs | 4 ++-- src/routes/{networks.rs => contact.rs} | 8 ++++---- src/routes/mod.rs | 2 +- src/template.rs | 2 +- templates/{networks.html => contact.html} | 0 templates/navbar.html | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) rename src/routes/{networks.rs => contact.rs} (87%) rename templates/{networks.html => contact.html} (100%) diff --git a/src/main.rs b/src/main.rs index d21a16e..98d5f0d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use actix_web::{middleware::DefaultHeaders, web, App, HttpServer}; use std::io::Result; use crate::routes::{ - agreements, api_v1, blog, contrib, cours, cv, gaming, index, memorial, networks, not_found, + agreements, api_v1, blog, contact, contrib, cours, cv, gaming, index, memorial, not_found, portfolio, setup, web3, }; @@ -47,7 +47,7 @@ async fn main() -> Result<()> { .service(cv::page) .service(gaming::page) .service(memorial::page) - .service(networks::page) + .service(contact::page) .service(portfolio::page) .service(setup::page) .service(web3::page) diff --git a/src/routes/networks.rs b/src/routes/contact.rs similarity index 87% rename from src/routes/networks.rs rename to src/routes/contact.rs index 35b184f..cb02464 100644 --- a/src/routes/networks.rs +++ b/src/routes/contact.rs @@ -8,7 +8,7 @@ use crate::{ template::{Infos, NavBar}, }; -#[get("/networks")] +#[get("/contact")] pub async fn page(req: HttpRequest, config: web::Data) -> impl Responder { HttpResponse::Ok().body(build_page( config.get_ref().to_owned(), @@ -24,15 +24,15 @@ struct NetworksTemplate { #[once(time = 60)] pub fn build_page(config: Config, url: String) -> String { config.tmpl.render( - "networks.html", + "contact.html", NetworksTemplate { navbar: NavBar { - networks: true, + contact: true, ..NavBar::default() }, }, Infos { - page_title: Some("Mes réseaux".into()), + page_title: Some("Contacts".into()), page_desc: Some(format!("Réseaux d'{}", config.fc.name.unwrap_or_default())), page_kw: None, url, diff --git a/src/routes/mod.rs b/src/routes/mod.rs index da3bd5d..137a5c4 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs @@ -1,13 +1,13 @@ pub mod agreements; pub mod api_v1; pub mod blog; +pub mod contact; pub mod contrib; pub mod cours; pub mod cv; pub mod gaming; pub mod index; pub mod memorial; -pub mod networks; pub mod not_found; pub mod portfolio; pub mod setup; diff --git a/src/template.rs b/src/template.rs index 14f8341..e01279a 100644 --- a/src/template.rs +++ b/src/template.rs @@ -27,7 +27,7 @@ pub struct NavBar { pub index: bool, pub blog: bool, pub portfolio: bool, - pub networks: bool, + pub contact: bool, pub contrib: bool, pub cours: bool, } diff --git a/templates/networks.html b/templates/contact.html similarity index 100% rename from templates/networks.html rename to templates/contact.html diff --git a/templates/navbar.html b/templates/navbar.html index bf71270..2edf67f 100644 --- a/templates/navbar.html +++ b/templates/navbar.html @@ -28,10 +28,10 @@
  • RéseauxContact