diff --git a/crates/app/old_templates/hello.html b/crates/app/old_templates/hello.html deleted file mode 100644 index c45d96e..0000000 --- a/crates/app/old_templates/hello.html +++ /dev/null @@ -1 +0,0 @@ -
Hello {{name}}!
diff --git a/crates/app/old_templates/layout/nav.html b/crates/app/old_templates/layout/nav.html deleted file mode 100644 index 872267f..0000000 --- a/crates/app/old_templates/layout/nav.html +++ /dev/null @@ -1,41 +0,0 @@ - diff --git a/crates/app/old_templates/layout/nav/desktop/menu-items.html b/crates/app/old_templates/layout/nav/desktop/menu-items.html deleted file mode 100644 index 51a8e6b..0000000 --- a/crates/app/old_templates/layout/nav/desktop/menu-items.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/crates/app/old_templates/layout/nav/desktop/notifications-button.html b/crates/app/old_templates/layout/nav/desktop/notifications-button.html deleted file mode 100644 index f11c45e..0000000 --- a/crates/app/old_templates/layout/nav/desktop/notifications-button.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/crates/app/old_templates/layout/nav/desktop/profile-dropdown.html b/crates/app/old_templates/layout/nav/desktop/profile-dropdown.html deleted file mode 100644 index 73667f7..0000000 --- a/crates/app/old_templates/layout/nav/desktop/profile-dropdown.html +++ /dev/null @@ -1,22 +0,0 @@ - diff --git a/crates/app/old_templates/layout/nav/desktop/profile.html b/crates/app/old_templates/layout/nav/desktop/profile.html deleted file mode 100644 index b0ceabc..0000000 --- a/crates/app/old_templates/layout/nav/desktop/profile.html +++ /dev/null @@ -1,27 +0,0 @@ - -
-
- -
- - {% include "layout/nav/desktop/profile-dropdown.html" %} -
diff --git a/crates/app/old_templates/layout/nav/logo.html b/crates/app/old_templates/layout/nav/logo.html deleted file mode 100644 index b7a5c3d..0000000 --- a/crates/app/old_templates/layout/nav/logo.html +++ /dev/null @@ -1,4 +0,0 @@ -
- Your Company - -
\ No newline at end of file diff --git a/crates/app/old_templates/layout/nav/mobile/menu-button.html b/crates/app/old_templates/layout/nav/mobile/menu-button.html deleted file mode 100644 index c59e6e4..0000000 --- a/crates/app/old_templates/layout/nav/mobile/menu-button.html +++ /dev/null @@ -1,43 +0,0 @@ - - diff --git a/crates/app/old_templates/layout/nav/mobile/menu-items.html b/crates/app/old_templates/layout/nav/mobile/menu-items.html deleted file mode 100644 index 1bece64..0000000 --- a/crates/app/old_templates/layout/nav/mobile/menu-items.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/crates/app/old_templates/layout/nav/mobile/notifications-button.html b/crates/app/old_templates/layout/nav/mobile/notifications-button.html deleted file mode 100644 index 5525de9..0000000 --- a/crates/app/old_templates/layout/nav/mobile/notifications-button.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/crates/app/old_templates/layout/nav/mobile/profile-items.html b/crates/app/old_templates/layout/nav/mobile/profile-items.html deleted file mode 100644 index 9f84346..0000000 --- a/crates/app/old_templates/layout/nav/mobile/profile-items.html +++ /dev/null @@ -1,9 +0,0 @@ -
- Chargement ... -
diff --git a/crates/app/old_templates/layout/nav/mobile/profile.html b/crates/app/old_templates/layout/nav/mobile/profile.html deleted file mode 100644 index 03851b7..0000000 --- a/crates/app/old_templates/layout/nav/mobile/profile.html +++ /dev/null @@ -1,11 +0,0 @@ -
- -
-
-
Tom Cook
-
tom@example.com
-
diff --git a/crates/app/old_templates/layout/nav/nav-menu-items.html b/crates/app/old_templates/layout/nav/nav-menu-items.html deleted file mode 100644 index f9de594..0000000 --- a/crates/app/old_templates/layout/nav/nav-menu-items.html +++ /dev/null @@ -1,14 +0,0 @@ -{% for item in items %} - - {{ item.label }} - -{% endfor %} \ No newline at end of file diff --git a/crates/app/old_templates/layout/nav/notifications-icon.html b/crates/app/old_templates/layout/nav/notifications-icon.html deleted file mode 100644 index 7f645d7..0000000 --- a/crates/app/old_templates/layout/nav/notifications-icon.html +++ /dev/null @@ -1,16 +0,0 @@ - -View notifications - \ No newline at end of file diff --git a/crates/app/old_templates/layout/nav/profile-menu-items.html b/crates/app/old_templates/layout/nav/profile-menu-items.html deleted file mode 100644 index 95b0064..0000000 --- a/crates/app/old_templates/layout/nav/profile-menu-items.html +++ /dev/null @@ -1,11 +0,0 @@ -{% for item in items %} - - {{ item.label }} - -{% endfor %} diff --git a/crates/app/old_templates/pages/cps.html b/crates/app/old_templates/pages/cps.html deleted file mode 100644 index 3df33d7..0000000 --- a/crates/app/old_templates/pages/cps.html +++ /dev/null @@ -1,52 +0,0 @@ -

- CPS -

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/crates/app/old_templates/pages/home.html b/crates/app/old_templates/pages/home.html deleted file mode 100644 index c7cf418..0000000 --- a/crates/app/old_templates/pages/home.html +++ /dev/null @@ -1,52 +0,0 @@ -

- Accueil -

- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/crates/app/src/old_pages/home.rs b/crates/app/src/old_pages/home.rs deleted file mode 100644 index 791c63f..0000000 --- a/crates/app/src/old_pages/home.rs +++ /dev/null @@ -1,9 +0,0 @@ -use askama_axum::Template; - -#[derive(Template)] -#[template(path = "pages/home.html")] -pub struct HomeTemplate; - -pub async fn home() -> HomeTemplate { - HomeTemplate -} diff --git a/crates/app/src/old_templates/hello.rs b/crates/app/src/old_templates/hello.rs deleted file mode 100644 index 58ae568..0000000 --- a/crates/app/src/old_templates/hello.rs +++ /dev/null @@ -1,18 +0,0 @@ -use askama_axum::Template; -use axum::{routing, Router}; - -#[derive(Template)] -#[template(path = "hello.html")] -struct HelloTemplate { - pub name: String, -} - -async fn hello() -> HelloTemplate { - HelloTemplate { - name: "Theo".to_string(), - } -} - -pub fn get_routes() -> Router { - Router::new().route("/", routing::get(hello)) -} diff --git a/crates/app/src/old_templates/mod.rs b/crates/app/src/old_templates/mod.rs deleted file mode 100644 index c0b91c0..0000000 --- a/crates/app/src/old_templates/mod.rs +++ /dev/null @@ -1,12 +0,0 @@ -use axum::Router; - -mod hello; -mod nav; -mod profile; - -pub fn get_routes() -> Router { - Router::new() - .nest("/hello", hello::get_routes()) - .nest("/nav", nav::get_routes()) - .nest("/profile", profile::get_routes()) -} diff --git a/crates/app/src/old_templates/nav.rs b/crates/app/src/old_templates/nav.rs deleted file mode 100644 index 9bb44cc..0000000 --- a/crates/app/src/old_templates/nav.rs +++ /dev/null @@ -1,60 +0,0 @@ -use askama_axum::Template; -use axum::{extract::Query, routing, Router}; -use serde::Deserialize; - -struct MenuItem { - label: String, - href: String, - current: bool, -} - -#[derive(Deserialize)] -struct MenuParameters { - mobile: bool, -} - -#[derive(Template)] -#[template(path = "layout/nav/nav-menu-items.html")] -struct MenuTemplate { - mobile: bool, - items: Vec, -} - -impl MenuTemplate { - fn get_classes(&self, is_current_item: &bool) -> String { - let common_classes = match self.mobile { - true => "block border-l-4 py-2 pl-3 pr-4 text-base font-medium".to_string(), - false => { - "inline-flex items-center border-b-2 px-1 pt-1 text-sm font-medium".to_string() - } - }; - match (self.mobile, is_current_item) { - (true, true) => common_classes + " border-indigo-500 bg-indigo-50 text-indigo-700", - (true, false) => common_classes + " border-transparent text-gray-600 hover:border-gray-300 hover:bg-gray-50 hover:text-gray-800", - (false, true) => common_classes + " border-indigo-500 text-gray-900", - (false, false) => common_classes + " border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700", - } - } -} - -async fn menu(Query(params): Query) -> MenuTemplate { - MenuTemplate { - mobile: params.mobile, - items: vec![ - MenuItem { - label: "Accueil".to_string(), - href: "/pages/home".to_string(), - current: true, - }, - MenuItem { - label: "CPS".to_string(), - href: "/pages/cps".to_string(), - current: false, - }, - ], - } -} - -pub fn get_routes() -> Router { - Router::new().route("/menu", routing::get(menu)) -} diff --git a/crates/app/src/old_templates/profile.rs b/crates/app/src/old_templates/profile.rs deleted file mode 100644 index 60a915a..0000000 --- a/crates/app/src/old_templates/profile.rs +++ /dev/null @@ -1,63 +0,0 @@ -use askama_axum::Template; -use axum::{extract::Query, routing, Router}; -use serde::Deserialize; - -struct MenuItem { - label: String, - id: String, - current: bool, -} - -#[derive(Deserialize)] -struct MenuParameters { - mobile: bool, -} - -#[derive(Template)] -#[template(path = "layout/nav/profile-menu-items.html")] -struct MenuTemplate { - mobile: bool, - items: Vec, -} - -impl MenuTemplate { - fn get_classes(&self, is_current_item: &bool) -> String { - let common_classes = match self.mobile { - true => "block px-4 py-2 text-base font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-800".to_string(), - false => "block px-4 py-2 text-sm text-gray-700".to_string(), - }; - match (self.mobile, is_current_item) { - (true, true) => common_classes + "", // ??? - (true, false) => common_classes + "", - (false, true) => common_classes + " bg-gray-100", - (false, false) => common_classes + "", - } - } -} - -async fn menu(Query(params): Query) -> MenuTemplate { - MenuTemplate { - mobile: params.mobile, - items: vec![ - MenuItem { - label: "Votre profil".to_string(), - id: "profile".to_string(), - current: false, - }, - MenuItem { - label: "Paramètres".to_string(), - id: "settings".to_string(), - current: false, - }, - MenuItem { - label: "Déconnexion".to_string(), - id: "logout".to_string(), - current: false, - }, - ], - } -} - -pub fn get_routes() -> Router { - Router::new().route("/menu", routing::get(menu)) -}