A simple web-based promo poster generator that lets users enter a promo code, preview the result in real time, and download a 1080x1080 PNG poster.
affiliatesgenerator is a lightweight static HTML tool designed to generate promotional poster images for affiliate or discount campaigns. Users can type a promo code, instantly preview it on the poster layout, and export the final result as a PNG image.
The project uses a custom poster canvas, scales the preview responsively, and captures the final design using html2canvas.
- Real-time promo code preview
- 1080x1080 poster output
- One-click PNG download
- Responsive preview scaling
- Tailwind CSS based UI
- SweetAlert2 notifications
- Custom promo font support (
IntegralCF) - External background image support
- HTML
- Tailwind CSS (CDN)
- JavaScript
- html2canvas
- SweetAlert2
- Font Awesome
- Enter a promo code in the input field.
- The poster preview updates automatically.
- Click Download Hasil to export the poster.
- The result is saved as a PNG file.
Since this project is a static web app, no build process is required.
Just open index.html in your browser.
You can also deploy it on any static hosting service such as:
- GitHub Pages
- Netlify
- Vercel
- Any shared hosting
Edit the input value inside index.html:
<input id="codeField" value="ALLYNC10">Update the background image URL in the script section:
const backgroundImageURL = 'https://i.imgur.com/nObbmIX.png';Make sure the image URL is public and supports CORS, otherwise html2canvas may fail during export.
The project uses a custom font loaded from:
font/integral.otf
Replace it with your own font if needed.
.
├── font/
├── images/
└── index.html
- Poster resolution is fixed at 1080x1080.
- Promo text is automatically transformed to uppercase.
- If the input is empty, the preview falls back to
KODE. - Export depends on browser support and external image accessibility.
This project is suitable for:
- Affiliate promo poster generation
- Discount code campaigns
- Social media promotional assets
- Simple internal marketing tools
Potential enhancements:
- Background image upload from local device
- Multiple templates
- Color and text position customization
- Batch poster generation
- Automatic branding presets
Built as a lightweight promo poster generator for affiliate and discount campaigns.