|
| 1 | +"use client"; |
| 2 | + |
| 3 | +import BackToDashBoardLink from "@/components/back-to-dashboard-link"; |
| 4 | +import YouTube from "react-youtube"; |
| 5 | + |
1 | 6 | export default function TutorialHelloWorld() { |
2 | 7 | return ( |
3 | | - <> |
4 | | - <h1>Hello World</h1> |
5 | | - </> |
| 8 | + <div className="min-h-screen bg-gray-50 p-8"> |
| 9 | + <BackToDashBoardLink></BackToDashBoardLink> |
| 10 | + |
| 11 | + <article className="max-w-5xl mx-auto bg-white p-6 md:p-10 rounded-lg shadow-md space-y-6"> |
| 12 | + {/* Quest Title */} |
| 13 | + <h1 className="text-3xl md:text-4xl font-bold text-indigo-700 border-b pb-2 mb-6"> |
| 14 | + Quest: The Oracle's First Greeting - Whispering "Hello World" |
| 15 | + </h1> |
| 16 | + {/* Flavor Text*/} |
| 17 | + <p className="text-lg italic text-gray-600"> |
| 18 | + Welcome, brave coder! Your journey into the mystical lands of programming begins now. |
| 19 | + Before you can conjure complex spells or build mighty digital fortresses, every adventurer |
| 20 | + must learn the first incantation, the universal greeting recognized across all realms:{" "} |
| 21 | + <strong className="font-semibold text-indigo-600">"Hello World"</strong>. This |
| 22 | + simple phrase is your key to unlocking the power of code. |
| 23 | + </p> |
| 24 | + <p className="text-gray-700"> |
| 25 | + This quest will guide you through understanding and wielding this fundamental magic. |
| 26 | + </p> |
| 27 | + |
| 28 | + <hr className="my-6" /> |
| 29 | + {/* Section 1 */} |
| 30 | + <section className="space-y-3"> |
| 31 | + <h2 className="text-2xl font-semibold text-gray-800"> |
| 32 | + What is this "Hello World" Sorcery? |
| 33 | + </h2> |
| 34 | + <p className="text-gray-700"> |
| 35 | + In the ancient scrolls of programming, "Hello World" is the traditional first |
| 36 | + spell learned. What does it do? It simply commands the machine - your loyal golem - to |
| 37 | + display the message{" "} |
| 38 | + <code className="bg-gray-100 px-1 rounded text-indigo-700"> |
| 39 | + "Hello World!" |
| 40 | + </code>{" "} |
| 41 | + on the screen. |
| 42 | + </p> |
| 43 | + <p className="text-gray-700"> |
| 44 | + Think of it like teaching a parrot its first words. You're not asking it to recite |
| 45 | + poetry yet, just to say "Hello!" It's the basic proof that you can |
| 46 | + communicate your intentions to the machine and make it respond. |
| 47 | + </p> |
| 48 | + </section> |
| 49 | + |
| 50 | + <hr className="my-6" /> |
| 51 | + {/* Section 2 */} |
| 52 | + <section className="space-y-3"> |
| 53 | + <h2 className="text-2xl font-semibold text-gray-800">Why This First Greeting Matters</h2> |
| 54 | + <p className="text-gray-700">Why start with something so simple?</p> |
| 55 | + <ul className="list-disc list-inside space-y-2 text-gray-700 pl-4"> |
| 56 | + <li> |
| 57 | + <strong className="font-semibold">It's Tradition:</strong> Like a knight |
| 58 | + receiving their first sword, programmers worldwide start here. It connects you to |
| 59 | + generations of coders before you! |
| 60 | + </li> |
| 61 | + <li> |
| 62 | + <strong className="font-semibold">It's a Test:</strong> Successfully making the |
| 63 | + machine say "Hello World" proves your basic setup is working. Your coding |
| 64 | + environment, the language you're using - they're all aligned and ready for |
| 65 | + more complex commands. It's like checking if your magic wand sparks before trying |
| 66 | + to levitate a mountain. |
| 67 | + </li> |
| 68 | + <li> |
| 69 | + <strong className="font-semibold">It's Confidence:</strong> Seeing your very |
| 70 | + first command come to life, even a simple one, is a powerful boost! It's the |
| 71 | + first step on your epic journey. |
| 72 | + </li> |
| 73 | + </ul> |
| 74 | + </section> |
| 75 | + <hr className="my-6" /> |
| 76 | + {/* Section 3 */} |
| 77 | + <section className="space-y-3"> |
| 78 | + <h2 className="text-2xl font-semibold text-gray-800"> |
| 79 | + Visualizing the Incantation (Conceptual Example) |
| 80 | + </h2> |
| 81 | + <p className="text-gray-700"> |
| 82 | + Imagine you have a magical scroll (your program). To perform the "Hello World" |
| 83 | + greeting, you'd write an instruction similar to this: |
| 84 | + </p> |
| 85 | + <pre className="bg-gray-100 p-4 rounded-md font-mono text-sm text-gray-800 overflow-x-auto"> |
| 86 | + <code>{`// Command the Oracle (or Screen) to speak:\nDisplay: "Hello World!"`}</code> |
| 87 | + </pre> |
| 88 | + <p className="text-gray-700"> |
| 89 | + Different programming languages (spellbooks) have slightly different words for the |
| 90 | + 'Display' command (like{" "} |
| 91 | + <code className="bg-gray-100 px-1 rounded text-indigo-700">print</code>,{" "} |
| 92 | + <code className="bg-gray-100 px-1 rounded text-indigo-700">console.log</code>,{" "} |
| 93 | + <code className="bg-gray-100 px-1 rounded text-indigo-700">echo</code>), but the core |
| 94 | + idea is the same: tell the machine to show those exact words. |
| 95 | + </p> |
| 96 | + </section> |
| 97 | + <hr className="my-6" /> |
| 98 | + |
| 99 | + <YouTube videoId="hp4pYFASTrc"></YouTube> |
| 100 | + </article> |
| 101 | + </div> |
6 | 102 | ); |
7 | 103 | } |
0 commit comments