
How I Built a Complete Teachable Landing Page in 60-Minutes with AI (A Case Study)
How I Built a Complete Teachable Landing Page in 1 Hour with AI (A Case Study)
Waiting for a car repair
Most of us have been there, idly sitting with nothing to do but wait for the mechanic to finish repairing your car wondering how much it’s going to cost. I have a BMW. A lovely white 2013 X1 xDrive 20d, but please don’t hold that against me! I drove a skedonk of a car for a decade before I decided to just get that car I fell in love with in a parking lot one day.
Anyway, back to the mechanic. I’m sitting with my laptop in the waiting room at the BWM service centre and I have two hours of waiting but didn’t want to leave it to waste. Usually, I check emails, look at Xero, balance my books, but I knew I had a landing page I wanted to get started and thought, sure why not — so I grabbed a free coffee from the kitchen and sat down to write some HTML code in Teachable. Then I had a thought… “could I build a complete, professional, A-to-Z sales page—the kind that usually takes me the full day—in just the few hours that I have sitting here?”
I had one key difference: I would use an AI as my development partner.
The problem was that AI can sometimes get confused and if you don’t feed it the correct information right from the start you’ll get all sorts of unhelpful responses.
For example, “Gemini, write me a sales page for my online course about baking soda bread.”
This results in the following except:
Of course. Here is a draft for your sales page, incorporating elements of your unique background to build authenticity and connection.
[Headline] From Rock-Hard Bricks to Rustic Perfection: Master Authentic Soda Bread in Under an Hour Tired of dense, crumbly soda bread that tastes more like baking soda than bliss? Do you dream of pulling a warm, crusty loaf from your own oven, with a soft, fluffy inside, ready to be slathered in butter?
You don’t need to be a master baker. You don’t need fancy equipment. And you certainly don’t need to waste another batch of ingredients.
Clearly, this isn’t our intended purpose, but it is the copy we’d need to get started with the code we’d want to get from the AI model.
But, adding a further prompt: ‘oh sorry, I mean an HTML page for this idea. Maybe just start with a hero-header?
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>The Simple Soda Bread Method</title> <style> /* --- Basic Resets & Font --- */ body, html { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; }
/* --- Hero Section Styles --- */ .hero-header { /* Hero Background: - Replace 'soda-bread-background.jpg' with a URL to your own high-quality image. - I've added a semi-transparent overlay to make the text more readable. */ background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1594498762137-92015243f7a2?q=80&w=2070') no-repeat center center/cover; color: #ffffff; text-align: center; padding: 100px 20px; display: flex; justify-content: center; align-items: center; flex-direction: column; min-height: 60vh; /* Ensures the hero section takes a good portion of the screen height */ }
.hero-header .container { max-width: 800px; }
.hero-header h1 { font-size: 3rem; /* Responsive font size */ margin-bottom: 0.5em; font-weight: 700; line-height: 1.2; }
.hero-header p { font-size: 1.25rem; margin-bottom: 1.5em; font-weight: 300; }
/* --- Call to Action (CTA) Button --- */ .cta-button { display: inline-block; background-color: #d46a2a; /* A warm, rustic orange */ color: #ffffff; padding: 15px 35px; font-size: 1.1rem; font-weight: 600; text-decoration: none; border-radius: 5px; transition: background-color 0.3s ease, transform 0.3s ease; }
.cta-button:hover { background-color: #b3521b; transform: translateY(-2px); /* Slight lift on hover */ }
/* --- Media query for smaller screens --- */ @media (max-width: 768px) { .hero-header h1 { font-size: 2.5rem; } .hero-header p { font-size: 1.1rem; } } </style></head><body>
<header class="hero-header"> <div class="container"> <h1>From Rock-Hard Bricks to Rustic Perfection</h1> <p>Tired of dense, crumbly soda bread? Master the simple, authentic method and bake a perfect, crusty loaf in under an hour. Guaranteed.</p> <a href="#pricing" class="cta-button">Bake Your First Loaf Today</a> </div> </header>
</body></html>
The problem with this code, although it will work if pasted inside a Teachable HTML block, is that it has superfluous code that we don’t need.
It normally takes me about a day to write the code for a full landing page.
So, to get our AI model to understand our needs, we need to feed it some prompts on what Teachable needs for it’s HTML block so we don’t get more than we really need.
All we need is
<style> /* --- Basic Resets & Font --- */ body, html { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; }
/* --- Hero Section Styles --- */ .hero-header { /* Hero Background: - Replace 'soda-bread-background.jpg' with a URL to your own high-quality image. - I've added a semi-transparent overlay to make the text more readable. */ background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1594498762137-92015243f7a2?q=80&w=2070') no-repeat center center/cover; color: #ffffff; text-align: center; padding: 100px 20px; display: flex; justify-content: center; align-items: center; flex-direction: column; min-height: 60vh; /* Ensures the hero section takes a good portion of the screen height */ }
.hero-header .container { max-width: 800px; }
.hero-header h1 { font-size: 3rem; /* Responsive font size */ margin-bottom: 0.5em; font-weight: 700; line-height: 1.2; }
.hero-header p { font-size: 1.25rem; margin-bottom: 1.5em; font-weight: 300; }
/* --- Call to Action (CTA) Button --- */ .cta-button { display: inline-block; background-color: #d46a2a; /* A warm, rustic orange */ color: #ffffff; padding: 15px 35px; font-size: 1.1rem; font-weight: 600; text-decoration: none; border-radius: 5px; transition: background-color 0.3s ease, transform 0.3s ease; }
.cta-button:hover { background-color: #b3521b; transform: translateY(-2px); /* Slight lift on hover */ }
/* --- Media query for smaller screens --- */ @media (max-width: 768px) { .hero-header h1 { font-size: 2.5rem; } .hero-header p { font-size: 1.1rem; } } </style> <section class="hero-header"> <div class="container"> <h1>From Rock-Hard Bricks to Rustic Perfection</h1> <p>Tired of dense, crumbly soda bread? Master the simple, authentic method and bake a perfect, crusty loaf in under an hour. Guaranteed.</p> <a href="#pricing" class="cta-button">Bake Your First Loaf Today</a> </div> </section>
This is better but the layout is wrong because Teachable is also providing CSS which is conflicting with the code provided by Gemini.
“Hey Gemini, this is a good start, but the Teachable .container class is conflicting with the .container we are using”.
This gives us this code which we’ll show the result below the code block.
<style> /* --- Hero Section Styles --- */ .hero-header { /* Hero Background */ background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1594498762137-92015243f7a2?q=80&w=2070') no-repeat center center/cover; color: #ffffff; text-align: center; padding: 100px 20px; display: flex; justify-content: center; align-items: center; flex-direction: column; min-height: 60vh; }
/* RENAMED this class to avoid conflicts with Teachable */ .hero-header .hero-container { max-width: 800px; }
.hero-header h1 { font-size: 3rem; margin-bottom: 0.5em; font-weight: 700; line-height: 1.2; }
.hero-header p { font-size: 1.25rem; margin-bottom: 1.5em; font-weight: 300; }
/* --- Call to Action (CTA) Button --- */ .cta-button { display: inline-block; background-color: #d46a2a; color: #ffffff; padding: 15px 35px; font-size: 1.1rem; font-weight: 600; text-decoration: none; border-radius: 5px; transition: background-color 0.3s ease, transform 0.3s ease; }
.cta-button:hover { background-color: #b3521b; transform: translateY(-2px); }
/* --- Media query for smaller screens --- */ @media (max-width: 768px) { .hero-header h1 { font-size: 2.5rem; } .hero-header p { font-size: 1.1rem; } }</style>
<section class="hero-header"> <div class="hero-container"> <h1>From Rock-Hard Bricks to Rustic Perfection</h1> <p>Tired of dense, crumbly soda bread? Master the simple, authentic method and bake a perfect, crusty loaf in under an hour. Guaranteed.</p> <a href="#pricing" class="cta-button">Bake Your First Loaf Today</a> </div></section>
Much better, but you notice we have a gray background, this is because the image link Gemini is providing us in the code is not working.
Let’s ask Gemini to use lorem.picsum website. This is a great site for quickly using images during the development phase.
“Can you use https://lorem.picsum instead of Unsplash since the Unsplash images are not working.”
And, voilà! Our Hero header in all it’s glory after the code block:
<style> /* --- Hero Section Styles --- */ .hero-header { /* Hero Background: - Now using a random placeholder image from lorem.picsum. - A semi-transparent overlay is added to make the text more readable. */ background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://picsum.photos/1920/1080') no-repeat center center/cover; color: #ffffff; text-align: center; padding: 100px 20px; display: flex; justify-content: center; align-items: center; flex-direction: column; min-height: 60vh; }
/* RENAMED this class to avoid conflicts with Teachable */ .hero-header .hero-container { max-width: 800px; }
.hero-header h1 { font-size: 3rem; margin-bottom: 0.5em; font-weight: 700; line-height: 1.2; }
.hero-header p { font-size: 1.25rem; margin-bottom: 1.5em; font-weight: 300; }
/* --- Call to Action (CTA) Button --- */ .cta-button { display: inline-block; background-color: #d46a2a; color: #ffffff; padding: 15px 35px; font-size: 1.1rem; font-weight: 600; text-decoration: none; border-radius: 5px; transition: background-color 0.3s ease, transform 0.3s ease; }
.cta-button:hover { background-color: #b3521b; transform: translateY(-2px); }
/* --- Media query for smaller screens --- */ @media (max-width: 768px) { .hero-header h1 { font-size: 2.5rem; } .hero-header p { font-size: 1.1rem; } }</style>
<section class="hero-header"> <div class="hero-container"> <h1>From Rock-Hard Bricks to Rustic Perfection</h1> <p>Tired of dense, crumbly soda bread? Master the simple, authentic method and bake a perfect, crusty loaf in under an hour. Guaranteed.</p> <a href="#pricing" class="cta-button">Bake Your First Loaf Today</a> </div></section>
There are other changes I would make to this. Certainly, let’s increase the font size. Teachable has a base html font-size of 10px and the code we’re using from Gemini is using ‘rem’. Without providing a CSS lesson, rems are a multiple of the base html font-size. So, .hero-header h1
is 3rem x 10px or 30px. This is far too small for a hero-header. Typical body or html font-size would be 16px or 18px, meaning our H1 font size would be 3rem x 18 = 54px. So, let’s just set that manually and see how the hero-header looks.
html { font-size: 18px;}
It’s a case of asking Gemini to do what you think needs to be done and then refining the results until you get what you need. Unfortunately, without the vocabulary, it may be incredibly frustrating for a non-developer to construct the correct prompts to properly guide Gemini to provide HTML code that works.
This is where my new course comes in. It’s still in the planning and development process, but if you’re interested feel free to sign-up to the waiting list over at https://ai.purplehippo.io.