From 2f4a388a4cc40f133409ebf451d6294a5da63e39 Mon Sep 17 00:00:00 2001 From: Louis King Date: Wed, 6 May 2026 19:02:18 +0100 Subject: [PATCH 1/2] feat: improve markdown prose styling, map popup overlay, and collapsible filters - Add .prose > :first-child margin-top:0 to eliminate double-spacing before headings - Add nested list CSS (circle/square bullets, lower-alpha/roman numbering) - Replace map popup

/space-y-1 layout with CSS grid for aligned label-value pairs - Convert map filter card to collapsible

with state persistence - Add nested list HTML output tests and markdown features docs --- docs/content.md | 18 +++ .../20260506-1830-markdown-parsing/plan.md | 145 ++++++++++++++++++ .../20260506-1830-markdown-parsing/tasks.md | 17 ++ src/meshcore_hub/web/static/css/app.css | 11 ++ .../web/static/js/spa/pages/map.js | 64 ++++---- tests/test_web/test_pages.py | 54 +++++++ 6 files changed, 280 insertions(+), 29 deletions(-) create mode 100644 docs/plans/20260506-1830-markdown-parsing/plan.md create mode 100644 docs/plans/20260506-1830-markdown-parsing/tasks.md diff --git a/docs/content.md b/docs/content.md index b7afe21..17b093b 100644 --- a/docs/content.md +++ b/docs/content.md @@ -77,6 +77,24 @@ Markdown content here (include your own heading)... The markdown content is rendered as-is, so include your own `# Heading` if desired. +### Supported Markdown Features + +Pages are rendered with [Python-Markdown](https://python-markdown.github.io/) with the following extensions enabled: + +| Feature | Syntax | Notes | +|---------|--------|-------| +| Headings | `# H1` through `### H3` | Rendered with `.prose` styling | +| Bold / Italic | `**bold**`, `*italic*` | Standard Markdown | +| Links | `[text](url)` | Relative paths supported | +| Unordered lists | `- item` or `* item` | Nested lists supported (3 levels) | +| Ordered lists | `1. item` | Nested lists supported (3 levels) | +| Tables | Pipe-delimited (`\| Header \|`) | Auto-generated ``/`` | +| Fenced code blocks | ` ``` ` with optional language | Syntax highlighting via `codehilite` extension | +| Inline code | `` `code` `` | Styled with monospace font | +| Blockquotes | `> quote` | Left border styling | +| Images | `![alt](/media/image.png)` | Use absolute paths to `/media/` | +| Table of contents | `[TOC]` marker | Auto-generated from headings | + ## Docker Configuration With Docker, mount the content directory as a read-only volume. This is already configured in `docker-compose.yml`: diff --git a/docs/plans/20260506-1830-markdown-parsing/plan.md b/docs/plans/20260506-1830-markdown-parsing/plan.md new file mode 100644 index 0000000..431e0c6 --- /dev/null +++ b/docs/plans/20260506-1830-markdown-parsing/plan.md @@ -0,0 +1,145 @@ +# Plan: Markdown Nested Lists & Map Collapsible Filters + +Date: 2026-05-06 + +## Part A: Fix Markdown Prose Styling + +### Problem + +Two CSS issues in custom markdown pages: + +1. **Excessive top spacing** — The first element inside `.prose` (typically an `

`) gets both the DaisyUI `card-body` padding AND its own `margin-top: 1.5rem`, creating a large gap before content starts. The `.prose h1` rule at `app.css:166` applies `margin-top: 1.5rem` unconditionally. + +2. **No nested list differentiation** — All list levels use the same bullet style (`disc`) because the `.prose` CSS in `app.css:199-215` only styles `ul`, `ol`, and `li` at a single level. Python-Markdown correctly generates nested `