Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 2.9 KB

File metadata and controls

47 lines (32 loc) · 2.9 KB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Static website for the Electrum Bitcoin wallet plugins directory (plugins.electrum.org). Pure HTML/CSS with no JavaScript, no build system, and no package manager. Serves 3 pages: home (index.html), plugin directory (plugins.html), and developer guide (developers.html).

Docker deployment:

cd hosting && ./start.sh

This builds a Caddy 2 Alpine image, copies site files, and runs on port 80.

Architecture

  • No build step — edit HTML/CSS directly, no transpilation or bundling
  • No client-side JS — hamburger menu uses CSS checkbox trick
  • CSS variables in css/style.css control theming (colors, typography, spacing)
  • Responsive breakpoints: mobile <768px, tablet ≥768px (2-col), desktop ≥1024px (3-col)
  • Hosting: Docker → Caddy 2 with gzip, security headers (X-Frame-Options DENY, nosniff, no-referrer)

Content Structure

plugins.html contains 3 plugin categories:

  • Graphical User Interface — Qt/QML GUI plugins (Audio MODEM, LabelSync, Revealer, etc.)
  • Daemon only — CLI/Daemon plugins (SwapServer, Watchtower, etc.)
  • Hardware Wallets — Trezor, Ledger, Coldcard, BitBox02, etc.

Each plugin is an <article class="plugin-card"> with icon, name, description, and links. Plugins carry platform badges (badge-qt for Desktop, badge-qml for Android, badge-cli for CLI) indicating which platforms they support. Internal plugins (bundled with Electrum) carry a badge-internal badge labeled "Internal".

Adding External Plugins

New external plugins go in the appropriate category section of plugins.html above the corresponding comment marker (<!-- ADD NEW EXTERNAL DESKTOP PLUGIN ABOVE THIS LINE --> or <!-- ADD NEW EXTERNAL CLI PLUGIN ABOVE THIS LINE -->). Plugin icons go in assets/plugins/ (48x48+ PNG/SVG). See CONTRIBUTING.md for the full card template. Each plugin also needs a plugin/{id}/index.html share redirect page and an assets/og/{id}.png OG image (see CONTRIBUTING.md).

Social Sharing

Each plugin has a shareable URL at plugin/{id}/ containing a lightweight redirect page with plugin-specific OpenGraph metadata. These pages redirect instantly to plugins.html#{id} via <meta http-equiv="refresh">. OG images are in assets/og/{id}.png (1200x630). A generation script lives at scripts/generate_og_images.py. When adding a new external plugin, also create a plugin/{id}/index.html redirect page and generate an OG image (see CONTRIBUTING.md).

Key Files

  • css/style.css — all styling (mobile-first responsive)
  • hosting/Caddyfile — web server config
  • hosting/start.sh — Docker build and deploy script
  • hosting/Dockerfile — Caddy 2 Alpine image
  • assets/plugins/ — plugin icons
  • developers.html — plugin hooks reference, manifest.json schema, plugin dev guide