Changes to particles1.scroll.pub

root
root
29 days ago
Initial commit
README.md
Changed around line 1
+ # particles1.scroll.pub
+ Website generated from prompt: A website about the Particles syntax. Its like JSON, but no quotes parens or brackets etc. Plain text. Uses a single indent for scope. Sort of like S Expressions without parens. Very ismple. Very powerful.
index.html
Changed around line 1
+
+
+
+
+
+
+
+ Particles Syntax
+
+
+
+
+
+
    +
    +
    +
    +
    +
    +
    +

    Particles Syntax

    +

    Elegant data representation without the noise

    +
    +
    +
    +
    +

    What is Particles?

    +

    Particles is a human-friendly data format that eliminates unnecessary syntax. No quotes, no brackets, no parentheses—just pure, readable structure through indentation.

    +
    +
    +
    +

    Examples

    +
    +
    +

    JSON

    +
    {
    + "user": {
    + "name": "Alice",
    + "age": 28,
    + "hobbies": ["coding", "reading"]
    + }
    + }
    +
    +
    +

    Particles

    +
    user
    + name Alice
    + age 28
    + hobbies
    + coding
    + reading
    +
    +
    +
    +
    +
    +

    Interactive Playground

    +
    +
    +
    +
    +
    +
    +
    +
    +

    Made with love for the data minimalist

    +
    +
    +
    +
    +
    script.js
    Changed around line 1
    + document.addEventListener('DOMContentLoaded', () => {
    + // Particle animation
    + const particleAnimation = document.querySelector('.particle-animation');
    + for (let i = 0; i < 50; i++) {
    + const particle = document.createElement('div');
    + particle.className = 'particle';
    + particle.style.cssText = `
    + position: absolute;
    + background: rgba(255, 255, 255, 0.1);
    + width: ${Math.random() * 10 + 5}px;
    + height: ${Math.random() * 10 + 5}px;
    + border-radius: 50%;
    + left: ${Math.random() * 100}%;
    + top: ${Math.random() * 100}%;
    + animation: float ${Math.random() * 10 + 5}s linear infinite;
    + `;
    + particleAnimation.appendChild(particle);
    + }
    +
    + // Interactive editor
    + const editor = document.getElementById('particlesEditor');
    + const preview = document.getElementById('preview');
    +
    + editor.addEventListener('input', () => {
    + try {
    + const particles = parseParticles(editor.value);
    + preview.innerHTML = `
    ${JSON.stringify(particles, null, 2)}
    `;
    + } catch (e) {
    + preview.innerHTML = `

    ${e.message}

    `;
    + }
    + });
    +
    + // Smooth scroll for navigation
    + document.querySelectorAll('nav a').forEach(anchor => {
    + anchor.addEventListener('click', (e) => {
    + e.preventDefault();
    + const target = document.querySelector(anchor.getAttribute('href'));
    + target.scrollIntoView({ behavior: 'smooth' });
    + });
    + });
    + });
    +
    + function parseParticles(input) {
    + if (!input.trim()) return {};
    +
    + const lines = input.split('\n');
    + const result = {};
    + let currentContext = [result];
    + let currentIndent = 0;
    +
    + lines.forEach(line => {
    + if (line.trim() === '') return;
    +
    + const indent = line.search(/\S/);
    + const parts = line.trim().split(/\s+/);
    + const key = parts[0];
    + const value = parts.slice(1).join(' ');
    +
    + if (indent > currentIndent) {
    + currentIndent = indent;
    + } else if (indent < currentIndent) {
    + const levels = (currentIndent - indent) / 2;
    + for (let i = 0; i < levels; i++) {
    + currentContext.pop();
    + }
    + currentIndent = indent;
    + }
    +
    + if (value) {
    + currentContext[currentContext.length - 1][key] = isNaN(value) ? value : Number(value);
    + } else {
    + const newObject = {};
    + currentContext[currentContext.length - 1][key] = newObject;
    + currentContext.push(newObject);
    + }
    + });
    +
    + return result;
    + }
    style.css
    Changed around line 1
    + :root {
    + --primary-color: #2a2b4d;
    + --accent-color: #6d72c3;
    + --text-color: #333;
    + --background-light: #f5f6fa;
    + --transition-speed: 0.3s;
    + }
    +
    + * {
    + margin: 0;
    + padding: 0;
    + box-sizing: border-box;
    + }
    +
    + body {
    + font-family: 'Segoe UI', system-ui, sans-serif;
    + line-height: 1.6;
    + color: var(--text-color);
    + background: var(--background-light);
    + }
    +
    + header {
    + background: var(--primary-color);
    + padding: 1rem;
    + position: fixed;
    + width: 100%;
    + z-index: 1000;
    + box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    + }
    +
    + nav ul {
    + display: flex;
    + justify-content: center;
    + gap: 2rem;
    + list-style: none;
    + }
    +
    + nav a {
    + color: white;
    + text-decoration: none;
    + font-weight: 500;
    + transition: var(--transition-speed);
    + }
    +
    + nav a:hover {
    + color: var(--accent-color);
    + }
    +
    + #hero {
    + height: 100vh;
    + display: flex;
    + flex-direction: column;
    + justify-content: center;
    + align-items: center;
    + background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    + color: white;
    + position: relative;
    + overflow: hidden;
    + }
    +
    + .tagline {
    + font-size: 1.5rem;
    + margin-top: 1rem;
    + opacity: 0.9;
    + }
    +
    + .particle-animation {
    + position: absolute;
    + width: 100%;
    + height: 100%;
    + z-index: 1;
    + }
    +
    + section {
    + padding: 4rem 2rem;
    + max-width: 1200px;
    + margin: 0 auto;
    + }
    +
    + h1 {
    + font-size: 4rem;
    + font-weight: 700;
    + text-align: center;
    + margin-bottom: 1rem;
    + }
    +
    + h2 {
    + font-size: 2.5rem;
    + color: var(--primary-color);
    + margin-bottom: 2rem;
    + }
    +
    + .code-comparison {
    + display: grid;
    + grid-template-columns: 1fr 1fr;
    + gap: 2rem;
    + margin: 2rem 0;
    + }
    +
    + .code-block {
    + background: white;
    + padding: 2rem;
    + border-radius: 8px;
    + box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    + transition: var(--transition-speed);
    + }
    +
    + .code-block:hover {
    + transform: translateY(-5px);
    + }
    +
    + pre {
    + background: #f8f9fa;
    + padding: 1rem;
    + border-radius: 4px;
    + overflow-x: auto;
    + }
    +
    + .editor-container {
    + display: grid;
    + grid-template-columns: 1fr 1fr;
    + gap: 2rem;
    + margin-top: 2rem;
    + }
    +
    + #particlesEditor {
    + width: 100%;
    + height: 300px;
    + padding: 1rem;
    + border: 2px solid var(--accent-color);
    + border-radius: 8px;
    + font-family: monospace;
    + resize: none;
    + }
    +
    + #preview {
    + background: white;
    + padding: 1rem;
    + border-radius: 8px;
    + min-height: 300px;
    + }
    +
    + footer {
    + background: var(--primary-color);
    + color: white;
    + text-align: center;
    + padding: 2rem;
    + margin-top: 4rem;
    + }
    +
    + @media (max-width: 768px) {
    + .code-comparison,
    + .editor-container {
    + grid-template-columns: 1fr;
    + }
    +
    + h1 {
    + font-size: 2.5rem;
    + }
    +
    + h2 {
    + font-size: 2rem;
    + }
    +
    + section {
    + padding: 2rem 1rem;
    + }
    + }