Changes to imagealt.scroll.pub

root
root
8 days ago
Initial commit
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://imagealt.scroll.pub
+ metaTags
+ editButton /edit.html
+ title Image Alt Text Viewer
+ style.css
+
+ header
+ class hero
+ h1 Image Alt Text Viewer
+ p Hover over images to view their alt text
+ main
+ section
+ class gallery
+ div
+ class image-grid
+ div
+ class image-container
+ img
+ src images/image1.jpg
+ alt
+ class gallery-image
+ div
+ class alt-text
+ div
+ class image-container
+ img
+ src images/image2.jpg
+ alt
+ class gallery-image
+ div
+ class alt-text
+ div
+ class image-container
+ img
+ src images/image3.jpg
+ alt
+ class gallery-image
+ div
+ class alt-text
+ footer
+ div
+ class footer-content
+ p A simple tool for viewing image alt text
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "573701fe-2301-43e0-9803-6795e75631e2",
+ "object": "chat.completion",
+ "created": 1741252961,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nimagealt.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://imagealt.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Image Alt Text Viewer\nstyle.css\n\nheader\n class hero\n h1 Image Alt Text Viewer\n p Hover over images to view their alt text\nmain\n section\n class gallery\n div\n class image-grid\n div\n class image-container\n img\n src images/image1.jpg\n alt \n class gallery-image\n div\n class alt-text\n div\n class image-container\n img\n src images/image2.jpg\n alt \n class gallery-image\n div\n class alt-text\n div\n class image-container\n img\n src images/image3.jpg\n alt \n class gallery-image\n div\n class alt-text\nfooter\n div\n class footer-content\n p A simple tool for viewing image alt text\nscript.js\n---style.css---\n:root {\n --primary-color: #4a90e2;\n --secondary-color: #f5f5f5;\n --text-color: #333;\n --hover-color: #3a7bbd;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: 'Segoe UI', sans-serif;\n line-height: 1.6;\n color: var(--text-color);\n background-color: var(--secondary-color);\n}\n\n.hero {\n text-align: center;\n padding: 2rem;\n background-color: var(--primary-color);\n color: white;\n}\n\n.hero h1 {\n font-size: 2.5rem;\n margin-bottom: 1rem;\n}\n\n.gallery {\n padding: 2rem;\n}\n\n.image-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));\n gap: 1.5rem;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.image-container {\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n transition: transform 0.3s ease;\n}\n\n.image-container:hover {\n transform: translateY(-5px);\n}\n\n.gallery-image {\n width: 100%;\n height: auto;\n display: block;\n transition: opacity 0.3s ease;\n}\n\n.image-container:hover .gallery-image {\n opacity: 0.9;\n}\n\n.alt-text {\n position: absolute;\n bottom: -100%;\n left: 0;\n width: 100%;\n padding: 1rem;\n background-color: rgba(0, 0, 0, 0.8);\n color: white;\n transition: bottom 0.3s ease;\n text-align: center;\n}\n\n.image-container:hover .alt-text {\n bottom: 0;\n}\n\n.footer-content {\n text-align: center;\n padding: 1.5rem;\n background-color: var(--primary-color);\n color: white;\n}\n\n@media (max-width: 768px) {\n .hero h1 {\n font-size: 2rem;\n }\n \n .image-grid {\n grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n fetch('image_list2')\n .then(response => response.text())\n .then(data => {\n const sections = data.split('\\n\\n');\n const imageData = sections.map(section => {\n const lines = section.split('\\n');\n return {\n filename: lines[0],\n altText: lines[1]\n };\n });\n\n const imageContainers = document.querySelectorAll('.image-container');\n imageContainers.forEach(container => {\n const img = container.querySelector('img');\n const altTextDiv = container.querySelector('.alt-text');\n \n const imageName = img.src.split('/').pop();\n const imageInfo = imageData.find(data => data.filename === imageName);\n \n if (imageInfo) {\n img.alt = imageInfo.altText;\n altTextDiv.textContent = imageInfo.altText;\n } else {\n img.alt = 'No alt text available';\n altTextDiv.textContent = 'No alt text available';\n }\n });\n })\n .catch(error => {\n console.error('Error loading image data:', error);\n const altTextDivs = document.querySelectorAll('.alt-text');\n altTextDivs.forEach(div => {\n div.textContent = 'Error loading alt text';\n });\n });\n});\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 781,
+ "completion_tokens": 1037,
+ "total_tokens": 1818,
+ "prompt_tokens_details": {
+ "cached_tokens": 0
+ },
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 781
+ },
+ "system_fingerprint": "fp_3a5770e1b4_prod0225"
+ }
readme.scroll
Changed around line 1
+ # imagealt.scroll.pub
+
+ Prompt: website
+ Agent: deepseek
+ Model: deepseek-chat
+
+ ## User prompt
+ i want a website that displays images from a folder called images. When the user hovers over this image an alt text is displayed based a raw file called image_list2. Each image filename corresponds to the first line of each empty line seperated section in image_list2. each alt text corresponds to the line after that.
+
+ ## System prompt
+ You are an expert web developer. Create a website based on this request: "i want a website that displays images from a folder called images. When the user hovers over this image an alt text is displayed based a raw file called image_list2. Each image filename corresponds to the first line of each empty line seperated section in image_list2. each alt text corresponds to the line after that."
+
+ 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', function() {
+ fetch('image_list2')
+ .then(response => response.text())
+ .then(data => {
+ const sections = data.split('\n\n');
+ const imageData = sections.map(section => {
+ const lines = section.split('\n');
+ return {
+ filename: lines[0],
+ altText: lines[1]
+ };
+ });
+
+ const imageContainers = document.querySelectorAll('.image-container');
+ imageContainers.forEach(container => {
+ const img = container.querySelector('img');
+ const altTextDiv = container.querySelector('.alt-text');
+
+ const imageName = img.src.split('/').pop();
+ const imageInfo = imageData.find(data => data.filename === imageName);
+
+ if (imageInfo) {
+ img.alt = imageInfo.altText;
+ altTextDiv.textContent = imageInfo.altText;
+ } else {
+ img.alt = 'No alt text available';
+ altTextDiv.textContent = 'No alt text available';
+ }
+ });
+ })
+ .catch(error => {
+ console.error('Error loading image data:', error);
+ const altTextDivs = document.querySelectorAll('.alt-text');
+ altTextDivs.forEach(div => {
+ div.textContent = 'Error loading alt text';
+ });
+ });
+ });
style.css
Changed around line 1
+ :root {
+ --primary-color: #4a90e2;
+ --secondary-color: #f5f5f5;
+ --text-color: #333;
+ --hover-color: #3a7bbd;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: 'Segoe UI', sans-serif;
+ line-height: 1.6;
+ color: var(--text-color);
+ background-color: var(--secondary-color);
+ }
+
+ .hero {
+ text-align: center;
+ padding: 2rem;
+ background-color: var(--primary-color);
+ color: white;
+ }
+
+ .hero h1 {
+ font-size: 2.5rem;
+ margin-bottom: 1rem;
+ }
+
+ .gallery {
+ padding: 2rem;
+ }
+
+ .image-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
+ gap: 1.5rem;
+ max-width: 1200px;
+ margin: 0 auto;
+ }
+
+ .image-container {
+ position: relative;
+ overflow: hidden;
+ border-radius: 8px;
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ transition: transform 0.3s ease;
+ }
+
+ .image-container:hover {
+ transform: translateY(-5px);
+ }
+
+ .gallery-image {
+ width: 100%;
+ height: auto;
+ display: block;
+ transition: opacity 0.3s ease;
+ }
+
+ .image-container:hover .gallery-image {
+ opacity: 0.9;
+ }
+
+ .alt-text {
+ position: absolute;
+ bottom: -100%;
+ left: 0;
+ width: 100%;
+ padding: 1rem;
+ background-color: rgba(0, 0, 0, 0.8);
+ color: white;
+ transition: bottom 0.3s ease;
+ text-align: center;
+ }
+
+ .image-container:hover .alt-text {
+ bottom: 0;
+ }
+
+ .footer-content {
+ text-align: center;
+ padding: 1.5rem;
+ background-color: var(--primary-color);
+ color: white;
+ }
+
+ @media (max-width: 768px) {
+ .hero h1 {
+ font-size: 2rem;
+ }
+
+ .image-grid {
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ }
+ }