diff --git a/axum_server/.cargo/config.toml b/axum_server/.cargo/config.toml new file mode 100644 index 0000000..c4bb6e0 --- /dev/null +++ b/axum_server/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +rustflags = ["-Clink-arg=-fuse-ld=lld", "-Ctarget-cpu=native"] diff --git a/axum_server/.zellij/dev-layout.kdl b/axum_server/.zellij/dev-layout.kdl index 99d4bc0..6f06a8c 100644 --- a/axum_server/.zellij/dev-layout.kdl +++ b/axum_server/.zellij/dev-layout.kdl @@ -1,7 +1,4 @@ layout { - pane size=1 borderless=true { - plugin location="zellij:tab-bar" - } pane split_direction="vertical" focus=true { pane edit="src/main.rs" pane split_direction="horizontal" size=60 { @@ -22,4 +19,7 @@ layout { pane size=2 borderless=true { plugin location="zellij:status-bar" } + pane size=1 borderless=true { + plugin location="zellij:tab-bar" + } } diff --git a/axum_server/Cargo.toml b/axum_server/Cargo.toml index 49724f2..677cd94 100644 --- a/axum_server/Cargo.toml +++ b/axum_server/Cargo.toml @@ -1,6 +1,3 @@ -[build] -rustflags = ["-Z", "threads=8"] - [package] name = "axum_server" version = "0.1.0" @@ -23,3 +20,13 @@ tower-http = { version = "0.5.0", features = ["trace", "fs"] } tower-livereload = "0.9.2" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } + +[build] +rustflags = ["-Z", "threads=8"] + +[profile.dev] +debug = true +opt-level = 1 +lto = "thin" +panic = "unwind" +strip = false diff --git a/axum_server/justfile b/axum_server/justfile index 42ab7ca..664bea4 100644 --- a/axum_server/justfile +++ b/axum_server/justfile @@ -4,6 +4,12 @@ port := env_var_or_default('PORT', '3080') tailwind: npx tailwindcss -i ./styles/input.css -o ./styles/output.css --watch +# svg sprite creation +# TODO change route on svetle project deletion +# TODO #directory-swap +svgstore: + npx svgstore -o ../static/svg/icons-sprite.svg ../src/svg/**.svg + server_dev: cargo watch -x run diff --git a/axum_server/src/main.rs b/axum_server/src/main.rs index 1e14237..f3268e7 100644 --- a/axum_server/src/main.rs +++ b/axum_server/src/main.rs @@ -28,7 +28,8 @@ async fn main() { // build our application with a single route let app = router::get_router() .nest_service("/styles", ServeDir::new("styles")) - .nest_service("/images", ServeDir::new("../static/images")); + .nest_service("/images", ServeDir::new("../static/images")) + .nest_service("/svg", ServeDir::new("../static/svg")); #[cfg(debug_assertions)] let app = app.layer(LiveReloadLayer::new()); diff --git a/axum_server/src/pages/post.rs b/axum_server/src/pages/post.rs index 5da2ad8..d6b1618 100644 --- a/axum_server/src/pages/post.rs +++ b/axum_server/src/pages/post.rs @@ -1,4 +1,4 @@ -use crate::filters; +use crate::{components::site_header::Link, filters}; use askama::Template; use axum::{extract::Path, http::StatusCode}; use chrono::{DateTime, Utc}; @@ -49,6 +49,9 @@ pub async fn render_post(Path(post_id): Path) -> Result + +
+
+

{{heading}}

+
+

{{description}}

+
+ + +{% endmacro %} + diff --git a/axum_server/templates/index.html b/axum_server/templates/index.html index d0421ef..9301701 100644 --- a/axum_server/templates/index.html +++ b/axum_server/templates/index.html @@ -1,9 +1,10 @@ +{%- import "components/talent_card.html" as tc -%} {% extends "base.html" %} {% block title %}Introduction{% endblock %} {% block content %} -
+ +

About me

+

- Hey, welcome to my personal website. My name is + Welcome to my personal website. My name is Michal Vanko and I'm a programmer - . I'll try to share some stories and opinions about things that I'm interested - in. -

+ . I am developing software for more than half of my life and I love it! Sometimes I stream working on my side projects and building a community of like minded people. Here you can find blogs of my thoughts and journeys, as well as links to my socials where you can see other content.

+ +
+ {% call tc::talent_card("code", "Web development", "Extensive expertise in creating performant, live web applications and websites") %} + {% call tc::talent_card("gamepad", "Game development", "Extensive expertise in creating performant, live web applications and websites") %} +

Follow my twitch stream

diff --git a/axum_server/templates/post.html b/axum_server/templates/post.html index 1828fc9..637e8ef 100644 --- a/axum_server/templates/post.html +++ b/axum_server/templates/post.html @@ -5,13 +5,9 @@ {% block content %}
-

{{title}}

-

TODO: article preview, maybe implement as a filter?, Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Ald

-
-
diff --git a/axum_server/templates/post_tag_list.html b/axum_server/templates/post_tag_list.html new file mode 100644 index 0000000..d1cf9be --- /dev/null +++ b/axum_server/templates/post_tag_list.html @@ -0,0 +1,11 @@ + diff --git a/axum_server/templates/site_footer.html b/axum_server/templates/site_footer.html index 60cd712..67c25f6 100644 --- a/axum_server/templates/site_footer.html +++ b/axum_server/templates/site_footer.html @@ -1,7 +1,49 @@ +{% macro contact_link(svg, title, href, text) %} + + + + {{text}} + + +{% endmacro %} +