:3
This commit is contained in:
		
							parent
							
								
									d23055a0bf
								
							
						
					
					
						commit
						f59e1eeebd
					
				| 
						 | 
					@ -22,17 +22,17 @@ body {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.topnav_button {
 | 
					.topnav_button {
 | 
				
			||||||
    padding: 1rem 3rem;
 | 
					    width: 12rem;
 | 
				
			||||||
    margin: 3px 10px;
 | 
					    padding: 0.6rem 2rem;
 | 
				
			||||||
 | 
					    margin: 3px 3px;
 | 
				
			||||||
    background: var(--bg-color-ll);
 | 
					    background: var(--bg-color-ll);
 | 
				
			||||||
    border: 2px solid var(--bg-color);
 | 
					    border: 2px solid var(--bg-color);
 | 
				
			||||||
    border-radius: 10px;
 | 
					    border-radius: 10px;
 | 
				
			||||||
 | 
					    text-align: center;
 | 
				
			||||||
 | 
					    font-size: 25px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.topnav_button a {
 | 
					 | 
				
			||||||
    text_decoration: none;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
.topnav_button:hover {
 | 
					.topnav_button:hover {
 | 
				
			||||||
    cursor: pointer
 | 
					    background: var(--bg-color)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										12
									
								
								src/pages/documents.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								src/pages/documents.rs
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										12
									
								
								src/pages/events.rs
									
									
									
									
									
										Normal 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()))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,14 @@
 | 
				
			||||||
use askama::Template;
 | 
					 | 
				
			||||||
use axum::{Router, routing::get};
 | 
					use axum::{Router, routing::get};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					pub mod documents;
 | 
				
			||||||
 | 
					pub mod events;
 | 
				
			||||||
pub mod index;
 | 
					pub mod index;
 | 
				
			||||||
 | 
					pub mod roster;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pub fn register_routes() -> Router {
 | 
					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
									
								
							
							
						
						
									
										12
									
								
								src/pages/roster.rs
									
									
									
									
									
										Normal 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()))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -9,19 +9,19 @@
 | 
				
			||||||
    </head>
 | 
					    </head>
 | 
				
			||||||
    <body>
 | 
					    <body>
 | 
				
			||||||
        <div id="topnav">
 | 
					        <div id="topnav">
 | 
				
			||||||
            <div class="topnav_button" onclick="location.href='/'">
 | 
					            <button class="topnav_button" onclick="location.href='/'">
 | 
				
			||||||
                 Dashboard
 | 
					                 Dashboard
 | 
				
			||||||
            </div>
 | 
					            </button>
 | 
				
			||||||
            <div class="topnav_button" onclick="location.href='/roster'">
 | 
					            <button class="topnav_button" onclick="location.href='/roster'">
 | 
				
			||||||
                 Roster
 | 
					                 Roster
 | 
				
			||||||
            </div>
 | 
					            </button>
 | 
				
			||||||
            <div class="topnav_button" onclick="location.href='/events'">
 | 
					            <button class="topnav_button" onclick="location.href='/events'">
 | 
				
			||||||
                 Events
 | 
					                 Events
 | 
				
			||||||
            </div>
 | 
					            </button>
 | 
				
			||||||
            <div class="topnav_button" onclick="location.href='/documents'">
 | 
					            <button class="topnav_button" onclick="location.href='/documents'">
 | 
				
			||||||
                 Documents
 | 
					                 Documents
 | 
				
			||||||
            </div>
 | 
					            </button>
 | 
				
			||||||
            {% block content %}{% endblock %}
 | 
					 | 
				
			||||||
         </div>
 | 
					         </div>
 | 
				
			||||||
 | 
					        {% block content %}{% endblock %}
 | 
				
			||||||
    </body>
 | 
					    </body>
 | 
				
			||||||
</html>
 | 
					</html>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										11
									
								
								templates/documents.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								templates/documents.html
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										11
									
								
								templates/events.html
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										11
									
								
								templates/roster.html
									
									
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,11 @@
 | 
				
			||||||
 | 
					{% extends "base.html" %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block title %}Dashboard{% endblock %}
 | 
				
			||||||
 | 
					{% block headers %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% endblock %}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{% block content %}
 | 
				
			||||||
 | 
					    <h1>Hello!!!!!!!</h1>
 | 
				
			||||||
 | 
					{% endblock %}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user