Complete documentation · Version 1.0.0 · HTML5 / CSS3 / Vanilla JavaScript
NatureFit is a conversion-focused landing page template for a natural weight-loss / health supplement offer. You can use it as a normal product landing page, or as a bridge page for a CPA / affiliate offer.
What makes it different from a plain HTML template:
s1= sub-ID tracking per button.index.html
(images embedded, works offline) or template.html +
images/ folder for classic editing.| Item | Requirement |
|---|---|
| Server side | None. Any static hosting works (shared hosting, Netlify, Vercel, Cloudflare Pages, GitHub Pages, S3, a plain folder). |
| PHP / database | Not required. |
| Browser | Chrome, Edge, Firefox, Safari, Opera - current and previous major versions. Also works on iOS Safari and Android Chrome. |
| Internet | Only needed for the Google Fonts (Poppins, Open Sans) and for images if you use template.html with the separate images/ folder. |
| Editor | Any text editor (VS Code, Sublime, Notepad++, even Notepad). |
| Optional | Python 3 + Pillow - only if you want to rebuild the single-file version with build.py. |
NatureFit/
├── index.html <- MAIN FILE. Self-contained page, images embedded.
├── template.html <- Same page, but loads images from /images folder.
├── images/ <- All 7 JPG images used by template.html
│ ├── hero-bg.jpg
│ ├── bottle.jpg
│ ├── model.jpg
│ ├── food.jpg
│ ├── avatar1.jpg
│ ├── avatar2.jpg
│ └── avatar3.jpg
├── build.py <- Optional: rebuild index.html after changing images
├── documentation.html <- This file
├── licences.txt <- License terms (Regular / Extended)
├── changelog.txt <- Version history
└── README.txt <- One-page quick start
| Your situation | Use |
|---|---|
| Just changing texts, links, prices, colours | index.html (or template.html + rebuild) |
| Replacing images | images/ + run build.py, or replace the base64 strings in index.html |
| Uploading to a host where you prefer separate files | template.html renamed to index.html, uploaded together with images/ |
index.html and template.html contain
the same content. If you edit one, remember that the other one is not updated. Pick one
as your working file and stick to it.
index.html. It opens in your browser with all images.public_html folder (or the site root).index.html - that is all you need for the single-file version.template.html to index.html.images/ folder, keeping the folder name
exactly images (lowercase).images/ instead of the embedded copies.
Open index.html and search for GLOBAL CONFIGURATION
(Ctrl+F). Everything below lives in that
single object:
const CONFIG = {
affiliateUrl : '', // your CPA / offer URL
buyMode : 'modal', // 'modal' | 'direct' | 'after-form'
subIdParam : 's1', // tracking parameter name
trackSubIds : true, // append ?s1=pkg3-hero
openInNewTab : true, // open the offer in a new tab
countdownMs : 86399000, // offer timer length (23h 59m 59s)
countdownKey : 'naturefit_offer_deadline',
toastsEnabled: true, // "someone just ordered" pop-ups
toastDelay : 16000, // ms between pop-ups
version : '1.0.0'
};
| Setting | What it does |
|---|---|
affiliateUrl | Your offer link. Empty '' keeps the built-in demo checkout. |
buyMode | 'modal' = demo checkout opens; 'direct' = the visitor goes straight to the offer; 'after-form' = demo checkout first, then redirect. |
subIdParam | Name of the tracking parameter your network uses: s1, sub1, aff_sub, clickid, etc. |
trackSubIds | When on, every button sends its own sub-ID (e.g. pkg3-hero) so you can see which button converts. |
openInNewTab | true keeps your landing page open in the original tab. |
countdownMs | How long the offer countdown runs. Default 86,399,000 ms = 23:59:59. |
countdownKey | The localStorage key that remembers the deadline per visitor. Change it if you want every visitor to get a fresh timer. |
toastsEnabled / toastDelay | Turns the social-proof notifications on/off and sets the interval. |
This is the most common use case, so it is deliberately a one-line change. Paste your
offer URL into affiliateUrl and choose a buyMode.
The visitor clicks any Buy Now button and lands directly on your offer page in a new tab.
const CONFIG = {
affiliateUrl : 'https://your-network.com/click?offer=123&aff=456',
buyMode : 'direct',
subIdParam : 's1',
trackSubIds : true,
openInNewTab : true,
/* ...rest unchanged... */
};
Result for a click on the pricing card of the 3-bottle package:
https://your-network.com/click?offer=123&aff=456&s1=pkg3-offer
The demo checkout opens, the visitor fills in name / email / phone, and after the success message appears they are forwarded to the offer after 1.5 seconds.
buyMode : 'after-form',
Keeps the built-in demo checkout. Use it to present the design to a client, or when you want to plug in your own checkout / payment link later.
If you want the checkout form to send leads somewhere (your CRM, Zapier, Make, a Google Sheet, or your own PHP script), find the submit handler and replace the demo success block with your own call:
orderForm.addEventListener('submit', (e) => {
e.preventDefault();
/* ...validation stays as it is... */
// ---- send the data ----
fetch('https://your-endpoint.com/lead', {
method : 'POST',
headers: { 'Content-Type': 'application/json' },
body : JSON.stringify({
name : $('#fName').value,
email : $('#fEmail').value,
phone : $('#fPhone').value,
zip : $('#fZip').value,
addr : $('#fAddr').value,
pkg : selectedPkg
})
});
orderForm.classList.add('hide');
successState.classList.add('show');
});
| Button | Generated sub-ID |
|---|---|
| Header "Buy Now" | pkg3-header |
| Hero "Buy Now - from $39" | pkg3-home |
| About / offer box button | pkg3-about |
| Benefits section button | pkg3-benefits |
| Pricing cards (1 / 3 / 6 bottles) | pkg1-offer, pkg3-offer, pkg6-offer |
| Final CTA | pkg6-cta |
| Sticky bottom bar | pkg3-* (uses the selected package) |
| Checkout form (after-form mode) | pkg*-checkout |
You can override any of them by adding data-position="my-label" to the button:
<button class="btn" data-buy data-package="3" data-position="facebook-ad">Buy Now</button>
fb.html, tt.html, native.html) and give each copy
a different data-position. Your network statistics will then show exactly
which traffic source converts.
Use find & replace (Ctrl+H) to replace
NatureFit and naturefit with your own brand. Occurrences:
<title> and meta description in the <head>countdownKey in CONFIG (change it, otherwise old visitors keep their old timer)support@naturefit.exampleThe logo is text based, so there is nothing to upload:
<a class="logo" href="#home">
<span class="logo-mark"><svg ...></svg></span>
<span class="logo-text">nature<b>FIT</b></span>
</a>
Edit logo-text to your brand, or drop an image inside the
logo-mark span:
<span class="logo-mark"><img src="images/my-logo.svg" alt="My Brand" style="width:100%"></span>
The page uses an inline SVG emoji favicon. To use your own, add this line inside
<head>:
<link rel="icon" href="images/favicon.png" sizes="32x32">
There are two routes. Pick the one that matches the file you are editing.
images/, keeping the same file names
(hero-bg.jpg, bottle.jpg, model.jpg,
food.jpg, avatar1.jpg, avatar2.jpg,
avatar3.jpg).
index.html has the images embedded as base64 data URIs, so the page works
even without the images/ folder. To change them, either
Using build.py (needs Python 3 and Pillow: pip install pillow):
cd NatureFit
python3 build.py
The script takes everything in images/, resizes and compresses it, embeds it
into template.html and writes a fresh index.html. It prints the
size of every image and the final file size.
Not using build.py? Replace the long data:image/jpeg;base64,...
string in the src attribute with a normal path:
<img src="images/bottle.jpg" alt="NatureFit bottle">
| Image | Used for | Recommended size |
|---|---|---|
hero-bg.jpg | Hero + final CTA background | 1600 × 900 px, under 250 KB |
bottle.jpg | Product shot (hero, sticky bar) | 900 × 600 px, under 120 KB |
model.jpg | "What is NatureFit" section | 640 × 960 px (portrait), under 120 KB |
food.jpg | "Burn fat & stay healthy" section | 860 × 600 px, under 150 KB |
avatar1-3.jpg | Testimonial authors | 320 × 320 px (square), under 30 KB each |
All copy is normal HTML. Open the file, press Ctrl+F and search for the sentence you want to change.
| What you want to change | Search for |
|---|---|
| Hero headline | Natural / weight loss (inside an <h1>) |
| Hero subtitle + bullet points | Burn stubborn fat |
| Top urgency bar text | LIMITED TIME |
| Trust strip (4 icons under the hero) | 100% Natural |
| "What is NatureFit" section | What is |
| Feature blocks (dark green section) | Burn fat / feature-card |
| How it works steps | step-card |
| Animated statistics | data-counter |
| Pricing cards | class="price-card" |
| Testimonials | class="slide" |
| Guarantee band | 60-Day |
| FAQ questions and answers | class="faq-item" |
| Footer disclaimer | disclaimer |
| Social-proof toast names / cities | const purchases |
<div class="faq-item">
<button class="faq-q">How fast will I see results?</button>
<div class="faq-a"><p>Most customers notice a difference within 2-4 weeks...</p></div>
</div>
Add or remove faq-item blocks freely - the accordion re-binds automatically.
Copy one .slide block inside the slider and change the text, the name and
the avatar. The dots and arrows are generated from the number of slides.
Prices live in two places and must match: the HTML (pricing cards) and the JavaScript (checkout summary).
<div class="price-card">
<div class="pc-name">STARTER</div>
<div class="pc-sub">1 Bottle - 30 Day Supply</div>
<div class="pc-price">$49</div>
<div class="pc-old">$98</div>
<div class="pc-save">SAVE $49 (50% OFF)</div>
<button class="btn btn-dark btn-block" data-buy data-package="1">Buy Now</button>
</div>
const PACKAGES = {
'1': { name: '1 Bottle', price: 49, disc: 49 },
'3': { name: '3 Bottles', price: 119, disc: 175 },
'6': { name: '6 Bottles', price: 179, disc: 409 }
};
price is what the customer pays, disc is the amount shown as
"-$175" in the checkout summary. Keep the data-package attribute on the
button in sync with the key in this object.
'12') to
PACKAGES, copy a .price-card, change its
data-package="12", and add a matching option in the checkout modal:
<label class="pkg-opt" data-pkg="12">...</label>.
| # | Section | Anchor | Purpose |
|---|---|---|---|
| 1 | Urgency bar | - | Discount + live countdown, always on top |
| 2 | Header / nav | #siteHeader | Logo, menu, cart counter, Buy Now; becomes sticky on scroll |
| 3 | Hero | #home | Headline, product image, countdown, rating, main CTA |
| 4 | Trust strip | - | Four trust icons (natural, shipping, guarantee, secure) |
| 5 | What is it | #about | Explanation + offer box with price and CTA |
| 6 | Features | #benefits | Dark green block with 4 feature cards |
| 7 | How it works | #how | 3 step cards |
| 8 | Statistics | #stats | Animated counters |
| 9 | Pricing | #offer | 3 packages with Buy Now buttons |
| 10 | Testimonials | #reviews | Slider with arrows, dots and autoplay |
| 11 | Guarantee | - | 60-day money-back band |
| 12 | FAQ | #faq | Accordion |
| 13 | Final CTA | #cta | Closing call to action over the hero image |
| 14 | Footer | - | Links, e-mail, disclaimer, copyright |
| 15 | Sticky buy bar | #stickyBar | Appears on scroll, keeps the offer one click away |
| 16 | Checkout modal | #orderModal | Package selection + form + success state |
| 17 | Toasts | #toast | Social-proof notifications |
To remove a section, delete it from the opening tag to the matching closing tag, and remove its link from the navigation menu.
All colours are CSS variables at the top of the <style> block:
:root{
--lime : #8cc63f; /* primary accent / buttons */
--green-deep : #37804f; /* headings, dark accents */
--green-head : #79b82e; /* gradient headlines */
--dark : #16281d; /* dark section background */
--ink : #25342b; /* body text */
}
Change one value and the whole page follows. Fonts are set here:
--font-head: 'Poppins', system-ui, sans-serif;
--font-body: 'Open Sans', system-ui, sans-serif;
To swap the fonts, replace the Google Fonts link in <head> and update
these two variables.
Ocean / tech
--lime:#22b8cf; --green-deep:#1864ab; --dark:#0b2545
Warm / beauty
--lime:#e5989b; --green-deep:#b56576; --dark:#3d2c2e
public_html.index.html (and images/ if you use template.html).NatureFit folder onto the page.
Same idea: the project is a static site, so no build command is needed. Build command:
empty. Output directory: the folder containing index.html.
Upload index.html through FTP to your host and open it directly, or paste
the markup into a full-width page template. For CPA traffic a plain static page is
faster and safer than going through WordPress.
toastsEnabled) if you cannot prove them.<head>.| Problem | Cause / fix |
|---|---|
| Images do not show in template.html | The images folder is missing, renamed or in the wrong place. It must sit next to the HTML file and keep the lowercase name. |
| Buy Now opens nothing | affiliateUrl is empty and buyMode is set to 'direct' or 'after-form'. Use 'modal' or fill in the URL. |
| Popup blocked in the browser | Browsers block window.open when it is not triggered by a direct click. Keep the default click handler, and test without an ad blocker. |
| Countdown restarts every visit | The browser blocks localStorage (private mode, strict cookie settings). This is expected; the timer simply restarts. |
| Fonts look different | Google Fonts did not load (offline or blocked). The page falls back to system fonts; self-host Poppins/Open Sans if the network is restricted. |
| Page looks broken after editing | A tag was most likely deleted. Restore the original file from a backup and re-apply your change. |
| Checkout form does not submit | All five fields are required and the e-mail must be valid; invalid fields show a red border. |
| index.html is very large | It contains the embedded images (about 1 MB). That is normal. Use template.html + images/ if you prefer a small HTML file. |
For installation questions or bugs in the unmodified code, use the support / contact tab on the item page and include your item version, browser and a screenshot or console error. Customisation and third-party services are outside the support scope. Please allow up to two business days for a reply.
Bug fixes and small improvements are published as new versions and are free for
existing buyers through the download button on the item page. See
changelog.txt.
This item is sold under the Codester Regular or Extended License. Full terms, the list of
included assets and the demo-content disclaimer are in licences.txt.
Short version: use it in one project (Regular) or unlimited projects (Extended), modify
it as much as you like, never resell or redistribute the template itself.