Skip to content

Commit 415c54c

Browse files
dpupclaude
andauthored
Format code and improve line wrapping across the site (#126)
* Show alert title when there is only one active alert When the Current Conditions card has exactly one alert, display the alert's title instead of the generic "1 active alert" text. https://claude.ai/code/session_01DkQd81sxvLc4w5VkZCwenM * Apply formatting and update lockfile Run pnpm format across the codebase and update pnpm-lock.yaml after fresh install. https://claude.ai/code/session_01DkQd81sxvLc4w5VkZCwenM --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4a39b08 commit 415c54c

37 files changed

+3497
-1287
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
version: 2
22
updates:
3-
- package-ecosystem: 'npm'
4-
directory: '/'
5-
schedule:
6-
interval: "weekly"
7-
open-pull-requests-limit: 1
8-
groups:
9-
all:
10-
patterns:
11-
- "*"
3+
- package-ecosystem: 'npm'
4+
directory: '/'
5+
schedule:
6+
interval: 'weekly'
7+
open-pull-requests-limit: 1
8+
groups:
9+
all:
10+
patterns:
11+
- '*'

.prettierrc.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ export default {
33
printWidth: 100,
44
semi: true,
55
singleQuote: true,
6-
trailingComma: "all",
6+
trailingComma: 'all',
77
tabWidth: 2,
88
useTabs: false,
99

10-
plugins: ["prettier-plugin-astro"],
10+
plugins: ['prettier-plugin-astro'],
1111
overrides: [
1212
{
13-
files: "*.astro",
13+
files: '*.astro',
1414
options: {
15-
parser: "astro",
15+
parser: 'astro',
1616
},
1717
},
1818
],

CLAUDE.md

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,26 @@
33
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
44

55
## Project Overview
6+
67
This is an Astro-based website for the Ebbetts Pass Radio Safety Net (ERSN). The site provides information about emergency communications, GMRS radios, mesh networking, and amateur radio resources.
78

89
## Build Commands
10+
911
- `pnpm dev` or `pnpm start`: Start dev server
1012
- `pnpm build`: Build for production
1113
- `pnpm preview`: Preview production build
1214
- `pnpm check`: Run Astro type checking
1315
- `pnpm format` or `pnpm fmt`: Format code with Prettier
1416

1517
## Quality Assurance
18+
1619
- **Always run checks**: After making changes, run `pnpm check` to verify TypeScript compilation
1720
- **Format code**: Run `pnpm format` before committing to ensure consistent formatting
1821
- **Test builds**: Run `pnpm build` to ensure production builds work correctly
1922
- **Preview changes**: Use `pnpm preview` to test the production build locally
2023

2124
## Code Style Guidelines
25+
2226
- **Formatting**: 100 char line width, 2-space indentation, single quotes, trailing commas
2327
- **Imports**: Framework imports first, then path aliases (@components, @layouts), then local
2428
- **Component Structure**: Props declaration in frontmatter, clear script/template separation
@@ -29,6 +33,7 @@ This is an Astro-based website for the Ebbetts Pass Radio Safety Net (ERSN). The
2933
- **React Components**: Used sparingly when needed for interactivity
3034

3135
## Autonomous Operation Guidelines
36+
3237
- **Make changes confidently**: You have permission to edit files, add components, and modify content
3338
- **Follow existing patterns**: Study existing components and pages to understand conventions
3439
- **Validate changes**: Always run `pnpm check` and `pnpm build` after making changes
@@ -37,13 +42,15 @@ This is an Astro-based website for the Ebbetts Pass Radio Safety Net (ERSN). The
3742
- **Maintain consistency**: Follow the established patterns for page structure and styling
3843

3944
## Common Tasks
45+
4046
- **Adding pages**: Create .astro files in src/pages/, use Layout.astro wrapper
4147
- **Styling**: Use Tailwind CSS classes, follow existing color/spacing patterns
4248
- **Content updates**: Edit existing .astro files in src/pages/ for content changes
4349
- **Component updates**: Modify files in src/components/ for reusable functionality
4450
- **Asset management**: Add images to src/assets/img/, reference with @img/ alias
4551

4652
## Technology Stack
53+
4754
- **Framework**: Astro (Static Site Generator)
4855
- **Styling**: Tailwind CSS
4956
- **Package Manager**: pnpm
@@ -53,17 +60,19 @@ This is an Astro-based website for the Ebbetts Pass Radio Safety Net (ERSN). The
5360
## News & Bulletin Management
5461

5562
### Adding News Posts
63+
5664
You are authorized to autonomously add news, bulletins, and updates to the website using Astro's content collections.
5765

5866
**Location**: Create new files in `src/content/bulletins/`
5967

6068
**File Format**:
69+
6170
```markdown
6271
---
63-
title: "Short descriptive title"
72+
title: 'Short descriptive title'
6473
date: 2025-06-07T00:00:00Z
65-
slug: "url-friendly-slug"
66-
summary: "One or two sentence plain text preview of the post content."
74+
slug: 'url-friendly-slug'
75+
summary: 'One or two sentence plain text preview of the post content.'
6776
---
6877

6978
Content body with proper markdown formatting.
@@ -81,6 +90,7 @@ Use double line breaks between paragraphs.
8190
**File Naming**: Use kebab-case names like `practice-net-update.md`
8291

8392
**Summary Requirements**:
93+
8494
- **Plain text only**: No markdown formatting in summaries
8595
- **1-2 sentences**: Concise preview of the main content
8696
- **Key details**: Include who, what, when for events
@@ -90,21 +100,25 @@ Use double line breaks between paragraphs.
90100
### Content Guidelines & Privacy Rules
91101

92102
**REQUIRED Content Filtering**:
103+
93104
- **Remove surnames**: Use first names only (e.g., "Jay" not "Jay Smith") unless explicitly told to keep them
94105
- **Remove GMRS codes**: Strip out PL tones, CTCSS codes, access codes, or frequency details
95106
- **Remove phone numbers**: Never include personal phone numbers unless explicitly instructed
96107
- **Emergency contacts**: Keep official emergency numbers (911, etc.)
97108

98109
**Content Examples**:
110+
99111
```markdown
100112
# ✅ GOOD - Event Formatting
113+
101114
ERSN member Jay will be hosting a practice net on Wednesday.
102115

103116
- **When:** 7:30 PM, Wednesdays
104117
- **Where:** Forest Meadows Repeater
105118
- **Contact:** ersnnets@gmail.com for more info
106119

107-
# ❌ BAD
120+
# ❌ BAD
121+
108122
Jay Williams will be hosting...
109123
Use PL tone 156.7 to access...
110124
Call Jay at (555) 123-4567...
@@ -115,6 +129,7 @@ Single line breaks that don't create paragraphs
115129
```
116130

117131
**Markdown Formatting Rules**:
132+
118133
- **Double line breaks** create paragraphs (required for proper rendering)
119134
- **Use headings** (## Heading) to structure content sections
120135
- **Event details as lists**: Use bulleted lists for event information, not headings
@@ -124,6 +139,7 @@ Single line breaks that don't create paragraphs
124139
- **Hyperlink text properly** using `[link text](url)` format instead of bare URLs
125140

126141
**Event Formatting Standard**:
142+
127143
```markdown
128144
Event description goes here.
129145

@@ -134,36 +150,44 @@ Event description goes here.
134150
```
135151

136152
**Link Examples**:
153+
137154
```markdown
138155
# ✅ GOOD
156+
139157
Join us at [Pine Brook HOA](http://pinebrookhoa.com/) for the meeting.
140158
Learn more about [Meshtastic](https://ersn.net/mesh) technology.
141159

142160
# ❌ BAD
161+
143162
Join us at Pine Brook HOA: http://pinebrookhoa.com/
144163
Learn more: https://ersn.net/mesh
145164
```
146165

147166
**Acceptable Content**:
167+
148168
- Event announcements and updates
149169
- Practice net schedules and changes
150170
- Equipment testing notifications
151171
- General community information
152172
- Educational content about emergency preparedness
153173

154174
**Process**:
175+
155176
1. Create the markdown file with proper frontmatter
156177
2. Apply content filtering rules automatically
157178
3. Run `pnpm check` and `pnpm build` to verify
158179
4. News will automatically appear on homepage and /news page
159180

160181
### Manual Override
182+
161183
If explicitly instructed to "keep surnames" or "include contact numbers," you may override the default filtering rules for that specific post.
162184

163185
## Repeater Status Management
164186

165187
### Overview
188+
166189
Repeater statuses are displayed in two key locations that must be kept synchronized:
190+
167191
1. **Homepage widget** (`src/components/homepage/CurrentConditions.tsx`) - Compact status summary
168192
2. **Main status page** (`src/pages/status.astro`) - Detailed repeater information
169193

@@ -176,6 +200,7 @@ When changing a repeater's operational status, **BOTH locations must be updated*
176200
**Location**: Lines ~72-76 in the `repeaters` array constant
177201

178202
**Current repeaters**:
203+
179204
```typescript
180205
const repeaters: RepeaterInfo[] = [
181206
{ name: 'Forest Meadows', frequency: '462.725', status: 'up' },
@@ -185,6 +210,7 @@ const repeaters: RepeaterInfo[] = [
185210
```
186211

187212
**Status Values**:
213+
188214
- `'up'` - Repeater is operational (displays as "Up" in green)
189215
- `'down'` - Repeater is offline (displays as "Down" in red)
190216
- `'unknown'` - Status unclear (not currently used in display)
@@ -196,6 +222,7 @@ const repeaters: RepeaterInfo[] = [
196222
**Location**: Lines ~46-84 in the repeater status section
197223

198224
**Elements to update for each repeater**:
225+
199226
- **Status indicator** (line ~51, ~70): `<div class="w-3 h-3 bg-green-500 rounded-full"></div>`
200227
- `bg-green-500` for operational
201228
- `bg-red-500` for offline
@@ -208,13 +235,17 @@ const repeaters: RepeaterInfo[] = [
208235
### Adding New Repeaters
209236

210237
#### 1. Add to Homepage Widget
238+
211239
Add new entry to the `repeaters` array in `CurrentConditions.tsx`:
240+
212241
```typescript
213242
{ name: 'New Repeater Name', frequency: '462.725', status: 'up' },
214243
```
215244

216245
#### 2. Add to Status Page
246+
217247
Copy an existing repeater block in `status.astro` and update:
248+
218249
- Repeater name
219250
- Status indicator color
220251
- Status badge text and styling
@@ -223,14 +254,17 @@ Copy an existing repeater block in `status.astro` and update:
223254
### Removing Repeaters
224255

225256
#### 1. Remove from Homepage Widget
257+
226258
Delete the entry from the `repeaters` array in `CurrentConditions.tsx`
227259

228260
#### 2. Remove from Status Page
261+
229262
Delete the entire repeater block from the grid in `status.astro`
230263

231264
### Status Change Checklist
232265

233266
When updating repeater status:
267+
234268
- [ ] Update `repeaters` array in `src/components/homepage/CurrentConditions.tsx`
235269
- [ ] Update status indicator in `src/pages/status.astro`
236270
- [ ] Update status badge in `src/pages/status.astro`
@@ -241,16 +275,19 @@ When updating repeater status:
241275
### Common Status Scenarios
242276

243277
**Repeater comes online**:
278+
244279
1. Change `status: 'down'` to `status: 'up'` in homepage widget
245280
2. Change status indicator to `bg-green-500` in status page
246281
3. Change status badge to `text-green-700 bg-green-100` with "Operational" text
247282

248283
**Repeater goes offline**:
284+
249285
1. Change `status: 'up'` to `status: 'down'` in homepage widget
250286
2. Change status indicator to `bg-red-500` in status page
251287
3. Change status badge to `text-red-700 bg-red-100` with "Offline" text
252288

253289
**Emergency maintenance**:
290+
254291
1. Keep `status: 'up'` in homepage widget (or use 'down' if completely inaccessible)
255292
2. Change status indicator to `bg-yellow-500` in status page
256-
3. Change status badge to `text-yellow-700 bg-yellow-100` with "Maintenance" text
293+
3. Change status badge to `text-yellow-700 bg-yellow-100` with "Maintenance" text

astro.config.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ export default defineConfig({
1212
trailingSlash: 'never',
1313
integrations: [icon(), mdx(), sitemap(), react()],
1414
vite: {
15-
plugins: [
16-
tailwindcss(),
17-
],
15+
plugins: [tailwindcss()],
1816
optimizeDeps: {
1917
exclude: ['sharp'],
2018
},
2119
},
2220
redirects: {},
23-
});
21+
});

0 commit comments

Comments
 (0)