Changes to reactlog.scroll.pub

ffff:72.255.242.84
ffff:72.255.242.84
23 days ago
created https:/reactlog.scroll.pub
https:/reactlog.scroll.pub
root
root
23 days ago
Initial commit
body.html
Changed around line 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Share Your React Knowledge

+

Discover and share beautiful React components, hooks, and patterns

+
+
+
+
+
+ Component
+

Advanced Modal Component

+

A reusable modal with animations and accessibility features

+
+ June 15, 2023
+ 5 min read
+
+
+
+
+
+
+ Hook
+

useIntersection Hook

+

Create infinite scroll with the Intersection Observer API

+
+ June 14, 2023
+ 3 min read
+
+
+
+
+
+
+

Submit Your Artifact

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://reactlog.scroll.pub
+ metaTags
+ description "A modern blog showcasing React artifacts, components, and development insights"
+ keywords "React, web development, components, JavaScript, frontend"
+ author "React Developers Community"
+ editButton /edit.html
+ title React Artifacts Blog
+ style.css
+ body.html
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_015gEdRyVwxRyMc274LLx11g",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "I'll create a blog focused on React artifacts with a clean, modern design.\n\nSuggested domain: reactlog.scroll.pub\n\n---domain---\nreactlog.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://reactlog.scroll.pub\nmetaTags\n description \"A modern blog showcasing React artifacts, components, and development insights\"\n keywords \"React, web development, components, JavaScript, frontend\"\n author \"React Developers Community\"\neditButton /edit.html\ntitle React Artifacts Blog\nstyle.css\nbody.html\nscript.js\n---body.html---\n
\n \n
\n\n
\n
\n

Share Your React Knowledge

\n

Discover and share beautiful React components, hooks, and patterns

\n
\n\n
\n
\n
\n Component\n

Advanced Modal Component

\n

A reusable modal with animations and accessibility features

\n
\n June 15, 2023\n 5 min read\n
\n
\n
\n\n
\n
\n Hook\n

useIntersection Hook

\n

Create infinite scroll with the Intersection Observer API

\n
\n June 14, 2023\n 3 min read\n
\n
\n
\n
\n\n
\n

Submit Your Artifact

\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n \n
\n
\n
\n\n\n---style.css---\n:root {\n --primary: #61dafb;\n --secondary: #282c34;\n --text: #333;\n --background: #ffffff;\n --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\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);\n background: var(--background);\n}\n\n.main-nav {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 1rem 2rem;\n background: var(--secondary);\n position: fixed;\n width: 100%;\n top: 0;\n z-index: 1000;\n}\n\n.logo {\n color: var(--primary);\n font-size: 1.5rem;\n font-weight: bold;\n}\n\n.nav-links {\n display: flex;\n gap: 2rem;\n list-style: none;\n}\n\n.nav-links a {\n color: white;\n text-decoration: none;\n transition: color 0.3s ease;\n}\n\n.nav-links a:hover {\n color: var(--primary);\n}\n\n.mobile-menu {\n display: none;\n}\n\n#hero {\n height: 60vh;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n text-align: center;\n background: linear-gradient(135deg, var(--secondary), #20232a);\n color: white;\n padding: 2rem;\n margin-top: 4rem;\n}\n\n#hero h1 {\n font-size: 3rem;\n margin-bottom: 1rem;\n background: linear-gradient(45deg, var(--primary), #4fa8fb);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n}\n\n.articles-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 2rem;\n padding: 2rem;\n}\n\n.card {\n background: white;\n border-radius: 8px;\n overflow: hidden;\n box-shadow: var(--card-shadow);\n transition: transform 0.3s ease;\n}\n\n.card:hover {\n transform: translateY(-5px);\n}\n\n.card-content {\n padding: 1.5rem;\n}\n\n.tag {\n background: var(--primary);\n color: var(--secondary);\n padding: 0.25rem 0.75rem;\n border-radius: 20px;\n font-size: 0.875rem;\n display: inline-block;\n margin-bottom: 1rem;\n}\n\n.metadata {\n margin-top: 1rem;\n color: #666;\n font-size: 0.875rem;\n display: flex;\n gap: 1rem;\n}\n\n.submit-section {\n padding: 4rem 2rem;\n background: #f5f5f5;\n}\n\n.submit-form {\n max-width: 600px;\n margin: 0 auto;\n}\n\n.form-group {\n margin-bottom: 1.5rem;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: 500;\n}\n\ninput, textarea {\n width: 100%;\n padding: 0.75rem;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 1rem;\n}\n\ntextarea {\n min-height: 150px;\n resize: vertical;\n}\n\nbutton {\n background: var(--primary);\n color: var(--secondary);\n border: none;\n padding: 0.75rem 1.5rem;\n border-radius: 4px;\n cursor: pointer;\n font-weight: bold;\n transition: background 0.3s ease;\n}\n\nbutton:hover {\n background: #4fa8fb;\n}\n\nfooter {\n background: var(--secondary);\n color: white;\n padding: 2rem;\n margin-top: 4rem;\n}\n\n.footer-nav {\n display: flex;\n justify-content: center;\n gap: 2rem;\n}\n\n.footer-nav a {\n color: white;\n text-decoration: none;\n}\n\n@media (max-width: 768px) {\n .mobile-menu {\n display: block;\n background: none;\n border: none;\n cursor: pointer;\n }\n\n .mobile-menu span {\n display: block;\n width: 25px;\n height: 3px;\n background: white;\n margin: 5px 0;\n transition: 0.3s;\n }\n\n .nav-links {\n display: none;\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: var(--secondary);\n flex-direction: column;\n padding: 1rem;\n text-align: center;\n }\n\n .nav-links.active {\n display: flex;\n }\n\n #hero h1 {\n font-size: 2rem;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n // Mobile menu toggle\n const mobileMenu = document.querySelector('.mobile-menu');\n const navLinks = document.querySelector('.nav-links');\n\n mobileMenu.addEventListener('click', () => {\n navLinks.classList.toggle('active');\n const spans = mobileMenu.querySelectorAll('span');\n spans[0].style.transform = navLinks.classList.contains('active') ? 'rotate(45deg) translate(8px, 8px)' : 'none';\n spans[1].style.opacity = navLinks.classList.contains('active') ? '0' : '1';\n spans[2].style.transform = navLinks.classList.contains('active') ? 'rotate(-45deg) translate(7px, -7px)' : 'none';\n });\n\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 // Form submission\n const submitForm = document.getElementById('submitForm');\n if (submitForm) {\n submitForm.addEventListener('submit', (e) => {\n e.preventDefault();\n const formData = {\n title: document.getElementById('title').value,\n description: document.getElementById('description').value,\n code: document.getElementById('code').value\n };\n \n // Here you would typically send the data to a server\n console.log('Form submitted:', formData);\n alert('Thank you for your submission!');\n submitForm.reset();\n });\n }\n\n // Active nav link highlighting\n const sections = document.querySelectorAll('section');\n const navItems = document.querySelectorAll('.nav-links a');\n\n window.addEventListener('scroll', () => {\n let current = '';\n sections.forEach(section => {\n const sectionTop = section.offsetTop;\n if (pageYOffset >= sectionTop - 60) {\n current = section.getAttribute('id');\n }\n });\n\n navItems.forEach(item => {\n item.classList.remove('active');\n if (item.getAttribute('href').includes(current)) {\n item.classList.add('active');\n }\n });\n });\n});\n---end---"
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 279,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2859
+ }
+ }
readme.scroll
Changed around line 1
+ # reactlog.scroll.pub
+ Website generated by Claude from prompt: create a blog website that can publish react artifacts.
script.js
Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ // Mobile menu toggle
+ const mobileMenu = document.querySelector('.mobile-menu');
+ const navLinks = document.querySelector('.nav-links');
+
+ mobileMenu.addEventListener('click', () => {
+ navLinks.classList.toggle('active');
+ const spans = mobileMenu.querySelectorAll('span');
+ spans[0].style.transform = navLinks.classList.contains('active') ? 'rotate(45deg) translate(8px, 8px)' : 'none';
+ spans[1].style.opacity = navLinks.classList.contains('active') ? '0' : '1';
+ spans[2].style.transform = navLinks.classList.contains('active') ? 'rotate(-45deg) translate(7px, -7px)' : 'none';
+ });
+
+ // 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'
+ });
+ });
+ });
+
+ // Form submission
+ const submitForm = document.getElementById('submitForm');
+ if (submitForm) {
+ submitForm.addEventListener('submit', (e) => {
+ e.preventDefault();
+ const formData = {
+ title: document.getElementById('title').value,
+ description: document.getElementById('description').value,
+ code: document.getElementById('code').value
+ };
+
+ // Here you would typically send the data to a server
+ console.log('Form submitted:', formData);
+ alert('Thank you for your submission!');
+ submitForm.reset();
+ });
+ }
+
+ // Active nav link highlighting
+ const sections = document.querySelectorAll('section');
+ const navItems = document.querySelectorAll('.nav-links a');
+
+ window.addEventListener('scroll', () => {
+ let current = '';
+ sections.forEach(section => {
+ const sectionTop = section.offsetTop;
+ if (pageYOffset >= sectionTop - 60) {
+ current = section.getAttribute('id');
+ }
+ });
+
+ navItems.forEach(item => {
+ item.classList.remove('active');
+ if (item.getAttribute('href').includes(current)) {
+ item.classList.add('active');
+ }
+ });
+ });
+ });
style.css
Changed around line 1
+ :root {
+ --primary: #61dafb;
+ --secondary: #282c34;
+ --text: #333;
+ --background: #ffffff;
+ --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: system-ui, -apple-system, sans-serif;
+ line-height: 1.6;
+ color: var(--text);
+ background: var(--background);
+ }
+
+ .main-nav {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 1rem 2rem;
+ background: var(--secondary);
+ position: fixed;
+ width: 100%;
+ top: 0;
+ z-index: 1000;
+ }
+
+ .logo {
+ color: var(--primary);
+ font-size: 1.5rem;
+ font-weight: bold;
+ }
+
+ .nav-links {
+ display: flex;
+ gap: 2rem;
+ list-style: none;
+ }
+
+ .nav-links a {
+ color: white;
+ text-decoration: none;
+ transition: color 0.3s ease;
+ }
+
+ .nav-links a:hover {
+ color: var(--primary);
+ }
+
+ .mobile-menu {
+ display: none;
+ }
+
+ #hero {
+ height: 60vh;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ text-align: center;
+ background: linear-gradient(135deg, var(--secondary), #20232a);
+ color: white;
+ padding: 2rem;
+ margin-top: 4rem;
+ }
+
+ #hero h1 {
+ font-size: 3rem;
+ margin-bottom: 1rem;
+ background: linear-gradient(45deg, var(--primary), #4fa8fb);
+ -webkit-background-clip: text;
+ -webkit-text-fill-color: transparent;
+ }
+
+ .articles-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ gap: 2rem;
+ padding: 2rem;
+ }
+
+ .card {
+ background: white;
+ border-radius: 8px;
+ overflow: hidden;
+ box-shadow: var(--card-shadow);
+ transition: transform 0.3s ease;
+ }
+
+ .card:hover {
+ transform: translateY(-5px);
+ }
+
+ .card-content {
+ padding: 1.5rem;
+ }
+
+ .tag {
+ background: var(--primary);
+ color: var(--secondary);
+ padding: 0.25rem 0.75rem;
+ border-radius: 20px;
+ font-size: 0.875rem;
+ display: inline-block;
+ margin-bottom: 1rem;
+ }
+
+ .metadata {
+ margin-top: 1rem;
+ color: #666;
+ font-size: 0.875rem;
+ display: flex;
+ gap: 1rem;
+ }
+
+ .submit-section {
+ padding: 4rem 2rem;
+ background: #f5f5f5;
+ }
+
+ .submit-form {
+ max-width: 600px;
+ margin: 0 auto;
+ }
+
+ .form-group {
+ margin-bottom: 1.5rem;
+ }
+
+ label {
+ display: block;
+ margin-bottom: 0.5rem;
+ font-weight: 500;
+ }
+
+ input, textarea {
+ width: 100%;
+ padding: 0.75rem;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ font-size: 1rem;
+ }
+
+ textarea {
+ min-height: 150px;
+ resize: vertical;
+ }
+
+ button {
+ background: var(--primary);
+ color: var(--secondary);
+ border: none;
+ padding: 0.75rem 1.5rem;
+ border-radius: 4px;
+ cursor: pointer;
+ font-weight: bold;
+ transition: background 0.3s ease;
+ }
+
+ button:hover {
+ background: #4fa8fb;
+ }
+
+ footer {
+ background: var(--secondary);
+ color: white;
+ padding: 2rem;
+ margin-top: 4rem;
+ }
+
+ .footer-nav {
+ display: flex;
+ justify-content: center;
+ gap: 2rem;
+ }
+
+ .footer-nav a {
+ color: white;
+ text-decoration: none;
+ }
+
+ @media (max-width: 768px) {
+ .mobile-menu {
+ display: block;
+ background: none;
+ border: none;
+ cursor: pointer;
+ }
+
+ .mobile-menu span {
+ display: block;
+ width: 25px;
+ height: 3px;
+ background: white;
+ margin: 5px 0;
+ transition: 0.3s;
+ }
+
+ .nav-links {
+ display: none;
+ position: absolute;
+ top: 100%;
+ left: 0;
+ right: 0;
+ background: var(--secondary);
+ flex-direction: column;
+ padding: 1rem;
+ text-align: center;
+ }
+
+ .nav-links.active {
+ display: flex;
+ }
+
+ #hero h1 {
+ font-size: 2rem;
+ }
+ }