A beautiful scrollytelling experience showcasing Cloudinary's image transformations with D3.js animations and Tailwind CSS.
The little Cloudicorn is generated by ChatGPT and will soon be replaced by an artist's render!
- 🌟 Interactive scrollytelling with D3.js starfield animations
- 🎨 Cloudinary image transformations (background removal, artistic effects, generative AI)
- 🎯 Smooth scroll-triggered image transitions
- 📱 Responsive design with Tailwind CSS
- ⚡ Optimized for performance
-
Install dependencies:
npm install
-
Start development server:
npm run dev
-
Build for production:
npm run build
- Push your code to GitHub/GitLab/Bitbucket
- Go to netlify.com and sign up/login
- Click "New site from Git"
- Connect your repository
- Configure build settings:
- Build command:
npm run build - Publish directory:
.
- Build command:
- Click "Deploy site"
-
Install Netlify CLI:
npm install -g netlify-cli
-
Login to Netlify:
netlify login
-
Initialize and deploy:
netlify init netlify deploy --prod
- Run
npm run buildlocally - Go to netlify.com
- Drag your project folder to the deploy area
scroll-d3/
├── index.html # Main HTML file
├── main.js # D3.js and scroll logic
├── style.css # Tailwind CSS input
├── dist/output.css # Compiled CSS (generated)
├── netlify.toml # Netlify configuration
├── package.json # Dependencies and scripts
└── README.md # This file
This demo showcases various Cloudinary transformations:
- Background Removal:
e_background_removal - Generative Recolor:
e_gen_recolor:prompt_goggles;to-color_red - Artistic Effects:
e_art:aurora - Opacity Control:
o_30 - Generative Background Replace:
e_gen_background_replace - Pixelation:
e_pixelate:20
- D3.js - Data visualization and animations
- Tailwind CSS - Utility-first CSS framework
- Cloudinary - Image transformations and optimization
- Intersection Observer API - Scroll detection
- Netlify - Hosting and deployment
There's a simple quiz at the bottom if you want to use this form to award prizes. If the user gets 100% they can show the booth worker and get a prize. Add ?quiz=true to the URL to show the quiz.
When the quiz URL parameter is present (?quiz=true), users are now presented with a choice:
- 🧦 Take Quiz & Win Socks! - Shows the Cloudinary transformation quiz
- 🦄 Get Unicorn Magic! - Shows a Marketo embed form
When the quiz URL parameter is present (?quiz=true), users now see a tabbed interface:
- 🧦 Quiz & Socks Tab - Shows the Cloudinary transformation quiz
- 🦄 Unicorn Magic Tab - Shows a Marketo embed form
Users can easily switch between tabs to explore both options, and the quiz tab is selected by default.
To add your Marketo embed code:
- Find the Marketo container in
index.html(around line 380) - Replace the placeholder content with your Marketo embed code:
<!-- Marketo Form Placeholder -->
<div class="bg-gray-800/30 rounded-lg p-8 border border-gray-700">
<!-- Replace this div with your Marketo embed code -->
<script src="//app-sj20.marketo.com/js/forms2/js/forms2.min.js"></script>
<form id="mktoForm_1234"></form>
<script>MktoForms2.loadForm("//app-sj20.marketo.com", "123-ABC-456", 1234);</script>
</div>- Choice Interface: Users can choose between quiz or Marketo form
- Back Navigation: Back buttons allow users to return to the choice interface
- Smooth Transitions: CSS animations for a polished user experience
- Responsive Design: Works on both desktop and mobile devices
MIT License - feel free to use this template for your own projects!