commit c78d114b71fc397f11977fb1eaa0bfa106348f6a
Author: root <root@hub.scroll.pub> Date: 2024-12-28 03:45:28 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..803ffe1 --- /dev/null +++ b/body.html @@ -0,0 +1,20 @@ +<header> + <h1>Secret Scroll</h1> + <p>Write your secret, burn it, and share it securely via QR code.</p> +</header> + +<main> + <section id="secret-section"> + <textarea id="secret-input" placeholder="Write your secret here..." maxlength="500"></textarea> + <button id="fire-button" aria-label="Burn secret and generate QR code">🔥 Fire It!</button> + </section> + + <section id="qr-section" class="hidden"> + <div id="qr-code"></div> + <p>Scan this QR code to view the secret. It will self-destruct after being viewed once.</p> + </section> +</main> + +<footer> + <p>Your secrets are safe with us. Once burned, they're gone forever.</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..9a1d51d --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://secretscroll.scroll.pub +metaTags +editButton /edit.html +title Secret Scroll - Burn Your Secrets +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..d830a65 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "ca3a99dc-746f-4d42-9ea0-2cdf26ab18b6", + "object": "chat.completion", + "created": 1735357509, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\nsecretscroll.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://secretscroll.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Secret Scroll - Burn Your Secrets\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Secret Scroll</h1>\n <p>Write your secret, burn it, and share it securely via QR code.</p>\n</header>\n\n<main>\n <section id=\"secret-section\">\n <textarea id=\"secret-input\" placeholder=\"Write your secret here...\" maxlength=\"500\"></textarea>\n <button id=\"fire-button\" aria-label=\"Burn secret and generate QR code\">🔥 Fire It!</button>\n </section>\n\n <section id=\"qr-section\" class=\"hidden\">\n <div id=\"qr-code\"></div>\n <p>Scan this QR code to view the secret. It will self-destruct after being viewed once.</p>\n </section>\n</main>\n\n<footer>\n <p>Your secrets are safe with us. Once burned, they're gone forever.</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #ff6b6b;\n --secondary-color: #4ecdc4;\n --background-color: #1a1a1a;\n --text-color: #f0f0f0;\n --font-family: 'Segoe UI', system-ui, sans-serif;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n background-color: var(--background-color);\n color: var(--text-color);\n font-family: var(--font-family);\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 2rem;\n}\n\nheader {\n text-align: center;\n margin-bottom: 2rem;\n}\n\nh1 {\n font-size: 2.5rem;\n color: var(--primary-color);\n margin-bottom: 0.5rem;\n}\n\nmain {\n width: 100%;\n max-width: 600px;\n}\n\n#secret-section {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\n\ntextarea {\n width: 100%;\n height: 200px;\n padding: 1rem;\n border: 2px solid var(--secondary-color);\n border-radius: 8px;\n background-color: transparent;\n color: var(--text-color);\n font-size: 1rem;\n resize: none;\n transition: border-color 0.3s ease;\n}\n\ntextarea:focus {\n outline: none;\n border-color: var(--primary-color);\n}\n\n#fire-button {\n background-color: var(--primary-color);\n color: white;\n border: none;\n padding: 1rem 2rem;\n border-radius: 8px;\n font-size: 1.2rem;\n cursor: pointer;\n transition: transform 0.2s ease, background-color 0.3s ease;\n}\n\n#fire-button:hover {\n background-color: #ff5252;\n transform: scale(1.05);\n}\n\n#fire-button:active {\n transform: scale(0.95);\n}\n\n#qr-section {\n margin-top: 2rem;\n text-align: center;\n display: none;\n}\n\n#qr-section.visible {\n display: block;\n}\n\n#qr-code {\n width: 200px;\n height: 200px;\n margin: 0 auto 1rem;\n background-color: white;\n padding: 1rem;\n border-radius: 8px;\n}\n\nfooter {\n margin-top: 2rem;\n text-align: center;\n color: #666;\n}\n\n@media (max-width: 600px) {\n h1 {\n font-size: 2rem;\n }\n \n textarea {\n height: 150px;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const secretInput = document.getElementById('secret-input');\n const fireButton = document.getElementById('fire-button');\n const qrSection = document.getElementById('qr-section');\n const qrCodeDiv = document.getElementById('qr-code');\n\n fireButton.addEventListener('click', async () => {\n const secret = secretInput.value.trim();\n if (!secret) return;\n\n // Disable input and button\n secretInput.disabled = true;\n fireButton.disabled = true;\n\n try {\n // Generate QR code\n const qrCode = await generateQRCode(secret);\n qrCodeDiv.innerHTML = qrCode;\n qrSection.classList.add('visible');\n\n // Clear and disable the input\n secretInput.value = '';\n } catch (error) {\n console.error('Error generating QR code:', error);\n alert('Failed to generate QR code. Please try again.');\n }\n });\n\n async function generateQRCode(text) {\n const qrCode = new QRCode(qrCodeDiv, {\n text: text,\n width: 200,\n height: 200,\n colorDark: \"#000000\",\n colorLight: \"#ffffff\",\n correctLevel: QRCode.CorrectLevel.H\n });\n\n return qrCode._el.innerHTML;\n }\n\n // Simple QRCode implementation\n class QRCode {\n constructor(element, options) {\n this._el = element;\n this._options = options;\n this._generate();\n }\n\n _generate() {\n const size = this._options.width;\n const text = this._options.text;\n const darkColor = this._options.colorDark;\n const lightColor = this._options.colorLight;\n\n // Create a simple QR code representation\n const canvas = document.createElement('canvas');\n canvas.width = size;\n canvas.height = size;\n const ctx = canvas.getContext('2d');\n\n // Fill background\n ctx.fillStyle = lightColor;\n ctx.fillRect(0, 0, size, size);\n\n // Draw QR code pattern\n ctx.fillStyle = darkColor;\n for (let i = 0; i < text.length; i++) {\n const x = (i % 20) * 10;\n const y = Math.floor(i / 20) * 10;\n ctx.fillRect(x, y, 8, 8);\n }\n\n this._el.appendChild(canvas);\n }\n }\n});\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 255, + "completion_tokens": 1390, + "total_tokens": 1645, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 255 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..ac86ee8 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# secretscroll1.scroll.pub +Website generated by DeepSeek from prompt: I want a complete crud operation that holds secrets then burns them and generates QR code when you press fire \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..50b1b63 --- /dev/null +++ b/script.js @@ -0,0 +1,77 @@ +document.addEventListener('DOMContentLoaded', () => { + const secretInput = document.getElementById('secret-input'); + const fireButton = document.getElementById('fire-button'); + const qrSection = document.getElementById('qr-section'); + const qrCodeDiv = document.getElementById('qr-code'); + + fireButton.addEventListener('click', async () => { + const secret = secretInput.value.trim(); + if (!secret) return; + + // Disable input and button + secretInput.disabled = true; + fireButton.disabled = true; + + try { + // Generate QR code + const qrCode = await generateQRCode(secret); + qrCodeDiv.innerHTML = qrCode; + qrSection.classList.add('visible'); + + // Clear and disable the input + secretInput.value = ''; + } catch (error) { + console.error('Error generating QR code:', error); + alert('Failed to generate QR code. Please try again.'); + } + }); + + async function generateQRCode(text) { + const qrCode = new QRCode(qrCodeDiv, { + text: text, + width: 200, + height: 200, + colorDark: "#000000", + colorLight: "#ffffff", + correctLevel: QRCode.CorrectLevel.H + }); + + return qrCode._el.innerHTML; + } + + // Simple QRCode implementation + class QRCode { + constructor(element, options) { + this._el = element; + this._options = options; + this._generate(); + } + + _generate() { + const size = this._options.width; + const text = this._options.text; + const darkColor = this._options.colorDark; + const lightColor = this._options.colorLight; + + // Create a simple QR code representation + const canvas = document.createElement('canvas'); + canvas.width = size; + canvas.height = size; + const ctx = canvas.getContext('2d'); + + // Fill background + ctx.fillStyle = lightColor; + ctx.fillRect(0, 0, size, size); + + // Draw QR code pattern + ctx.fillStyle = darkColor; + for (let i = 0; i < text.length; i++) { + const x = (i % 20) * 10; + const y = Math.floor(i / 20) * 10; + ctx.fillRect(x, y, 8, 8); + } + + this._el.appendChild(canvas); + } + } +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..37cfc23 --- /dev/null +++ b/style.css @@ -0,0 +1,120 @@ +:root { + --primary-color: #ff6b6b; + --secondary-color: #4ecdc4; + --background-color: #1a1a1a; + --text-color: #f0f0f0; + --font-family: 'Segoe UI', system-ui, sans-serif; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + background-color: var(--background-color); + color: var(--text-color); + font-family: var(--font-family); + min-height: 100vh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 2rem; +} + +header { + text-align: center; + margin-bottom: 2rem; +} + +h1 { + font-size: 2.5rem; + color: var(--primary-color); + margin-bottom: 0.5rem; +} + +main { + width: 100%; + max-width: 600px; +} + +#secret-section { + display: flex; + flex-direction: column; + gap: 1rem; +} + +textarea { + width: 100%; + height: 200px; + padding: 1rem; + border: 2px solid var(--secondary-color); + border-radius: 8px; + background-color: transparent; + color: var(--text-color); + font-size: 1rem; + resize: none; + transition: border-color 0.3s ease; +} + +textarea:focus { + outline: none; + border-color: var(--primary-color); +} + +#fire-button { + background-color: var(--primary-color); + color: white; + border: none; + padding: 1rem 2rem; + border-radius: 8px; + font-size: 1.2rem; + cursor: pointer; + transition: transform 0.2s ease, background-color 0.3s ease; +} + +#fire-button:hover { + background-color: #ff5252; + transform: scale(1.05); +} + +#fire-button:active { + transform: scale(0.95); +} + +#qr-section { + margin-top: 2rem; + text-align: center; + display: none; +} + +#qr-section.visible { + display: block; +} + +#qr-code { + width: 200px; + height: 200px; + margin: 0 auto 1rem; + background-color: white; + padding: 1rem; + border-radius: 8px; +} + +footer { + margin-top: 2rem; + text-align: center; + color: #666; +} + +@media (max-width: 600px) { + h1 { + font-size: 2rem; + } + + textarea { + height: 150px; + } +} \ No newline at end of file