{"id":21146616,"url":"https://github.com/thounny/day_020","last_synced_at":"2026-05-19T08:10:42.586Z","repository":{"id":258872912,"uuid":"875832177","full_name":"thounny/DAY_020","owner":"thounny","description":"Showcase Card Animation with Horizontal Parallax Scroll","archived":false,"fork":false,"pushed_at":"2024-10-20T23:45:23.000Z","size":76840,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T07:42:58.005Z","etag":null,"topics":["css","gsap","html","javascript","lenis-scroll","scrolltrigger"],"latest_commit_sha":null,"homepage":"https://thounny.github.io/DAY_020/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thounny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-20T23:42:48.000Z","updated_at":"2024-10-20T23:46:38.000Z","dependencies_parsed_at":"2024-10-21T03:38:18.730Z","dependency_job_id":null,"html_url":"https://github.com/thounny/DAY_020","commit_stats":null,"previous_names":["thounny/day_020"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thounny%2FDAY_020","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thounny%2FDAY_020/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thounny%2FDAY_020/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thounny%2FDAY_020/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thounny","download_url":"https://codeload.github.com/thounny/DAY_020/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243589345,"owners_count":20315471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","gsap","html","javascript","lenis-scroll","scrolltrigger"],"created_at":"2024-11-20T08:58:21.872Z","updated_at":"2025-12-29T08:34:34.642Z","avatar_url":"https://github.com/thounny.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DAY_020 | Showcase Card Animation with Horizontal Parallax Scroll\n\n## Project Overview\n\nThis project is part of my daily code challenge series, **DAY_020**, where I built a showcase card animation with a **horizontal parallax scroll animation**. I used **HTML**, **CSS**, **JavaScript**, **GSAP**, and **Lenis** to create smooth, interactive effects. The animation features a set of portfolio cards highlighting my client work in web design and visual arts.\n\nThe horizontal parallax scroll and animation techniques are inspired by the modern, smooth interactions seen in **Critical Danger’s** Awwwards-winning website.\n\n### Inspiration from Awwwards Element from \nCheck the site out here! [Critical Danger](https://www.criticaldanger.com/)\n\n---\n\n## Preview\n\n![DAY_020 Preview](./assets/DAY_020_1.gif)\n\n## Inspiration\n\n![Critical Danger](./assets/DAY_020_2.gif)\n\n---\n\n## Key Features\n\n- **Showcase Card Animation**: Interactive cards featuring client projects, with smooth animations and transitions.\n- **Horizontal Parallax Scroll Animation**: A scrolling experience that moves elements horizontally based on the user’s scroll position.\n- **Smooth Scrolling with Lenis**: Implemented smooth scrolling for a refined user experience.\n- **GSAP Animations**: All animations are powered by **GSAP** for high-performance interactions.\n- **Responsive Design**: Optimized for various screen sizes, ensuring a smooth experience across devices.\n\n---\n\n## GSAP in Action\n\n**GSAP (GreenSock Animation Platform)** powers the smooth transitions and animations. Below are some key snippets of the animation setup:\n\n### Horizontal Parallax Scroll Animation\n\n```javascript\ngsap.registerPlugin(ScrollTrigger);\n\ngsap.to(\".parallax-wrapper\", {\n  xPercent: -100 * (document.querySelectorAll('.parallax-item').length - 1),\n  ease: \"none\",\n  scrollTrigger: {\n    trigger: \".parallax\",\n    pin: true,\n    scrub: 1,\n    snap: 1 / (document.querySelectorAll('.parallax-item').length - 1),\n    end: \"+=3000\",\n  },\n});\n```\n\n**Explanation**:\n\n- **Horizontal Parallax**: Elements scroll horizontally based on the user’s scrolling, creating a dynamic, immersive effect.\n- **Smooth Pinning**: The `.parallax` section is pinned in place while the content moves horizontally.\n\n---\n\n### Card Animations with ScrollTrigger\n\n```javascript\nScrollTrigger.create({\n  trigger: stickySection,\n  start: \"top top\",\n  end: `+=${stickyHeight}px`,\n  pin: true,\n  pinSpacing: true,\n  onUpdate: (self) =\u003e {\n    const progress = self.progress;\n    const maxTranslate = stickyHeader.offsetWidth - window.innerWidth;\n    const translateX = -progress * maxTranslate;\n    gsap.set(stickyHeader, { x: translateX });\n  },\n});\n```\n\n**Explanation**:\n\n- **Card Movement**: Cards animate with the scroll, creating interactive and smooth effects as the user moves through the page.\n\n---\n\n## How to Run\n\n1. **Clone the repository**:\n\n   ```bash\n   git clone https://github.com/thounny/DAY_020.git\n   ```\n\n2. **Navigate to the project directory**:\n\n   ```bash\n   cd DAY_020\n   ```\n\n3. **Open the `index.html` file** in your browser, or use a local development server like **Live Server** in VSCode.\n\n---\n\n## Project Structure\n\n```bash\nDAY_020/\n├── assets/\n├── fonts/\n├── styles.css\n├── index.html\n├── script.js\n```\n\n---\n\n## Features\n\n- **Showcase Card Animation**: Interactive and engaging card animations.\n- **Horizontal Parallax Scroll**: Smooth, interactive horizontal scrolling using GSAP and ScrollTrigger.\n- **Lenis Smooth Scroll**: Enhances the user experience with smooth scrolling.\n- **GSAP Animations**: High-performance animations that work seamlessly with the scroll effects.\n- **Responsive Design**: Fully optimized for various screen sizes.\n\n---\n\n## Technologies Used\n\n- **HTML5**: For the structure and layout.\n- **CSS3**: Custom styling and responsiveness.\n- **JavaScript (ES6)**: Interactivity and animation logic.\n- **GSAP (GreenSock Animation Platform)**: Powers the animations and parallax effects.\n- **Lenis**: Adds smooth scrolling behavior.\n\n---\n\n## Author\n\n![Logo](./assets/index_dwn.gif)\n\n**Thounny Keo**  \nCreative Developer \u0026 Designer  \nFrontend Development Student | Year Up United\n\n---\n\n![miku](./assets/miku.gif)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthounny%2Fday_020","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthounny%2Fday_020","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthounny%2Fday_020/lists"}