Changes to viewscroll.pub.scroll.pub

root
root
7 days ago
Initial commit
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://viewscroll.pub
+ metaTags
+ editButton /edit.html
+ title HTML Viewer - View Source Code Beautifully
+ style.css
+ header
+ class hero
+ nav
+ div HTML Viewer
+ class logo
+ div
+ class nav-links
+ a View
+ href #viewer
+ a About
+ href #about
+ main
+ section
+ id viewer
+ class viewer-section
+ h1 View HTML Source Beautifully
+ p Paste a URL below to fetch and display its HTML content
+ div
+ class input-container
+ input
+ type url
+ id urlInput
+ placeholder Enter URL here...
+ aria-label Website URL input
+ button Fetch HTML
+ id fetchButton
+ aria-label Fetch HTML content
+ div
+ class output-container
+ pre
+ id htmlOutput
+ aria-live polite
+ section
+ id about
+ class about-section
+ h2 About HTML Viewer
+ div
+ class feature-grid
+ div
+ class feature-card
+ div 🔍
+ class feature-icon
+ h3 Clean Display
+ p View HTML source code with syntax highlighting and proper formatting
+ div
+ class feature-card
+ div ⚡
+ class feature-icon
+ h3 Fast Loading
+ p Instant results with no external dependencies
+ div
+ class feature-card
+ div 📱
+ class feature-icon
+ h3 Mobile Ready
+ p Perfect viewing experience on any device
+ footer
+ div
+ class footer-content
+ p Built with care by the Scroll community
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_01RvB8xTwxBUWwoApdPkVWRU",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "Let me create a website for fetching and displaying HTML content with a clean, professional design.\n\n---domain---\nviewscroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://viewscroll.pub\nmetaTags\neditButton /edit.html\ntitle HTML Viewer - View Source Code Beautifully\nstyle.css\nheader\n class hero\n nav\n div HTML Viewer\n class logo\n div\n class nav-links\n a View\n href #viewer\n a About\n href #about\nmain\n section\n id viewer\n class viewer-section\n h1 View HTML Source Beautifully\n p Paste a URL below to fetch and display its HTML content\n div\n class input-container\n input\n type url\n id urlInput\n placeholder Enter URL here...\n aria-label Website URL input\n button Fetch HTML\n id fetchButton\n aria-label Fetch HTML content\n div\n class output-container\n pre\n id htmlOutput\n aria-live polite\n section\n id about\n class about-section\n h2 About HTML Viewer\n div\n class feature-grid\n div\n class feature-card\n div 🔍\n class feature-icon\n h3 Clean Display\n p View HTML source code with syntax highlighting and proper formatting\n div\n class feature-card\n div ⚡\n class feature-icon\n h3 Fast Loading\n p Instant results with no external dependencies\n div\n class feature-card\n div 📱\n class feature-icon\n h3 Mobile Ready\n p Perfect viewing experience on any device\nfooter\n div\n class footer-content\n p Built with care by the Scroll community\nscript.js\n---style.css---\n:root {\n --primary-color: #2563eb;\n --secondary-color: #1e40af;\n --background-color: #f8fafc;\n --text-color: #1e293b;\n --card-background: #ffffff;\n --border-radius: 8px;\n --transition: all 0.3s ease;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: system-ui, -apple-system, sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background-color: var(--background-color);\n}\n\n.hero {\n background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));\n padding: 1rem 2rem;\n color: white;\n}\n\nnav {\n display: flex;\n justify-content: space-between;\n align-items: center;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.logo {\n font-size: 1.5rem;\n font-weight: bold;\n}\n\n.nav-links a {\n color: white;\n text-decoration: none;\n margin-left: 2rem;\n transition: var(--transition);\n}\n\n.nav-links a:hover {\n opacity: 0.8;\n}\n\nmain {\n max-width: 1200px;\n margin: 0 auto;\n padding: 2rem;\n}\n\n.viewer-section {\n text-align: center;\n margin-bottom: 4rem;\n}\n\nh1 {\n font-size: 2.5rem;\n margin-bottom: 1rem;\n background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n\n.input-container {\n display: flex;\n gap: 1rem;\n max-width: 800px;\n margin: 2rem auto;\n}\n\ninput[type=\"url\"] {\n flex: 1;\n padding: 1rem;\n border: 2px solid #e2e8f0;\n border-radius: var(--border-radius);\n font-size: 1rem;\n transition: var(--transition);\n}\n\ninput[type=\"url\"]:focus {\n outline: none;\n border-color: var(--primary-color);\n}\n\nbutton {\n background-color: var(--primary-color);\n color: white;\n border: none;\n padding: 1rem 2rem;\n border-radius: var(--border-radius);\n cursor: pointer;\n transition: var(--transition);\n}\n\nbutton:hover {\n background-color: var(--secondary-color);\n}\n\n.output-container {\n background: var(--card-background);\n border-radius: var(--border-radius);\n padding: 2rem;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n max-height: 600px;\n overflow-y: auto;\n text-align: left;\n}\n\npre {\n white-space: pre-wrap;\n word-wrap: break-word;\n font-family: 'Monaco', 'Consolas', monospace;\n font-size: 0.9rem;\n}\n\n.feature-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 2rem;\n margin-top: 3rem;\n}\n\n.feature-card {\n background: var(--card-background);\n padding: 2rem;\n border-radius: var(--border-radius);\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n transition: var(--transition);\n}\n\n.feature-card:hover {\n transform: translateY(-5px);\n}\n\n.feature-icon {\n font-size: 2rem;\n margin-bottom: 1rem;\n}\n\nfooter {\n background-color: var(--card-background);\n padding: 2rem;\n text-align: center;\n margin-top: 4rem;\n}\n\n@media (max-width: 768px) {\n .input-container {\n flex-direction: column;\n }\n \n .nav-links a {\n margin-left: 1rem;\n }\n \n h1 {\n font-size: 2rem;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const urlInput = document.getElementById('urlInput');\n const fetchButton = document.getElementById('fetchButton');\n const htmlOutput = document.getElementById('htmlOutput');\n\n fetchButton.addEventListener('click', async () => {\n const url = urlInput.value.trim();\n \n if (!url) {\n htmlOutput.textContent = 'Please enter a valid URL';\n return;\n }\n\n try {\n htmlOutput.textContent = 'Loading...';\n \n const response = await fetch(url);\n if (!response.ok) throw new Error('Failed to fetch');\n \n const text = await response.text();\n \n // Basic HTML syntax highlighting\n const highlightedHtml = text\n .replace(//g, '>')\n .replace(/(<[^&]*>)/g, '$1')\n .replace(/(\"[^\"]*\")/g, '$1');\n \n htmlOutput.innerHTML = highlightedHtml;\n } catch (error) {\n htmlOutput.textContent = `Error: ${error.message}. Note: Some websites may block direct access due to CORS policies.`;\n }\n });\n\n // Enable Enter key submission\n urlInput.addEventListener('keypress', (e) => {\n if (e.key === 'Enter') {\n fetchButton.click();\n }\n });\n});\n---end---\n\nThis implementation creates a clean, professional HTML viewer with the following features:\n\n1. Beautiful gradient header with responsive navigation\n2. Clean, modern input field for URLs\n3. Syntax-highlighted output display\n4. Feature cards explaining the benefits\n5. Mobile-responsive design\n6. Accessibility features including ARIA labels\n7. Smooth animations and transitions\n8. Error handling for failed requests\n9. Support for keyboard navigation\n\nThe CSS includes modern features like:\n- CSS Variables for easy theming\n- Fluid typography\n- CSS Grid for feature cards\n- Beautiful box shadows and hover effects\n- Gradient text effects\n- Smooth transitions\n\nNote that due to CORS policies, this tool will only work with URLs that explicitly allow cross-origin requests. You might need to implement a backend proxy to fetch HTML from sites that don't allow direct access."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 832,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2196
+ }
+ }
readme.scroll
Changed around line 1
+ # viewscroll.pub.scroll.pub
+
+ Prompt: website
+ Agent: claude
+ Model: claude-3-5-sonnet-20241022
+
+ ## User prompt
+ create an application that will take an html file from a link and display its contents
+
+ ## System prompt
+ You are an expert web developer. Create a website based on this request: "create an application that will take an html file from a link and display its contents"
+
+ Requirements:
+ - Use only Scroll, CSS, and JavaScript (NO frameworks, NO external dependencies)
+ - Create clean, semantic HTML5
+ - Make it mobile-responsive
+ - Follow modern best practices and accessibility guidelines
+ - Keep it simple but professional
+ - Use only relative links and no external resources
+ - Do not put a copyright symbol or all rights reserved in the footer.
+ - Make it beautiful. Dazzling. Advanced used of CSS.
+
+ As a refresher, for doing the html body, Scroll is a whitespace based language that uses a single indented space to mark a line (aka particle) as a subparticle of a parent line.
+
+ For example:
+
+ header
+ class hero
+ nav
+ div Scroll
+ class logo
+ div
+ class nav-links
+ a Features
+ href #features
+ a Examples
+ href #examples
+ a Edit
+ href edit.html
+ a GitHub
+ class cta-button
+ href https://github.com/breck7/scroll
+ div
+ class hero-content
+ h1 Write Better with Scroll
+ p The extendible markup language that makes source beautiful and compiles to anything
+ a Get Started
+ class primary-button
+ href https://hub.scroll.pub/
+ main
+ section
+ id features
+ class features
+ h2 Why Scroll?
+ div
+ class feature-grid
+ div
+ class feature-card
+ div ⚡
+ class feature-icon
+ h3 Simple Syntax
+ p Like Markdown, but more powerful. No parentheses needed.
+ div
+ class feature-card
+ div 🧩
+ class feature-icon
+ h3 Extendible
+ p Build your own custom parsers.
+ div
+ class feature-card
+ div 🎨
+ class feature-icon
+ h3 Beautiful Output
+ p Create stunning documents with minimal effort.
+ div
+ class feature-card
+ div 🚀
+ class feature-icon
+ h3 Fast & Light
+ p Built on the efficient PPS Stack.
+ section
+ id examples
+ class code-demo
+ h2 See It In Action
+ div
+ class code-container
+ pre
+ class code-example
+ div
+ class code-output
+ footer
+ div
+ class footer-content
+ div
+ class footer-links
+ a Documentation
+ href https://scroll.pub/tutorial.html
+ a Community
+ href https://www.reddit.com/r/WorldWideScroll/
+ a Blog
+ href https://scroll.pub/blog
+ p Started by Breck Yunits. Evolved by a community.
+ https://twitter.com/breckyunits Breck Yunits
+ https://github.com/breck7/scroll/graphs/contributors community
+
+
+ First suggest a short, memorable domain name ending in scroll.pub that represents this website. Then provide the website files. Use this exact format:
+
+ ---domain---
+ (domainscroll.pub here)
+ ---index.scroll---
+ buildHtml
+ baseUrl https://(domainscroll.pub here)
+ metaTags
+ editButton /edit.html
+ title (Title here)
+ style.css
+
+ (body content here. no blank lines please.)
+
+ script.js
+ ---style.css---
+ (CSS content here)
+ ---script.js---
+ (JavaScript content here)
+ ---end---
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ const urlInput = document.getElementById('urlInput');
+ const fetchButton = document.getElementById('fetchButton');
+ const htmlOutput = document.getElementById('htmlOutput');
+
+ fetchButton.addEventListener('click', async () => {
+ const url = urlInput.value.trim();
+
+ if (!url) {
+ htmlOutput.textContent = 'Please enter a valid URL';
+ return;
+ }
+
+ try {
+ htmlOutput.textContent = 'Loading...';
+
+ const response = await fetch(url);
+ if (!response.ok) throw new Error('Failed to fetch');
+
+ const text = await response.text();
+
+ // Basic HTML syntax highlighting
+ const highlightedHtml = text
+ .replace(/
+ .replace(/>/g, '>')
+ .replace(/(<[^&]*>)/g, '$1')
+ .replace(/("[^"]*")/g, '$1');
+
+ htmlOutput.innerHTML = highlightedHtml;
+ } catch (error) {
+ htmlOutput.textContent = `Error: ${error.message}. Note: Some websites may block direct access due to CORS policies.`;
+ }
+ });
+
+ // Enable Enter key submission
+ urlInput.addEventListener('keypress', (e) => {
+ if (e.key === 'Enter') {
+ fetchButton.click();
+ }
+ });
+ });
style.css
Changed around line 1
+ :root {
+ --primary-color: #2563eb;
+ --secondary-color: #1e40af;
+ --background-color: #f8fafc;
+ --text-color: #1e293b;
+ --card-background: #ffffff;
+ --border-radius: 8px;
+ --transition: all 0.3s ease;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: system-ui, -apple-system, sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background-color: var(--background-color);
+ }
+
+ .hero {
+ background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
+ padding: 1rem 2rem;
+ color: white;
+ }
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ max-width: 1200px;
+ margin: 0 auto;
+ }
+
+ .logo {
+ font-size: 1.5rem;
+ font-weight: bold;
+ }
+
+ .nav-links a {
+ color: white;
+ text-decoration: none;
+ margin-left: 2rem;
+ transition: var(--transition);
+ }
+
+ .nav-links a:hover {
+ opacity: 0.8;
+ }
+
+ main {
+ max-width: 1200px;
+ margin: 0 auto;
+ padding: 2rem;
+ }
+
+ .viewer-section {
+ text-align: center;
+ margin-bottom: 4rem;
+ }
+
+ h1 {
+ font-size: 2.5rem;
+ margin-bottom: 1rem;
+ background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
+ -webkit-background-clip: text;
+ -webkit-text-fill-color: transparent;
+ }
+
+ .input-container {
+ display: flex;
+ gap: 1rem;
+ max-width: 800px;
+ margin: 2rem auto;
+ }
+
+ input[type="url"] {
+ flex: 1;
+ padding: 1rem;
+ border: 2px solid #e2e8f0;
+ border-radius: var(--border-radius);
+ font-size: 1rem;
+ transition: var(--transition);
+ }
+
+ input[type="url"]:focus {
+ outline: none;
+ border-color: var(--primary-color);
+ }
+
+ button {
+ background-color: var(--primary-color);
+ color: white;
+ border: none;
+ padding: 1rem 2rem;
+ border-radius: var(--border-radius);
+ cursor: pointer;
+ transition: var(--transition);
+ }
+
+ button:hover {
+ background-color: var(--secondary-color);
+ }
+
+ .output-container {
+ background: var(--card-background);
+ border-radius: var(--border-radius);
+ padding: 2rem;
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ max-height: 600px;
+ overflow-y: auto;
+ text-align: left;
+ }
+
+ pre {
+ white-space: pre-wrap;
+ word-wrap: break-word;
+ font-family: 'Monaco', 'Consolas', monospace;
+ font-size: 0.9rem;
+ }
+
+ .feature-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
+ gap: 2rem;
+ margin-top: 3rem;
+ }
+
+ .feature-card {
+ background: var(--card-background);
+ padding: 2rem;
+ border-radius: var(--border-radius);
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ transition: var(--transition);
+ }
+
+ .feature-card:hover {
+ transform: translateY(-5px);
+ }
+
+ .feature-icon {
+ font-size: 2rem;
+ margin-bottom: 1rem;
+ }
+
+ footer {
+ background-color: var(--card-background);
+ padding: 2rem;
+ text-align: center;
+ margin-top: 4rem;
+ }
+
+ @media (max-width: 768px) {
+ .input-container {
+ flex-direction: column;
+ }
+
+ .nav-links a {
+ margin-left: 1rem;
+ }
+
+ h1 {
+ font-size: 2rem;
+ }
+ }