Changes to mdq.scroll.pub

root
root
17 days ago
Initial commit
index.scroll
Changed around line 1
+ buildHtml
+ baseUrl https://mdq.scroll.pub
+ metaTags
+ editButton /edit.html
+ title MDQ - Query Your Markdown Like JSON
+ style.css
+ header
+ class hero
+ nav
+ div MDQ
+ class logo
+ div
+ class nav-links
+ a Installation
+ href #installation
+ a Usage
+ href #usage
+ a Examples
+ href #examples
+ a GitHub
+ class cta-button
+ href https://github.com/yshavit/mdq
+ div
+ class hero-content
+ h1 MDQ: jq for Markdown
+ p Query and filter Markdown documents with ease - just like jq does for JSON
+ div
+ class badges
+ img Code Coverage
+ src https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fyshavit%2F53901a0115b596e015a891c41fb0f256%2Fraw%2Fmdq-coverage.json
+ img Build Status
+ src https://github.com/yshavit/mdq/actions/workflows/rust.yml/badge.svg
+ main
+ section
+ id installation
+ class installation
+ h2 Installation
+ div
+ class install-options
+ div
+ class install-card
+ h3 Via Cargo
+ pre cargo install --git https://github.com/yshavit/mdq
+ class code-block
+ div
+ class install-card
+ h3 Direct Download
+ a Download Latest Release
+ href https://github.com/yshavit/mdq/releases/latest
+ class button
+ section
+ id usage
+ class usage
+ h2 Basic Usage
+ div
+ class usage-grid
+ div
+ class usage-example
+ h3 Filter Sections
+ pre cat example.md | mdq '# usage'
+ class code-block
+ div
+ class usage-example
+ h3 Find Tasks
+ pre mdq '- [ ]'
+ class code-block
+ div
+ class usage-example
+ h3 Chain Filters
+ pre cat example.md | mdq '# usage | -'
+ class code-block
+ section
+ id examples
+ class examples
+ h2 Real-World Examples
+ div
+ class example-cards
+ div
+ class example-card
+ h3 Check Issue Templates
+ pre if echo "$ISSUE_TEXT" | mdq -q '- [x] I have searched for existing issues' ; then
+ class code-block
+ p Verify that users have checked for duplicate issues
+ div
+ class example-card
+ h3 Extract Tickets
+ pre TICKET_URL="$(echo "$PR_TEXT" | mdq --output json '# Ticket')"
+ class code-block
+ p Parse ticket references from pull requests
+ footer
+ div
+ class footer-content
+ p MDQ is available under Apache 2.0 or MIT licenses
+ div
+ class footer-links
+ a Documentation
+ href https://github.com/yshavit/mdq/wiki/Tutorial
+ a GitHub
+ href https://github.com/yshavit/mdq
+ script.js
prompt.json
Changed around line 1
+ {
+ "id": "msg_01EjuYoBmPxoerqSn4i1DvzY",
+ "type": "message",
+ "role": "assistant",
+ "model": "claude-3-5-sonnet-20241022",
+ "content": [
+ {
+ "type": "text",
+ "text": "Let me create a website for mdq - a Markdown query tool. Given its similarity to jq, I'll suggest:\n\n---domain---\nmdq.scroll.pub\n\n---index.scroll---\nbuildHtml\nbaseUrl https://mdq.scroll.pub\nmetaTags\neditButton /edit.html\ntitle MDQ - Query Your Markdown Like JSON\nstyle.css\nheader\n class hero\n nav\n div MDQ\n class logo\n div\n class nav-links\n a Installation\n href #installation\n a Usage\n href #usage\n a Examples\n href #examples\n a GitHub\n class cta-button\n href https://github.com/yshavit/mdq\n div\n class hero-content\n h1 MDQ: jq for Markdown\n p Query and filter Markdown documents with ease - just like jq does for JSON\n div\n class badges\n img Code Coverage\n src https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fyshavit%2F53901a0115b596e015a891c41fb0f256%2Fraw%2Fmdq-coverage.json\n img Build Status\n src https://github.com/yshavit/mdq/actions/workflows/rust.yml/badge.svg\nmain\n section\n id installation\n class installation\n h2 Installation\n div\n class install-options\n div\n class install-card\n h3 Via Cargo\n pre cargo install --git https://github.com/yshavit/mdq\n class code-block\n div\n class install-card\n h3 Direct Download\n a Download Latest Release\n href https://github.com/yshavit/mdq/releases/latest\n class button\n section\n id usage\n class usage\n h2 Basic Usage\n div\n class usage-grid\n div\n class usage-example\n h3 Filter Sections\n pre cat example.md | mdq '# usage'\n class code-block\n div\n class usage-example\n h3 Find Tasks\n pre mdq '- [ ]'\n class code-block\n div\n class usage-example\n h3 Chain Filters\n pre cat example.md | mdq '# usage | -'\n class code-block\n section\n id examples\n class examples\n h2 Real-World Examples\n div\n class example-cards\n div\n class example-card\n h3 Check Issue Templates\n pre if echo \"$ISSUE_TEXT\" | mdq -q '- [x] I have searched for existing issues' ; then\n class code-block\n p Verify that users have checked for duplicate issues\n div\n class example-card\n h3 Extract Tickets\n pre TICKET_URL=\"$(echo \"$PR_TEXT\" | mdq --output json '# Ticket')\"\n class code-block\n p Parse ticket references from pull requests\nfooter\n div\n class footer-content\n p MDQ is available under Apache 2.0 or MIT licenses\n div\n class footer-links\n a Documentation\n href https://github.com/yshavit/mdq/wiki/Tutorial\n a GitHub\n href https://github.com/yshavit/mdq\nscript.js\n\n---style.css---\n:root {\n --primary: #2563eb;\n --secondary: #1e40af;\n --text: #1f2937;\n --background: #ffffff;\n --code-bg: #f3f4f6;\n --border: #e5e7eb;\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n line-height: 1.6;\n color: var(--text);\n}\n\n.hero {\n background: linear-gradient(135deg, var(--primary), var(--secondary));\n color: white;\n padding: 2rem 1rem;\n text-align: center;\n}\n\nnav {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 1rem;\n max-width: 1200px;\n margin: 0 auto;\n}\n\n.logo {\n font-size: 1.5rem;\n font-weight: bold;\n text-decoration: none;\n color: white;\n}\n\n.nav-links {\n display: flex;\n gap: 2rem;\n}\n\n.nav-links a {\n color: white;\n text-decoration: none;\n transition: opacity 0.2s;\n}\n\n.nav-links a:hover {\n opacity: 0.8;\n}\n\n.cta-button {\n background: white;\n color: var(--primary) !important;\n padding: 0.5rem 1rem;\n border-radius: 0.5rem;\n font-weight: 500;\n}\n\n.hero-content {\n max-width: 800px;\n margin: 4rem auto;\n}\n\n.hero-content h1 {\n font-size: 3rem;\n margin-bottom: 1rem;\n}\n\n.badges {\n display: flex;\n gap: 1rem;\n justify-content: center;\n margin-top: 2rem;\n}\n\n.install-options {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 2rem;\n padding: 2rem;\n}\n\n.install-card {\n background: var(--background);\n border: 1px solid var(--border);\n border-radius: 0.5rem;\n padding: 1.5rem;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}\n\n.code-block {\n background: var(--code-bg);\n padding: 1rem;\n border-radius: 0.5rem;\n overflow-x: auto;\n font-family: 'Fira Code', monospace;\n}\n\n.usage-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 2rem;\n padding: 2rem;\n}\n\n.example-cards {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 2rem;\n padding: 2rem;\n}\n\n.example-card {\n background: var(--background);\n border: 1px solid var(--border);\n border-radius: 0.5rem;\n padding: 1.5rem;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n}\n\nsection {\n padding: 4rem 1rem;\n}\n\nsection h2 {\n text-align: center;\n margin-bottom: 2rem;\n color: var(--primary);\n}\n\n.button {\n display: inline-block;\n background: var(--primary);\n color: white;\n padding: 0.75rem 1.5rem;\n border-radius: 0.5rem;\n text-decoration: none;\n transition: background-color 0.2s;\n}\n\n.button:hover {\n background: var(--secondary);\n}\n\nfooter {\n background: var(--code-bg);\n padding: 2rem;\n text-align: center;\n}\n\n.footer-links {\n display: flex;\n justify-content: center;\n gap: 2rem;\n margin-bottom: 1rem;\n}\n\n.footer-links a {\n color: var(--text);\n text-decoration: none;\n}\n\n@media (max-width: 768px) {\n .nav-links {\n display: none;\n }\n \n .hero-content h1 {\n font-size: 2rem;\n }\n \n .badges {\n flex-direction: column;\n align-items: center;\n }\n}\n\n---script.js---\ndocument.addEventListener('DOMContentLoaded', () => {\n // Add smooth scrolling 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 // Add mobile menu toggle\n const createMobileMenu = () => {\n const nav = document.querySelector('nav');\n const burger = document.createElement('button');\n burger.className = 'mobile-menu-button';\n burger.innerHTML = '☰';\n burger.style.display = 'none';\n \n const mobileBreakpoint = window.matchMedia('(max-width: 768px)');\n \n const handleMobileMenu = (e) => {\n if (e.matches) {\n burger.style.display = 'block';\n } else {\n burger.style.display = 'none';\n document.querySelector('.nav-links').style.display = 'flex';\n }\n };\n\n mobileBreakpoint.addListener(handleMobileMenu);\n handleMobileMenu(mobileBreakpoint);\n\n burger.addEventListener('click', () => {\n const navLinks = document.querySelector('.nav-links');\n navLinks.style.display = navLinks.style.display === 'none' ? 'flex' : 'none';\n });\n\n nav.prepend(burger);\n };\n\n createMobileMenu();\n});\n\n---end---\n\nThis implementation creates a modern, responsive website for MDQ with a clean and professional design. The color scheme uses a beautiful blue gradient for the hero section and maintains high contrast for accessibility. The layout is organized into clear sections for installation, usage, and examples. \n\nKey features:\n- Responsive design that works on all screen sizes\n- Smooth scrolling navigation\n- Mobile menu for smaller screens\n- Beautiful code block styling\n- Card-based layout for examples and installation options\n- Accessible color contrast and semantic HTML\n- Clean animations and transitions\n- Modern CSS Grid and Flexbox layouts\n- No external dependencies\n\nThe domain name \"mdq.scroll.pub\" is appropriate as it directly reflects the tool's purpose while fitting into the scroll.pub ecosystem."
+ }
+ ],
+ "stop_reason": "end_turn",
+ "stop_sequence": null,
+ "usage": {
+ "input_tokens": 2987,
+ "cache_creation_input_tokens": 0,
+ "cache_read_input_tokens": 0,
+ "output_tokens": 2645
+ }
+ }
readme.scroll
Changed around line 1
+ # mdq.scroll.pub
+
+ Prompt: website
+ Agent: claude
+ Model: claude-3-5-sonnet-20241022
+
+ ## User prompt
+ # mdq: jq for Markdown [![Code Coverage][coverage-shield]][coverage-link] [![Build status][build-shield]][build-link] [![Pending TODOs][todos-shield]][todos-link] [![Ignored tests][ignoreds-shield]][ignoreds-link] [coverage-shield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fyshavit%2F53901a0115b596e015a891c41fb0f256%2Fraw%2Fmdq-coverage.json [coverage-link]: https://github.com/yshavit/mdq/actions/workflows/coverage.yml?query=branch%3Amain [build-shield]: https://github.com/yshavit/mdq/actions/workflows/rust.yml/badge.svg [build-link]: https://github.com/yshavit/mdq/actions/workflows/rust.yml?query=branch%3Amain [todos-shield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fyshavit%2Fe7a9e9e72651da0d7d2b1fbbe56237d0%2Fraw%2Fmdq-todos.json [todos-link]: https://github.com/search?q=repo%3Ayshavit%2Fmdq+NOT+path%3A.github%2Fworkflows%2Fcoverage.yml+NOT+path%3AREADME.md+todo&type=code [ignoreds-shield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fyshavit%2F782a8dc5f77d2cf4b1c774da72636f00%2Fraw%2Fmdq-ignoreds.json [ignoreds-link]: https://github.com/search?q=repo%3Ayshavit%2Fmdq+%28%28path%3A%2F%5C.rs%24%2F+%22%23%5Bignore%5D%22%29+OR+%28path%3Atests%2Fmd_cases+%2F%5Eignore%2F%29%29&type=code ## What is mdq? mdq aims to do for Markdown what jq does for JSON: provide an easy way to zero in on specific parts of a document. For example, GitHub PRs are Markdown documents, and some organizations have specific templates with checklists for all reviewers to complete. Enforcing these often requires ugly regexes that are a pain to write and worse to debug. Instead, you can (for example) ask mdq for all uncompleted tasks: ```shell mdq '- [ ]' ``` mdq is available under the Apache 2.0 or MIT licenses, at your option. I am open to other permissive licenses, if you have one you prefer. # Installation Any of these will work: 1. ```shell cargo install --git https://github.com/yshavit/mdq ``` 2. Download binaries from [the latest release] (or any other release, of course). 3. You can also grab the binaries from the latest [build-release] workflow run. You must be logged into GitHub to do that (this is GitHub's limitation, not mine). You'll have to `chmod +x` them before you can run them.
Security concerns The release and latest-workflow binaries are built on GitHub's servers, so if you trust my code (and dependencies), and you trust GitHub, you can trust the binaries. See https://github.com/yshavit/mdq/wiki/Release-binaries for information on how to verify them.
[the latest release]: https://github.com/yshavit/mdq/releases/latest [build-release]: https://github.com/yshavit/mdq/actions/workflows/build-release.yml # Basic Usage Simple example to select sections containing "usage": ```shell cat example.md | mdq '# usage' ``` Use pipe (`|`) to chain filters together. For example, to select sections containing "usage", and within those find all unordered list items: ```shell cat example.md | mdq '# usage | -' ``` The filter syntax is designed to mirror Markdown syntax. You can select... | Element | Syntax | |------------------|----------------------------------| | Sections | `# title text` | | Lists | `- unordered list item text` | | " | `1. ordered list item text` | | " | `- [ ] uncompleted task` | | " | `- [x] completed task` | | " | `- [?] any task` | | Links | `[display text](url)` | | Images | `![alt text](url)` | | Block quotes | `> block quote text` | | Code blocks | ` ```language ` | | Raw HTML | ` html_tag` | | Plain paragraphs | `P: paragraph text ` | | Tables | `:-: header text :-: row text` | (Tables selection differs from other selections in that you can actually select only certain headers and rows, such that the resulting element is of a different shape than the original. See the example below, or the wiki for more detail.) In any of the above, the text may be: - an `unquoted string` that starts with a letter; this is case-insensitive - a `"quoted string"` (either single or double quotes); this is case-sensitive - a string (quoted or unquoted) anchored by `^` or `$` (for start and end of string, respectively) - a `/regex/` - omitted or `*`, to mean "any" See the [tutorial] for a bit more detail, and [user manual] for the full picture. [tutorial]: https://github.com/yshavit/mdq/wiki/Tutorial [user manual]: https://github.com/yshavit/mdq/wiki/Full-User-Manual ## Examples ### Ensuring that people have searched existing issues before submitting a bug report Many projects have bug report templates that ask the submitter to attest that they've checked existing issues for possible duplicates. In mdq, you can do: ```bash if echo "$ISSUE_TEXT" | mdq -q '- [x] I have searched for existing issues' ; then ... ``` (The `-q` option is like grep's: it doesn't output anything to stdout, but exits 0 if any items were found, or non-0 otherwise.) This will match: > - [x] I have searched for existing issues ... but will fail if the checkbox is unchecked: > - [ ] I have searched for existing issues ### Extracting a referenced ticket Some organizations use GitHub Actions to update their ticket tracker, if a PR mentions a ticket. You can use mdq to extract the link from Markdown as JSON, and then use jq to get the URL: ```bash TICKET_URL="$(echo "$PR_TEXT" | mdq --output json '# Ticket | [](^https://tickets.example.com/[A-Z]+-\d+$)' | jq -r '.items[].link.url')" ``` This will match Markdown like: > #### Ticket > > https://tickets.example.com/PROJ-1234 ### Whittling down a big table Let's say you have a table whose columns reference people in an on-call schedule, rows correspond to weeks in `YYYY-MM-DD` format: > | On-Call | Alice | Bob | Sam | Pat | > |:----------:|:-----:|:---:|:---:|:---:| > | 2024-01-08 | x | | | | > | 2024-01-15 | | | x | | > | 2024-01-22 | | x | | | To find out when Alice is on call: ```bash cat oncall.md | mdq ':-: /On-Call|Alice/:-: *' ``` ```markdown | On-Call | Alice | |:----------:|:-----:| | 2024-01-08 | x | | 2024-01-15 | | | 2024-01-22 | | ``` Or, to find out who's on call for the week of Jan 15: ```bash cat oncall.md | mdq ':-: * :-: 2024-01-15' ``` ```markdown | On-Call | Alice | Bob | Sam | Pat | |:----------:|:-----:|:---:|:---:|----:| | 2024-01-15 | | | x | | ```
+
+ ## System prompt
+ You are an expert web developer. Create a website based on this request: "# mdq: jq for Markdown [![Code Coverage][coverage-shield]][coverage-link] [![Build status][build-shield]][build-link] [![Pending TODOs][todos-shield]][todos-link] [![Ignored tests][ignoreds-shield]][ignoreds-link] [coverage-shield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fyshavit%2F53901a0115b596e015a891c41fb0f256%2Fraw%2Fmdq-coverage.json [coverage-link]: https://github.com/yshavit/mdq/actions/workflows/coverage.yml?query=branch%3Amain [build-shield]: https://github.com/yshavit/mdq/actions/workflows/rust.yml/badge.svg [build-link]: https://github.com/yshavit/mdq/actions/workflows/rust.yml?query=branch%3Amain [todos-shield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fyshavit%2Fe7a9e9e72651da0d7d2b1fbbe56237d0%2Fraw%2Fmdq-todos.json [todos-link]: https://github.com/search?q=repo%3Ayshavit%2Fmdq+NOT+path%3A.github%2Fworkflows%2Fcoverage.yml+NOT+path%3AREADME.md+todo&type=code [ignoreds-shield]: https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Fyshavit%2F782a8dc5f77d2cf4b1c774da72636f00%2Fraw%2Fmdq-ignoreds.json [ignoreds-link]: https://github.com/search?q=repo%3Ayshavit%2Fmdq+%28%28path%3A%2F%5C.rs%24%2F+%22%23%5Bignore%5D%22%29+OR+%28path%3Atests%2Fmd_cases+%2F%5Eignore%2F%29%29&type=code ## What is mdq? mdq aims to do for Markdown what jq does for JSON: provide an easy way to zero in on specific parts of a document. For example, GitHub PRs are Markdown documents, and some organizations have specific templates with checklists for all reviewers to complete. Enforcing these often requires ugly regexes that are a pain to write and worse to debug. Instead, you can (for example) ask mdq for all uncompleted tasks: ```shell mdq '- [ ]' ``` mdq is available under the Apache 2.0 or MIT licenses, at your option. I am open to other permissive licenses, if you have one you prefer. # Installation Any of these will work: 1. ```shell cargo install --git https://github.com/yshavit/mdq ``` 2. Download binaries from [the latest release] (or any other release, of course). 3. You can also grab the binaries from the latest [build-release] workflow run. You must be logged into GitHub to do that (this is GitHub's limitation, not mine). You'll have to `chmod +x` them before you can run them.
Security concerns The release and latest-workflow binaries are built on GitHub's servers, so if you trust my code (and dependencies), and you trust GitHub, you can trust the binaries. See https://github.com/yshavit/mdq/wiki/Release-binaries for information on how to verify them.
[the latest release]: https://github.com/yshavit/mdq/releases/latest [build-release]: https://github.com/yshavit/mdq/actions/workflows/build-release.yml # Basic Usage Simple example to select sections containing "usage": ```shell cat example.md | mdq '# usage' ``` Use pipe (`|`) to chain filters together. For example, to select sections containing "usage", and within those find all unordered list items: ```shell cat example.md | mdq '# usage | -' ``` The filter syntax is designed to mirror Markdown syntax. You can select... | Element | Syntax | |------------------|----------------------------------| | Sections | `# title text` | | Lists | `- unordered list item text` | | " | `1. ordered list item text` | | " | `- [ ] uncompleted task` | | " | `- [x] completed task` | | " | `- [?] any task` | | Links | `[display text](url)` | | Images | `![alt text](url)` | | Block quotes | `> block quote text` | | Code blocks | ` ```language ` | | Raw HTML | ` html_tag` | | Plain paragraphs | `P: paragraph text ` | | Tables | `:-: header text :-: row text` | (Tables selection differs from other selections in that you can actually select only certain headers and rows, such that the resulting element is of a different shape than the original. See the example below, or the wiki for more detail.) In any of the above, the text may be: - an `unquoted string` that starts with a letter; this is case-insensitive - a `"quoted string"` (either single or double quotes); this is case-sensitive - a string (quoted or unquoted) anchored by `^` or `You are an expert web developer. Create a website based on this request: " (for start and end of string, respectively) - a `/regex/` - omitted or `*`, to mean "any" See the [tutorial] for a bit more detail, and [user manual] for the full picture. [tutorial]: https://github.com/yshavit/mdq/wiki/Tutorial [user manual]: https://github.com/yshavit/mdq/wiki/Full-User-Manual ## Examples ### Ensuring that people have searched existing issues before submitting a bug report Many projects have bug report templates that ask the submitter to attest that they've checked existing issues for possible duplicates. In mdq, you can do: ```bash if echo "$ISSUE_TEXT" | mdq -q '- [x] I have searched for existing issues' ; then ... ``` (The `-q` option is like grep's: it doesn't output anything to stdout, but exits 0 if any items were found, or non-0 otherwise.) This will match: > - [x] I have searched for existing issues ... but will fail if the checkbox is unchecked: > - [ ] I have searched for existing issues ### Extracting a referenced ticket Some organizations use GitHub Actions to update their ticket tracker, if a PR mentions a ticket. You can use mdq to extract the link from Markdown as JSON, and then use jq to get the URL: ```bash TICKET_URL="$(echo "$PR_TEXT" | mdq --output json '# Ticket | [](^https://tickets.example.com/[A-Z]+-\d+$)' | jq -r '.items[].link.url')" ``` This will match Markdown like: > #### Ticket > > https://tickets.example.com/PROJ-1234 ### Whittling down a big table Let's say you have a table whose columns reference people in an on-call schedule, rows correspond to weeks in `YYYY-MM-DD` format: > | On-Call | Alice | Bob | Sam | Pat | > |:----------:|:-----:|:---:|:---:|:---:| > | 2024-01-08 | x | | | | > | 2024-01-15 | | | x | | > | 2024-01-22 | | x | | | To find out when Alice is on call: ```bash cat oncall.md | mdq ':-: /On-Call|Alice/:-: *' ``` ```markdown | On-Call | Alice | |:----------:|:-----:| | 2024-01-08 | x | | 2024-01-15 | | | 2024-01-22 | | ``` Or, to find out who's on call for the week of Jan 15: ```bash cat oncall.md | mdq ':-: * :-: 2024-01-15' ``` ```markdown | On-Call | Alice | Bob | Sam | Pat | |:----------:|:-----:|:---:|:---:|----:| | 2024-01-15 | | | x | | ```"
+
+ 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', () => {
+ // Add smooth scrolling for anchor links
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
+ anchor.addEventListener('click', function (e) {
+ e.preventDefault();
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
+ behavior: 'smooth'
+ });
+ });
+ });
+
+ // Add mobile menu toggle
+ const createMobileMenu = () => {
+ const nav = document.querySelector('nav');
+ const burger = document.createElement('button');
+ burger.className = 'mobile-menu-button';
+ burger.innerHTML = '☰';
+ burger.style.display = 'none';
+
+ const mobileBreakpoint = window.matchMedia('(max-width: 768px)');
+
+ const handleMobileMenu = (e) => {
+ if (e.matches) {
+ burger.style.display = 'block';
+ } else {
+ burger.style.display = 'none';
+ document.querySelector('.nav-links').style.display = 'flex';
+ }
+ };
+
+ mobileBreakpoint.addListener(handleMobileMenu);
+ handleMobileMenu(mobileBreakpoint);
+
+ burger.addEventListener('click', () => {
+ const navLinks = document.querySelector('.nav-links');
+ navLinks.style.display = navLinks.style.display === 'none' ? 'flex' : 'none';
+ });
+
+ nav.prepend(burger);
+ };
+
+ createMobileMenu();
+ });
style.css
Changed around line 1
+ :root {
+ --primary: #2563eb;
+ --secondary: #1e40af;
+ --text: #1f2937;
+ --background: #ffffff;
+ --code-bg: #f3f4f6;
+ --border: #e5e7eb;
+ }
+
+ * {
+ margin: 0;
+ padding: 0;
+ box-sizing: border-box;
+ }
+
+ body {
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
+ line-height: 1.6;
+ color: var(--text);
+ }
+
+ .hero {
+ background: linear-gradient(135deg, var(--primary), var(--secondary));
+ color: white;
+ padding: 2rem 1rem;
+ text-align: center;
+ }
+
+ nav {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 1rem;
+ max-width: 1200px;
+ margin: 0 auto;
+ }
+
+ .logo {
+ font-size: 1.5rem;
+ font-weight: bold;
+ text-decoration: none;
+ color: white;
+ }
+
+ .nav-links {
+ display: flex;
+ gap: 2rem;
+ }
+
+ .nav-links a {
+ color: white;
+ text-decoration: none;
+ transition: opacity 0.2s;
+ }
+
+ .nav-links a:hover {
+ opacity: 0.8;
+ }
+
+ .cta-button {
+ background: white;
+ color: var(--primary) !important;
+ padding: 0.5rem 1rem;
+ border-radius: 0.5rem;
+ font-weight: 500;
+ }
+
+ .hero-content {
+ max-width: 800px;
+ margin: 4rem auto;
+ }
+
+ .hero-content h1 {
+ font-size: 3rem;
+ margin-bottom: 1rem;
+ }
+
+ .badges {
+ display: flex;
+ gap: 1rem;
+ justify-content: center;
+ margin-top: 2rem;
+ }
+
+ .install-options {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ gap: 2rem;
+ padding: 2rem;
+ }
+
+ .install-card {
+ background: var(--background);
+ border: 1px solid var(--border);
+ border-radius: 0.5rem;
+ padding: 1.5rem;
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ }
+
+ .code-block {
+ background: var(--code-bg);
+ padding: 1rem;
+ border-radius: 0.5rem;
+ overflow-x: auto;
+ font-family: 'Fira Code', monospace;
+ }
+
+ .usage-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ gap: 2rem;
+ padding: 2rem;
+ }
+
+ .example-cards {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ gap: 2rem;
+ padding: 2rem;
+ }
+
+ .example-card {
+ background: var(--background);
+ border: 1px solid var(--border);
+ border-radius: 0.5rem;
+ padding: 1.5rem;
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ }
+
+ section {
+ padding: 4rem 1rem;
+ }
+
+ section h2 {
+ text-align: center;
+ margin-bottom: 2rem;
+ color: var(--primary);
+ }
+
+ .button {
+ display: inline-block;
+ background: var(--primary);
+ color: white;
+ padding: 0.75rem 1.5rem;
+ border-radius: 0.5rem;
+ text-decoration: none;
+ transition: background-color 0.2s;
+ }
+
+ .button:hover {
+ background: var(--secondary);
+ }
+
+ footer {
+ background: var(--code-bg);
+ padding: 2rem;
+ text-align: center;
+ }
+
+ .footer-links {
+ display: flex;
+ justify-content: center;
+ gap: 2rem;
+ margin-bottom: 1rem;
+ }
+
+ .footer-links a {
+ color: var(--text);
+ text-decoration: none;
+ }
+
+ @media (max-width: 768px) {
+ .nav-links {
+ display: none;
+ }
+
+ .hero-content h1 {
+ font-size: 2rem;
+ }
+
+ .badges {
+ flex-direction: column;
+ align-items: center;
+ }
+ }