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 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)

View file

@ -8,7 +8,7 @@ use crate::{
template::{Infos, NavBar},
};
#[get("/networks")]
#[get("/contact")]
pub async fn page(req: HttpRequest, config: web::Data<Config>) -> 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,

View file

@ -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;

View file

@ -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,
}

View file

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