networks to contact

This commit is contained in:
Mylloon 2023-10-13 15:10:03 +02:00
parent 39a28ea745
commit 7aa32aabf6
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
6 changed files with 11 additions and 11 deletions

View file

@ -3,7 +3,7 @@ use actix_web::{middleware::DefaultHeaders, web, App, HttpServer};
use std::io::Result; use std::io::Result;
use crate::routes::{ 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, portfolio, setup, web3,
}; };
@ -47,7 +47,7 @@ async fn main() -> Result<()> {
.service(cv::page) .service(cv::page)
.service(gaming::page) .service(gaming::page)
.service(memorial::page) .service(memorial::page)
.service(networks::page) .service(contact::page)
.service(portfolio::page) .service(portfolio::page)
.service(setup::page) .service(setup::page)
.service(web3::page) .service(web3::page)

View file

@ -8,7 +8,7 @@ use crate::{
template::{Infos, NavBar}, template::{Infos, NavBar},
}; };
#[get("/networks")] #[get("/contact")]
pub async fn page(req: HttpRequest, config: web::Data<Config>) -> impl Responder { pub async fn page(req: HttpRequest, config: web::Data<Config>) -> impl Responder {
HttpResponse::Ok().body(build_page( HttpResponse::Ok().body(build_page(
config.get_ref().to_owned(), config.get_ref().to_owned(),
@ -24,15 +24,15 @@ struct NetworksTemplate {
#[once(time = 60)] #[once(time = 60)]
pub fn build_page(config: Config, url: String) -> String { pub fn build_page(config: Config, url: String) -> String {
config.tmpl.render( config.tmpl.render(
"networks.html", "contact.html",
NetworksTemplate { NetworksTemplate {
navbar: NavBar { navbar: NavBar {
networks: true, contact: true,
..NavBar::default() ..NavBar::default()
}, },
}, },
Infos { 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_desc: Some(format!("Réseaux d'{}", config.fc.name.unwrap_or_default())),
page_kw: None, page_kw: None,
url, url,

View file

@ -1,13 +1,13 @@
pub mod agreements; pub mod agreements;
pub mod api_v1; pub mod api_v1;
pub mod blog; pub mod blog;
pub mod contact;
pub mod contrib; pub mod contrib;
pub mod cours; pub mod cours;
pub mod cv; pub mod cv;
pub mod gaming; pub mod gaming;
pub mod index; pub mod index;
pub mod memorial; pub mod memorial;
pub mod networks;
pub mod not_found; pub mod not_found;
pub mod portfolio; pub mod portfolio;
pub mod setup; pub mod setup;

View file

@ -27,7 +27,7 @@ pub struct NavBar {
pub index: bool, pub index: bool,
pub blog: bool, pub blog: bool,
pub portfolio: bool, pub portfolio: bool,
pub networks: bool, pub contact: bool,
pub contrib: bool, pub contrib: bool,
pub cours: bool, pub cours: bool,
} }

View file

@ -28,10 +28,10 @@
<li> <li>
<p> <p>
<a <a
class="_ {{#networks}}bold{{/networks}}" class="_ {{#contact}}bold{{/contact}}"
href="/networks" href="/contact"
title="Page des réseaux" title="Page des réseaux"
>Réseaux</a >Contact</a
> >
</p> </p>
</li> </li>