SiteโฏBuilder
Editing:
demo-prompt.html
writable 0666
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Promptinator Demo โ Bedtime-Story Generator</title> <!-- Pico.css for quick, modern defaults --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"> <style> /* ---------- Layout helpers ---------- */ body { min-height: 100vh; display: flex; flex-direction: column; background: #f4f6fb; } header { background: #5c3bff; /* Melanie-AI purple */ color: #fff; text-align: center; padding: 0.5rem 0; /* Slimmed-down header */ } header h1 { margin: 0; font-size: 1.5rem; } header small { display: none; /* Hide tagline */ } /* simple nav */ nav { display: flex; justify-content: center; margin-top: 0.4rem; } nav ul { display: flex; gap: 1rem; margin: 0; padding: 0; list-style: none; } nav a { color: #e0dcff; font-weight: 500; text-decoration: none; font-size: 0.9rem; } nav a:hover { text-decoration: underline; } main { flex: 1; /* push footer to bottom */ display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; margin-top: 1rem; /* Space below header */ } .card { background: #fff; padding: 2rem 2.5rem; border-radius: 14px; border: 1px solid #e0e0e0; /* Soft border to focus card */ box-shadow: 0 4px 20px rgba(0,0,0,0.05); width: 100%; max-width: 730px; } /* Keep your existing token / dialog tweaks */ .token { color:#5c3bff; font-weight:600; cursor:pointer; } dialog { border:none; border-radius:10px; max-width:440px; padding:0; } dialog::backdrop { background:rgba(0,0,0,0.4); } .popup-body { background:#fff; padding:1.3rem 1.6rem; border-radius:12px; box-shadow:0 4px 26px rgba(0,0,0,0.2); } fieldset { border:1px solid #ccd; border-radius:8px; padding:.8rem 1rem; background:#fff; margin-bottom:1rem; } iframe { border:1px solid #ccd; width:100%; min-height:340px; margin-top:.6rem; } .ai-buttons { margin-top:1.3rem; display:flex; gap:.75rem; flex-wrap: wrap; justify-content: center; } .ai-buttons button { flex: 1 1 120px; } footer { padding: 0.5rem 0; font-size: 0.8rem; color: #888; text-align: center; } </style> </head> <body> <!-- ---------- HEADER ---------- --> <header> <h1>Promptinator Demo</h1> <!-- Tagline hidden --> <!-- NEW NAVIGATION --> <nav> <ul> <li><a href="./">Code Builder</a></li> <li><a href="demo-prompt.html">Demo</a></li> <li><a href="guide.html">Guide</a></li> </ul> </nav> </header> <!-- ---------- MAIN CONTENT ---------- --> <main> <div class="card"> <h2 style="margin-top:0">๐ง The Promptinator</h2> <!-- Prompt container --> <div id="prompt-app" data-prompt="Craft a [B-tone-|Soothing|Adventurous|Funny|Magical|Dreamy|~Soothing~] bedtime story, told in the [B-pov-|First person|Second person|Third person|~Third person~] perspective, with a [B-pace-|Slow and gentle|Moderate|Lively|~Slow and gentle~] narrative flow. The hero is a [D-gender-|Boy|Girl|~Girl~] who is [D-age-12~7~] years old, named [Melanie]. Set the adventure in a [C-setting-|Enchanted Forest|Starry Space Station|Under-sea Kingdom|Friendly Dragonโs Lair|Snowy Mountain Village|~Enchanted Forest~] and sprinkle in any of these magical elements if selected: [C-features-|Friendly Dragon|Singing Tree|Magic Carpet|Glow-in-the-dark Fireflies|Talking Moon|~Friendly Dragon~]. Throughout the tale, weave the life lesson of [B-moral-|Kindness|Courage|Curiosity|Friendship|Gratitude|Perseverance|~Kindness~] and, if it fits naturally, include a cameo by her favourite animal, a [D-favAnimal-|Unicorn|Puppy|Kitten|Dinosaur|Dragon|Dolphin|Bunny|Elephant|Penguin|Butterfly|Panda|Horse|Lion|Owl|~Unicorn~]. Keep the length around [D-wordcount-700~400~] words and aim for a vividness level of [D-vivid-5~4~] / 5, guiding the listener peacefully toward sleep."> </div> <!-- AI buttons --> <div class="ai-buttons"> <button type="button" onclick="openPrompt('chatgpt')">Open in ChatGPT</button> <button type="button" onclick="openPrompt('perplexity')">Open in Perplexity</button> <button type="button" onclick="openPrompt('copilot')">Open in Copilot</button> </div> </div> </main> <!-- ---------- FOOTER ---------- --> <footer> <small>Promptinator Demo</small> </footer> <!-- Promptify runtime (ES module) --> <script type="module"> import Promptify from './promptify.js'; document.addEventListener('DOMContentLoaded', () => { const app = document.getElementById('prompt-app'); Promptify.init({ template: app.dataset.prompt, mount: app }); }); </script> <!-- AI button helper --> <script> window.openPrompt = function(engine) { const urls = { chatgpt: 'https://chat.openai.com/?prompt=', perplexity: 'https://www.perplexity.ai/search?q=', copilot: 'https://copilot.microsoft.com/?q=' }; const app = document.getElementById('prompt-app'); const text = app.innerText.trim(); window.open(urls[engine] + encodeURIComponent(text), '_blank'); }; </script> </body> </html>
Save changes
Create folder
writable 0777
Create
Cancel