個人資訊
最後更新
左側固定圖示側欄的個人履歷作品集單頁,含技能條、經歷時間軸、可篩選橫向作品輪播、價目與聯絡表單。概要
預覽
在新分頁開啟範例頁面區塊
| 區塊 | 說明 |
|---|
| 左側欄導覽 | #nav 含 Logo P、7 個圖示分頁(#tab-left,依 sel 高亮)與版權;行動版由 #nav-button 開關。 |
| 開場 | 頭像、姓名 Pardn Chiu、職稱、GitHub/LinkedIn 圖示、Contact 按鈕與動態 Scroll Down 滑鼠提示,背景為 image/section-0.svg。 |
| 關於我 | 照片、自介文字、4 條百分比技能條(span[percent])與 4 個數據項目(5y、7y、+20、+40)。 |
| 服務 | 3 張卡:iOS、前端、後端開發。 |
| 經歷 | 兩欄時間軸:學歷與工作經歷(UMD你的博客、JOBALL找專家、Pardn Ltd)。 |
| 作品集 | ALL / Web / iOS 篩選分頁(tag-filter all / 1 / 2)與 #body-portfolio 橫向欄式格狀,附前後按鈕;項目由 JS 產生。 |
| 價目 | 3 張價目卡(30k / 120k / 30k)與 Contact 信箱按鈕。 |
| 客戶評價 | #body-client 橫向滑動 2 張評價卡,附前後按鈕。 |
| 聯絡 | 姓名、Email、主旨、訊息表單與 Send Message 連結(無送出邏輯)。 |
互動行為
js/index.js:#nav-button 切換 #nav 的 .show 並在 fa-bars 與 fa-chevron-left 間換圖示。- 作品集:以
"a"._({"tag-key": e.tag}, ["img"._(e.src)])._open(e.href) 產生 20 個隨機 tag-key 1 或 2 的項目;點分頁移動 .sel、設定 #body-portfolio[tag-filter] 並重置 scrollLeft,由 CSS 顯示對應項目。 - 前後按鈕翻頁
#body-portfolio 與 #body-client:下一頁將 scrollLeft 設為 (頁數 + 1) * (clientWidth + 間距),上一頁減去 clientWidth + 間距(全域 vw <= 414 時間距 16px,否則 24px)。 - 點側欄分頁將 document.body.scrollTop 設為前面
#body 子區塊高度總和;body scroll 監聽依位置設定 #tab-left sel=0..6(scroll-spy,偏移 vh/3)。 index.html 在 head 內引用 js/index.js 兩次(樣式表之後與 inline <style> 之後);檔內作品集前後按鈕的處理分別綁定在兩個區塊。
相依資源
樣式
| 項目 | 內容 |
|---|
| SCSS 入口 | sass/index.scss |
| 輸出 CSS | css/index.css |
| Partials | _nav.scss, _section-0.scss, _section-1.scss, _section-2.scss, _section-3.scss, _section-4.scss, _section-5.scss, _section-6.scss, _section-7.scss |
index.scss:reset、body 捲動容器(>=800px 左側留 8rem 給側欄)、linear-move keyframes;partials 對應 8 個區塊與 _nav(固定側欄、依 sel 高亮圖示)。_section-0 使用 ../image/section-0.svg 與 mouse-animate keyframes;_section-1 以 @for 1..100 依 [percent] 產生技能條寬度;_section-4 以 @for 1..100 產生 [tag-filter]/[tag-key] 篩選規則。色票變數(brand/fine/info/error/hint 各 9 階)位於 index.html inline <style>;各區塊標題使用 image/header.svg。- cd target/20230610
- npx sass sass/index.scss css/index.css --no-source-map || exit 1
使用技巧
- SCSS @for 迴圈產生屬性選擇器([percent="n"]::after 寬度、[tag-filter="n"] [tag-key="n"])。
- 以 content: attr(percent) "%" 顯示 HTML 屬性值。
- 以 flex-flow: column wrap 搭配 calc() 高度與 overflow hidden 做橫向分頁畫廊,藉 scrollLeft 翻頁。
- 以 max-width/opacity 過渡切換顯示實現篩選,而非 display。
- 五組 9 階 CSS 變數色票;斷點 414/480/640/800/1024px。
外部資源
相關頁面