Skip to content

Commit

Permalink
Merge pull request #18 from husni-zuhdi/feat-add-talks-page
Browse files Browse the repository at this point in the history
Feat add talks page
  • Loading branch information
husni-zuhdi authored Dec 20, 2024
2 parents f6b4426 + 9fb08ab commit dd61843
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 12 deletions.
4 changes: 2 additions & 2 deletions cmd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "cmd"
version = "0.2.0"
version = "0.2.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
internal = { path = "../internal", version = "0.2.0"}
internal = { path = "../internal", version = "0.2.1"}
tokio = { version = "1.0", features = ["full"] }
2 changes: 1 addition & 1 deletion internal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "internal"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
build = "build.rs"

Expand Down
1 change: 1 addition & 0 deletions internal/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pub async fn app() -> () {
.route("/version", get(handler::version::get_version))
.route("/blogs", get(handler::blog::get_blogs))
.route("/blogs/:blog_id", get(handler::blog::get_blog))
.route("/talks", get(handler::talks::get_talks))
.nest_service("/statics", get_service(ServeDir::new("./statics/favicon/")))
.nest_service(
"/statics/styles.css",
Expand Down
1 change: 1 addition & 0 deletions internal/src/handler/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pub mod blog;
pub mod profile;
pub mod status;
pub mod talks;
pub mod version;

// Note: In axum [example](https://docs.rs/axum/latest/axum/response/index.html#building-responses)
Expand Down
21 changes: 21 additions & 0 deletions internal/src/handler/talks.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
use crate::handler::status::get_500_internal_server_error;
use crate::model::templates::TalksTemplate;
use askama::Template;
use axum::response::Html;
use tracing::{error, info};

/// get_talks
/// Serve Talks HTML file
pub async fn get_talks() -> Html<String> {
let talks = TalksTemplate.render();
match talks {
Ok(res) => {
info!("Profile askama template rendered.");
Html(res)
}
Err(err) => {
error!("Failed to render profile.html. {}", err);
get_500_internal_server_error()
}
}
}
4 changes: 4 additions & 0 deletions internal/src/model/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ pub struct VersionTemplate<'a> {
pub build_date: &'a str,
}

#[derive(Template, Debug)]
#[template(path = "talks.html")]
pub struct TalksTemplate;

#[derive(Template, Debug)]
#[template(path = "404_not_found.html")]
pub struct NotFoundTemplate;
Expand Down
5 changes: 5 additions & 0 deletions internal/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<div class="flex space-x-4">
<a href="/" class="rounded-md px-3 py-2 text-sm font-medium hover:bg-gray-700 hover:text-white" aria-current="page">Home</a>
<a href="/blogs" class="rounded-md px-3 py-2 text-sm font-medium hover:bg-gray-700 hover:text-white">Blogs</a>
<a href="/talks" class="rounded-md px-3 py-2 text-sm font-medium hover:bg-gray-700 hover:text-white">Talks</a>
</div>
</div>
</div>
Expand All @@ -69,6 +70,7 @@
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
<a href="/" class="block rounded-md px-3 py-2 text-base font-medium hover:bg-gray-700 hover:text-white" aria-current="page">Home</a>
<a href="/blogs" class="block rounded-md px-3 py-2 text-base font-medium hover:bg-gray-700 hover:text-white">Blogs</a>
<a href="/talks" class="block rounded-md px-3 py-2 text-base font-medium hover:bg-gray-700 hover:text-white">Talks</a>
</div>
</div>
</nav>
Expand Down Expand Up @@ -134,6 +136,9 @@ <h6 class="mb-4 flex justify-center font-semibold uppercase md:justify-start">
<p class="mb-4">
<a href="/blogs">Blogs</a>
</p>
<p class="mb-4">
<a href="/talks">Talks</a>
</p>
</div>
<!-- Contact section -->
<div>
Expand Down
2 changes: 1 addition & 1 deletion internal/templates/blogs.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1 class="mb-4 font-semibold uppercase md:justify-start">Blogs</h1>
<hr>
{% for blog in blogs %}
<h2 class="mb-2 hover:font-bold md:justify-start">
<a href="/blogs/{{blog.id}}">{{blog.name}}</a>
<a href="/blogs/{{blog.id}}" target="_blank">{{blog.name}}</a>
</h2>
{% endfor %}

Expand Down
10 changes: 5 additions & 5 deletions internal/templates/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ <h1>Husni Naufal Zuhdi - Site Reliability Engineer</h1>

<h2 class="border-2 border-b-neutral-200 border-x-transparent border-t-transparent">Overview</h2>
<p>Hi! I'm a Site Reliability Engineer by job and Software Engineer by passion. I'm comfortable writing code with python, golang, and rust.</p>
<p>I love exploring several topics such as Cloud Computing, DevOps, Platform Engineering, Nuclear Science, and Physics Computation.</p>
<p>I love exploring several topics such as Cloud Computing, DevOps, Platform Engineering, Nuclear Science, and Computational Physics.</p>

<h2 class="border-2 border-b-neutral-200 border-x-transparent border-t-transparent">Work Experiences</h2>
<h3>2022 - Now | Site Reliability Engineer at <a href="https://accelbyte.io/about-us">Accelbyte</a></h3>
<h3>2022 - Now | Site Reliability Engineer at <a href="https://accelbyte.io/about-us" target="_blank">Accelbyte</a></h3>
<ul>
<li>Manage and operate Accelbyte game-platform cloud infrastructure</li>
<li>Handle incident management related to client and internal cloud infrastructure</li>
<li>Develop Backend Service for internal alerting subscription</li>
</ul>
<h3>2022 - 2022 | System Engineer at <a href="https://www.tokopedia.com/about/">Tokopedia</a></h3>
<h3>2022 - 2022 | System Engineer at <a href="https://www.tokopedia.com/about/" target="_blank">Tokopedia</a></h3>
<ul>
<li>Handle Tokopedia Multi-Cloud Environment</li>
<li>Onboard several existing Jenkins Pipelines into our new GitHub Action Workflows</li>
Expand All @@ -26,13 +26,13 @@ <h3>2022 - 2022 | System Engineer at <a href="https://www.tokopedia.com/about/">
</ul>

<h2 class="border-2 border-b-neutral-200 border-x-transparent border-t-transparent">Volunteers</h2>
<h3>2023 - Now | Instructor and Advisor at <a href="https://grow.google/intl/id_id/bangkit">Bangkit Academy</a></h3>
<h3>2023 - Now | Instructor and Advisor at <a href="https://grow.google/intl/id_id/bangkit" target="_blank">Bangkit Academy</a></h3>
<ul>
<li>Teaching on 20+ Cloud ILT sessions in Bangkit 2023.</li>
<li>Colaborate with Mentors to setup ILT sessions.</li>
<li>Advise 3 capstone teams to deliver their final projects.</li>
</ul>
<h3>2022 - 2022 | Facilitator at <a href="https://grow.google/intl/id_id/bangkit">Bangkit Academy</a></h3>
<h3>2022 - 2022 | Facilitator at <a href="https://grow.google/intl/id_id/bangkit" target="_blank">Bangkit Academy</a></h3>
<ul>
<li>Colaborate with Instructors to setup ILT sessions.</li>
<li>Conduct weekly meeting to monitor students progress and play games (to refresh their mind).</li>
Expand Down
22 changes: 22 additions & 0 deletions internal/templates/talks.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends "base.html" %}

{% block title %}Talks{% endblock %}
{% block description %}"Husni Naufal Zuhdi Talks"{% endblock %}

{% block content %}
<h1 class="mb-4 font-semibold uppercase md:justify-start">Blogs</h1>
<hr>
<h2 class="mb-2 hover:font-bold md:justify-start">
<p>2022-07-02 | Cloud Computing 101 at UIN Syarif Hidayatullah Jakarta.</p>
</h2>
<h2 class="mb-2 hover:font-bold md:justify-start">
<p>2024-03-09 | How to setup simple Kubernetes cluster with GCE at <a href="https://www.linkedin.com/company/devops-jogja" target="_blank">DevOps Jogja</a>.</p>
</h2>
<h2 class="mb-2 hover:font-bold md:justify-start">
<p>2024-05-24 | Explore CI/CD with Github Action part #1 at <a href="https://www.linkedin.com/company/devops-jogja" target="_blank">DevOps Jogja</a>.</p>
</h2>
<h2 class="mb-2 hover:font-bold md:justify-start">
<p>2024-06-07 | Explore CI/CD with Github Action part #2 at <a href="https://www.linkedin.com/company/devops-jogja" target="_blank">DevOps Jogja</a>.</p>
</h2>

{% endblock content %}
6 changes: 3 additions & 3 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.2.0",
"build_date": "2024-09-19",
"build_hash": "2c7ffdde74efcd069372657947f30ccf82754317"
"version": "0.2.1",
"build_date": "2024-12-20",
"build_hash": "8d58e5e0214ae3c0fc34ed20ddd83888fab0432e"
}

0 comments on commit dd61843

Please sign in to comment.