From 7366d05e24beafe2bd00f9644336705b07aaece2 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Thu, 7 May 2026 20:53:06 +0700 Subject: [PATCH] feat: homepage personal portfolio (Phase 4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - data/profile.yaml schema: name, handle, tagline, avatar, bio, links - data/projects.yaml schema: featured projects with title, tagline, repo, demo, image, tags - _partials/home/hero.html: avatar + name + tagline + bio + social links - _partials/home/projects.html: data-driven project grid - _partials/home/recent-posts.html: configurable count, view-all link - home.html composes hero → projects → recent-posts - assets/icons: github, mail, rss (Lucide-style) - exampleSite fixtures: profile, 4 projects, 5 SVG placeholder images --- themes/tsuki/assets/icons/github.svg | 3 ++ themes/tsuki/assets/icons/mail.svg | 4 ++ themes/tsuki/assets/icons/rss.svg | 5 +++ themes/tsuki/exampleSite/data/profile.yaml | 18 +++++++++ themes/tsuki/exampleSite/data/projects.yaml | 25 ++++++++++++ .../tsuki/exampleSite/static/img/avatar.svg | 10 +++++ .../static/img/projects/bonsai.svg | 4 ++ .../static/img/projects/miti99bot.svg | 4 ++ .../static/img/projects/rplace.svg | 17 ++++++++ .../static/img/projects/vngeoguessr.svg | 7 ++++ themes/tsuki/layouts/_partials/home/hero.html | 31 ++++++++++++++ .../layouts/_partials/home/projects.html | 40 +++++++++++++++++++ .../layouts/_partials/home/recent-posts.html | 21 ++++++++++ themes/tsuki/layouts/home.html | 8 ++-- 14 files changed, 192 insertions(+), 5 deletions(-) create mode 100644 themes/tsuki/assets/icons/github.svg create mode 100644 themes/tsuki/assets/icons/mail.svg create mode 100644 themes/tsuki/assets/icons/rss.svg create mode 100644 themes/tsuki/exampleSite/data/profile.yaml create mode 100644 themes/tsuki/exampleSite/data/projects.yaml create mode 100644 themes/tsuki/exampleSite/static/img/avatar.svg create mode 100644 themes/tsuki/exampleSite/static/img/projects/bonsai.svg create mode 100644 themes/tsuki/exampleSite/static/img/projects/miti99bot.svg create mode 100644 themes/tsuki/exampleSite/static/img/projects/rplace.svg create mode 100644 themes/tsuki/exampleSite/static/img/projects/vngeoguessr.svg create mode 100644 themes/tsuki/layouts/_partials/home/hero.html create mode 100644 themes/tsuki/layouts/_partials/home/projects.html create mode 100644 themes/tsuki/layouts/_partials/home/recent-posts.html diff --git a/themes/tsuki/assets/icons/github.svg b/themes/tsuki/assets/icons/github.svg new file mode 100644 index 0000000..af4afa2 --- /dev/null +++ b/themes/tsuki/assets/icons/github.svg @@ -0,0 +1,3 @@ + diff --git a/themes/tsuki/assets/icons/mail.svg b/themes/tsuki/assets/icons/mail.svg new file mode 100644 index 0000000..55dafda --- /dev/null +++ b/themes/tsuki/assets/icons/mail.svg @@ -0,0 +1,4 @@ + diff --git a/themes/tsuki/assets/icons/rss.svg b/themes/tsuki/assets/icons/rss.svg new file mode 100644 index 0000000..057a46c --- /dev/null +++ b/themes/tsuki/assets/icons/rss.svg @@ -0,0 +1,5 @@ + diff --git a/themes/tsuki/exampleSite/data/profile.yaml b/themes/tsuki/exampleSite/data/profile.yaml new file mode 100644 index 0000000..0f69022 --- /dev/null +++ b/themes/tsuki/exampleSite/data/profile.yaml @@ -0,0 +1,18 @@ +name: "Tien Nguyen" +handle: "tiennm99" +tagline: "Building tools, breaking things, writing it down." +avatar: "img/avatar.svg" +bio: | + Software engineer based in Ho Chi Minh City. I build for the web, + experiment with AI tooling, and write down what I learn. + +links: + - icon: github + label: GitHub + url: https://github.com/tiennm99 + - icon: mail + label: Email + url: mailto:hi@miti99.com + - icon: rss + label: RSS + url: /index.xml diff --git a/themes/tsuki/exampleSite/data/projects.yaml b/themes/tsuki/exampleSite/data/projects.yaml new file mode 100644 index 0000000..839a6e9 --- /dev/null +++ b/themes/tsuki/exampleSite/data/projects.yaml @@ -0,0 +1,25 @@ +featured: + - title: "bonsai" + tagline: "Minimalist Hugo theme for link-in-bio. Inspired by Linktree and Japanese bonsai aesthetics." + repo: https://github.com/tiennm99/bonsai + demo: https://tiennm99.github.io/bonsai/ + image: "img/projects/bonsai.svg" + tags: [hugo, theme, minimal] + + - title: "miti99bot" + tagline: "Plug-n-play Telegram bot framework on Cloudflare Workers with grammY." + repo: https://github.com/tiennm99/miti99bot + image: "img/projects/miti99bot.svg" + tags: [telegram, cloudflare, framework] + + - title: "rplace" + tagline: "Collaborative pixel art canvas inspired by Reddit r/place. Real-time WebSocket sync." + repo: https://github.com/tiennm99/rplace + image: "img/projects/rplace.svg" + tags: [svelte, hono, durable-objects] + + - title: "vngeoguessr" + tagline: "GeoGuessr clone for Vietnamese locations. Mapillary street view + Redis leaderboards." + repo: https://github.com/tiennm99/vngeoguessr + image: "img/projects/vngeoguessr.svg" + tags: [geo, mapillary, redis] diff --git a/themes/tsuki/exampleSite/static/img/avatar.svg b/themes/tsuki/exampleSite/static/img/avatar.svg new file mode 100644 index 0000000..26300d2 --- /dev/null +++ b/themes/tsuki/exampleSite/static/img/avatar.svg @@ -0,0 +1,10 @@ + + + + + + + + + 月 + diff --git a/themes/tsuki/exampleSite/static/img/projects/bonsai.svg b/themes/tsuki/exampleSite/static/img/projects/bonsai.svg new file mode 100644 index 0000000..0c6e946 --- /dev/null +++ b/themes/tsuki/exampleSite/static/img/projects/bonsai.svg @@ -0,0 +1,4 @@ + + + 盆栽 + diff --git a/themes/tsuki/exampleSite/static/img/projects/miti99bot.svg b/themes/tsuki/exampleSite/static/img/projects/miti99bot.svg new file mode 100644 index 0000000..b3543e8 --- /dev/null +++ b/themes/tsuki/exampleSite/static/img/projects/miti99bot.svg @@ -0,0 +1,4 @@ + + + miti99bot + diff --git a/themes/tsuki/exampleSite/static/img/projects/rplace.svg b/themes/tsuki/exampleSite/static/img/projects/rplace.svg new file mode 100644 index 0000000..107a0ba --- /dev/null +++ b/themes/tsuki/exampleSite/static/img/projects/rplace.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + r/place + diff --git a/themes/tsuki/exampleSite/static/img/projects/vngeoguessr.svg b/themes/tsuki/exampleSite/static/img/projects/vngeoguessr.svg new file mode 100644 index 0000000..b013cd0 --- /dev/null +++ b/themes/tsuki/exampleSite/static/img/projects/vngeoguessr.svg @@ -0,0 +1,7 @@ + + + + + + VN GeoGuessr + diff --git a/themes/tsuki/layouts/_partials/home/hero.html b/themes/tsuki/layouts/_partials/home/hero.html new file mode 100644 index 0000000..19d3b82 --- /dev/null +++ b/themes/tsuki/layouts/_partials/home/hero.html @@ -0,0 +1,31 @@ +{{- $profile := site.Data.profile -}} +{{- with $profile -}} +
+ {{- with .avatar }} + {{ $profile.name | default site.Title }} + {{- end }} + +

{{ .name | default site.Title }}

+ + {{- with .tagline }} +

{{ . }}

+ {{- end }} + + {{- with .bio }} +
{{ . | markdownify }}
+ {{- end }} + + {{- with .links }} + + {{- end }} +
+{{- end -}} diff --git a/themes/tsuki/layouts/_partials/home/projects.html b/themes/tsuki/layouts/_partials/home/projects.html new file mode 100644 index 0000000..90b9fb1 --- /dev/null +++ b/themes/tsuki/layouts/_partials/home/projects.html @@ -0,0 +1,40 @@ +{{- with site.Data.projects.featured -}} +
+

+ {{ i18n "featuredProjects" | default "Featured Projects" }} +

+ + +
+{{- end -}} diff --git a/themes/tsuki/layouts/_partials/home/recent-posts.html b/themes/tsuki/layouts/_partials/home/recent-posts.html new file mode 100644 index 0000000..8efac2b --- /dev/null +++ b/themes/tsuki/layouts/_partials/home/recent-posts.html @@ -0,0 +1,21 @@ +{{- $count := site.Params.home.recentPostsCount | default 5 -}} +{{- $posts := first $count (where (where site.RegularPages "Type" "post") "Draft" false) -}} +{{- with $posts -}} +
+

+ {{ i18n "recentPosts" | default "Recent Posts" }} +

+ + + + {{- if gt (len (where (where site.RegularPages "Type" "post") "Draft" false)) $count }} +

+ {{ i18n "viewAll" | default "View all" }} → +

+ {{- end }} +
+{{- end -}} diff --git a/themes/tsuki/layouts/home.html b/themes/tsuki/layouts/home.html index 312ad17..53b5ebb 100644 --- a/themes/tsuki/layouts/home.html +++ b/themes/tsuki/layouts/home.html @@ -1,9 +1,7 @@ {{ define "body_class" }}home{{ end }} {{ define "main" }} -{{/* Phase 4 fills hero/projects/recent-posts here. Placeholder for now. */}} -
-

{{ site.Title }}

- {{- with site.Params.description }}

{{ . }}

{{ end }} -
+{{ partial "home/hero.html" . }} +{{ partial "home/projects.html" . }} +{{ partial "home/recent-posts.html" . }} {{ end }}