commit 553d4203f6793d56802576eaa49b944091d3d7a6
Author: root <root@hub.scroll.pub>
Date: 2024-12-29 14:49:34 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..aadb1c1
--- /dev/null
+++ b/body.html
@@ -0,0 +1,44 @@
+<header>
+ <h1>Decide: Work or PhD?</h1>
+ <p>Take control of your future with this interactive decision-making tool.</p>
+</header>
+
+<main>
+ <section id="quiz">
+ <h2>Answer these questions to get personalized insights</h2>
+ <form id="decisionForm">
+ <div class="question">
+ <label for="passion">How passionate are you about research?</label>
+ <input type="range" id="passion" min="1" max="10" value="5">
+ <span class="value">5</span>
+ </div>
+
+ <div class="question">
+ <label for="career">How important is immediate career progression?</label>
+ <input type="range" id="career" min="1" max="10" value="5">
+ <span class="value">5</span>
+ </div>
+
+ <div class="question">
+ <label for="financial">How important is immediate financial stability?</label>
+ <input type="range" id="financial" min="1" max="10" value="5">
+ <span class="value">5</span>
+ </div>
+
+ <button type="submit">Get Recommendation</button>
+ </form>
+ </section>
+
+ <section id="result" class="hidden">
+ <h2>Your Recommendation</h2>
+ <div class="chart-container">
+ <canvas id="decisionChart"></canvas>
+ </div>
+ <p class="recommendation-text"></p>
+ <button id="retake">Retake Quiz</button>
+ </section>
+</main>
+
+<footer>
+ <p>Remember, this is just a tool to help you think. The final decision is yours.</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..2127cf0
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://decide.scroll.pub
+metaTags
+editButton /edit.html
+title Decide: Work or PhD?
+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..a9969c9
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "2a12bcb9-03ec-44f1-9d85-174f9bf9c87e",
+ "object": "chat.completion",
+ "created": 1735483747,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\ndecide.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://decide.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Decide: Work or PhD?\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Decide: Work or PhD?</h1>\n <p>Take control of your future with this interactive decision-making tool.</p>\n</header>\n\n<main>\n <section id=\"quiz\">\n <h2>Answer these questions to get personalized insights</h2>\n <form id=\"decisionForm\">\n <div class=\"question\">\n <label for=\"passion\">How passionate are you about research?</label>\n <input type=\"range\" id=\"passion\" min=\"1\" max=\"10\" value=\"5\">\n <span class=\"value\">5</span>\n </div>\n \n <div class=\"question\">\n <label for=\"career\">How important is immediate career progression?</label>\n <input type=\"range\" id=\"career\" min=\"1\" max=\"10\" value=\"5\">\n <span class=\"value\">5</span>\n </div>\n \n <div class=\"question\">\n <label for=\"financial\">How important is immediate financial stability?</label>\n <input type=\"range\" id=\"financial\" min=\"1\" max=\"10\" value=\"5\">\n <span class=\"value\">5</span>\n </div>\n \n <button type=\"submit\">Get Recommendation</button>\n </form>\n </section>\n\n <section id=\"result\" class=\"hidden\">\n <h2>Your Recommendation</h2>\n <div class=\"chart-container\">\n <canvas id=\"decisionChart\"></canvas>\n </div>\n <p class=\"recommendation-text\"></p>\n <button id=\"retake\">Retake Quiz</button>\n </section>\n</main>\n\n<footer>\n <p>Remember, this is just a tool to help you think. The final decision is yours.</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #50e3c2;\n --text-color: #333;\n --bg-color: #f5f7fa;\n --shadow: 0 2px 10px rgba(0,0,0,0.1);\n}\n\n* {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n\nbody {\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background-color: var(--bg-color);\n padding: 2rem;\n max-width: 800px;\n margin: 0 auto;\n}\n\nheader {\n text-align: center;\n margin-bottom: 2rem;\n}\n\nh1 {\n color: var(--primary-color);\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\nh2 {\n color: var(--primary-color);\n margin-bottom: 1rem;\n}\n\n.question {\n margin: 1.5rem 0;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: 500;\n}\n\ninput[type=\"range\"] {\n width: 100%;\n margin: 0.5rem 0;\n -webkit-appearance: none;\n appearance: none;\n height: 8px;\n background: #ddd;\n border-radius: 5px;\n outline: none;\n opacity: 0.7;\n transition: opacity 0.2s;\n}\n\ninput[type=\"range\"]:hover {\n opacity: 1;\n}\n\ninput[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 20px;\n height: 20px;\n background: var(--primary-color);\n border-radius: 50%;\n cursor: pointer;\n}\n\n.value {\n display: inline-block;\n margin-left: 1rem;\n font-weight: bold;\n color: var(--primary-color);\n}\n\nbutton {\n background-color: var(--primary-color);\n color: white;\n border: none;\n padding: 0.8rem 1.5rem;\n border-radius: 5px;\n cursor: pointer;\n font-size: 1rem;\n transition: background-color 0.3s;\n width: 100%;\n margin-top: 1rem;\n}\n\nbutton:hover {\n background-color: #357abd;\n}\n\n#result {\n margin-top: 2rem;\n}\n\n.chart-container {\n max-width: 400px;\n margin: 1rem auto;\n}\n\n.hidden {\n display: none;\n}\n\nfooter {\n text-align: center;\n margin-top: 2rem;\n color: #666;\n}\n\n@media (max-width: 600px) {\n body {\n padding: 1rem;\n }\n \n h1 {\n font-size: 2rem;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n const form = document.getElementById('decisionForm');\n const resultSection = document.getElementById('result');\n const recommendationText = document.querySelector('.recommendation-text');\n const retakeButton = document.getElementById('retake');\n \n // Update range values\n const rangeInputs = document.querySelectorAll('input[type=\"range\"]');\n rangeInputs.forEach(input => {\n const valueDisplay = input.nextElementSibling;\n valueDisplay.textContent = input.value;\n \n input.addEventListener('input', () => {\n valueDisplay.textContent = input.value;\n });\n });\n\n form.addEventListener('submit', function(e) {\n e.preventDefault();\n \n // Get values\n const passion = parseInt(document.getElementById('passion').value);\n const career = parseInt(document.getElementById('career').value);\n const financial = parseInt(document.getElementById('financial').value);\n \n // Calculate scores\n const phdScore = passion * 0.6 + (10 - career) * 0.2 + (10 - financial) * 0.2;\n const workScore = (10 - passion) * 0.2 + career * 0.6 + financial * 0.2;\n \n // Show result\n form.classList.add('hidden');\n resultSection.classList.remove('hidden');\n \n // Draw chart\n const ctx = document.getElementById('decisionChart').getContext('2d');\n new Chart(ctx, {\n type: 'bar',\n data: {\n labels: ['PhD', 'Work'],\n datasets: [{\n label: 'Recommendation Score',\n data: [phdScore, workScore],\n backgroundColor: [\n 'rgba(74, 144, 226, 0.8)',\n 'rgba(80, 227, 194, 0.8)'\n ],\n borderColor: [\n 'rgba(74, 144, 226, 1)',\n 'rgba(80, 227, 194, 1)'\n ],\n borderWidth: 1\n }]\n },\n options: {\n scales: {\n y: {\n beginAtZero: true,\n max: 10\n }\n },\n responsive: true,\n maintainAspectRatio: false\n }\n });\n \n // Show recommendation text\n if (phdScore > workScore) {\n recommendationText.textContent = \"Based on your answers, pursuing a PhD might be the better choice for you.\";\n } else {\n recommendationText.textContent = \"Based on your answers, entering the workforce might be the better choice for you.\";\n }\n });\n\n retakeButton.addEventListener('click', function() {\n resultSection.classList.add('hidden');\n form.classList.remove('hidden');\n });\n});\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 254,
+ "completion_tokens": 1719,
+ "total_tokens": 1973,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 254
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..32c5568
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# decide2.scroll.pub
+Website generated by DeepSeek from prompt: 创建一个网站,帮助我评估是否要去工作还是去读博士,需要有一些数值分析和交互性
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..8a7a5d1
--- /dev/null
+++ b/script.js
@@ -0,0 +1,78 @@
+document.addEventListener('DOMContentLoaded', function() {
+ const form = document.getElementById('decisionForm');
+ const resultSection = document.getElementById('result');
+ const recommendationText = document.querySelector('.recommendation-text');
+ const retakeButton = document.getElementById('retake');
+
+ // Update range values
+ const rangeInputs = document.querySelectorAll('input[type="range"]');
+ rangeInputs.forEach(input => {
+ const valueDisplay = input.nextElementSibling;
+ valueDisplay.textContent = input.value;
+
+ input.addEventListener('input', () => {
+ valueDisplay.textContent = input.value;
+ });
+ });
+
+ form.addEventListener('submit', function(e) {
+ e.preventDefault();
+
+ // Get values
+ const passion = parseInt(document.getElementById('passion').value);
+ const career = parseInt(document.getElementById('career').value);
+ const financial = parseInt(document.getElementById('financial').value);
+
+ // Calculate scores
+ const phdScore = passion * 0.6 + (10 - career) * 0.2 + (10 - financial) * 0.2;
+ const workScore = (10 - passion) * 0.2 + career * 0.6 + financial * 0.2;
+
+ // Show result
+ form.classList.add('hidden');
+ resultSection.classList.remove('hidden');
+
+ // Draw chart
+ const ctx = document.getElementById('decisionChart').getContext('2d');
+ new Chart(ctx, {
+ type: 'bar',
+ data: {
+ labels: ['PhD', 'Work'],
+ datasets: [{
+ label: 'Recommendation Score',
+ data: [phdScore, workScore],
+ backgroundColor: [
+ 'rgba(74, 144, 226, 0.8)',
+ 'rgba(80, 227, 194, 0.8)'
+ ],
+ borderColor: [
+ 'rgba(74, 144, 226, 1)',
+ 'rgba(80, 227, 194, 1)'
+ ],
+ borderWidth: 1
+ }]
+ },
+ options: {
+ scales: {
+ y: {
+ beginAtZero: true,
+ max: 10
+ }
+ },
+ responsive: true,
+ maintainAspectRatio: false
+ }
+ });
+
+ // Show recommendation text
+ if (phdScore > workScore) {
+ recommendationText.textContent = "Based on your answers, pursuing a PhD might be the better choice for you.";
+ } else {
+ recommendationText.textContent = "Based on your answers, entering the workforce might be the better choice for you.";
+ }
+ });
+
+ retakeButton.addEventListener('click', function() {
+ resultSection.classList.add('hidden');
+ form.classList.remove('hidden');
+ });
+});
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..ce58713
--- /dev/null
+++ b/style.css
@@ -0,0 +1,129 @@
+:root {
+ --primary-color: #4a90e2;
+ --secondary-color: #50e3c2;
+ --text-color: #333;
+ --bg-color: #f5f7fa;
+ --shadow: 0 2px 10px rgba(0,0,0,0.1);
+}
+
+* {
+ box-sizing: border-box;
+ margin: 0;
+ padding: 0;
+}
+
+body {
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background-color: var(--bg-color);
+ padding: 2rem;
+ max-width: 800px;
+ margin: 0 auto;
+}
+
+header {
+ text-align: center;
+ margin-bottom: 2rem;
+}
+
+h1 {
+ color: var(--primary-color);
+ font-size: 2.5rem;
+ margin-bottom: 0.5rem;
+}
+
+h2 {
+ color: var(--primary-color);
+ margin-bottom: 1rem;
+}
+
+.question {
+ margin: 1.5rem 0;
+}
+
+label {
+ display: block;
+ margin-bottom: 0.5rem;
+ font-weight: 500;
+}
+
+input[type="range"] {
+ width: 100%;
+ margin: 0.5rem 0;
+ -webkit-appearance: none;
+ appearance: none;
+ height: 8px;
+ background: #ddd;
+ border-radius: 5px;
+ outline: none;
+ opacity: 0.7;
+ transition: opacity 0.2s;
+}
+
+input[type="range"]:hover {
+ opacity: 1;
+}
+
+input[type="range"]::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ appearance: none;
+ width: 20px;
+ height: 20px;
+ background: var(--primary-color);
+ border-radius: 50%;
+ cursor: pointer;
+}
+
+.value {
+ display: inline-block;
+ margin-left: 1rem;
+ font-weight: bold;
+ color: var(--primary-color);
+}
+
+button {
+ background-color: var(--primary-color);
+ color: white;
+ border: none;
+ padding: 0.8rem 1.5rem;
+ border-radius: 5px;
+ cursor: pointer;
+ font-size: 1rem;
+ transition: background-color 0.3s;
+ width: 100%;
+ margin-top: 1rem;
+}
+
+button:hover {
+ background-color: #357abd;
+}
+
+#result {
+ margin-top: 2rem;
+}
+
+.chart-container {
+ max-width: 400px;
+ margin: 1rem auto;
+}
+
+.hidden {
+ display: none;
+}
+
+footer {
+ text-align: center;
+ margin-top: 2rem;
+ color: #666;
+}
+
+@media (max-width: 600px) {
+ body {
+ padding: 1rem;
+ }
+
+ h1 {
+ font-size: 2rem;
+ }
+}
\ No newline at end of file