diff --git a/assets/static/images/favicon.ico b/assets/static/images/favicon.ico new file mode 100644 index 0000000..499d717 Binary files /dev/null and b/assets/static/images/favicon.ico differ diff --git a/assets/static/images/ja.jpg b/assets/static/images/ja.jpg new file mode 100644 index 0000000..15b64bd Binary files /dev/null and b/assets/static/images/ja.jpg differ diff --git a/assets/views/website/about.html b/assets/views/website/about.html new file mode 100644 index 0000000..07a9dff --- /dev/null +++ b/assets/views/website/about.html @@ -0,0 +1,117 @@ +{% extends "website/base.html" %} {% block content %} +🌟 +
+ me +

Hello, I'm Gabriel! 👋

+
+

More info about me! 💡

+
+

+ Hi! I am Gabriel and I am {{ age }} years old. I study Bioinformatics at the + University of Gdansk đŸĢ. I'm fluent in Polish and English and currently work + as a Python Developer at digimonkeys.com 🐒đŸ’ģ. +

+
+

Hobbies 🎮🎸

+
+

+ Programming đŸ’ģ +

+

+ Filmmaking đŸŽĨ +

+

+ Gaming đŸ•šī¸ +

+

+ Playing guitar 🎸 +

+
+

Interests 🌌📚

+
+

+ Computer Science 💾 +

+

+ Sci-Fi Books 📚 +

+

+ Astronomy 🔭 +

+

+ Sports 🏅 +

+

+ History 🏰 +

+
+

FAQ ❓

+
+
+
+ How old were you when you started programming? +
+

I was 11 years old 🧑‍đŸ’ģ.

+
+
+
How did you learn programming?
+

I read books 📖 and practiced a lot.

+
+
+
Are you studying Computer Science?
+

No, I study Bioinformatics, but it's closely related đŸ§ŦđŸ’ģ.

+
+
+
+ Which programming language do you recommend for a beginner? +
+

+ The language doesn't really matter, just choose one you like and dive in + 🌊. +

+
+
+
What was your first programming language?
+

My journey began with C++ đŸ–Ĩī¸.

+
+
+
+ What is your favorite programming language? +
+

I enjoy writing in C, Rust, and Python 🐍. But Rust is the best 💖đŸĻ€

+
+
+ +{% endblock content %} diff --git a/assets/views/website/base.html b/assets/views/website/base.html index 7dbf9c0..8adb918 100644 --- a/assets/views/website/base.html +++ b/assets/views/website/base.html @@ -5,6 +5,7 @@ Gabriel Kaszewski + ) -> Result { + views::website::about(v).await +} + pub fn routes() -> Routes { Routes::new() .add("/", get(render_index)) .add("/upload", get(render_upload)) .add("/login", get(render_login)) + .add("/about", get(render_about)) } diff --git a/src/services/mod.rs b/src/services/mod.rs index 69ebaae..123f66b 100644 --- a/src/services/mod.rs +++ b/src/services/mod.rs @@ -1,3 +1,4 @@ pub mod data; pub mod jobs; pub mod skills; +pub mod website; diff --git a/src/services/website.rs b/src/services/website.rs new file mode 100644 index 0000000..2fffbce --- /dev/null +++ b/src/services/website.rs @@ -0,0 +1,12 @@ +use chrono::Datelike; + +pub fn get_current_age() -> u32 { + let now = chrono::Utc::now(); + let birth_date = chrono::NaiveDate::from_ymd_opt(2002, 2, 27); + let age = match birth_date { + Some(birth_date) => now.year_ce().1 - birth_date.year_ce().1, + None => 0, + }; + + age +} diff --git a/src/views/website.rs b/src/views/website.rs index 54e19c4..babfe90 100644 --- a/src/views/website.rs +++ b/src/views/website.rs @@ -12,3 +12,9 @@ pub async fn index(v: impl ViewRenderer, ctx: &AppContext) -> Result Result { + let age = services::website::get_current_age(); + + format::render().view(&v, "website/about.html", data!({"age": age})) +}