commit 9a89d54f9a8cd4ea3f88ed396060cdeaa09a683c
Author: root <root@hub.scroll.pub>
Date: 2024-12-27 19:00:58 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..3ccd06a
--- /dev/null
+++ b/body.html
@@ -0,0 +1,22 @@
+<header>
+ <h1>Adventure Quiz</h1>
+ <p>Answer the questions and embark on an epic journey!</p>
+</header>
+
+<main>
+ <section id="quiz-section" class="quiz-container">
+ <div id="question-container" class="question-box">
+ <h2 id="question"></h2>
+ <div id="answer-buttons" class="btn-grid"></div>
+ </div>
+ <div id="result-container" class="result-box hidden">
+ <h2 id="result-title"></h2>
+ <p id="result-text"></p>
+ <button id="restart-btn" class="btn">Start Over</button>
+ </div>
+ </section>
+</main>
+
+<footer>
+ <p>Created with ❤️ by Adventure Quiz</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..882707b
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://adventurequiz.scroll.pub
+metaTags
+editButton /edit.html
+title Adventure Quiz: Choose Your Path
+style.css
+body.html
+script.js
\ No newline at end of file
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..9cd6f23
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "7873a89d-9e5f-476d-bab6-ccf230a7be50",
+ "object": "chat.completion",
+ "created": 1735326040,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nadventurequiz.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://adventurequiz.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Adventure Quiz: Choose Your Path\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Adventure Quiz</h1>\n <p>Answer the questions and embark on an epic journey!</p>\n</header>\n\n<main>\n <section id=\"quiz-section\" class=\"quiz-container\">\n <div id=\"question-container\" class=\"question-box\">\n <h2 id=\"question\"></h2>\n <div id=\"answer-buttons\" class=\"btn-grid\"></div>\n </div>\n <div id=\"result-container\" class=\"result-box hidden\">\n <h2 id=\"result-title\"></h2>\n <p id=\"result-text\"></p>\n <button id=\"restart-btn\" class=\"btn\">Start Over</button>\n </div>\n </section>\n</main>\n\n<footer>\n <p>Created with ❤️ by Adventure Quiz</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #f5a623;\n --background-color: #f4f4f4;\n --text-color: #333;\n --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n}\n\nbody {\n font-family: var(--font-family);\n line-height: 1.6;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n color: var(--text-color);\n}\n\nheader {\n background: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n}\n\n.quiz-container {\n max-width: 800px;\n margin: 2rem auto;\n padding: 1rem;\n background: white;\n border-radius: 10px;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\n}\n\n.question-box {\n text-align: center;\n}\n\n.btn-grid {\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n gap: 1rem;\n margin-top: 1rem;\n}\n\n.btn {\n background: var(--primary-color);\n color: white;\n border: none;\n padding: 1rem;\n border-radius: 5px;\n cursor: pointer;\n transition: background 0.3s ease;\n}\n\n.btn:hover {\n background: var(--secondary-color);\n}\n\n.result-box {\n text-align: center;\n}\n\n.hidden {\n display: none;\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background: var(--primary-color);\n color: white;\n margin-top: 2rem;\n}\n\n@media (max-width: 600px) {\n .btn-grid {\n grid-template-columns: 1fr;\n }\n}\n---script.js---\nconst questions = [\n {\n question: \"You find a mysterious map. Do you...\",\n answers: [\n { text: \"Follow it immediately\", result: \"adventurer\" },\n { text: \"Study it carefully first\", result: \"scholar\" }\n ]\n },\n {\n question: \"A dragon appears! Do you...\",\n answers: [\n { text: \"Fight it bravely\", result: \"warrior\" },\n { text: \"Try to reason with it\", result: \"diplomat\" }\n ]\n },\n {\n question: \"You reach a fork in the road. Do you...\",\n answers: [\n { text: \"Take the left path\", result: \"explorer\" },\n { text: \"Take the right path\", result: \"strategist\" }\n ]\n }\n];\n\nconst resultDescriptions = {\n adventurer: \"You're a true adventurer! Always ready for the next challenge.\",\n scholar: \"Your wisdom and knowledge will guide you to great discoveries.\",\n warrior: \"Your courage and strength will lead you to victory.\",\n diplomat: \"Your charm and wit will help you navigate any situation.\",\n explorer: \"Your curiosity and daring will take you to amazing places.\",\n strategist: \"Your careful planning will ensure your success.\"\n};\n\nconst questionElement = document.getElementById('question');\nconst answerButtonsElement = document.getElementById('answer-buttons');\nconst resultContainer = document.getElementById('result-container');\nconst resultTitle = document.getElementById('result-title');\nconst resultText = document.getElementById('result-text');\nconst restartButton = document.getElementById('restart-btn');\n\nlet currentQuestionIndex = 0;\nlet userResults = [];\n\nfunction startQuiz() {\n currentQuestionIndex = 0;\n userResults = [];\n resultContainer.classList.add('hidden');\n showQuestion();\n}\n\nfunction showQuestion() {\n const question = questions[currentQuestionIndex];\n questionElement.innerText = question.question;\n answerButtonsElement.innerHTML = '';\n question.answers.forEach(answer => {\n const button = document.createElement('button');\n button.innerText = answer.text;\n button.classList.add('btn');\n button.addEventListener('click', () => selectAnswer(answer.result));\n answerButtonsElement.appendChild(button);\n });\n}\n\nfunction selectAnswer(result) {\n userResults.push(result);\n if (currentQuestionIndex < questions.length - 1) {\n currentQuestionIndex++;\n showQuestion();\n } else {\n showResult();\n }\n}\n\nfunction showResult() {\n const finalResult = determineFinalResult();\n resultTitle.innerText = \"Your Adventure Awaits!\";\n resultText.innerText = resultDescriptions[finalResult];\n resultContainer.classList.remove('hidden');\n}\n\nfunction determineFinalResult() {\n const resultCounts = {};\n userResults.forEach(result => {\n resultCounts[result] = (resultCounts[result] || 0) + 1;\n });\n return Object.keys(resultCounts).reduce((a, b) => resultCounts[a] > resultCounts[b] ? a : b);\n}\n\nrestartButton.addEventListener('click', startQuiz);\n\nstartQuiz();\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 247,
+ "completion_tokens": 1323,
+ "total_tokens": 1570,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 247
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..e865b77
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# adventurequiz.scroll.pub
+Website generated by DeepSeek from prompt: I want an interactive quizlet that send that user on a adventure
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..65e6991
--- /dev/null
+++ b/script.js
@@ -0,0 +1,91 @@
+const questions = [
+ {
+ question: "You find a mysterious map. Do you...",
+ answers: [
+ { text: "Follow it immediately", result: "adventurer" },
+ { text: "Study it carefully first", result: "scholar" }
+ ]
+ },
+ {
+ question: "A dragon appears! Do you...",
+ answers: [
+ { text: "Fight it bravely", result: "warrior" },
+ { text: "Try to reason with it", result: "diplomat" }
+ ]
+ },
+ {
+ question: "You reach a fork in the road. Do you...",
+ answers: [
+ { text: "Take the left path", result: "explorer" },
+ { text: "Take the right path", result: "strategist" }
+ ]
+ }
+];
+
+const resultDescriptions = {
+ adventurer: "You're a true adventurer! Always ready for the next challenge.",
+ scholar: "Your wisdom and knowledge will guide you to great discoveries.",
+ warrior: "Your courage and strength will lead you to victory.",
+ diplomat: "Your charm and wit will help you navigate any situation.",
+ explorer: "Your curiosity and daring will take you to amazing places.",
+ strategist: "Your careful planning will ensure your success."
+};
+
+const questionElement = document.getElementById('question');
+const answerButtonsElement = document.getElementById('answer-buttons');
+const resultContainer = document.getElementById('result-container');
+const resultTitle = document.getElementById('result-title');
+const resultText = document.getElementById('result-text');
+const restartButton = document.getElementById('restart-btn');
+
+let currentQuestionIndex = 0;
+let userResults = [];
+
+function startQuiz() {
+ currentQuestionIndex = 0;
+ userResults = [];
+ resultContainer.classList.add('hidden');
+ showQuestion();
+}
+
+function showQuestion() {
+ const question = questions[currentQuestionIndex];
+ questionElement.innerText = question.question;
+ answerButtonsElement.innerHTML = '';
+ question.answers.forEach(answer => {
+ const button = document.createElement('button');
+ button.innerText = answer.text;
+ button.classList.add('btn');
+ button.addEventListener('click', () => selectAnswer(answer.result));
+ answerButtonsElement.appendChild(button);
+ });
+}
+
+function selectAnswer(result) {
+ userResults.push(result);
+ if (currentQuestionIndex < questions.length - 1) {
+ currentQuestionIndex++;
+ showQuestion();
+ } else {
+ showResult();
+ }
+}
+
+function showResult() {
+ const finalResult = determineFinalResult();
+ resultTitle.innerText = "Your Adventure Awaits!";
+ resultText.innerText = resultDescriptions[finalResult];
+ resultContainer.classList.remove('hidden');
+}
+
+function determineFinalResult() {
+ const resultCounts = {};
+ userResults.forEach(result => {
+ resultCounts[result] = (resultCounts[result] || 0) + 1;
+ });
+ return Object.keys(resultCounts).reduce((a, b) => resultCounts[a] > resultCounts[b] ? a : b);
+}
+
+restartButton.addEventListener('click', startQuiz);
+
+startQuiz();
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..ab35baa
--- /dev/null
+++ b/style.css
@@ -0,0 +1,79 @@
+:root {
+ --primary-color: #4a90e2;
+ --secondary-color: #f5a623;
+ --background-color: #f4f4f4;
+ --text-color: #333;
+ --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+}
+
+body {
+ font-family: var(--font-family);
+ line-height: 1.6;
+ margin: 0;
+ padding: 0;
+ background-color: var(--background-color);
+ color: var(--text-color);
+}
+
+header {
+ background: var(--primary-color);
+ color: white;
+ padding: 2rem;
+ text-align: center;
+}
+
+.quiz-container {
+ max-width: 800px;
+ margin: 2rem auto;
+ padding: 1rem;
+ background: white;
+ border-radius: 10px;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
+}
+
+.question-box {
+ text-align: center;
+}
+
+.btn-grid {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ gap: 1rem;
+ margin-top: 1rem;
+}
+
+.btn {
+ background: var(--primary-color);
+ color: white;
+ border: none;
+ padding: 1rem;
+ border-radius: 5px;
+ cursor: pointer;
+ transition: background 0.3s ease;
+}
+
+.btn:hover {
+ background: var(--secondary-color);
+}
+
+.result-box {
+ text-align: center;
+}
+
+.hidden {
+ display: none;
+}
+
+footer {
+ text-align: center;
+ padding: 1rem;
+ background: var(--primary-color);
+ color: white;
+ margin-top: 2rem;
+}
+
+@media (max-width: 600px) {
+ .btn-grid {
+ grid-template-columns: 1fr;
+ }
+}
\ No newline at end of file