commit fff49aa8653ed23fe38e1acd5a7f47d1d126ce18 Author: sthkm3 Date: Wed Dec 2 04:21:46 2026 +0800 upload diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..018698c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +# 自己架(本機預覽或 TrueNAS),再用 cloudflared 指到這個容器 +# docker build -t sahik-about . && docker run -d -p 8080:80 --name sahik-about sahik-about +FROM nginx:alpine +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY public/ /usr/share/nginx/html/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..5b946c6 --- /dev/null +++ b/README.md @@ -0,0 +1,36 @@ +# about.sahik.org + +Sahik 的個人頁。純靜態:`public/` 裡的 HTML / CSS / JS,沒有建置步驟。 + +``` +public/ 要部署的檔案(index.html、style.css、main.js、404.html、img/) +image/ 原始照片(不會被部署) +wrangler.jsonc Cloudflare Worker 設定 +Dockerfile 備案:nginx 容器 +``` + +## 部署(Cloudflare Worker) + +```bash +npx wrangler login +npx wrangler deploy +``` + +`wrangler.jsonc` 已經把 `about.sahik.org` 設成 custom domain,第一次部署會自動建 DNS 記錄(sahik.org 要在同一個 Cloudflare 帳號)。 + +## 備案(Docker on TrueNAS) + +```bash +docker build -t sahik-about . +docker run -d -p 8080:80 --name sahik-about sahik-about +``` + +再用 cloudflared 把 `about.sahik.org` 指到 `http://<主機>:8080`。 + +## 本機預覽 + +直接開 `public/index.html`,或 `npx wrangler dev`。 + +## 換照片 + +原圖放 `image/`,轉成 WebP(長邊 1400、去 EXIF)放到 `public/img/`。 diff --git a/image/IMG20260514182727.jpg b/image/IMG20260514182727.jpg new file mode 100644 index 0000000..39e910c Binary files /dev/null and b/image/IMG20260514182727.jpg differ diff --git a/image/IMG20260903233611.jpg b/image/IMG20260903233611.jpg new file mode 100644 index 0000000..a67e202 Binary files /dev/null and b/image/IMG20260903233611.jpg differ diff --git a/image/rn_image_picker_lib_temp_5ccb55f5-110a-4131-874a-053d836310f9.jpg b/image/rn_image_picker_lib_temp_5ccb55f5-110a-4131-874a-053d836310f9.jpg new file mode 100644 index 0000000..9af5a2e Binary files /dev/null and b/image/rn_image_picker_lib_temp_5ccb55f5-110a-4131-874a-053d836310f9.jpg differ diff --git a/image/rn_image_picker_lib_temp_8c220400-c5c7-48aa-aabf-7ca5a9e3e447.jpg b/image/rn_image_picker_lib_temp_8c220400-c5c7-48aa-aabf-7ca5a9e3e447.jpg new file mode 100644 index 0000000..a909be2 Binary files /dev/null and b/image/rn_image_picker_lib_temp_8c220400-c5c7-48aa-aabf-7ca5a9e3e447.jpg differ diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..91f7eca --- /dev/null +++ b/nginx.conf @@ -0,0 +1,17 @@ +server { + listen 80; + server_name _; + root /usr/share/nginx/html; + index index.html; + + error_page 404 /404.html; + + location / { + try_files $uri $uri/ =404; + } + + location ~* \.(webp|png|jpg|svg|ico)$ { + expires 7d; + add_header Cache-Control "public"; + } +} diff --git a/public/404.html b/public/404.html new file mode 100644 index 0000000..eaa54ee --- /dev/null +++ b/public/404.html @@ -0,0 +1,20 @@ + + + + + +404 · Sahik + + + + +
+
+

> cd ???

+

404

+

這裡什麼都沒有,鳥也不知道。

+ 回首頁 +
+
+ + diff --git a/public/img/apple-touch-icon.png b/public/img/apple-touch-icon.png new file mode 100644 index 0000000..443d0a6 Binary files /dev/null and b/public/img/apple-touch-icon.png differ diff --git a/public/img/avatar.webp b/public/img/avatar.webp new file mode 100644 index 0000000..aaacbd0 Binary files /dev/null and b/public/img/avatar.webp differ diff --git a/public/img/favicon.png b/public/img/favicon.png new file mode 100644 index 0000000..61f1cb6 Binary files /dev/null and b/public/img/favicon.png differ diff --git a/public/img/og.jpg b/public/img/og.jpg new file mode 100644 index 0000000..4652940 Binary files /dev/null and b/public/img/og.jpg differ diff --git a/public/img/server-big-1.webp b/public/img/server-big-1.webp new file mode 100644 index 0000000..8e91f22 Binary files /dev/null and b/public/img/server-big-1.webp differ diff --git a/public/img/server-big-2.webp b/public/img/server-big-2.webp new file mode 100644 index 0000000..b917721 Binary files /dev/null and b/public/img/server-big-2.webp differ diff --git a/public/img/server-small.webp b/public/img/server-small.webp new file mode 100644 index 0000000..cdb8d14 Binary files /dev/null and b/public/img/server-small.webp differ diff --git a/public/img/works/mousetrail-maps.webp b/public/img/works/mousetrail-maps.webp new file mode 100644 index 0000000..cdc2d91 Binary files /dev/null and b/public/img/works/mousetrail-maps.webp differ diff --git a/public/img/works/zhiwu-card.webp b/public/img/works/zhiwu-card.webp new file mode 100644 index 0000000..dcfac0a Binary files /dev/null and b/public/img/works/zhiwu-card.webp differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..59aeb41 --- /dev/null +++ b/public/index.html @@ -0,0 +1,426 @@ + + + + + +Sahik + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ +
+
+ + +
+
+ +
+

> whoami

+

Sahik

+

+ 自架伺服器、寫 Discord bot、做簽到網站和小遊戲。
+ 畢業專題在研究怎麼抓 AI 視覺外掛,外掛也是自己寫的。 +

+
    +
  • 2 台伺服器
  • +
  • 19 個自架服務
  • +
  • 11 個開源專案
  • +
+ +
+
+ + +
+
+ 01 / ABOUT +

關於

+
+ +
+
+

嗨,我是 Sahik,一個大學生。

+

我習慣把用得到的東西自己架起來:程式碼放在自己的 Gitea,檔案放 Nextcloud,Minecraft 伺服器、Discord bot 和簽到網站都跑在家裡那台米色的 TrueNAS 上。另一台大的負責跑 VM 和需要 GPU 的東西。

+

寫程式大多是為了解決自己的需求,或單純好玩:遊戲太肝就寫自動化腳本,群組要管理就寫 bot,想每天打卡就做一個簽到網站。

+
+ +
+
+

會用的東西

+
+
語言
+
PythonC#JavaScriptC
+
開發
+
FastAPIUnityDockerSQLiteOpenCVAuto.js
+
維運
+
TrueNAS SCALECloudflare Tunneln8nNode-REDNextcloud
+
+
+ + +
+
+
+ + +
+
+ 02 / WORKS +

作品

+

挑了幾個,都是開源的。其他的在 gitea.sahik.dev。

+
+ +
+ + + +
+
+ 吱鼯計畫的簽到卡:簽到第 1 天、吱吱次數 67 +
+
+
+ 網站 + 上線中 +
+

吱鼯計畫

+

「你今天吱吱了嗎」。每日簽到網站,簽到後會產生一張附隨機圖片、可以分享的卡片。

+
  • FastAPI
  • SQLite
  • Docker
+ +
+
+ +
+ +
+
+ Discord Bot + 運作中 +
+

LunarHelper 月都小幫手

+

Discord 伺服器助手:進語音頻道自動開私人包廂、每日簽到領點數、排行榜。每個伺服器的設定各自獨立,正式版 24 小時跑在小台上。

+
  • Python
  • Docker
+ +
+
+ +
+ +
+
+ 自動化 +
+

AutoCatAndSoup

+

手遊《貓咪與湯》的掛機腳本:自動賣商品、升級設施和食譜、領各種獎勵、抓黃金蝴蝶。跑在 Auto.js 6 上。

+
  • JavaScript
  • Auto.js
  • GPL-3.0
+ +
+
+ +
+ +
+
+ 網站 +
+

SimpleRickroll

+

一個很單純的網頁。點下去就知道了。

+
  • HTML
+ +
+
+ +
+
+ + +
+
+ 03 / HOMELAB +

伺服器

+

家裡的兩台機器。一台跑 VM,另一台什麼都跑。

+
+ +
+ +
+
+ 大台:黑色玻璃側板機殼,看得到塔式散熱器、兩顆發光風扇和 Tesla M40 顯示卡 +
+ + +
+

正面

+
+
+
+

大台

+ VM 主機 +
+
+
主機板
Gigabyte MU70-SU0
+
CPU
Intel Xeon E5-2696 v422 核 44 緒
+
記憶體
256 GB DDR4-2133 ECC32G × 8
+
儲存
128 GB mSATA SSD
2 TB M.2 SSD
+
GPU
NVIDIA Tesla M40 24GB
+
系統
Windows 10
+
用途
主要跑 VM
+
+
+
+ +
+
+ 小台:米色復古造型機殼,上方四個熱插拔硬碟槽 +

四個熱插拔槽裝的是四顆 Exos

+
+
+
+

小台

+ TrueNAS +
+
+
主機板
X99M D4
+
CPU
Intel Xeon E5-2618L v410 核 20 緒
+
記憶體
64 GB DDR4-2133 ECC16G × 4
+
開機碟
128 GB M.2 SSD
+
儲存
240 GB SATA SSD × 2RAID 1
4 TB Exos × 2RAID 1
6 TB Exos × 2RAID 1
+
顯卡
GT 210只負責亮畫面
+
系統
TrueNAS SCALE 25.10
+
用途
除了 VM 什麼都跑
+
+
+

可用空間 約 10.2 TB(三組鏡像)

+ +
    +
  • 240 GB SSD:App 資料
  • +
  • 4 TB
  • +
  • 6 TB
  • +
+
+
+
+ +
+ +
+
+

小台上跑的 19 個 App

+

確實很雜。

+
+
+
+

對外連線

+
  • cloudflared
  • playit
  • playit幫朋友代管
  • vpn幫朋友代管
+
+
+

開發工具

+
  • gitea
  • jupyter310
  • nodered
  • n8n
  • scrcpy
+
+
+

檔案與同步

+
  • nextcloud0808
  • nextcloudfamily
  • filebrowser
  • syncthing
+
+
+

遊戲

+
  • craftyMinecraft
+
+
+

自己寫的

+
  • lunarhelper
  • myinmu
  • zhiwuproject
  • fasturl
  • rickroll
+
+
+
+ +
+

外面怎麼連進來

+
+
+ 網際網路 + + Cloudflare Tunnel+ Access 登入保護 + + 網站與服務Gitea、Nextcloud、簽到網站⋯ +
+
+ 網際網路 + + playit.gg + + MinecraftCrafty +
+
+

家裡不用開任何對外 port,全部走 tunnel。

+
+
+ + + + +
+ + + +
+ + diff --git a/public/main.js b/public/main.js new file mode 100644 index 0000000..a574761 --- /dev/null +++ b/public/main.js @@ -0,0 +1,84 @@ +// about.sahik.org +(() => { + const reduceMotion = matchMedia("(prefers-reduced-motion: reduce)").matches; + + /* ---------- 開機畫面:每個分頁只播一次,點一下或按任意鍵跳過 ---------- */ + if (!reduceMotion && !sessionStorage.getItem("booted")) { + sessionStorage.setItem("booted", "1"); + const lines = [ + "SAHIK BIOS v26.12", + "", + "CPU Xeon E5-2696 v4 ........ OK", + "MEM 256 GB ECC ............. OK", + "GPU Tesla M40 24G .......... OK", + "NAS 3 × mirror ............. OK", + "", + "Loading about.sahik.org", + ]; + const boot = document.createElement("div"); + boot.className = "boot"; + boot.setAttribute("aria-hidden", "true"); + const pre = document.createElement("pre"); + boot.appendChild(pre); + document.body.appendChild(boot); + + let i = 0, timer; + const finish = () => { + clearTimeout(timer); + boot.classList.add("done"); + setTimeout(() => boot.remove(), 400); + removeEventListener("keydown", finish); + }; + const step = () => { + if (i < lines.length) { + pre.innerHTML = lines.slice(0, ++i).join("\n") + ' '; + timer = setTimeout(step, i === 1 ? 220 : 110); + } else { + timer = setTimeout(finish, 380); + } + }; + boot.addEventListener("click", finish); + addEventListener("keydown", finish); + step(); + } + + /* ---------- 伺服器照片切換 ---------- */ + document.querySelectorAll("[data-gallery]").forEach((g) => { + const main = g.querySelector(".server-photo"); + const caption = g.querySelector(".photo-caption"); + const thumbs = g.querySelectorAll(".thumbs button"); + thumbs.forEach((t) => { + t.addEventListener("click", () => { + main.src = t.dataset.src; + main.alt = t.dataset.alt; + caption.textContent = t.dataset.caption; + thumbs.forEach((x) => x.setAttribute("aria-pressed", String(x === t))); + }); + }); + }); + + /* ---------- 頭像彩蛋 ---------- */ + const toast = document.querySelector(".toast"); + let toastTimer; + const say = (msg) => { + toast.textContent = msg; + toast.classList.add("show"); + clearTimeout(toastTimer); + toastTimer = setTimeout(() => toast.classList.remove("show"), 2200); + }; + const avatar = document.querySelector(".avatar-btn"); + const msgs = ["?", "咕。", "牠沒有名字。", "再點一下就要發生事情了。"]; + let clicks = 0; + avatar.addEventListener("click", () => { + avatar.classList.remove("wiggle"); + void avatar.offsetWidth; + avatar.classList.add("wiggle"); + if (clicks < msgs.length) { + say(msgs[clicks++]); + } else { + clicks = 0; + say("Never gonna give you up ♪"); + window.open("https://sahik.dev", "_blank", "noopener"); + } + }); +})(); diff --git a/public/style.css b/public/style.css new file mode 100644 index 0000000..a142177 --- /dev/null +++ b/public/style.css @@ -0,0 +1,394 @@ +/* ===== Sahik · about.sahik.org ===== + 米色復古電腦主題:機殼米色、綠色電源燈、CRT 螢幕 */ + +:root { + --cream: #f3ecdc; + --paper: #fbf7ee; + --case: #e8dec5; + --case-dark: #d3c6a6; + --line: #ddd2b9; + --ink: #2a2620; + --muted: #6e6656; + --led: #2bb24c; + --amber: #c9781a; + --screen: #1f2a23; + --screen-text: #9be8ae; + --radius: 14px; + --shadow: 0 1px 0 #fff8 inset, 0 2px 0 var(--case-dark), 0 10px 24px -14px #5a4a2a55; + --font: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; + --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace; +} + +* { box-sizing: border-box; } +html { scroll-behavior: smooth; scroll-padding-top: 72px; } +body { + margin: 0; + background: var(--cream); + color: var(--ink); + font-family: var(--font); + font-size: 16px; + line-height: 1.75; + -webkit-font-smoothing: antialiased; +} +img { max-width: 100%; height: auto; display: block; } +a { color: inherit; } +h1, h2, h3, h4 { line-height: 1.3; margin: 0; } +small { font-size: .8em; } +:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 6px; } + +/* ===== Header ===== */ +.site-header { + position: sticky; top: 0; z-index: 20; + display: flex; align-items: center; justify-content: space-between; gap: 16px; + padding: 12px clamp(16px, 4vw, 40px); + background: color-mix(in srgb, var(--cream) 85%, transparent); + backdrop-filter: blur(10px); + border-bottom: 1px solid var(--line); +} +.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .02em; } +.brand img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--case-dark); } +.nav { display: flex; gap: 4px; overflow-x: auto; } +.nav a { + text-decoration: none; padding: 6px 12px; border-radius: 999px; white-space: nowrap; + color: var(--muted); font-size: 15px; +} +.nav a:hover { background: var(--case); color: var(--ink); } + +main { max-width: 1080px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); } + +/* ===== Hero ===== */ +.hero { + display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: clamp(28px, 6vw, 72px); + align-items: center; + padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 7vw, 80px); +} +.monitor { + background: linear-gradient(#efe6cf, var(--case)); + border-radius: 22px 22px 18px 18px; + padding: 18px 18px 0; + box-shadow: var(--shadow), 0 24px 40px -24px #5a4a2a88; + transform: rotate(-2deg); +} +.monitor-screen { + background: var(--screen); + border-radius: 14px; + padding: 14px; + box-shadow: inset 0 0 0 3px #00000022, inset 0 0 30px #000a; + position: relative; +} +.monitor-screen::after { /* scanlines */ + content: ""; position: absolute; inset: 14px; border-radius: 8px; pointer-events: none; + background: repeating-linear-gradient(transparent 0 2px, #0000000f 2px 4px); +} +.avatar-btn { all: unset; display: block; cursor: pointer; border-radius: 8px; overflow: hidden; } +.avatar-btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; } +.avatar-btn img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(.9) contrast(1.02); transition: transform .3s; } +.avatar-btn:hover img { transform: scale(1.03); } +.avatar-btn.wiggle img { animation: wiggle .4s; } +@keyframes wiggle { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } } +.monitor-chin { display: flex; align-items: center; justify-content: space-between; padding: 14px 6px 16px; } +.vents { width: 45%; height: 10px; background: repeating-linear-gradient(90deg, var(--case-dark) 0 4px, transparent 4px 9px); border-radius: 2px; } +.led { width: 10px; height: 10px; border-radius: 50%; background: var(--led); box-shadow: 0 0 8px var(--led); animation: blink 3.2s infinite; } +@keyframes blink { 0%, 92%, 100% { opacity: 1; } 95% { opacity: .35; } } + +.prompt { font-family: var(--mono); color: var(--amber); margin: 0 0 4px; font-size: 15px; } +.hero h1 { font-size: clamp(52px, 9vw, 88px); letter-spacing: -.02em; font-weight: 800; } +.tagline { font-size: clamp(16px, 2vw, 19px); color: var(--muted); margin: 14px 0 22px; max-width: 34em; } +.stats { list-style: none; padding: 0; margin: 0 0 26px; display: flex; flex-wrap: wrap; gap: 8px; } +.stats li { + font-size: 14px; color: var(--muted); + background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; +} +.stats b { color: var(--ink); font-family: var(--mono); font-size: 16px; margin-right: 2px; } +.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; } +.btn { + display: inline-block; text-decoration: none; font-weight: 600; font-size: 15px; + padding: 9px 20px; border-radius: 10px; + background: var(--paper); border: 1px solid var(--case-dark); + box-shadow: 0 2px 0 var(--case-dark); + transition: transform .1s, box-shadow .1s; +} +.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 0 var(--case-dark); } +.btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--case-dark); } +.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 0 2px 0 #000; } +.btn-primary:hover { box-shadow: 0 3px 0 #000; } + +/* ===== Sections ===== */ +.section { padding: clamp(48px, 8vw, 88px) 0 0; } +.section-head { margin-bottom: 28px; } +.label { font-family: var(--mono); font-size: 13px; letter-spacing: .12em; color: var(--amber); } +.section-head h2 { font-size: clamp(28px, 4vw, 36px); margin-top: 2px; } +.section-note { color: var(--muted); margin: 6px 0 0; } +.section-note a { color: var(--ink); text-underline-offset: 3px; } + +.card { + background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); + padding: clamp(20px, 3vw, 28px); box-shadow: var(--shadow); +} +.card h3 { font-size: 17px; margin-bottom: 12px; } + +/* ===== About ===== */ +.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; } +.about-bio p { margin: 0 0 14px; font-size: 17px; } +.about-bio p:last-child { margin-bottom: 0; } +.about-side { display: grid; gap: 20px; } +.skills { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; margin: 0; } +.skills dt { font-size: 14px; color: var(--muted); padding-top: 3px; } +.skills dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; } +.skills span, .tags li { + font-family: var(--mono); font-size: 13px; line-height: 1.4; + background: var(--case); border-radius: 6px; padding: 4px 9px; +} +.likes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } +.likes li { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; } +.likes li b { font-size: 20px; } +.likes li b::before { content: "zz "; font-family: var(--mono); font-size: 13px; color: var(--amber); font-weight: 400; } +.likes li:nth-child(2) b::before { content: ">_ "; } +.likes li:nth-child(3) b::before { content: "✎ "; } +.likes li span { color: var(--muted); font-size: 14px; } + +/* ===== Works ===== */ +.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; } +.work { + display: flex; flex-direction: column; overflow: hidden; + background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); + box-shadow: var(--shadow); + transition: transform .2s, box-shadow .2s; +} +.work:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 16px 30px -18px #5a4a2a77; } +.work-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; } +.work-media { + margin: 0; height: 250px; overflow: hidden; position: relative; + background: var(--case); border-bottom: 1px solid var(--line); + display: grid; place-items: center; +} +.work-media > img { width: 100%; height: 100%; object-fit: cover; } + +/* 吱鼯:直式卡片放在同色底上 */ +.media-zhiwu { background: radial-gradient(circle at 50% 30%, #4a2a10, #1c0f05); } +.media-zhiwu > img { width: auto; height: 230px; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 24px #0008; transform: rotate(3deg) translateY(10px); } + +/* Discord 示意 */ +.media-discord { background: #313338; } +.dc { width: min(86%, 340px); font-size: 13px; color: #dbdee1; line-height: 1.45; } +.dc-channel { color: #949ba4; font-weight: 600; margin-bottom: 10px; } +.dc-msg { display: flex; gap: 10px; margin-bottom: 10px; } +.dc-msg p { margin: 0; } +.dc-avatar { flex: none; width: 32px; height: 32px; border-radius: 50%; background: #f0b232; } +.dc-avatar.bot { background: #5865f2 url("img/favicon.png") center/cover; } +.dc-name { font-weight: 600; color: #f2f3f5; } +.dc-name i { font-style: normal; font-size: 10px; background: #5865f2; color: #fff; border-radius: 3px; padding: 0 4px; margin-left: 4px; vertical-align: 1px; } +.dc-react { display: inline-block; margin-top: 4px; font-size: 12px; background: #373a6d; border: 1px solid #5865f2; border-radius: 8px; padding: 0 6px; } +.dc-embed { margin-top: 4px; background: #2b2d31; border-left: 4px solid #f0b232; border-radius: 4px; padding: 6px 10px; } +.dc-embed ol { list-style: none; margin: 2px 0 0; padding: 0; color: #949ba4; font-family: var(--mono); font-size: 12px; } + +/* 手機掛機示意 */ +.media-phone { background: linear-gradient(160deg, #f6d9b0, #e9b98a); } +.phone { + width: 180px; height: 215px; align-self: end; + background: #fffaf1; border: 6px solid #2a2620; border-radius: 22px 22px 0 0; border-bottom: 0; + padding: 10px 12px; font-size: 12.5px; +} +.phone-bar { font-family: var(--mono); font-size: 11px; color: #fff; background: var(--led); border-radius: 6px; padding: 2px 8px; margin-bottom: 8px; text-align: center; } +.phone-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; } +.phone-log li { display: flex; justify-content: space-between; border-bottom: 1px dashed #e4d8c2; padding-bottom: 3px; } +.phone-log b { color: var(--led); } +.phone-log b.wait { color: var(--amber); animation: blink 1.2s infinite; } + +/* Rickroll 假影片 */ +.media-video { background: #111; } +.vid { position: absolute; inset: 0; display: grid; place-items: center; } +.vid-title { position: absolute; top: 12px; left: 14px; color: #ddd; font-size: 13px; font-family: var(--mono); } +.vid-play { + width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; + background: #fff2; color: #fff; font-size: 24px; padding-left: 4px; transition: transform .2s, background .2s; +} +.work:hover .vid-play { transform: scale(1.12); background: #e33; } +.vid-bar { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 4px; background: #fff3; border-radius: 2px; } +.vid-bar i { display: block; width: 18%; height: 100%; background: #e33; border-radius: 2px; } + +.work-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; } +.work-cat { font-size: 13px; color: var(--muted); font-family: var(--mono); } +.badge { font-size: 12px; font-family: var(--mono); border: 1px solid var(--case-dark); border-radius: 999px; padding: 1px 10px; color: var(--muted); } +.badge.live { color: #1d7a36; border-color: #9fd4ad; background: #e7f5e9; } +.badge.live::before { content: "● "; color: var(--led); } +.work h3 { font-size: 20px; margin-bottom: 8px; } +.work-body > p { margin: 0 0 14px; color: var(--muted); flex: 1; } +.tags { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; } +.work-links { display: flex; flex-wrap: wrap; gap: 6px 18px; border-top: 1px dashed var(--line); padding-top: 12px; } +.work-links a { font-size: 14px; font-weight: 600; text-decoration: none; } +.work-links a:hover { color: var(--amber); } + +.work.featured { + grid-column: 1 / -1; + background: var(--screen); color: #e9f3ea; border-color: #111; + box-shadow: 0 2px 0 #0d130f, 0 18px 34px -20px #000a; + position: relative; overflow: hidden; +} +.work.featured .work-media { height: auto; border-color: #111; background: #111; } +.work.featured .work-media > img { height: auto; aspect-ratio: 1928 / 360; } +.work.featured::after { + content: ""; position: absolute; inset: 0; pointer-events: none; + background: repeating-linear-gradient(transparent 0 2px, #ffffff05 2px 4px); +} +.work.featured h3 { font-size: clamp(22px, 3vw, 28px); color: var(--screen-text); font-family: var(--mono); letter-spacing: -.01em; } +.work.featured .work-body > p { color: #c6d5c9; max-width: 46em; font-size: 16.5px; } +.work.featured .work-cat { color: var(--screen-text); } +.work.featured .badge { color: var(--screen-text); border-color: #3b5444; } +.work.featured .tags li { background: #2d3d33; color: #d5e8da; } +.work.featured .work-links { border-color: #3b5444; } +.work.featured .work-links a { color: var(--screen-text); } +.work.featured .work-links a:hover { color: #fff; } + +/* ===== Homelab ===== */ +.servers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } +.server { display: grid; grid-template-rows: auto 1fr; padding: 0; overflow: hidden; } +.server-photos { position: relative; background: var(--case); } +.server-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 40%; } +.thumbs { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 8px; } +.thumbs button { + all: unset; cursor: pointer; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; + border: 2px solid #fff9; box-shadow: 0 4px 12px #0006; opacity: .75; transition: opacity .2s, border-color .2s; +} +.thumbs button[aria-pressed="true"] { opacity: 1; border-color: #fff; } +.thumbs button:focus-visible { outline: 3px solid var(--amber); } +.thumbs img { width: 100%; height: 100%; object-fit: cover; } +.photo-caption { + position: absolute; left: 12px; bottom: 12px; margin: 0; + font-size: 13px; color: #fff; background: #0008; backdrop-filter: blur(4px); + padding: 3px 10px; border-radius: 999px; max-width: calc(100% - 150px); +} +.server-info { padding: clamp(20px, 3vw, 26px); } +.server-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; } +.server-title h3 { font-size: 24px; margin: 0; } +.role { font-family: var(--mono); font-size: 13px; background: var(--ink); color: var(--paper); padding: 2px 10px; border-radius: 6px; } +.specs { display: grid; grid-template-columns: 4.5em 1fr; gap: 8px 12px; margin: 0; font-size: 15px; } +.specs dt { color: var(--muted); } +.specs dd { margin: 0; font-weight: 500; } +.specs small { color: var(--muted); font-weight: 400; margin-left: 6px; font-family: var(--mono); } + +.storage { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line); } +.storage-title { margin: 0 0 8px; font-size: 15px; } +.storage-title small { color: var(--muted); } +.storage-bar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--case); } +.storage-bar span { width: var(--w); min-width: 6px; } +.s-ssd { background: var(--amber); } +.s-4t { background: #7c9a6d; } +.s-6t { background: #4c6b5a; } +.storage-legend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--muted); } +.storage-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; } + +.apps { margin-top: 20px; } +.apps-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; } +.apps-head h3 { margin: 0; font-size: 19px; } +.apps-head p { margin: 0; color: var(--muted); } +.app-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; } +.app-group h4 { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 8px; } +.app-group ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; } +.app-group li { + font-family: var(--mono); font-size: 14px; + background: var(--screen); color: var(--screen-text); + border-radius: 6px; padding: 5px 10px; + display: flex; justify-content: space-between; gap: 8px; align-items: baseline; +} +.app-group li small { color: #7fa58a; font-family: var(--font); font-size: 12px; } +.app-group.mine li { background: var(--amber); color: #fff8ec; } +.app-group.mine li::before { content: "★"; font-size: 11px; order: 2; opacity: .8; } + +.flow { margin-top: 20px; } +.flow h3 { font-size: 19px; margin-bottom: 16px; } +.flow-rows { display: grid; gap: 12px; } +.flow-row { display: grid; grid-template-columns: 110px 40px 200px 40px 1fr; align-items: center; gap: 8px; } +.node { + background: var(--case); border: 1px solid var(--case-dark); border-radius: 10px; + padding: 8px 14px; font-weight: 600; font-size: 15px; line-height: 1.4; + display: flex; flex-direction: column; +} +.node small { font-weight: 400; color: var(--muted); font-size: 12.5px; } +.node.accent { background: var(--ink); color: var(--paper); border-color: var(--ink); } +.node.accent small { color: #cfc6b3; } +.arrow { height: 2px; background: var(--case-dark); position: relative; } +.arrow::after { + content: ""; position: absolute; right: -1px; top: -5px; + border: 6px solid transparent; border-left: 8px solid var(--case-dark); border-right: 0; +} +.flow-note { margin: 14px 0 0; color: var(--muted); font-size: 14px; } + +/* ===== Links ===== */ +.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; } +.link-card { + display: flex; flex-direction: column; gap: 2px; text-decoration: none; + background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); + padding: 20px 22px; box-shadow: var(--shadow); transition: transform .2s; +} +.link-card:hover { transform: translateY(-3px); } +.link-name { font-weight: 700; font-size: 19px; } +.link-url { font-family: var(--mono); font-size: 13px; color: var(--amber); word-break: break-all; } +.link-desc { color: var(--muted); font-size: 14px; margin-top: 6px; } + +/* ===== Footer ===== */ +.site-footer { margin-top: clamp(64px, 10vw, 120px); } +.waves { display: block; width: 100%; height: 80px; } +.waves .w1 { fill: var(--case); } +.waves .w2 { fill: var(--case-dark); } +.footer-inner { + background: var(--case-dark); text-align: center; + padding: 8px 20px 36px; display: flex; flex-direction: column; align-items: center; gap: 10px; +} +.to-top { + display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; + background: var(--paper); text-decoration: none; font-size: 18px; line-height: 1; + box-shadow: 0 3px 0 #a99a78; margin-top: -40px; transition: transform .2s; +} +.to-top span { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; } +.to-top:hover { transform: translateY(-4px); } +.footer-nav { display: flex; gap: 18px; } +.footer-nav a { text-decoration: none; font-size: 15px; } +.footer-nav a:hover { text-decoration: underline; } +.footnote { margin: 4px 0 0; font-size: 14px; color: #5d5444; } +.copyright { margin: 0; font-family: var(--mono); font-size: 13px; color: #5d5444; } + +/* ===== Toast & Boot ===== */ +.toast { + position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); + background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 10px; + font-size: 15px; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 50; +} +.toast.show { opacity: 1; transform: translate(-50%, 0); } + +.boot { + position: fixed; inset: 0; z-index: 100; background: var(--screen); + display: grid; place-items: center; cursor: pointer; + transition: opacity .35s; +} +.boot.done { opacity: 0; pointer-events: none; } +.boot pre { + margin: 0; padding: 24px; font-family: var(--mono); font-size: clamp(12px, 2.2vw, 15px); + color: var(--screen-text); line-height: 1.8; min-width: min(460px, 90vw); + text-shadow: 0 0 6px #9be8ae66; +} +.boot pre .ok { color: #fff; } +.boot .cursor { display: inline-block; width: .6em; height: 1.1em; background: var(--screen-text); vertical-align: -.2em; animation: cur .8s steps(1) infinite; } +@keyframes cur { 50% { opacity: 0; } } + +/* ===== Responsive ===== */ +@media (max-width: 860px) { + .hero { grid-template-columns: 1fr; text-align: left; } + .monitor { max-width: 280px; } + .about-grid, .servers, .works { grid-template-columns: 1fr; } + .flow-row { grid-template-columns: 1fr; gap: 6px; } + .arrow { width: 2px; height: 16px; margin-left: 24px; } + .arrow::after { right: auto; top: auto; bottom: -2px; left: -5px; border: 6px solid transparent; border-top: 8px solid var(--case-dark); border-bottom: 0; } +} +@media (max-width: 520px) { + .site-header { padding: 10px 14px; } + .brand span { display: none; } + .nav a { padding: 6px 10px; } + .work.featured .work-media > img { aspect-ratio: 16 / 7; object-position: 30% center; } + .photo-caption { max-width: calc(100% - 140px); font-size: 12px; } +} + +@media (prefers-reduced-motion: reduce) { + html { scroll-behavior: auto; } + *, *::before, *::after { animation: none !important; transition: none !important; } +} diff --git a/wrangler.jsonc b/wrangler.jsonc new file mode 100644 index 0000000..5b43c7d --- /dev/null +++ b/wrangler.jsonc @@ -0,0 +1,13 @@ +{ + // Cloudflare Worker(純靜態檔案,不需要寫任何 Worker 程式) + // 部署:npx wrangler deploy + "name": "sahik-about", + "compatibility_date": "2026-12-01", + "assets": { + "directory": "./public", + "not_found_handling": "404-page" + }, + "routes": [ + { "pattern": "about.sahik.org", "custom_domain": true } + ] +}