Skip to content

Commit 2003488

Browse files
feat: add quiz container
1 parent ad81c79 commit 2003488

File tree

2 files changed

+61
-39
lines changed

2 files changed

+61
-39
lines changed

src/app/tutorial-hello-world/page.tsx

Lines changed: 50 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,49 @@
22

33
import BackToDashBoardLink from "@/components/back-to-dashboard-link";
44
import YouTube from "react-youtube";
5-
import { Cinzel } from 'next/font/google';
5+
import TutorialQuiz from "@/components/tutorial-quiz";
6+
import { Cinzel } from "next/font/google";
67

78
const cinzel = Cinzel({
89
subsets: ["latin"],
910
weight: ["400", "700"],
1011
});
1112

1213
// body text (Times New Roman= more readable)
13-
const bodyFontClass = "font-serif text-amber-950";
14+
const bodyFontClass = "font-serif text-amber-950";
1415
// titles (Cinzel font)
15-
const cinzelTitleClass = cinzel.className;
16+
const cinzelTitleClass = cinzel.className;
1617

1718
export default function TutorialHelloWorld() {
1819
return (
19-
// Background of scroll
20+
// Background of scroll
2021
<div
2122
className="min-h-screen p-4 md:p-12"
2223
style={{
23-
backgroundImage: "url('/geminiblurred.png')",
24-
backgroundSize: 'cover',
25-
backgroundPosition: 'center',
26-
backgroundColor: '#fef3c7',
24+
backgroundImage: "url('/geminiblurred.png')",
25+
backgroundSize: "cover",
26+
backgroundPosition: "center",
27+
backgroundColor: "#fef3c7",
2728
}}
2829
>
29-
<div
30-
className="inline-block p-4"
31-
style={{ zIndex: 10 }}
32-
>
30+
<div className="inline-block p-4" style={{ zIndex: 10 }}>
3331
<BackToDashBoardLink />
3432
</div>
3533

3634
{/* "scroll"*/}
37-
<article className={`max-w-4xl mx-auto bg-amber-100 p-8 md:p-12 shadow-2xl shadow-amber-950/70 space-y-8
35+
<article
36+
className={`max-w-4xl mx-auto bg-amber-100 p-8 md:p-12 shadow-2xl shadow-amber-950/70 space-y-8
3837
${bodyFontClass} border border-amber-800 transform rotate-[-0.5deg]
39-
rounded-t-[4rem] rounded-b-lg`}>
40-
38+
rounded-t-[4rem] rounded-b-lg`}
39+
>
4140
{/* title*/}
42-
<h1 className={`text-4xl md:text-5xl font-bold ${cinzelTitleClass}
43-
border-b-4 border-amber-900 pb-4 mb-8 text-center uppercase`}>
41+
<h1
42+
className={`text-4xl md:text-5xl font-bold ${cinzelTitleClass}
43+
border-b-4 border-amber-900 pb-4 mb-8 text-center uppercase`}
44+
>
4445
Quest: The Oracle&apos;s First Greeting
4546
</h1>
46-
47+
4748
<p className="text-xl italic text-amber-900">
4849
Welcome, brave coder! Your journey into the mystical lands of programming begins now.
4950
Before you can conjure complex spells or build mighty digital fortresses, every adventurer
@@ -56,7 +57,7 @@ export default function TutorialHelloWorld() {
5657
</p>
5758

5859
<hr className="my-8 border-amber-900/50" />
59-
60+
6061
{/* section*/}
6162
<section className="space-y-4">
6263
<h2 className={`text-3xl font-semibold ${cinzelTitleClass}`}>
@@ -79,7 +80,7 @@ export default function TutorialHelloWorld() {
7980
</section>
8081

8182
<hr className="my-8 border-amber-900/50" />
82-
83+
8384
{/* section */}
8485
<section className="space-y-4">
8586
<h2 className={`text-3xl font-semibold ${cinzelTitleClass}`}>
@@ -88,27 +89,27 @@ export default function TutorialHelloWorld() {
8889
<p className="text-lg">Why start with something so simple?</p>
8990
<ul className="list-disc list-inside space-y-3 text-lg pl-4">
9091
<li>
91-
<strong className="font-semibold text-amber-950">It&apos;s Tradition:</strong> Like a knight
92-
receiving their first sword, programmers worldwide start here. It connects you to
93-
generations of coders before you!
92+
<strong className="font-semibold text-amber-950">It&apos;s Tradition:</strong> Like a
93+
knight receiving their first sword, programmers worldwide start here. It connects you
94+
to generations of coders before you!
9495
</li>
9596
<li>
96-
<strong className="font-semibold text-amber-950">It&apos;s a Test:</strong> Successfully making the
97-
machine say &quot;Hello World&quot; proves your basic setup is working. Your coding
98-
environment, the language you&apos;re using - they&apos;re all aligned and ready for
99-
more complex commands. It&apos;s like checking if your magic wand sparks before trying
100-
to levitate a mountain.
97+
<strong className="font-semibold text-amber-950">It&apos;s a Test:</strong>{" "}
98+
Successfully making the machine say &quot;Hello World&quot; proves your basic setup is
99+
working. Your coding environment, the language you&apos;re using - they&apos;re all
100+
aligned and ready for more complex commands. It&apos;s like checking if your magic
101+
wand sparks before trying to levitate a mountain.
101102
</li>
102103
<li>
103-
<strong className="font-semibold text-amber-950">It&apos;s Confidence:</strong> Seeing your very
104-
first command come to life, even a simple one, is a powerful boost! It&apos;s the
105-
first step on your epic journey.
104+
<strong className="font-semibold text-amber-950">It&apos;s Confidence:</strong> Seeing
105+
your very first command come to life, even a simple one, is a powerful boost!
106+
It&apos;s the first step on your epic journey.
106107
</li>
107108
</ul>
108109
</section>
109-
110+
110111
<hr className="my-8 border-amber-900/50" />
111-
112+
112113
{/* section*/}
113114
<section className="space-y-4">
114115
<h2 className={`text-3xl font-semibold ${cinzelTitleClass}`}>
@@ -124,17 +125,27 @@ export default function TutorialHelloWorld() {
124125
<p className="text-lg">
125126
Different programming languages (spellbooks) have slightly different words for the
126127
&apos;Display&apos; command (like{" "}
127-
<code className="bg-amber-200 px-1 rounded text-amber-950 font-mono border border-amber-800">print</code>,{" "}
128-
<code className="bg-amber-200 px-1 rounded text-amber-950 font-mono border border-amber-800">console.log</code>,{" "}
129-
<code className="bg-amber-200 px-1 rounded text-amber-950 font-mono border border-amber-800">echo</code>), but the core
130-
idea is the same: tell the machine to show those exact words.
128+
<code className="bg-amber-200 px-1 rounded text-amber-950 font-mono border border-amber-800">
129+
print
130+
</code>
131+
,{" "}
132+
<code className="bg-amber-200 px-1 rounded text-amber-950 font-mono border border-amber-800">
133+
console.log
134+
</code>
135+
,{" "}
136+
<code className="bg-amber-200 px-1 rounded text-amber-950 font-mono border border-amber-800">
137+
echo
138+
</code>
139+
), but the core idea is the same: tell the machine to show those exact words.
131140
</p>
132141
</section>
133-
142+
134143
<hr className="my-8 border-amber-900/50" />
135144

136145
<YouTube videoId="hp4pYFASTrc"></YouTube>
146+
147+
<TutorialQuiz></TutorialQuiz>
137148
</article>
138149
</div>
139150
);
140-
}
151+
}

src/components/tutorial-quiz.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Cinzel } from "next/font/google";
2+
const cinzel = Cinzel({ subsets: ["latin"], weight: ["700"] });
3+
export default function TutorialQuiz() {
4+
return (
5+
<div className="mt-12 p-8 border-2 border-amber-800/50 rounded-xl bg-amber-50/50 shadow-inner shadow-amber-900/20">
6+
<h2 className={`text-3xl font-bold text-center mb-6 text-amber-900 ${cinzel.className}`}>
7+
Test Your Knowledge, Initiate
8+
</h2>
9+
</div>
10+
);
11+
}

0 commit comments

Comments
 (0)