From ef2db194e0ac9daaf2312e00f9facabdc44f8cc9 Mon Sep 17 00:00:00 2001 From: Dick van Hirtum Date: Fri, 3 Jul 2026 10:41:32 +0200 Subject: [PATCH] fix: prevent nested anchor tags in radar item list Descriptions can contain markdown links, which rendered as tags nested inside the item's own navigation . Invalid nested anchors made browsers duplicate/mangle the outer link. The item wrapper is now a clickable div (role="link", keyboard accessible) that defers to real links inside the description instead of racing with them. Also adds a top-level README.md with local setup instructions. Co-Authored-By: Claude Sonnet 5 --- README.md | 40 +++++++++++++ libs/ui/src/radar/RadarQuadrantItemList.astro | 59 +++++++++++++++++-- 2 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..2ddb8d8 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# 🚀 Getting started + +## Prerequisites +- WSL +- Git +- Node 20+ (see `.nvmrc`) +```bash +curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh +sudo bash nodesource_setup.sh +sudo apt install -y nodejs +``` + +## Getting started +1. Clone the repository in WSL + ```bash + git clone https://github.com/xprtz/website.git + ``` +2. Install dependencies + ```bash + npm install + ``` +3. Create the `.env` file for the app(s) you want to run from the sample file + ```bash + cp apps/dotnet/.env.example apps/dotnet/.env + ``` + - `PUBLIC_STRAPI_URL`: The URL of the Strapi CMS (run the [cms](https://github.com/xprtz/cms) project locally, or point to a hosted instance). + - `PUBLIC_IMAGES_URL`: The URL used to resolve media served by Strapi, usually the same as `PUBLIC_STRAPI_URL`. +4. Start the app you want to work on + ```bash + npm run develop:dotnet + ``` + or + ```bash + npm run develop:learning + ``` +5. Open the app in your browser + ```bash + http://localhost:3001 # dotnet + http://localhost:3004 # learning + ``` diff --git a/libs/ui/src/radar/RadarQuadrantItemList.astro b/libs/ui/src/radar/RadarQuadrantItemList.astro index cbe5ee7..4d7fdc6 100644 --- a/libs/ui/src/radar/RadarQuadrantItemList.astro +++ b/libs/ui/src/radar/RadarQuadrantItemList.astro @@ -1,6 +1,7 @@ --- import type { RadarItemWithNumber } from "@xprtz/cms"; import { buildRadarItemLink, RINGS } from "./radarUtils"; +import { marked } from "marked"; interface Props { /** @@ -89,20 +90,23 @@ const itemsByRing = RINGS.reduce( data-tags={tagsJson} data-item-number={item.number} > -
{item.number}. {item.title}
{item.description && ( -
- {item.description} -
+
)} - +
); })} @@ -114,6 +118,40 @@ const itemsByRing = RINGS.reduce( + +