Restaurant Introduction (2022-05-25)
Last updated 2026-10-30
Four-page restaurant / franchise brand site (About, News, Products, Stores) with scroll-aware nav, canvas-drawn curved hero and in-view store animations. Overview Item Value Created 2022-05-25 Category Business Examples HTML files index.html, news.html, products.html, store.htmlSource target/20220525
Preview Open the example in a new tab Page Sections Section Description Nav (all pages) #nav with list toggle button, 4 page tabs (品牌介紹 / 最新消息 / 餐點介紹 / 門市據點 linking to the 4 HTML files), and right-side 加盟專區 / 聯絡我們 / Facebook icons.Page hero (all pages) #body with a cover image and a <canvas> that paints a white curved shape around the centered #page-title (ABOUT US / LATEST NEWS / PRODUCTS / STORES).index.html contentPlaceholder block 自訂內容 (此範例沒此頁設計). news.html listCategory nav (全部消息 / 媒體報導 / 新品上市 / 新店快訊) and dated news items with tag, text and image. products.html gridCategory nav (類別1-5) and product figures with description and price (35 / 份). store.html listStore search (city / district selects, keyword, 搜尋門市) and numbered store cards (phone, hours, address, 訂餐 / 菜單 / 地圖 buttons) alternating image left / right. Footer (all pages) Store search form, logo image with franchise hotline tel: link, copyright row.
Interactions js/PDWebsitemplate.js window.onscroll: sets #nav class toppest when pageYOffset >= 64, switches to float when scrolled back above that.setLeftBg() on load / resize: sizes the hero canvas and draws a quadraticCurveTo bump around the width of #page-title.#nav-show-button toggles the left tab list show / hide (500ms) and swaps the icon between fa-list and fa-arrow-left.IntersectionObserver sets class inview on [animation='1'] store cards to trigger stores-index-show-left / stores-index-show-right keyframes. Dependencies Styling Item Value SCSS entry sass/PDWebsiteImitationCss.scssOutput CSS css/PDWebsiteImitationCss.cssPartials _nav.scss, _body.scss, _component.scss (imported inside _body), _bottom.scss
_nav styles the #nav states (toppest / float) and the left list show / hide with keyframes; _body the hero and canvas; _component the news / product / stores lists and in-view animations; _bottom the footer.cd target/20220525 npx sass sass/PDWebsiteImitationCss.scss css/PDWebsiteImitationCss.css --no-source-map || exit 1 Techniques Canvas 2D path (quadraticCurveTo) recomputed on resize for a curved header edge. IntersectionObserver scroll-reveal with alternating left / right keyframes. Desktop-first max-width breakpoints 359 / 413 / 479 / 539 / 639 / 799 / 1023px. Multi-page static site sharing one stylesheet and script with relative ./*.html links. External Assets https://fakeimg.pl/1024/282828/eae0d0/?text=samplehttps://pardn.io/image/head.pnghttps://demo-web.pardn.io/image/20220525.jpg