This commit is contained in:
Gvidas Juknevičius 2025-09-02 22:25:30 +03:00
parent d23055a0bf
commit f59e1eeebd
Signed by: MCorange
GPG Key ID: 5BE6B533CB76FE86
9 changed files with 92 additions and 17 deletions

View File

@ -22,17 +22,17 @@ body {
}
.topnav_button {
padding: 1rem 3rem;
margin: 3px 10px;
width: 12rem;
padding: 0.6rem 2rem;
margin: 3px 3px;
background: var(--bg-color-ll);
border: 2px solid var(--bg-color);
border-radius: 10px;
text-align: center;
font-size: 25px;
}
.topnav_button a {
text_decoration: none;
}
.topnav_button:hover {
cursor: pointer
background: var(--bg-color)
}

12
src/pages/documents.rs Normal file
View File

@ -0,0 +1,12 @@
use askama::Template;
use axum::{http::StatusCode, response::Html};
#[derive(Debug, Template, Clone)]
#[template(path = "index.html")]
pub struct PageTemplate {}
pub async fn page() -> (StatusCode, Html<String>) {
let page = PageTemplate {};
(StatusCode::OK, Html(page.render().unwrap()))
}

12
src/pages/events.rs Normal file
View File

@ -0,0 +1,12 @@
use askama::Template;
use axum::{http::StatusCode, response::Html};
#[derive(Debug, Template, Clone)]
#[template(path = "index.html")]
pub struct PageTemplate {}
pub async fn page() -> (StatusCode, Html<String>) {
let page = PageTemplate {};
(StatusCode::OK, Html(page.render().unwrap()))
}

View File

@ -1,8 +1,14 @@
use askama::Template;
use axum::{Router, routing::get};
pub mod documents;
pub mod events;
pub mod index;
pub mod roster;
pub fn register_routes() -> Router {
Router::new().route("/", get(index::page))
Router::new()
.route("/", get(index::page))
.route("/roster", get(roster::page))
.route("/events", get(events::page))
.route("/documents", get(documents::page))
}

12
src/pages/roster.rs Normal file
View File

@ -0,0 +1,12 @@
use askama::Template;
use axum::{http::StatusCode, response::Html};
#[derive(Debug, Template, Clone)]
#[template(path = "index.html")]
pub struct PageTemplate {}
pub async fn page() -> (StatusCode, Html<String>) {
let page = PageTemplate {};
(StatusCode::OK, Html(page.render().unwrap()))
}

View File

@ -9,19 +9,19 @@
</head>
<body>
<div id="topnav">
<div class="topnav_button" onclick="location.href='/'">
<button class="topnav_button" onclick="location.href='/'">
Dashboard
</div>
<div class="topnav_button" onclick="location.href='/roster'">
</button>
<button class="topnav_button" onclick="location.href='/roster'">
Roster
</div>
<div class="topnav_button" onclick="location.href='/events'">
</button>
<button class="topnav_button" onclick="location.href='/events'">
Events
</div>
<div class="topnav_button" onclick="location.href='/documents'">
</button>
<button class="topnav_button" onclick="location.href='/documents'">
Documents
</button>
</div>
{% block content %}{% endblock %}
</div>
</body>
</html>

11
templates/documents.html Normal file
View File

@ -0,0 +1,11 @@
{% extends "base.html" %}
{% block title %}Dashboard{% endblock %}
{% block headers %}
{% endblock %}
{% block content %}
<h1>Hello!!!!!!!</h1>
{% endblock %}

11
templates/events.html Normal file
View File

@ -0,0 +1,11 @@
{% extends "base.html" %}
{% block title %}Dashboard{% endblock %}
{% block headers %}
{% endblock %}
{% block content %}
<h1>Hello!!!!!!!</h1>
{% endblock %}

11
templates/roster.html Normal file
View File

@ -0,0 +1,11 @@
{% extends "base.html" %}
{% block title %}Dashboard{% endblock %}
{% block headers %}
{% endblock %}
{% block content %}
<h1>Hello!!!!!!!</h1>
{% endblock %}