個人介紹
以 QuickUI 0.6.2 製作的個人作品集頁:首頁打字效果標題與漂浮漸層圓,作品集依 ?type= 篩選並可複製連結分享。
概要
即時預覽
在新分頁開啟範例
頁面區塊
互動行為
- new QUI({ id: 'body', data, event, when }),page / type 取自網址參數(?page=portfolio&type=...)。
- event.page 不重新載入即切換 isHome 與頁籤 class,並重新啟動打字效果。
- event.dynamicInput:以 setInterval 每 8 秒刪除並重打 #typing-area,輪播 iOS工程師/網站工程師/程式設計師/Pardn Chiu。
- event.expand:800px 以下第一次點擊展開分類列,第二次點擊才導向 data-href。
- event.copy:以 QuickUI 的 String.$copy 複製圖片網址,顯示「已複製」500ms。
- event.show 對 #mobile-tab 加上 show。
相依資源
樣式
index.scss 含 reset、導覽列、行動版選單與動態漸層圓;_home 為主視覺與打字游標;_portfolio 為分類列與格線;_about 樣式 div.about,HTML 未使用。
cd target/20230220
npx sass sass/index.scss css/index.css --no-source-map || exit 1
使用技巧
- QuickUI 模板語法:{{ }}、:for、:if / :else、:class、:href、:data-*、:lazyload、:path(內嵌 SVG)、@click。
- inline <style> 主題變數:--clr-txt、--clr-grad-start / -end、--clr-main、--clr-bg、--grid-interval、--grid-radius、--grid-radio。
- 以 ::before / ::after 搭配 aspect-ratio 與無限 keyframes 製作漂浮漸層圓;backdrop-filter 模糊面板。
- Sass @for 產生 [data-target="N"] > li 選取頁籤規則;格線寬度以 calc() 搭配 var(--grid-interval)。
- 行動優先斷點 480 / 640 / 800 / 960 / 1024 / 1440px。
外部資源
https://fakeimg.pl/1024/282828/eae0d0/?text=sample
https://pardn.io/image/head.png
- https://pardn.io/web-template/image/20230320.jpg (og:image; canonical also points to /target/20230320)
- image/home.svg, image/temp1.png (relative, included in folder)
相關頁面