commit cf85d8bd85d67568340d1e41ebd7497814559d80
Author: root <root@hub.scroll.pub> Date: 2024-12-27 19:16:06 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..dca0d29 --- /dev/null +++ b/body.html @@ -0,0 +1,27 @@ +<header> + <h1>Business Readiness Quiz</h1> + <p>Discover how prepared your business is for success with this interactive quiz.</p> +</header> +<main> + <section id="quiz"> + <div id="question-container"> + <h2 id="question"></h2> + <div id="options"></div> + </div> + <div id="progress"> + <progress id="quiz-progress" value="0" max="10"></progress> + <span id="progress-text">0/10</span> + </div> + </section> + <section id="results" class="hidden"> + <h2>Your Business Readiness Score</h2> + <div id="chart-container"> + <canvas id="readiness-chart"></canvas> + </div> + <p id="result-text"></p> + <button id="retry-btn">Retry Quiz</button> + </section> +</main> +<footer> + <p>Take the first step towards business success.</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..cf9c030 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://bizready.scroll.pub +metaTags +editButton /edit.html +title Business Readiness Quiz +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..712684d --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "f7e2a85c-f25f-4848-96e3-2b048c1e973e", + "object": "chat.completion", + "created": 1735326945, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nbizready.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://bizready.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Business Readiness Quiz\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Business Readiness Quiz</h1>\n <p>Discover how prepared your business is for success with this interactive quiz.</p>\n</header>\n<main>\n <section id=\"quiz\">\n <div id=\"question-container\">\n <h2 id=\"question\"></h2>\n <div id=\"options\"></div>\n </div>\n <div id=\"progress\">\n <progress id=\"quiz-progress\" value=\"0\" max=\"10\"></progress>\n <span id=\"progress-text\">0/10</span>\n </div>\n </section>\n <section id=\"results\" class=\"hidden\">\n <h2>Your Business Readiness Score</h2>\n <div id=\"chart-container\">\n <canvas id=\"readiness-chart\"></canvas>\n </div>\n <p id=\"result-text\"></p>\n <button id=\"retry-btn\">Retry Quiz</button>\n </section>\n</main>\n<footer>\n <p>Take the first step towards business success.</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #f5a623;\n --background-color: #f8f9fa;\n --text-color: #333;\n --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n}\n\nbody {\n font-family: var(--font-family);\n color: var(--text-color);\n background-color: var(--background-color);\n margin: 0;\n padding: 0;\n line-height: 1.6;\n}\n\nheader {\n background-color: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n}\n\nmain {\n padding: 2rem;\n max-width: 800px;\n margin: 0 auto;\n}\n\n#question-container {\n margin-bottom: 2rem;\n}\n\n#options {\n display: grid;\n gap: 1rem;\n}\n\nbutton {\n background-color: var(--primary-color);\n color: white;\n border: none;\n padding: 0.75rem 1.5rem;\n border-radius: 5px;\n cursor: pointer;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: var(--secondary-color);\n}\n\n#progress {\n display: flex;\n align-items: center;\n gap: 1rem;\n margin-top: 2rem;\n}\n\n#quiz-progress {\n flex-grow: 1;\n height: 10px;\n border-radius: 5px;\n}\n\n#results {\n text-align: center;\n}\n\n#chart-container {\n max-width: 400px;\n margin: 2rem auto;\n}\n\n.hidden {\n display: none;\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background-color: var(--primary-color);\n color: white;\n margin-top: 2rem;\n}\n---script.js---\nconst questions = [\n {\n question: \"Does your business have a clear mission and vision?\",\n options: [\"Yes\", \"No\", \"Partially\"],\n weights: [3, 0, 1]\n },\n {\n question: \"Do you have a detailed business plan?\",\n options: [\"Yes\", \"No\", \"In Progress\"],\n weights: [3, 0, 1]\n },\n {\n question: \"Is your target market clearly defined?\",\n options: [\"Yes\", \"No\", \"Partially\"],\n weights: [3, 0, 1]\n },\n {\n question: \"Do you have a unique value proposition?\",\n options: [\"Yes\", \"No\", \"Developing\"],\n weights: [3, 0, 1]\n },\n {\n question: \"Is your financial plan in place?\",\n options: [\"Yes\", \"No\", \"In Progress\"],\n weights: [3, 0, 1]\n },\n {\n question: \"Do you have a marketing strategy?\",\n options: [\"Yes\", \"No\", \"Developing\"],\n weights: [3, 0, 1]\n },\n {\n question: \"Is your team fully trained and prepared?\",\n options: [\"Yes\", \"No\", \"Partially\"],\n weights: [3, 0, 1]\n },\n {\n question: \"Do you have the necessary technology and tools?\",\n options: [\"Yes\", \"No\", \"Partially\"],\n weights: [3, 0, 1]\n },\n {\n question: \"Is your legal and compliance framework in place?\",\n options: [\"Yes\", \"No\", \"In Progress\"],\n weights: [3, 0, 1]\n },\n {\n question: \"Do you have a risk management plan?\",\n options: [\"Yes\", \"No\", \"Developing\"],\n weights: [3, 0, 1]\n }\n];\n\nlet currentQuestion = 0;\nlet score = 0;\n\nconst questionElement = document.getElementById('question');\nconst optionsElement = document.getElementById('options');\nconst progressElement = document.getElementById('quiz-progress');\nconst progressText = document.getElementById('progress-text');\nconst quizSection = document.getElementById('quiz');\nconst resultsSection = document.getElementById('results');\nconst resultText = document.getElementById('result-text');\nconst retryBtn = document.getElementById('retry-btn');\n\nfunction showQuestion() {\n const question = questions[currentQuestion];\n questionElement.textContent = question.question;\n optionsElement.innerHTML = '';\n question.options.forEach((option, index) => {\n const button = document.createElement('button');\n button.textContent = option;\n button.addEventListener('click', () => selectAnswer(index));\n optionsElement.appendChild(button);\n });\n progressElement.value = currentQuestion + 1;\n progressText.textContent = `${currentQuestion + 1}/${questions.length}`;\n}\n\nfunction selectAnswer(index) {\n score += questions[currentQuestion].weights[index];\n currentQuestion++;\n if (currentQuestion < questions.length) {\n showQuestion();\n } else {\n showResults();\n }\n}\n\nfunction showResults() {\n quizSection.classList.add('hidden');\n resultsSection.classList.remove('hidden');\n const percentage = (score / (questions.length * 3)) * 100;\n resultText.textContent = `Your business readiness score is ${percentage.toFixed(1)}%.`;\n drawChart(percentage);\n}\n\nfunction drawChart(percentage) {\n const ctx = document.getElementById('readiness-chart').getContext('2d');\n new Chart(ctx, {\n type: 'doughnut',\n data: {\n labels: ['Readiness', 'Remaining'],\n datasets: [{\n data: [percentage, 100 - percentage],\n backgroundColor: ['#4a90e2', '#f5a623'],\n borderWidth: 0\n }]\n },\n options: {\n responsive: true,\n maintainAspectRatio: false,\n cutout: '80%',\n plugins: {\n legend: {\n display: false\n }\n }\n }\n });\n}\n\nretryBtn.addEventListener('click', () => {\n currentQuestion = 0;\n score = 0;\n quizSection.classList.remove('hidden');\n resultsSection.classList.add('hidden');\n showQuestion();\n});\n\nshowQuestion();\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 273, + "completion_tokens": 1637, + "total_tokens": 1910, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 273 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..d3899fc --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# bizready.scroll.pub +Website generated by DeepSeek from prompt: I want a website that guides users through a ten question quizlet that explores that intricacies of business readiness. there needs to be interactive charts, instructions, numbers, pickers, and sliders \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..727dcb2 --- /dev/null +++ b/script.js @@ -0,0 +1,131 @@ +const questions = [ + { + question: "Does your business have a clear mission and vision?", + options: ["Yes", "No", "Partially"], + weights: [3, 0, 1] + }, + { + question: "Do you have a detailed business plan?", + options: ["Yes", "No", "In Progress"], + weights: [3, 0, 1] + }, + { + question: "Is your target market clearly defined?", + options: ["Yes", "No", "Partially"], + weights: [3, 0, 1] + }, + { + question: "Do you have a unique value proposition?", + options: ["Yes", "No", "Developing"], + weights: [3, 0, 1] + }, + { + question: "Is your financial plan in place?", + options: ["Yes", "No", "In Progress"], + weights: [3, 0, 1] + }, + { + question: "Do you have a marketing strategy?", + options: ["Yes", "No", "Developing"], + weights: [3, 0, 1] + }, + { + question: "Is your team fully trained and prepared?", + options: ["Yes", "No", "Partially"], + weights: [3, 0, 1] + }, + { + question: "Do you have the necessary technology and tools?", + options: ["Yes", "No", "Partially"], + weights: [3, 0, 1] + }, + { + question: "Is your legal and compliance framework in place?", + options: ["Yes", "No", "In Progress"], + weights: [3, 0, 1] + }, + { + question: "Do you have a risk management plan?", + options: ["Yes", "No", "Developing"], + weights: [3, 0, 1] + } +]; + +let currentQuestion = 0; +let score = 0; + +const questionElement = document.getElementById('question'); +const optionsElement = document.getElementById('options'); +const progressElement = document.getElementById('quiz-progress'); +const progressText = document.getElementById('progress-text'); +const quizSection = document.getElementById('quiz'); +const resultsSection = document.getElementById('results'); +const resultText = document.getElementById('result-text'); +const retryBtn = document.getElementById('retry-btn'); + +function showQuestion() { + const question = questions[currentQuestion]; + questionElement.textContent = question.question; + optionsElement.innerHTML = ''; + question.options.forEach((option, index) => { + const button = document.createElement('button'); + button.textContent = option; + button.addEventListener('click', () => selectAnswer(index)); + optionsElement.appendChild(button); + }); + progressElement.value = currentQuestion + 1; + progressText.textContent = `${currentQuestion + 1}/${questions.length}`; +} + +function selectAnswer(index) { + score += questions[currentQuestion].weights[index]; + currentQuestion++; + if (currentQuestion < questions.length) { + showQuestion(); + } else { + showResults(); + } +} + +function showResults() { + quizSection.classList.add('hidden'); + resultsSection.classList.remove('hidden'); + const percentage = (score / (questions.length * 3)) * 100; + resultText.textContent = `Your business readiness score is ${percentage.toFixed(1)}%.`; + drawChart(percentage); +} + +function drawChart(percentage) { + const ctx = document.getElementById('readiness-chart').getContext('2d'); + new Chart(ctx, { + type: 'doughnut', + data: { + labels: ['Readiness', 'Remaining'], + datasets: [{ + data: [percentage, 100 - percentage], + backgroundColor: ['#4a90e2', '#f5a623'], + borderWidth: 0 + }] + }, + options: { + responsive: true, + maintainAspectRatio: false, + cutout: '80%', + plugins: { + legend: { + display: false + } + } + } + }); +} + +retryBtn.addEventListener('click', () => { + currentQuestion = 0; + score = 0; + quizSection.classList.remove('hidden'); + resultsSection.classList.add('hidden'); + showQuestion(); +}); + +showQuestion(); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..b23705a --- /dev/null +++ b/style.css @@ -0,0 +1,86 @@ +:root { + --primary-color: #4a90e2; + --secondary-color: #f5a623; + --background-color: #f8f9fa; + --text-color: #333; + --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; +} + +body { + font-family: var(--font-family); + color: var(--text-color); + background-color: var(--background-color); + margin: 0; + padding: 0; + line-height: 1.6; +} + +header { + background-color: var(--primary-color); + color: white; + padding: 2rem; + text-align: center; +} + +main { + padding: 2rem; + max-width: 800px; + margin: 0 auto; +} + +#question-container { + margin-bottom: 2rem; +} + +#options { + display: grid; + gap: 1rem; +} + +button { + background-color: var(--primary-color); + color: white; + border: none; + padding: 0.75rem 1.5rem; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; +} + +button:hover { + background-color: var(--secondary-color); +} + +#progress { + display: flex; + align-items: center; + gap: 1rem; + margin-top: 2rem; +} + +#quiz-progress { + flex-grow: 1; + height: 10px; + border-radius: 5px; +} + +#results { + text-align: center; +} + +#chart-container { + max-width: 400px; + margin: 2rem auto; +} + +.hidden { + display: none; +} + +footer { + text-align: center; + padding: 1rem; + background-color: var(--primary-color); + color: white; + margin-top: 2rem; +} \ No newline at end of file