Style rework #35
6 changed files with 11 additions and 11 deletions
|
@ -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)
|
||||
|
|
|
@ -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,
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue