68 lines
1.6 KiB
Diff
68 lines
1.6 KiB
Diff
diff --git a/src/web/mod.rs b/src/web/mod.rs
|
|
index f919e6e..4f03aa9 100644
|
|
--- a/src/web/mod.rs
|
|
+++ b/src/web/mod.rs
|
|
@@ -11,6 +11,7 @@ pub async fn start() -> anyhow::Result<()> {
|
|
let addr = "0.0.0.0:3000";
|
|
let app = Router::new()
|
|
.route("/", get(pages::home::get_page))
|
|
+ .route("/login", get(pages::login::get_page))
|
|
.nest_service(
|
|
"/static",
|
|
ServiceBuilder::new()
|
|
diff --git a/src/web/pages/mod.rs b/src/web/pages/mod.rs
|
|
index 0c1f8ad..d4fc7a0 100644
|
|
--- a/src/web/pages/mod.rs
|
|
+++ b/src/web/pages/mod.rs
|
|
@@ -1,6 +1,8 @@
|
|
|
|
|
|
+
|
|
pub mod home;
|
|
+pub mod login;
|
|
pub mod error;
|
|
|
|
|
|
diff --git a/templates/base.html b/templates/base.html
|
|
index 6731e87..86574ca 100644
|
|
--- a/templates/base.html
|
|
+++ b/templates/base.html
|
|
@@ -3,6 +3,7 @@
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>{{ self.title() }}</title>
|
|
+ <link rel="stylesheet" href="/static/index.css">
|
|
</head>
|
|
<body>
|
|
{% include "header.html" %}
|
|
diff --git a/templates/header.html b/templates/header.html
|
|
index c247db4..cf4fb71 100644
|
|
--- a/templates/header.html
|
|
+++ b/templates/header.html
|
|
@@ -1,6 +1,25 @@
|
|
<header>
|
|
|
|
|
|
+ <ul class="nav">
|
|
+ <li><a href="/">Home</a></li>
|
|
+ <li><a href="/personnel">Personnel</a></li>
|
|
+ <li><a href="/clients">Clients</a></li>
|
|
+ <li><a href="/tickets">Tickets</a></li>
|
|
+ <li><a href="/inventory">Inventory</a></li>
|
|
+
|
|
+ <!- not logged in>
|
|
+ <!--
|
|
+ <li class="right"><a href="/login">Sign in</a></li>
|
|
+ !-->
|
|
+
|
|
+ <!- logged in>
|
|
+ <li class="right">
|
|
+ <img class="pfp" src="/static/usericon.png">
|
|
+ <a>John Doe</a>
|
|
+ </li>
|
|
+
|
|
+ </ul>
|
|
|
|
|
|
</header>
|