commit a8c7b432a8df932353976948320f1fee50c81184
Author: root <root@hub.scroll.pub>
Date: 2024-12-27 19:48:04 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..fb3cae2
--- /dev/null
+++ b/body.html
@@ -0,0 +1,16 @@
+<header>
+ <h1>StockStream</h1>
+ <p>Real-time stock quotes at your fingertips</p>
+</header>
+
+<main>
+ <div class="scroll-container">
+ <div class="ticker-tape">
+ <!-- Stock quotes will be dynamically inserted here -->
+ </div>
+ </div>
+</main>
+
+<footer>
+ <p>Data updates every 10 seconds</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..3bc500a
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://stockstream.scroll.pub
+metaTags
+editButton /edit.html
+title StockStream - Latest Stock Quotes
+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..3452a41
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "0afa64e4-c3cc-49fd-a143-c28bc83317c5",
+ "object": "chat.completion",
+ "created": 1735328867,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nstockstream.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://stockstream.scroll.pub\nmetaTags\neditButton /edit.html\ntitle StockStream - Latest Stock Quotes\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>StockStream</h1>\n <p>Real-time stock quotes at your fingertips</p>\n</header>\n\n<main>\n <div class=\"scroll-container\">\n <div class=\"ticker-tape\">\n <!-- Stock quotes will be dynamically inserted here -->\n </div>\n </div>\n</main>\n\n<footer>\n <p>Data updates every 10 seconds</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #2563eb;\n --background-color: #f8fafc;\n --text-color: #1e293b;\n --border-color: #e2e8f0;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n background-color: 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 background-color: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n}\n\nheader h1 {\n font-size: 2.5rem;\n margin-bottom: 0.5rem;\n}\n\nheader p {\n font-size: 1.1rem;\n opacity: 0.9;\n}\n\n.scroll-container {\n flex: 1;\n overflow: hidden;\n position: relative;\n margin: 2rem auto;\n max-width: 1200px;\n width: 90%;\n}\n\n.ticker-tape {\n display: flex;\n white-space: nowrap;\n animation: scroll 30s linear infinite;\n}\n\n.stock-item {\n display: inline-flex;\n align-items: center;\n background-color: white;\n border: 1px solid var(--border-color);\n border-radius: 0.5rem;\n padding: 1rem;\n margin: 0 1rem;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);\n min-width: 200px;\n}\n\n.stock-symbol {\n font-weight: bold;\n margin-right: 1rem;\n color: var(--primary-color);\n}\n\n.stock-price {\n font-family: 'Courier New', Courier, monospace;\n}\n\n.stock-change {\n margin-left: 1rem;\n font-size: 0.9rem;\n}\n\n.stock-change.positive {\n color: #16a34a;\n}\n\n.stock-change.negative {\n color: #dc2626;\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background-color: white;\n border-top: 1px solid var(--border-color);\n}\n\n@keyframes scroll {\n 0% {\n transform: translateX(100%);\n }\n 100% {\n transform: translateX(-100%);\n }\n}\n\n@media (max-width: 768px) {\n header h1 {\n font-size: 2rem;\n }\n \n .stock-item {\n min-width: 150px;\n padding: 0.75rem;\n margin: 0 0.5rem;\n }\n}\n---script.js---\n// Sample stock data (would be replaced with real API calls)\nconst stocks = [\n { symbol: 'AAPL', price: 189.25, change: 1.45 },\n { symbol: 'GOOGL', price: 138.45, change: -0.75 },\n { symbol: 'TSLA', price: 260.02, change: 3.12 },\n { symbol: 'AMZN', price: 134.95, change: 0.89 },\n { symbol: 'MSFT', price: 340.54, change: -1.23 },\n { symbol: 'NVDA', price: 467.19, change: 5.67 },\n { symbol: 'META', price: 305.38, change: 2.34 },\n { symbol: 'BRK.B', price: 360.75, change: -0.45 }\n];\n\nconst tickerTape = document.querySelector('.ticker-tape');\n\nfunction createStockElement(stock) {\n const div = document.createElement('div');\n div.className = 'stock-item';\n \n const symbol = document.createElement('span');\n symbol.className = 'stock-symbol';\n symbol.textContent = stock.symbol;\n \n const price = document.createElement('span');\n price.className = 'stock-price';\n price.textContent = `$${stock.price.toFixed(2)}`;\n \n const change = document.createElement('span');\n change.className = 'stock-change ' + (stock.change >= 0 ? 'positive' : 'negative');\n change.textContent = `${stock.change >= 0 ? '+' : ''}${stock.change.toFixed(2)}`;\n \n div.append(symbol, price, change);\n return div;\n}\n\nfunction updateTicker() {\n // Clear existing content\n tickerTape.innerHTML = '';\n \n // Duplicate stocks for continuous scrolling\n const duplicatedStocks = [...stocks, ...stocks];\n \n // Create and append stock elements\n duplicatedStocks.forEach(stock => {\n tickerTape.appendChild(createStockElement(stock));\n });\n}\n\n// Initial update\nupdateTicker();\n\n// Update every 10 seconds\nsetInterval(updateTicker, 10000);\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 247,
+ "completion_tokens": 1282,
+ "total_tokens": 1529,
+ "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..b067975
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# stockstream.scroll.pub
+Website generated by DeepSeek from prompt: please help me write a scroll bar that shows latest stock symbol quote
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..65c6c10
--- /dev/null
+++ b/script.js
@@ -0,0 +1,52 @@
+// Sample stock data (would be replaced with real API calls)
+const stocks = [
+ { symbol: 'AAPL', price: 189.25, change: 1.45 },
+ { symbol: 'GOOGL', price: 138.45, change: -0.75 },
+ { symbol: 'TSLA', price: 260.02, change: 3.12 },
+ { symbol: 'AMZN', price: 134.95, change: 0.89 },
+ { symbol: 'MSFT', price: 340.54, change: -1.23 },
+ { symbol: 'NVDA', price: 467.19, change: 5.67 },
+ { symbol: 'META', price: 305.38, change: 2.34 },
+ { symbol: 'BRK.B', price: 360.75, change: -0.45 }
+];
+
+const tickerTape = document.querySelector('.ticker-tape');
+
+function createStockElement(stock) {
+ const div = document.createElement('div');
+ div.className = 'stock-item';
+
+ const symbol = document.createElement('span');
+ symbol.className = 'stock-symbol';
+ symbol.textContent = stock.symbol;
+
+ const price = document.createElement('span');
+ price.className = 'stock-price';
+ price.textContent = `$${stock.price.toFixed(2)}`;
+
+ const change = document.createElement('span');
+ change.className = 'stock-change ' + (stock.change >= 0 ? 'positive' : 'negative');
+ change.textContent = `${stock.change >= 0 ? '+' : ''}${stock.change.toFixed(2)}`;
+
+ div.append(symbol, price, change);
+ return div;
+}
+
+function updateTicker() {
+ // Clear existing content
+ tickerTape.innerHTML = '';
+
+ // Duplicate stocks for continuous scrolling
+ const duplicatedStocks = [...stocks, ...stocks];
+
+ // Create and append stock elements
+ duplicatedStocks.forEach(stock => {
+ tickerTape.appendChild(createStockElement(stock));
+ });
+}
+
+// Initial update
+updateTicker();
+
+// Update every 10 seconds
+setInterval(updateTicker, 10000);
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..0f544b6
--- /dev/null
+++ b/style.css
@@ -0,0 +1,117 @@
+:root {
+ --primary-color: #2563eb;
+ --background-color: #f8fafc;
+ --text-color: #1e293b;
+ --border-color: #e2e8f0;
+}
+
+* {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+}
+
+body {
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
+ background-color: var(--background-color);
+ color: var(--text-color);
+ line-height: 1.6;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+}
+
+header {
+ background-color: var(--primary-color);
+ color: white;
+ padding: 2rem;
+ text-align: center;
+}
+
+header h1 {
+ font-size: 2.5rem;
+ margin-bottom: 0.5rem;
+}
+
+header p {
+ font-size: 1.1rem;
+ opacity: 0.9;
+}
+
+.scroll-container {
+ flex: 1;
+ overflow: hidden;
+ position: relative;
+ margin: 2rem auto;
+ max-width: 1200px;
+ width: 90%;
+}
+
+.ticker-tape {
+ display: flex;
+ white-space: nowrap;
+ animation: scroll 30s linear infinite;
+}
+
+.stock-item {
+ display: inline-flex;
+ align-items: center;
+ background-color: white;
+ border: 1px solid var(--border-color);
+ border-radius: 0.5rem;
+ padding: 1rem;
+ margin: 0 1rem;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+ min-width: 200px;
+}
+
+.stock-symbol {
+ font-weight: bold;
+ margin-right: 1rem;
+ color: var(--primary-color);
+}
+
+.stock-price {
+ font-family: 'Courier New', Courier, monospace;
+}
+
+.stock-change {
+ margin-left: 1rem;
+ font-size: 0.9rem;
+}
+
+.stock-change.positive {
+ color: #16a34a;
+}
+
+.stock-change.negative {
+ color: #dc2626;
+}
+
+footer {
+ text-align: center;
+ padding: 1rem;
+ background-color: white;
+ border-top: 1px solid var(--border-color);
+}
+
+@keyframes scroll {
+ 0% {
+ transform: translateX(100%);
+ }
+ 100% {
+ transform: translateX(-100%);
+ }
+}
+
+@media (max-width: 768px) {
+ header h1 {
+ font-size: 2rem;
+ }
+
+ .stock-item {
+ min-width: 150px;
+ padding: 0.75rem;
+ margin: 0 0.5rem;
+ }
+}
\ No newline at end of file