Changes to anky.scroll.pub

Breck Yunits
Breck Yunits
6 days ago
updated script.js
script.js
Changed around line 34: document.addEventListener("DOMContentLoaded", () => {
- if ((e.ctrlKey || e.commandKey) && e.shiftKey && e.key === "F") {
+ if (e.shiftKey && e.key === "F") {
Breck Yunits
Breck Yunits
6 days ago
updated script.js
script.js
Changed around line 34: document.addEventListener("DOMContentLoaded", () => {
- if ((e.ctrlKey || e.cmdKey) && e.shiftKey && e.key === "F") {
+ if ((e.ctrlKey || e.commandKey) && e.shiftKey && e.key === "F") {
Breck Yunits
Breck Yunits
6 days ago
updated script.js
script.js
Changed around line 34: document.addEventListener("DOMContentLoaded", () => {
- if (e.ctrlKey && e.shiftKey && e.key === "F") {
+ if ((e.ctrlKey || e.cmdKey) && e.shiftKey && e.key === "F") {
Breck Yunits
Breck Yunits
6 days ago
updated script.js
script.js
Changed around line 1
- document.addEventListener('DOMContentLoaded', () => {
- const editor = document.getElementById('editor');
- const themeToggle = document.getElementById('theme-toggle');
- const widthSlider = document.getElementById('width-slider');
- const sessionLength = document.getElementById('session-length');
- const keystrokeInterval = document.getElementById('keystroke-interval');
- const startSession = document.getElementById('start-session');
- const energyBar = document.getElementById('energy-bar');
+ document.addEventListener("DOMContentLoaded", () => {
+ const editor = document.getElementById("editor");
+ const themeToggle = document.getElementById("theme-toggle");
+ const widthSlider = document.getElementById("width-slider");
+ const sessionLength = document.getElementById("session-length");
+ const keystrokeInterval = document.getElementById("keystroke-interval");
+ const startSession = document.getElementById("start-session");
+ const energyBar = document.getElementById("energy-bar");
- editor.value = localStorage.getItem('content') || '';
- editor.addEventListener('input', () => {
- localStorage.setItem('content', editor.value);
+ editor.value = localStorage.getItem("content") || "";
+ editor.addEventListener("input", () => {
+ localStorage.setItem("content", editor.value);
- themeToggle.addEventListener('click', () => {
- document.body.classList.toggle('dark-mode');
- localStorage.setItem('darkMode', document.body.classList.contains('dark-mode'));
+ themeToggle.addEventListener("click", () => {
+ document.body.classList.toggle("dark-mode");
+ localStorage.setItem(
+ "darkMode",
+ document.body.classList.contains("dark-mode"),
+ );
- if (localStorage.getItem('darkMode') === 'true') {
- document.body.classList.add('dark-mode');
+ if (localStorage.getItem("darkMode") === "true") {
+ document.body.classList.add("dark-mode");
- widthSlider.addEventListener('input', () => {
+ widthSlider.addEventListener("input", () => {
- document.addEventListener('keydown', (e) => {
- if (e.ctrlKey && e.shiftKey && e.key === 'F') {
- editor.classList.toggle('fullscreen');
+ document.addEventListener("keydown", (e) => {
+ if (e.ctrlKey && e.shiftKey && e.key === "F") {
+ editor.classList.toggle("fullscreen");
Changed around line 47: document.addEventListener('DOMContentLoaded', () => {
-
+
- energyBar.style.display = 'block';
- energyBar.style.width = '100%';
+ energyBar.style.display = "block";
+ energyBar.style.width = "100%";
- alert('Writing session complete!');
+ alert("Writing session complete!");
- const percentage = 100 - (timeSinceLastKeystroke / keystrokeDuration * 100);
+ const percentage =
+ 100 - (timeSinceLastKeystroke / keystrokeDuration) * 100;
+ energyBar.style.display = percentage > 50 ? "none" : "block";
- alert('Keep writing!');
+ alert("Keep writing!");
- editor.addEventListener('keydown', () => {
+ editor.addEventListener("keydown", () => {
Changed around line 80: document.addEventListener('DOMContentLoaded', () => {
- energyBar.style.display = 'none';
+ energyBar.style.display = "none";
- startSession.addEventListener('click', () => {
+ startSession.addEventListener("click", () => {
- });
+ });
Breck Yunits
Breck Yunits
6 days ago
updated index.scroll
index.scroll
Changed around line 41: main
- button
+ button Start Session
- Start Session
root
root
6 days ago
Initial commit
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://flowscroll.pub
+ metaTags
+ editButton /edit.html
+ title FlowScroll - Distraction-Free Writing Environment
+ style.css
+ main
+ div
+ class editor-container
+ textarea
+ id editor
+ placeholder Start writing... Press Ctrl/Cmd + Shift + F for fullscreen
+ div
+ class settings-panel
+ button
+ id theme-toggle
+ aria-label Toggle dark mode
+ span 🌓
+ div
+ class width-control
+ label Line Width
+ input
+ type range
+ min 30
+ max 100
+ value 65
+ id width-slider
+ div
+ class timer-settings
+ label Session Length (minutes)
+ input
+ type number
+ min 1
+ max 120
+ value 25
+ id session-length
+ label Keystroke Interval (seconds)
+ input
+ type number
+ min 5
+ max 60
+ value 10
+ id keystroke-interval
+ button
+ id start-session
+ Start Session
+ div
+ class energy-bar
+ id energy-bar
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_01P4CMzTufTAFXK9VVJjQDn7",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "I'll create a focused writing environment called \"flowscroll.pub\" - emphasizing the flow state for writers.\n\n---domain---\nflowscroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://flowscroll.pub\nmetaTags\neditButton /edit.html\ntitle FlowScroll - Distraction-Free Writing Environment\nstyle.css\nmain\n div\n class editor-container\n textarea\n id editor\n placeholder Start writing... Press Ctrl/Cmd + Shift + F for fullscreen\n div\n class settings-panel\n button\n id theme-toggle\n aria-label Toggle dark mode\n span 🌓\n div\n class width-control\n label Line Width\n input\n type range\n min 30\n max 100\n value 65\n id width-slider\n div\n class timer-settings\n label Session Length (minutes)\n input\n type number\n min 1\n max 120\n value 25\n id session-length\n label Keystroke Interval (seconds)\n input\n type number\n min 5\n max 60\n value 10\n id keystroke-interval\n button\n id start-session\n Start Session\ndiv\n class energy-bar\n id energy-bar\nscript.js\n---style.css---\n:root {\n --bg-light: #ffffff;\n --text-light: #2c3e50;\n --bg-dark: #1a1a1a;\n --text-dark: #e0e0e0;\n --accent: #3498db;\n --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: var(--font-main);\n background: var(--bg-light);\n color: var(--text-light);\n transition: background 0.3s, color 0.3s;\n min-height: 100vh;\n}\n\nbody.dark-mode {\n background: var(--bg-dark);\n color: var(--text-dark);\n}\n\n.editor-container {\n position: relative;\n height: 100vh;\n display: flex;\n justify-content: center;\n padding: 2rem;\n}\n\n#editor {\n width: 100%;\n max-width: 65ch;\n height: calc(100vh - 4rem);\n padding: 2rem;\n border: none;\n outline: none;\n resize: none;\n font-family: 'Georgia', serif;\n font-size: 1.2rem;\n line-height: 1.6;\n background: transparent;\n color: inherit;\n}\n\n.settings-panel {\n position: fixed;\n top: 1rem;\n right: 1rem;\n display: flex;\n gap: 1rem;\n padding: 0.5rem;\n background: rgba(255, 255, 255, 0.1);\n backdrop-filter: blur(10px);\n border-radius: 8px;\n opacity: 0;\n transition: opacity 0.3s;\n}\n\n.editor-container:hover + .settings-panel,\n.settings-panel:hover {\n opacity: 1;\n}\n\nbutton {\n padding: 0.5rem 1rem;\n border: none;\n border-radius: 4px;\n background: var(--accent);\n color: white;\n cursor: pointer;\n transition: transform 0.2s;\n}\n\nbutton:hover {\n transform: scale(1.05);\n}\n\ninput[type=\"range\"],\ninput[type=\"number\"] {\n width: 100px;\n}\n\n.energy-bar {\n position: fixed;\n bottom: 0;\n left: 0;\n height: 4px;\n background: var(--accent);\n transition: width 0.1s linear;\n display: none;\n}\n\n.fullscreen {\n position: fixed;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 1000;\n}\n\n@media (max-width: 768px) {\n .settings-panel {\n flex-direction: column;\n right: 0.5rem;\n }\n \n #editor {\n padding: 1rem;\n font-size: 1rem;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n const editor = document.getElementById('editor');\n const themeToggle = document.getElementById('theme-toggle');\n const widthSlider = document.getElementById('width-slider');\n const sessionLength = document.getElementById('session-length');\n const keystrokeInterval = document.getElementById('keystroke-interval');\n const startSession = document.getElementById('start-session');\n const energyBar = document.getElementById('energy-bar');\n\n // Load saved content\n editor.value = localStorage.getItem('content') || '';\n editor.addEventListener('input', () => {\n localStorage.setItem('content', editor.value);\n });\n\n // Theme toggle\n themeToggle.addEventListener('click', () => {\n document.body.classList.toggle('dark-mode');\n localStorage.setItem('darkMode', document.body.classList.contains('dark-mode'));\n });\n\n // Load theme preference\n if (localStorage.getItem('darkMode') === 'true') {\n document.body.classList.add('dark-mode');\n }\n\n // Line width control\n widthSlider.addEventListener('input', () => {\n editor.style.maxWidth = `${widthSlider.value}ch`;\n });\n\n // Fullscreen toggle\n document.addEventListener('keydown', (e) => {\n if (e.ctrlKey && e.shiftKey && e.key === 'F') {\n editor.classList.toggle('fullscreen');\n e.preventDefault();\n }\n });\n\n let sessionTimer;\n let keystrokeTimer;\n let lastKeystroke = Date.now();\n\n const startWritingSession = () => {\n const sessionDuration = sessionLength.value * 60 * 1000;\n const keystrokeDuration = keystrokeInterval.value * 1000;\n \n editor.focus();\n energyBar.style.display = 'block';\n energyBar.style.width = '100%';\n\n sessionTimer = setTimeout(() => {\n alert('Writing session complete!');\n resetSession();\n }, sessionDuration);\n\n const checkKeystroke = () => {\n const timeSinceLastKeystroke = Date.now() - lastKeystroke;\n const percentage = 100 - (timeSinceLastKeystroke / keystrokeDuration * 100);\n energyBar.style.width = `${Math.max(0, percentage)}%`;\n\n if (timeSinceLastKeystroke > keystrokeDuration) {\n alert('Keep writing!');\n lastKeystroke = Date.now();\n }\n };\n\n keystrokeTimer = setInterval(checkKeystroke, 100);\n\n editor.addEventListener('keydown', () => {\n lastKeystroke = Date.now();\n });\n };\n\n const resetSession = () => {\n clearTimeout(sessionTimer);\n clearInterval(keystrokeTimer);\n energyBar.style.display = 'none';\n };\n\n startSession.addEventListener('click', () => {\n resetSession();\n startWritingSession();\n });\n});\n---end---\n\nThis implementation provides:\n\n1. Clean, minimalist interface\n2. Dark/light mode toggle\n3. Local storage persistence\n4. Adjustable line width\n5. Fullscreen mode (Ctrl/Cmd + Shift + F)\n6. Configurable writing session timer\n7. Energy bar for keystroke tracking\n8. Mobile-responsive design\n9. Beautiful typography\n10. Smooth transitions and animations\n\nThe design is intentionally minimal but includes subtle interactions and visual feedback. The settings panel appears on hover and uses a frosted glass effect. The energy bar provides visual motivation without being distracting.\n\nThe JavaScript handles all the functionality while maintaining clean, modular code. The CSS uses modern features like CSS variables, backdrop-filter, and smooth transitions while maintaining broad browser compatibility."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 932,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2098
+ }
+ }
readme.scroll
Changed around line 1
+ # flowscroll.pub.scroll.pub
+
+ Prompt: website
+ Agent: claude
+ Model: claude-3-5-sonnet-20241022
+
+ ## User prompt
+ Give me a writing environment. Should have dark mode and light mode. Should save to local storage so I dont lose work. Should have nice typography. Should allow going full screen. And allow adjusting the line width. There should be no chrome at all. It should have a setting that I can require a keystroke every N seconds, and also force me to have an Y minute long writing session. If I dont hit a keystroke after N/2 seconds, show an energy bar that is running out of energy to scare me to hit a key and keep going.
+
+ ## System prompt
+ You are an expert web developer. Create a website based on this request: "Give me a writing environment. Should have dark mode and light mode. Should save to local storage so I dont lose work. Should have nice typography. Should allow going full screen. And allow adjusting the line width. There should be no chrome at all. It should have a setting that I can require a keystroke every N seconds, and also force me to have an Y minute long writing session. If I dont hit a keystroke after N/2 seconds, show an energy bar that is running out of energy to scare me to hit a key and keep going."
+
+ 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 editor = document.getElementById('editor');
+ const themeToggle = document.getElementById('theme-toggle');
+ const widthSlider = document.getElementById('width-slider');
+ const sessionLength = document.getElementById('session-length');
+ const keystrokeInterval = document.getElementById('keystroke-interval');
+ const startSession = document.getElementById('start-session');
+ const energyBar = document.getElementById('energy-bar');
+
+ // Load saved content
+ editor.value = localStorage.getItem('content') || '';
+ editor.addEventListener('input', () => {
+ localStorage.setItem('content', editor.value);
+ });
+
+ // Theme toggle
+ themeToggle.addEventListener('click', () => {
+ document.body.classList.toggle('dark-mode');
+ localStorage.setItem('darkMode', document.body.classList.contains('dark-mode'));
+ });
+
+ // Load theme preference
+ if (localStorage.getItem('darkMode') === 'true') {
+ document.body.classList.add('dark-mode');
+ }
+
+ // Line width control
+ widthSlider.addEventListener('input', () => {
+ editor.style.maxWidth = `${widthSlider.value}ch`;
+ });
+
+ // Fullscreen toggle
+ document.addEventListener('keydown', (e) => {
+ if (e.ctrlKey && e.shiftKey && e.key === 'F') {
+ editor.classList.toggle('fullscreen');
+ e.preventDefault();
+ }
+ });
+
+ let sessionTimer;
+ let keystrokeTimer;
+ let lastKeystroke = Date.now();
+
+ const startWritingSession = () => {
+ const sessionDuration = sessionLength.value * 60 * 1000;
+ const keystrokeDuration = keystrokeInterval.value * 1000;
+
+ editor.focus();
+ energyBar.style.display = 'block';
+ energyBar.style.width = '100%';
+
+ sessionTimer = setTimeout(() => {
+ alert('Writing session complete!');
+ resetSession();
+ }, sessionDuration);
+
+ const checkKeystroke = () => {
+ const timeSinceLastKeystroke = Date.now() - lastKeystroke;
+ const percentage = 100 - (timeSinceLastKeystroke / keystrokeDuration * 100);
+ energyBar.style.width = `${Math.max(0, percentage)}%`;
+
+ if (timeSinceLastKeystroke > keystrokeDuration) {
+ alert('Keep writing!');
+ lastKeystroke = Date.now();
+ }
+ };
+
+ keystrokeTimer = setInterval(checkKeystroke, 100);
+
+ editor.addEventListener('keydown', () => {
+ lastKeystroke = Date.now();
+ });
+ };
+
+ const resetSession = () => {
+ clearTimeout(sessionTimer);
+ clearInterval(keystrokeTimer);
+ energyBar.style.display = 'none';
+ };
+
+ startSession.addEventListener('click', () => {
+ resetSession();
+ startWritingSession();
+ });
+ });
style.css
Changed around line 1
+ :root {
+ --bg-light: #ffffff;
+ --text-light: #2c3e50;
+ --bg-dark: #1a1a1a;
+ --text-dark: #e0e0e0;
+ --accent: #3498db;
+ --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: var(--font-main);
+ background: var(--bg-light);
+ color: var(--text-light);
+ transition: background 0.3s, color 0.3s;
+ min-height: 100vh;
+ }
+
+ body.dark-mode {
+ background: var(--bg-dark);
+ color: var(--text-dark);
+ }
+
+ .editor-container {
+ position: relative;
+ height: 100vh;
+ display: flex;
+ justify-content: center;
+ padding: 2rem;
+ }
+
+ #editor {
+ width: 100%;
+ max-width: 65ch;
+ height: calc(100vh - 4rem);
+ padding: 2rem;
+ border: none;
+ outline: none;
+ resize: none;
+ font-family: 'Georgia', serif;
+ font-size: 1.2rem;
+ line-height: 1.6;
+ background: transparent;
+ color: inherit;
+ }
+
+ .settings-panel {
+ position: fixed;
+ top: 1rem;
+ right: 1rem;
+ display: flex;
+ gap: 1rem;
+ padding: 0.5rem;
+ background: rgba(255, 255, 255, 0.1);
+ backdrop-filter: blur(10px);
+ border-radius: 8px;
+ opacity: 0;
+ transition: opacity 0.3s;
+ }
+
+ .editor-container:hover + .settings-panel,
+ .settings-panel:hover {
+ opacity: 1;
+ }
+
+ button {
+ padding: 0.5rem 1rem;
+ border: none;
+ border-radius: 4px;
+ background: var(--accent);
+ color: white;
+ cursor: pointer;
+ transition: transform 0.2s;
+ }
+
+ button:hover {
+ transform: scale(1.05);
+ }
+
+ input[type="range"],
+ input[type="number"] {
+ width: 100px;
+ }
+
+ .energy-bar {
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ height: 4px;
+ background: var(--accent);
+ transition: width 0.1s linear;
+ display: none;
+ }
+
+ .fullscreen {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100vw;
+ height: 100vh;
+ z-index: 1000;
+ }
+
+ @media (max-width: 768px) {
+ .settings-panel {
+ flex-direction: column;
+ right: 0.5rem;
+ }
+
+ #editor {
+ padding: 1rem;
+ font-size: 1rem;
+ }
+ }