Files
Digital-Dabei-Hamburg-Job-M…/CLAUDE.md
Viktor Miller d907878143 refactor: improve CSS specificity and add vertical spacing
- Add 1rem vertical padding to .ddhh-provider-dashboard for proper spacing
- Remove all !important declarations from button styles
- Use proper CSS specificity (.ddhh-jobs-table .button) instead
- Document CSS best practices in CLAUDE.md (avoid !important)

CSS specificity approach is more maintainable and prevents conflicts
with Elementor and other theme styles.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-29 13:23:03 +09:00

85 lines
3.5 KiB
Markdown

# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
Digital Dabei Job Manager is a WordPress plugin providing a closed job board for "digital dabei Hamburg". External organizations (providers) self-register and manage job listings. Mentors (existing subscribers) view and apply to jobs. All jobs require admin moderation before publication.
**Core principle**: Every job goes through admin approval before mentors see it. The moderation flow is the trust layer protecting mentors from spam.
## Development Environment
- **Platform**: Local WP (WordPress development environment)
- **WordPress**: 6.0+, PHP 7.4+
- **Required Plugins**: ACF Pro, Formidable Forms Pro, Elementor Pro
- **Email**: WP Mail SMTP on production; disabled in Local WP dev environment
## Development Workflow with GSD
**IMPORTANT**: Use `/gsd` commands for all code-related work in this repository.
The GSD (Get Stuff Done) workflow provides:
- Structured planning and execution phases
- Automatic verification of changes
- State management across sessions
- Parallel execution when possible
Common commands:
- `/gsd:progress` - Check current state and next steps
- `/gsd:plan-phase` - Plan implementation for a phase
- `/gsd:execute-phase` - Execute all plans in a phase
- `/gsd:help` - View all available GSD commands
## Development Workflow
### Testing Locally
Since email is disabled in Local WP, test email functionality by:
1. Checking Action Scheduler status: WP Admin → Tools → Scheduled Actions
2. Monitoring logs: `error_log()` calls throughout notification classes
3. Using a plugin like WP Mail Logging to capture emails during dev
### Working with Forms
Formidable forms are managed through the Formidable UI. When referencing forms in code:
- Use form keys (e.g., 'job_submission') not IDs
- Form ID lookup happens via `FrmForm::getOne('form_key')`
- Field IDs are stored in form configuration, not hardcoded
### Modifying Email Templates
Email templates are inline in `class-notifications.php`:
- Admin emails use `wp_mail()` with HTML content
- Mentor notification emails use `wp_mail()` with plain text
- All emails include job title, provider name, and relevant links
- Date formatting: Use `get_field()` for ACF dates, format with German locale
### Adding New Notifications
1. Identify triggering event (form submission, status change, custom action)
2. Add notification method to `class-notifications.php`
3. Hook into appropriate action in `setup_hooks()`
4. For batch processing, use `DDHH_JM_Scheduler::schedule_mentor_notification_batch()`
### CSS Best Practices
**NEVER use `!important` in CSS.** This is a bad practice that creates maintenance issues and specificity wars.
Instead, use proper CSS specificity to override styles:
- **Bad:** `.button { color: #fff !important; }`
- **Good:** `.ddhh-jobs-table .button { color: #fff; }`
Specificity hierarchy (from weakest to strongest):
1. Element selectors: `button { }`
2. Class selectors: `.button { }`
3. Multiple classes: `.ddhh-jobs-table .button { }`
4. ID selectors: `#my-id { }` (avoid in most cases)
5. Inline styles: `style="..."` (avoid)
6. `!important` (NEVER use unless absolutely necessary for overriding external libraries)
**Template-specific styles:**
- All dashboard template styles are scoped with `.ddhh-provider-dashboard` or child selectors
- This prevents conflicts with Elementor and other theme styles
- Use parent selector chains like `.ddhh-jobs-table .button` for higher specificity