diff --git a/assets/main.css b/assets/main.css
index e5a7778..7d1c613 100644
--- a/assets/main.css
+++ b/assets/main.css
@@ -80,6 +80,22 @@ code {
color: var(--blue);
}
+.navbar {
+ overflow: hidden;
+ text-align: center;
+ margin: 0px;
+}
+
+.navbar-list {
+ paddign: 0px;
+ display: flex;
+ justify-content: space-between;
+ list-style-type: none;
+ font-size: 1.5rem; /* 24px */
+ line-height: 2rem; /* 32px */
+ color: var(--red);
+}
+
@media (max-width: 1024px) {
html {
line-height: 1.75rem;
@@ -105,5 +121,9 @@ code {
font-size: 1rem; /* 16px */
line-height: 1.5rem; /* 24px */
}
-}
+ .navbar-list {
+ font-size: 1.125rem; /* 18px */
+ line-height: 1.75rem; /* 28px */
+ }
+}
diff --git a/src/lib.rs b/src/lib.rs
index 6a103f9..bd06daa 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -25,9 +25,12 @@ pub async fn run() -> anyhow::Result<()> {
let api_router = Router::new().route("/hello", get(hello_from_the_server));
let router = Router::new()
.nest("/api", api_router)
- .route("/", get(hello))
- .route("/navbar", get(navbar))
- .route("/another-page", get(another_page))
+ .route("/", get(home))
+ .route("/blog", get(blog))
+ .route("/projects", get(projects))
+ .route("/now", get(now))
+ .route("/about", get(about))
+ .route("/contact", get(contact))
.nest_service(
"/assets",
ServeDir::new(format!("{}/assets", assets_path.to_str().unwrap())),
@@ -40,32 +43,59 @@ pub async fn run() -> anyhow::Result<()> {
Ok(())
}
-async fn hello() -> impl IntoResponse {
- let template = HelloTemplate {};
+async fn home() -> impl IntoResponse {
+ let template = HomeTemplate {};
html::HtmlTemplate(template)
}
#[derive(Template)]
-#[template(path = "hello.html")]
-struct HelloTemplate;
+#[template(path = "home.html")]
+struct HomeTemplate;
-#[derive(Template)]
-#[template(path = "test-navbar.html")]
-struct NavbarTemplate;
-
-async fn navbar() -> impl IntoResponse {
- let template = NavbarTemplate {};
- html::HtmlTemplate(template)
-}
-
-async fn another_page() -> impl IntoResponse {
- let template = AnotherPageTemplate {};
+async fn blog() -> impl IntoResponse {
+ let template = BlogTemplate{};
html::HtmlTemplate(template)
}
#[derive(Template)]
-#[template(path = "another-page.html")]
-struct AnotherPageTemplate;
+#[template(path = "blog.html")]
+struct BlogTemplate;
+
+async fn projects() -> impl IntoResponse {
+ let template = ProjectsTemplate{};
+ html::HtmlTemplate(template)
+}
+
+#[derive(Template)]
+#[template(path = "projects.html")]
+struct ProjectsTemplate;
+
+async fn now() -> impl IntoResponse {
+ let template = NowTemplate{};
+ html::HtmlTemplate(template)
+}
+
+#[derive(Template)]
+#[template(path = "now.html")]
+struct NowTemplate;
+
+async fn about() -> impl IntoResponse {
+ let template = AboutTemplate{};
+ html::HtmlTemplate(template)
+}
+
+#[derive(Template)]
+#[template(path = "about.html")]
+struct AboutTemplate;
+
+async fn contact() -> impl IntoResponse {
+ let template = ContactTemplate{};
+ html::HtmlTemplate(template)
+}
+
+#[derive(Template)]
+#[template(path = "contact.html")]
+struct ContactTemplate;
async fn hello_from_the_server() -> &'static str {
"Hello!"
diff --git a/templates/about.html b/templates/about.html
new file mode 100644
index 0000000..438ddbe
--- /dev/null
+++ b/templates/about.html
@@ -0,0 +1,62 @@
+
+{% extends "base.html" %}
+
+{% block content %}
+
+
General
+
+ My greatest joy in life is learning new things.
+ Early on I leaned almost exclusively toward the sciences.
+ I still trend that way but my interests have broadened considerably in recent years.
+ Philosophy, science, business, programming, religion, psychology, anything that helps me understand the world better.
+ My specific fascination for the last four years has been computers.
+ They are an unbelievably amazing intersection of so many sciences both physically and in the logic of programming.
+ They also provide the perfect platform for learning and creating.
+
+
+ A close second is making things and tinkering.
+ There is a satisfaction that comes from making or changing something with your own hands that is unique.
+ That is part of the reason that I switched my website from WordPress to something written by hand.
+ Even if I can't make something as good as what I could purchase, it is still mine.
+ I know it intimately and can build or tweak whatever it is to fit my needs exactly.
+
+
+ I read extensively and while my reading list is only getting longer I am always looking for new book recommendations.
+ I listen to a lot of music, almost all styles these days.
+ With a preference for instumentally complex music.
+
+
+ I am quite introverted and enjoy interacting with others one on one.
+ I find that my focus on learning things deeply extends to how I interact.
+ One long deep conversation is more pleasant to me than a dozen short ones.
+ I am more interested in talking about each other and our own interests than current events.
+ It does make interactions more work but personally I find it very fulfilling.
+
+
+ I have recently discovered just how important independence is to me.
+ I think that removing the worry of money from day to day life has allowed me to focus on what is important to me in a broader sense.
+ I think that it is too easy to give up control of things that are important.
+ To rely on external things that I have no control over.
+
+
+ I have been working lately to slowly move my digital life away from cloud services.
+ Hosting my own calendar, contacts, email, backups.
+ There is a sense of peace with that.
+ Knowing that I have control over things that are important to me.
+ It a stress that I had gotten used to and barely noticed.
+ Like not sleeping quite enough for a long time.
+ Didn't notice the effect until it was gone.
+
+
+ I would like to do the same with more of life eventually.
+ Work, food, electricity.
+ Try to make and fix things instead of buying or replacing them.
+ That thought feels right.
+
+
+ It and other feelings about the best way for me to live are things that I am constantly exploring.
+ Trying to live more in line with what feels right internally.
+ A wonderful exploration and adventure.
+
+
+{% endblock %}
diff --git a/templates/another-page.html b/templates/another-page.html
deleted file mode 100644
index 65892fe..0000000
--- a/templates/another-page.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
-{% extends "base.html" %}
-
-{% block title %}Another page!{% endblock %}
-
-{% block content %}
-
-
- {% block content %}{% endblock %}
+
+
+
+ {% block content %}{% endblock %}