commit 3d933910ea6e97cd4aa9aff8b6dc2828640b9bd8
Author: root <root@hub.scroll.pub> Date: 2024-12-28 12:50:47 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..2cf968d --- /dev/null +++ b/body.html @@ -0,0 +1,26 @@ +<header> + <nav> + <div class="logo">你好</div> + </nav> +</header> + +<main> + <section class="hero"> + <div class="character">你</div> + <div class="character">好</div> + <p class="translation">Hello</p> + </section> + + <section class="content"> + <div class="info"> + <h1>Discover Chinese</h1> + <p>你好 (nǐ hǎo) is the standard greeting in Chinese, meaning "hello"</p> + </div> + </section> +</main> + +<footer> + <nav> + <a href="#" aria-label="Top">Back to top</a> + </nav> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..6f73fe4 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://nihao.scroll.pub +metaTags +editButton /edit.html +title 你好 | Hello +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..c10d6ad --- /dev/null +++ b/prompt.json @@ -0,0 +1,20 @@ +{ + "id": "msg_01AxsYXmZ2kmcuEMvG1ygb8U", + "type": "message", + "role": "assistant", + "model": "claude-3-5-sonnet-20241022", + "content": [ + { + "type": "text", + "text": "Let me create a website that means \"Hello\" in Chinese with an elegant, modern design.\n\n---domain---\nnihao.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://nihao.scroll.pub\nmetaTags\neditButton /edit.html\ntitle 你好 | Hello\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <nav>\n <div class=\"logo\">你好</div>\n </nav>\n</header>\n\n<main>\n <section class=\"hero\">\n <div class=\"character\">你</div>\n <div class=\"character\">好</div>\n <p class=\"translation\">Hello</p>\n </section>\n \n <section class=\"content\">\n <div class=\"info\">\n <h1>Discover Chinese</h1>\n <p>你好 (nǐ hǎo) is the standard greeting in Chinese, meaning \"hello\"</p>\n </div>\n </section>\n</main>\n\n<footer>\n <nav>\n <a href=\"#\" aria-label=\"Top\">Back to top</a>\n </nav>\n</footer>\n---style.css---\n:root {\n --primary-color: #e60012;\n --text-color: #333;\n --bg-color: #fff;\n --accent-color: #ffd700;\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, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background: var(--bg-color);\n}\n\nheader {\n padding: 1rem;\n background: var(--bg-color);\n box-shadow: 0 2px 10px rgba(0,0,0,0.1);\n position: fixed;\n width: 100%;\n z-index: 100;\n}\n\n.logo {\n font-size: 2rem;\n font-weight: bold;\n color: var(--primary-color);\n}\n\n.hero {\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 2rem;\n background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);\n}\n\n.character {\n font-size: 15vw;\n font-weight: bold;\n color: var(--primary-color);\n opacity: 0;\n transform: translateY(50px);\n animation: fadeUp 0.8s ease forwards;\n}\n\n.character:nth-child(2) {\n animation-delay: 0.3s;\n}\n\n.translation {\n font-size: 2rem;\n margin-top: 2rem;\n color: var(--text-color);\n opacity: 0;\n transform: translateY(30px);\n animation: fadeUp 0.8s ease forwards 0.6s;\n}\n\n.content {\n padding: 4rem 2rem;\n text-align: center;\n}\n\n.info {\n max-width: 600px;\n margin: 0 auto;\n}\n\nh1 {\n font-size: 2.5rem;\n margin-bottom: 1rem;\n color: var(--primary-color);\n}\n\nfooter {\n padding: 2rem;\n text-align: center;\n background: #f8f8f8;\n}\n\nfooter a {\n color: var(--text-color);\n text-decoration: none;\n transition: color 0.3s ease;\n}\n\nfooter a:hover {\n color: var(--primary-color);\n}\n\n@keyframes fadeUp {\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@media (max-width: 768px) {\n .character {\n font-size: 20vw;\n }\n \n .translation {\n font-size: 1.5rem;\n }\n \n h1 {\n font-size: 2rem;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n // Smooth scroll for anchor links\n document.querySelectorAll('a[href^=\"#\"]').forEach(anchor => {\n anchor.addEventListener('click', function (e) {\n e.preventDefault();\n document.querySelector(this.getAttribute('href')).scrollIntoView({\n behavior: 'smooth'\n });\n });\n });\n\n // Add parallax effect to characters\n window.addEventListener('scroll', () => {\n const scrolled = window.pageYOffset;\n document.querySelectorAll('.character').forEach(char => {\n char.style.transform = `translateY(${scrolled * 0.1}px)`;\n });\n });\n});\n---end---\n\nThis website features:\n- Clean, minimal design focused on the Chinese characters\n- Beautiful animations for the characters and translation\n- Smooth parallax scrolling effect\n- Fully responsive layout\n- Semantic HTML structure\n- Accessible navigation\n- Performance optimized with minimal JavaScript\n- Modern CSS with variables and gradients\n- Mobile-first approach\n- Clear visual hierarchy\n\nThe domain \"nihao.scroll.pub\" is perfect as it:\n- Uses the pinyin (romanized) spelling of 你好 (nǐ hǎo)\n- Is short and memorable\n- Directly relates to the content\n- Is easy to type and share" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "usage": { + "input_tokens": 272, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "output_tokens": 1414 + } +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..7947dc1 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# nihao.scroll.pub +Website generated by Claude from prompt: 你好 \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..340c5b3 --- /dev/null +++ b/script.js @@ -0,0 +1,19 @@ +document.addEventListener('DOMContentLoaded', () => { + // Smooth scroll for anchor links + document.querySelectorAll('a[href^="#"]').forEach(anchor => { + anchor.addEventListener('click', function (e) { + e.preventDefault(); + document.querySelector(this.getAttribute('href')).scrollIntoView({ + behavior: 'smooth' + }); + }); + }); + + // Add parallax effect to characters + window.addEventListener('scroll', () => { + const scrolled = window.pageYOffset; + document.querySelectorAll('.character').forEach(char => { + char.style.transform = `translateY(${scrolled * 0.1}px)`; + }); + }); +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..b2bb8b1 --- /dev/null +++ b/style.css @@ -0,0 +1,119 @@ +:root { + --primary-color: #e60012; + --text-color: #333; + --bg-color: #fff; + --accent-color: #ffd700; +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + line-height: 1.6; + color: var(--text-color); + background: var(--bg-color); +} + +header { + padding: 1rem; + background: var(--bg-color); + box-shadow: 0 2px 10px rgba(0,0,0,0.1); + position: fixed; + width: 100%; + z-index: 100; +} + +.logo { + font-size: 2rem; + font-weight: bold; + color: var(--primary-color); +} + +.hero { + min-height: 100vh; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + padding: 2rem; + background: linear-gradient(135deg, #fff5f5 0%, #fff 100%); +} + +.character { + font-size: 15vw; + font-weight: bold; + color: var(--primary-color); + opacity: 0; + transform: translateY(50px); + animation: fadeUp 0.8s ease forwards; +} + +.character:nth-child(2) { + animation-delay: 0.3s; +} + +.translation { + font-size: 2rem; + margin-top: 2rem; + color: var(--text-color); + opacity: 0; + transform: translateY(30px); + animation: fadeUp 0.8s ease forwards 0.6s; +} + +.content { + padding: 4rem 2rem; + text-align: center; +} + +.info { + max-width: 600px; + margin: 0 auto; +} + +h1 { + font-size: 2.5rem; + margin-bottom: 1rem; + color: var(--primary-color); +} + +footer { + padding: 2rem; + text-align: center; + background: #f8f8f8; +} + +footer a { + color: var(--text-color); + text-decoration: none; + transition: color 0.3s ease; +} + +footer a:hover { + color: var(--primary-color); +} + +@keyframes fadeUp { + to { + opacity: 1; + transform: translateY(0); + } +} + +@media (max-width: 768px) { + .character { + font-size: 20vw; + } + + .translation { + font-size: 1.5rem; + } + + h1 { + font-size: 2rem; + } +} \ No newline at end of file