Kopieren Sie diesen Prompt in unsere Entwickler-Konsole, um ihn selbst auszuprobieren!

Inhalt
SystemIhre Aufgabe ist es, eine einseitige Website basierend auf den gegebenen Spezifikationen zu erstellen, die als HTML-Datei mit eingebettetem JavaScript und CSS geliefert wird. Die Website sollte eine Vielzahl ansprechender und interaktiver Designfunktionen enthalten, wie Dropdown-Menüs, dynamischen Text und Inhalt, anklickbare Schaltflächen und mehr. Stellen Sie sicher, dass das Design visuell ansprechend, responsiv und benutzerfreundlich ist. Der HTML-, CSS- und JavaScript-Code sollte gut strukturiert, effizient organisiert und für Lesbarkeit und Wartbarkeit ordnungsgemäß kommentiert sein.
UserErstellen Sie eine einseitige Website für eine Online-Lernplattform namens “EduQuest” mit den folgenden Funktionen und Abschnitten:

1. Eine fixierte Navigationsleiste mit Links zu Kurskategorien (Mathematik, Naturwissenschaften, Sprachen, Kunst) und einer Suchleiste.
2. Ein Hero-Bereich mit einem Videohintergrund, der Studenten beim Online-Lernen zeigt, einem dynamischen Slogan, der alle 3 Sekunden zwischen “Lernen Sie in Ihrem eigenen Tempo”, “Entdecken Sie neue Leidenschaften” und “Erweitern Sie Ihren Horizont” wechselt, und einer “Jetzt starten”-Schaltfläche, die zu einem Kurskatalog führt.
3. Ein Bereich mit vorgestellten Kursen, der Kurskarten mit Platzhaltern für Kursbilder, Titel, Dozenten und Beschreibungen anzeigt.
4. Ein interaktiver “Lernpfade”-Bereich mit einem kurzen Quiz zur Bestimmung von Lernstilen und Interessen sowie einer Schaltfläche zum Starten des Quiz.
5. Ein “Erfolgsgeschichten”-Bereich mit Testimonials von zufriedenen Studenten, mit Platzhaltern für den Testimonial-Text und die Namen der Studenten.
6. Eine Fußzeile mit Links zum Blog der Plattform, FAQ, Datenschutzrichtlinie und einer “Kontaktieren Sie uns”-Schaltfläche, die ein modales Fenster mit einem Kontaktformular und Kundendienstinformationen öffnet.

Fügen Sie Fülltext als Platzhalter für den Videohintergrund, Kurskarten und Testimonials ein. Betten Sie die CSS-Stile innerhalb des <style>-Tags im <head>-Abschnitt ein und platzieren Sie den JavaScript-Code innerhalb des <script>-Tags am Ende des <body>-Abschnitts.

Der JavaScript-Code sollte den dynamischen Slogan im Hero-Bereich verwalten und alle 3 Sekunden zwischen den verschiedenen Slogans wechseln.

Beispielausgabe

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>EduQuest - Online Learning Platform</title>
    <style>
        /* CSS Styles */
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
        }

        header {
            background-color: #333;
            color: #fff;
            padding: 20px;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 999;
        }

        nav ul {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: space-between;
        }

        nav ul li a {
            color: #fff;
            text-decoration: none;
            padding: 10px;
        }

        .hero {
            height: 100vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .hero video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: -1;
        }

        .hero h1 {
            font-size: 48px;
            margin-bottom: 20px;
        }

        .hero p {
            font-size: 24px;
            margin-bottom: 40px;
        }

        .hero button {
            padding: 10px 20px;
            font-size: 18px;
            background-color: #333;
            color: #fff;
            border: none;
            cursor: pointer;
        }

        .featured-courses, .success-stories {
            padding: 40px;
        }

        .course-card {
            background-color: #f5f5f5;
            padding: 20px;
            margin-bottom: 20px;
        }

        .testimonial {
            background-color: #f5f5f5;
            padding: 20px;
            margin-bottom: 20px;
        }

        footer {
            background-color: #333;
            color: #fff;
            padding: 20px;
            text-align: center;
        }

        footer a {
            color: #fff;
            text-decoration: none;
            margin: 0 10px;
        }

        footer button {
            padding: 10px 20px;
            font-size: 18px;
            background-color: #fff;
            color: #333;
            border: none;
            cursor: pointer;
            margin-top: 20px;
        }
    </style>
</head>
<body>
    <header>
        <nav>
            <ul>
                <li><a href="#">Math</a></li>
                <li><a href="#">Science</a></li>
                <li><a href="#">Languages</a></li>
                <li><a href="#">Arts</a></li>
                <li><input type="text" placeholder="Search"></li>
            </ul>
        </nav>
    </header>

    <section class="hero">
        <video src="placeholder-video.mp4" autoplay loop muted></video>
        <h1>Welcome to EduQuest</h1>
        <p id="tagline">Learn at your own pace</p>
        <button>Get Started</button>
    </section>

    <section class="featured-courses">
        <h2>Featured Courses</h2>
        <div class="course-card">
            <img src="placeholder-course-image.jpg" alt="Course Image">
            <h3>Course Title</h3>
            <p>Instructor: John Doe</p>
            <p>Course description goes here.</p>
        </div>
        <div class="course-card">
            <img src="placeholder-course-image.jpg" alt="Course Image">
            <h3>Course Title</h3>
            <p>Instructor: Jane Smith</p>
            <p>Course description goes here.</p>
        </div>
    </section>

    <section class="success-stories">
        <h2>Success Stories</h2>
        <div class="testimonial">
            <p>"EduQuest helped me learn a new skill and advance my career. Highly recommended!"</p>
            <p>- John Doe</p>
        </div>
        <div class="testimonial">
            <p>"I never thought I could learn a new language online, but EduQuest made it possible. Thank you!"</p>
            <p>- Jane Smith</p>
        </div>
    </section>

    <footer>
        <a href="#">Blog</a>
        <a href="#">FAQ</a>
        <a href="#">Privacy Policy</a>
        <button>Contact Us</button>
    </footer>

    <script>
        // JavaScript Code
        const taglines = [
            "Learn at your own pace",
            "Discover new passions",
            "Expand your horizons"
        ];

        let index = 0;
        const taglineElement = document.getElementById("tagline");

        function rotateTagline() {
            taglineElement.textContent = taglines[index];
            index = (index + 1) % taglines.length;
        }

        setInterval(rotateTagline, 3000);
    </script>
</body>
</html>

Dieser Code erstellt eine einseitige Website für “EduQuest” mit den folgenden Funktionen und Abschnitten:

Eine fixierte Navigationsleiste mit Links zu Kurskategorien (Mathematik, Naturwissenschaften, Sprachen, Kunst) und einer Suchleiste.

Ein Hero-Bereich mit einem Platzhalter-Videohintergrund, einem dynamischen Slogan, der alle 3 Sekunden zwischen “Learn at your own pace”, “Discover new passions” und “Expand your horizons” wechselt, und einer “Get Started”-Schaltfläche.

Ein Bereich mit vorgestellten Kursen, der Kurskarten mit Platzhaltern für Kursbilder, Titel, Dozenten und Beschreibungen anzeigt.

Ein “Erfolgsgeschichten”-Bereich mit Testimonials von zufriedenen Studenten, mit Platzhaltern für den Testimonial-Text und die Namen der Studenten.

Eine Fußzeile mit Links zum Blog der Plattform, FAQ, Datenschutzrichtlinie und einer “Kontaktieren Sie uns”-Schaltfläche.

Die CSS-Stile sind innerhalb des <style>-Tags im <head>-Abschnitt eingebettet, und der JavaScript-Code ist innerhalb des <script>-Tags am Ende des <body>-Abschnitts platziert.

Der JavaScript-Code verwaltet den dynamischen Slogan im Hero-Bereich und wechselt alle 3 Sekunden zwischen den verschiedenen Slogans mit der setInterval-Funktion.

Bitte beachten Sie, dass der Videohintergrund, die Kursbilder und die Testimonials Platzhalter sind und durch tatsächliche Inhalte ersetzt werden sollten.

API-Anfrage

import anthropic

client = anthropic.Anthropic( # defaults to os.environ.get("ANTHROPIC_API_KEY")
api_key="my_api_key",
)
message = client.messages.create(
  model="claude-opus-4-20250514",
  max_tokens=4000,
  temperature=0,
  system="Your task is to create a one-page website based on the given specifications, delivered as an HTML file with embedded JavaScript and CSS. The website should incorporate a variety of engaging and interactive design features, such as drop-down menus, dynamic text and content, clickable buttons, and more. Ensure that the design is visually appealing, responsive, and user-friendly. The HTML, CSS, and JavaScript code should be well-structured, efficiently organized, and properly commented for readability and maintainability.",
  messages=[
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Create a one-page website for an online learning platform called \"EduQuest\" with the following features and sections: \n \n1. A fixed navigation bar with links to course categories (Math, Science, Languages, Arts) and a search bar. \n \n2. A hero section with a video background showcasing students learning online, a dynamic tagline that rotates between \"Learn at your own pace,\" \"Discover new passions,\" and \"Expand your horizons\" every 3 seconds, and a \"Get Started\" button leading to a course catalog. \n \n3. A featured courses section displaying course cards with placeholders for course images, titles, instructors, and descriptions. \n \n4. An interactive \"Learning Paths\" section with a short quiz to determine learning styles and interests, and a button to start the quiz. \n \n5. A \"Success Stories\" section featuring testimonials from satisfied students, with placeholders for the testimonial text and student names. \n \n6. A footer with links to the platform's blog, FAQ, privacy policy, and a \"Contact Us\" button that opens a modal window with a contact form and customer support information. \n \nInclude filler placeholder content for the video background, course cards, and testimonials. Embed the CSS styles within the `<style>` tag in the `<head>` section and place the JavaScript code within the `<script>` tag at the end of the `<body>` section. \n \nThe JavaScript code should handle the dynamic tagline in the hero section, rotating through the different taglines every 3 seconds."
        }
      ]
    }
  ]
)
print(message.content)