Add HardwareCards component linking to sister hardware docs

Reusable Astro component placed on 6 pages, cross-linking to
nanovna-h.warehack.ing and nanovna-f.warehack.ing with cards
matching the NanoVNAFamily visual style.
This commit is contained in:
Ryan Malloy 2026-03-07 05:19:18 -07:00
parent a6845b67d5
commit 6f61e1c217
7 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,105 @@
---
/**
* Cross-link cards to NanoVNA hardware reference sites.
* Visual style matches NanoVNAFamily.astro from nanovna-h-docs.
*/
interface Props {
show?: 'both' | 'h' | 'f';
heading?: string | false;
}
const { show = 'both', heading = 'Hardware Reference' } = Astro.props;
const showH = show === 'both' || show === 'h';
const showF = show === 'both' || show === 'f';
const singleCard = show === 'h' || show === 'f';
---
{heading && <h2>{heading}</h2>}
<div class:list={['hardware-cards', { 'single-card': singleCard }]}>
{showH && (
<a href="https://nanovna-h.warehack.ing/" class="hw-card" rel="noopener">
<h3>NanoVNA-H</h3>
<span class="hw-range">600 Hz &ndash; 2 GHz</span>
<p>Open-source hardware reference. Firmware internals, calibration theory, 60 shell commands.</p>
<span class="hw-link">nanovna-h.warehack.ing &#8594;</span>
</a>
)}
{showF && (
<a href="https://nanovna-f.warehack.ing/" class="hw-card" rel="noopener">
<h3>NanoVNA-F V3</h3>
<span class="hw-range">1 MHz &ndash; 6 GHz</span>
<p>Extended-range hardware reference. Measurement guides, antenna testing, TDR, data export.</p>
<span class="hw-link">nanovna-f.warehack.ing &#8594;</span>
</a>
)}
</div>
<style>
.hardware-cards {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
margin: 1.5rem 0 2rem;
}
.hardware-cards.single-card {
grid-template-columns: 1fr;
max-width: 480px;
}
@media (max-width: 768px) {
.hardware-cards {
grid-template-columns: 1fr;
}
}
.hw-card {
background: var(--sl-color-gray-6);
border: 1px solid var(--sl-color-gray-5);
border-radius: 10px;
padding: 1.25rem;
text-decoration: none;
color: inherit;
transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
display: flex;
flex-direction: column;
}
.hw-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
border-color: var(--sl-color-gray-3);
}
.hw-card h3 {
margin: 0;
font-size: 1.1rem;
color: var(--sl-color-white);
}
.hw-range {
display: inline-block;
font-size: 0.8rem;
font-weight: 600;
color: var(--sl-color-accent);
margin: 0.25rem 0 0.5rem;
}
.hw-card p {
font-size: 0.82rem;
color: var(--sl-color-gray-2);
line-height: 1.5;
margin: 0;
flex: 1;
}
.hw-link {
display: block;
font-size: 0.78rem;
font-weight: 600;
color: var(--sl-color-text-accent);
margin-top: 0.75rem;
}
</style>

View File

@ -4,6 +4,7 @@ description: Get mcnanovna running in 5 minutes
--- ---
import { Steps, Tabs, TabItem, Aside } from '@astrojs/starlight/components'; import { Steps, Tabs, TabItem, Aside } from '@astrojs/starlight/components';
import HardwareCards from '../../../components/HardwareCards.astro';
## Prerequisites ## Prerequisites
@ -52,6 +53,8 @@ You should see device details like firmware version, serial number, and frequenc
- [Explore all 91 tools](/mcnanovna/tools/) - [Explore all 91 tools](/mcnanovna/tools/)
- [Multi-VNA measurements](/tutorials/multi-vna-basics/) — Use two VNAs together - [Multi-VNA measurements](/tutorials/multi-vna-basics/) — Use two VNAs together
<HardwareCards heading="Learn Your Hardware" />
## Troubleshooting ## Troubleshooting
### VNA not detected ### VNA not detected

View File

@ -18,6 +18,7 @@ hero:
import { Card, CardGrid, Tabs, TabItem } from '@astrojs/starlight/components'; import { Card, CardGrid, Tabs, TabItem } from '@astrojs/starlight/components';
import { Image } from 'astro:assets'; import { Image } from 'astro:assets';
import HardwareCards from '../../components/HardwareCards.astro';
import smithChart from '../../assets/screenshots/smith-chart.png'; import smithChart from '../../assets/screenshots/smith-chart.png';
import swrTrace from '../../assets/screenshots/swr-trace.png'; import swrTrace from '../../assets/screenshots/swr-trace.png';
import lcMatch from '../../assets/screenshots/measure-lc-match.png'; import lcMatch from '../../assets/screenshots/measure-lc-match.png';
@ -102,6 +103,8 @@ Then ask your assistant to analyze your antenna, measure a filter, or run a 3D p
</figure> </figure>
</div> </div>
<HardwareCards heading="Hardware Documentation" />
## Example Prompts ## Example Prompts
Once installed, try prompts like: Once installed, try prompts like:

View File

@ -4,6 +4,7 @@ description: MCP server for NanoVNA-H vector network analyzers
--- ---
import { Aside } from '@astrojs/starlight/components'; import { Aside } from '@astrojs/starlight/components';
import HardwareCards from '../../../components/HardwareCards.astro';
mcnanovna gives LLMs direct control of NanoVNA-H vector network analyzers over USB serial. It exposes 91 MCP tools for frequency sweeps, S-parameter measurements, calibration, LCD capture, RF analysis, 3D antenna radiation pattern visualization, and multi-VNA coordination. mcnanovna gives LLMs direct control of NanoVNA-H vector network analyzers over USB serial. It exposes 91 MCP tools for frequency sweeps, S-parameter measurements, calibration, LCD capture, RF analysis, 3D antenna radiation pattern visualization, and multi-VNA coordination.
@ -60,6 +61,8 @@ See [Multi-VNA Coordination](/mcnanovna/multi-vna/) for detailed tier comparison
Other NanoVNA variants using the same USB serial protocol (VID 0x0483, PID 0x5740) should also work. Other NanoVNA variants using the same USB serial protocol (VID 0x0483, PID 0x5740) should also work.
</Aside> </Aside>
<HardwareCards heading={false} />
## Architecture ## Architecture
``` ```

View File

@ -3,6 +3,8 @@ title: Ham Bands
description: Amateur radio frequency band presets description: Amateur radio frequency band presets
--- ---
import HardwareCards from '../../../components/HardwareCards.astro';
mcnanovna prompts accept ham band names as shortcuts for frequency ranges. mcnanovna prompts accept ham band names as shortcuts for frequency ranges.
## Band Presets ## Band Presets
@ -66,6 +68,8 @@ calibrate(start_hz=144000000, stop_hz=148000000)
Bands outside these ranges can't be measured directly. Bands outside these ranges can't be measured directly.
<HardwareCards heading="Hardware Details" />
## Harmonic Measurements ## Harmonic Measurements
For bands above the VNA's range, harmonics can sometimes be used: For bands above the VNA's range, harmonics can sometimes be used:

View File

@ -4,6 +4,7 @@ description: Using mcnanovna to analyze antenna performance
--- ---
import { Tabs, TabItem, Aside } from '@astrojs/starlight/components'; import { Tabs, TabItem, Aside } from '@astrojs/starlight/components';
import HardwareCards from '../../../components/HardwareCards.astro';
This tutorial covers common antenna analysis tasks using mcnanovna. This tutorial covers common antenna analysis tasks using mcnanovna.
@ -132,3 +133,5 @@ Say: "Show the radiation pattern for my dipole"
This uses the S11 data to determine resonance and impedance, then generates an idealized 3D pattern. This uses the S11 data to determine resonance and impedance, then generates an idealized 3D pattern.
For measured patterns, see [3D Pattern Measurement](/tutorials/pattern-measurement/). For measured patterns, see [3D Pattern Measurement](/tutorials/pattern-measurement/).
<HardwareCards show="h" heading={false} />

View File

@ -4,6 +4,7 @@ description: SOLT calibration for accurate measurements
--- ---
import { Steps, Aside } from '@astrojs/starlight/components'; import { Steps, Aside } from '@astrojs/starlight/components';
import HardwareCards from '../../../components/HardwareCards.astro';
Calibration removes systematic errors from VNA measurements. Without calibration, your readings will include errors from cables, adapters, and the VNA itself. Calibration removes systematic errors from VNA measurements. Without calibration, your readings will include errors from cables, adapters, and the VNA itself.
@ -136,3 +137,5 @@ The NanoVNA will use the stored calibration. Note that calibration must match th
<Aside type="caution"> <Aside type="caution">
Calibration is only valid for the exact cables and adapters used during calibration. If you change anything in the signal path, recalibrate. Calibration is only valid for the exact cables and adapters used during calibration. If you change anything in the signal path, recalibrate.
</Aside> </Aside>
<HardwareCards show="h" heading={false} />