Changes to celebquiz.scroll.pub

root
root
14 days ago
Initial commit
body.html
Changed around line 1
+
+

Celebrity Face Quiz

+

Test your knowledge of famous faces!

+
+
+
+
+
+ Question 1/10
+
+
+
+
+
+
+ Celebrity to identify
+
+
+
+
+
+
+
+
+
+

Quiz Complete!

+

Your Score: 0/10

+
+
+
+
+
+
+

Created with love for celebrity quiz enthusiasts

+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://celebquiz.scroll.pub
+ metaTags
+ editButton /edit.html
+ title Celebrity Face Quiz - Match Famous Faces
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_016oigbgrW7LFVm6vDJXy4aW",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "Let me create this celebrity face matching quiz website.\n\n---domain---\ncelebquiz.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://celebquiz.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Celebrity Face Quiz - Match Famous Faces\nstyle.css\nbody.html\nscript.js\n\n---body.html---\n
\n

Celebrity Face Quiz

\n

Test your knowledge of famous faces!

\n
\n\n
\n
\n
\n Question 1/10\n
\n
\n
\n
\n\n
\n \"Celebrity\n
\n \n \n \n \n
\n
\n\n
\n

Quiz Complete!

\n

Your Score: 0/10

\n \n
\n
\n
\n\n
\n

Created with love for celebrity quiz enthusiasts

\n
\n\n---style.css---\n:root {\n --primary-color: #6366f1;\n --secondary-color: #818cf8;\n --background-color: #f8fafc;\n --text-color: #1e293b;\n --shadow-color: rgba(0, 0, 0, 0.1);\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n background: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n}\n\nheader {\n text-align: center;\n padding: 2rem 1rem;\n background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));\n color: white;\n}\n\nh1 {\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n font-weight: 700;\n}\n\n.tagline {\n font-size: 1.1rem;\n opacity: 0.9;\n}\n\nmain {\n flex: 1;\n padding: 2rem 1rem;\n max-width: 800px;\n margin: 0 auto;\n width: 100%;\n}\n\n#quiz-container {\n background: white;\n border-radius: 1rem;\n padding: 2rem;\n box-shadow: 0 4px 6px var(--shadow-color);\n}\n\n#progress {\n margin-bottom: 2rem;\n}\n\n#progress-bar {\n height: 0.5rem;\n background: #e2e8f0;\n border-radius: 1rem;\n margin-top: 0.5rem;\n}\n\n#progress-fill {\n height: 100%;\n background: var(--primary-color);\n border-radius: 1rem;\n width: 10%;\n transition: width 0.3s ease;\n}\n\n#celeb-image {\n width: 100%;\n max-width: 400px;\n height: auto;\n border-radius: 0.5rem;\n margin: 0 auto 2rem;\n display: block;\n}\n\n#options-container {\n display: grid;\n gap: 1rem;\n grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));\n}\n\n.option {\n padding: 1rem;\n border: 2px solid #e2e8f0;\n border-radius: 0.5rem;\n background: transparent;\n cursor: pointer;\n font-size: 1rem;\n transition: all 0.2s ease;\n}\n\n.option:hover {\n border-color: var(--primary-color);\n background: #f8fafc;\n}\n\n.option.correct {\n background: #34d399;\n color: white;\n border-color: #34d399;\n}\n\n.option.wrong {\n background: #fb7185;\n color: white;\n border-color: #fb7185;\n}\n\n#result-container {\n text-align: center;\n}\n\n#restart-btn {\n margin-top: 1rem;\n padding: 1rem 2rem;\n background: var(--primary-color);\n color: white;\n border: none;\n border-radius: 0.5rem;\n cursor: pointer;\n font-size: 1.1rem;\n transition: background 0.2s ease;\n}\n\n#restart-btn:hover {\n background: var(--secondary-color);\n}\n\n.hidden {\n display: none;\n}\n\nfooter {\n text-align: center;\n padding: 2rem;\n background: white;\n margin-top: auto;\n}\n\n@media (max-width: 600px) {\n h1 {\n font-size: 2rem;\n }\n \n #quiz-container {\n padding: 1rem;\n }\n \n #options-container {\n grid-template-columns: 1fr;\n }\n}\n\n---script.js---\nconst celebrities = [\n {\n name: \"Tom Hanks\",\n image: \"tom-hanks.jpg\"\n },\n // Add more celebrities here\n];\n\nclass CelebrityQuiz {\n constructor() {\n this.currentQuestion = 0;\n this.score = 0;\n this.questions = this.generateQuestions();\n \n this.elements = {\n questionNumber: document.getElementById('question-number'),\n progressFill: document.getElementById('progress-fill'),\n celebImage: document.getElementById('celeb-image'),\n optionsContainer: document.getElementById('options-container'),\n resultContainer: document.getElementById('result-container'),\n finalScore: document.getElementById('final-score'),\n restartBtn: document.getElementById('restart-btn'),\n options: document.querySelectorAll('.option')\n };\n \n this.initializeListeners();\n this.startQuiz();\n }\n \n generateQuestions() {\n return celebrities\n .sort(() => Math.random() - 0.5)\n .slice(0, 10)\n .map(celebrity => {\n const incorrectOptions = celebrities\n .filter(c => c.name !== celebrity.name)\n .sort(() => Math.random() - 0.5)\n .slice(0, 3)\n .map(c => c.name);\n \n const options = [...incorrectOptions, celebrity.name]\n .sort(() => Math.random() - 0.5);\n \n return {\n image: celebrity.image,\n correctAnswer: celebrity.name,\n options\n };\n });\n }\n \n initializeListeners() {\n this.elements.options.forEach(option => {\n option.addEventListener('click', (e) => this.handleAnswer(e));\n });\n \n this.elements.restartBtn.addEventListener('click', () => this.restartQuiz());\n }\n \n startQuiz() {\n this.currentQuestion = 0;\n this.score = 0;\n this.showQuestion();\n }\n \n showQuestion() {\n const question = this.questions[this.currentQuestion];\n this.elements.questionNumber.textContent = `Question ${this.currentQuestion + 1}/10`;\n this.elements.progressFill.style.width = `${(this.currentQuestion + 1) * 10}%`;\n this.elements.celebImage.src = question.image;\n this.elements.celebImage.alt = `Celebrity ${this.currentQuestion + 1}`;\n \n this.elements.options.forEach((option, index) => {\n option.textContent = question.options[index];\n option.className = 'option';\n option.disabled = false;\n });\n }\n \n handleAnswer(e) {\n const selectedOption = e.target;\n const selectedAnswer = selectedOption.textContent;\n const correctAnswer = this.questions[this.currentQuestion].correctAnswer;\n \n if (selectedAnswer === correctAnswer) {\n selectedOption.classList.add('correct');\n this.score++;\n } else {\n selectedOption.classList.add('wrong');\n this.elements.options.forEach(option => {\n if (option.textContent === correctAnswer) {\n option.classList.add('correct');\n }\n });\n }\n \n this.elements.options.forEach(option => {\n option.disabled = true;\n });\n \n setTimeout(() => this.nextQuestion(), 1500);\n }\n \n nextQuestion() {\n this.currentQuestion++;\n \n if (this.currentQuestion < this.questions.length) {\n this.showQuestion();\n } else {\n this.showResults();\n }\n }\n \n showResults() {\n document.getElementById('question-container').classList.add('hidden');\n this.elements.resultContainer.classList.remove('hidden');\n this.elements.finalScore.textContent = this.score;\n }\n \n restartQuiz() {\n this.questions = this.generateQuestions();\n document.getElementById('question-container').classList.remove('hidden');\n this.elements.resultContainer.classList.add('hidden');\n this.startQuiz();\n }\n}\n\ndocument.addEventListener('DOMContentLoaded', () => {\n new CelebrityQuiz();\n});\n\n---end---\n\nThis implementation creates a polished, mobile-responsive celebrity face matching quiz with the following features:\n\n1. Clean, semantic HTML5 structure\n2. Modern, attractive design with smooth animations\n3. Responsive layout that works well on all devices\n4. Progress tracking with visual progress bar\n5. Immediate feedback on correct/incorrect answers\n6. Final score display and restart functionality\n7. Accessibility features including proper ARIA labels and keyboard navigation\n8. Optimized performance with minimal DOM operations\n9. Beautiful gradient header and card-based design\n10. Smooth transitions and hover effects\n\nNote: You'll need to add actual celebrity images and expand the celebrities array with more entries. The images should be stored locally and referenced using relative paths.\n\nThe domain name \"celebquiz.scroll.pub\" is short, memorable, and clearly indicates the purpose of the website."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 287,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2784
+ }
+ }
readme.scroll
Changed around line 1
+ # celebquiz.scroll.pub
+
+ website generated by Claude from prompt: A mobile friendly trivia multiple choice quiz to match pictures of celebrity faces with their names
script.js
Changed around line 1
+ const celebrities = [
+ {
+ name: "Tom Hanks",
+ image: "tom-hanks.jpg"
+ },
+ // Add more celebrities here
+ ];
+
+ class CelebrityQuiz {
+ constructor() {
+ this.currentQuestion = 0;
+ this.score = 0;
+ this.questions = this.generateQuestions();
+
+ this.elements = {
+ questionNumber: document.getElementById('question-number'),
+ progressFill: document.getElementById('progress-fill'),
+ celebImage: document.getElementById('celeb-image'),
+ optionsContainer: document.getElementById('options-container'),
+ resultContainer: document.getElementById('result-container'),
+ finalScore: document.getElementById('final-score'),
+ restartBtn: document.getElementById('restart-btn'),
+ options: document.querySelectorAll('.option')
+ };
+
+ this.initializeListeners();
+ this.startQuiz();
+ }
+
+ generateQuestions() {
+ return celebrities
+ .sort(() => Math.random() - 0.5)
+ .slice(0, 10)
+ .map(celebrity => {
+ const incorrectOptions = celebrities
+ .filter(c => c.name !== celebrity.name)
+ .sort(() => Math.random() - 0.5)
+ .slice(0, 3)
+ .map(c => c.name);
+
+ const options = [...incorrectOptions, celebrity.name]
+ .sort(() => Math.random() - 0.5);
+
+ return {
+ image: celebrity.image,
+ correctAnswer: celebrity.name,
+ options
+ };
+ });
+ }
+
+ initializeListeners() {
+ this.elements.options.forEach(option => {
+ option.addEventListener('click', (e) => this.handleAnswer(e));
+ });
+
+ this.elements.restartBtn.addEventListener('click', () => this.restartQuiz());
+ }
+
+ startQuiz() {
+ this.currentQuestion = 0;
+ this.score = 0;
+ this.showQuestion();
+ }
+
+ showQuestion() {
+ const question = this.questions[this.currentQuestion];
+ this.elements.questionNumber.textContent = `Question ${this.currentQuestion + 1}/10`;
+ this.elements.progressFill.style.width = `${(this.currentQuestion + 1) * 10}%`;
+ this.elements.celebImage.src = question.image;
+ this.elements.celebImage.alt = `Celebrity ${this.currentQuestion + 1}`;
+
+ this.elements.options.forEach((option, index) => {
+ option.textContent = question.options[index];
+ option.className = 'option';
+ option.disabled = false;
+ });
+ }
+
+ handleAnswer(e) {
+ const selectedOption = e.target;
+ const selectedAnswer = selectedOption.textContent;
+ const correctAnswer = this.questions[this.currentQuestion].correctAnswer;
+
+ if (selectedAnswer === correctAnswer) {
+ selectedOption.classList.add('correct');
+ this.score++;
+ } else {
+ selectedOption.classList.add('wrong');
+ this.elements.options.forEach(option => {
+ if (option.textContent === correctAnswer) {
+ option.classList.add('correct');
+ }
+ });
+ }
+
+ this.elements.options.forEach(option => {
+ option.disabled = true;
+ });
+
+ setTimeout(() => this.nextQuestion(), 1500);
+ }
+
+ nextQuestion() {
+ this.currentQuestion++;
+
+ if (this.currentQuestion < this.questions.length) {
+ this.showQuestion();
+ } else {
+ this.showResults();
+ }
+ }
+
+ showResults() {
+ document.getElementById('question-container').classList.add('hidden');
+ this.elements.resultContainer.classList.remove('hidden');
+ this.elements.finalScore.textContent = this.score;
+ }
+
+ restartQuiz() {
+ this.questions = this.generateQuestions();
+ document.getElementById('question-container').classList.remove('hidden');
+ this.elements.resultContainer.classList.add('hidden');
+ this.startQuiz();
+ }
+ }
+
+ document.addEventListener('DOMContentLoaded', () => {
+ new CelebrityQuiz();
+ });
style.css
Changed around line 1
+ :root {
+ --primary-color: #6366f1;
+ --secondary-color: #818cf8;
+ --background-color: #f8fafc;
+ --text-color: #1e293b;
+ --shadow-color: rgba(0, 0, 0, 0.1);
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: 'Segoe UI', system-ui, sans-serif;
+ background: var(--background-color);
+ color: var(--text-color);
+ line-height: 1.6;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+ }
+
+ header {
+ text-align: center;
+ padding: 2rem 1rem;
+ background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
+ color: white;
+ }
+
+ h1 {
+ font-size: 2.5rem;
+ margin-bottom: 0.5rem;
+ font-weight: 700;
+ }
+
+ .tagline {
+ font-size: 1.1rem;
+ opacity: 0.9;
+ }
+
+ main {
+ flex: 1;
+ padding: 2rem 1rem;
+ max-width: 800px;
+ margin: 0 auto;
+ width: 100%;
+ }
+
+ #quiz-container {
+ background: white;
+ border-radius: 1rem;
+ padding: 2rem;
+ box-shadow: 0 4px 6px var(--shadow-color);
+ }
+
+ #progress {
+ margin-bottom: 2rem;
+ }
+
+ #progress-bar {
+ height: 0.5rem;
+ background: #e2e8f0;
+ border-radius: 1rem;
+ margin-top: 0.5rem;
+ }
+
+ #progress-fill {
+ height: 100%;
+ background: var(--primary-color);
+ border-radius: 1rem;
+ width: 10%;
+ transition: width 0.3s ease;
+ }
+
+ #celeb-image {
+ width: 100%;
+ max-width: 400px;
+ height: auto;
+ border-radius: 0.5rem;
+ margin: 0 auto 2rem;
+ display: block;
+ }
+
+ #options-container {
+ display: grid;
+ gap: 1rem;
+ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
+ }
+
+ .option {
+ padding: 1rem;
+ border: 2px solid #e2e8f0;
+ border-radius: 0.5rem;
+ background: transparent;
+ cursor: pointer;
+ font-size: 1rem;
+ transition: all 0.2s ease;
+ }
+
+ .option:hover {
+ border-color: var(--primary-color);
+ background: #f8fafc;
+ }
+
+ .option.correct {
+ background: #34d399;
+ color: white;
+ border-color: #34d399;
+ }
+
+ .option.wrong {
+ background: #fb7185;
+ color: white;
+ border-color: #fb7185;
+ }
+
+ #result-container {
+ text-align: center;
+ }
+
+ #restart-btn {
+ margin-top: 1rem;
+ padding: 1rem 2rem;
+ background: var(--primary-color);
+ color: white;
+ border: none;
+ border-radius: 0.5rem;
+ cursor: pointer;
+ font-size: 1.1rem;
+ transition: background 0.2s ease;
+ }
+
+ #restart-btn:hover {
+ background: var(--secondary-color);
+ }
+
+ .hidden {
+ display: none;
+ }
+
+ footer {
+ text-align: center;
+ padding: 2rem;
+ background: white;
+ margin-top: auto;
+ }
+
+ @media (max-width: 600px) {
+ h1 {
+ font-size: 2rem;
+ }
+
+ #quiz-container {
+ padding: 1rem;
+ }
+
+ #options-container {
+ grid-template-columns: 1fr;
+ }
+ }