# Story 5.4: Public Posts Display
## Epic Reference
**Epic 5:** Posts/Blog System
## User Story
As a **website visitor**,
I want **to view published blog posts**,
So that **I can read legal updates and articles from the firm**.
## Story Context
### Existing System Integration
- **Integrates with:** posts table (published only)
- **Technology:** Livewire Volt (public routes)
- **Follows pattern:** Public content display
- **Touch points:** Navigation, homepage
### Assumptions
- Post model exists with `published()` scope (from Story 5.1)
- Post model has locale-aware `title`, `body`, and `excerpt` accessors (from Story 5.1)
- Bilingual infrastructure is in place (from Epic 1)
- Base navigation includes link to posts section (from Epic 1)
## Acceptance Criteria
### Posts Listing Page
- [ ] Public access (no login required)
- [ ] Display in reverse chronological order
- [ ] Each post card shows:
- Title
- Publication date
- Excerpt (first ~150 characters)
- Read more link
- [ ] Pagination for many posts
### Individual Post Page
- [ ] Full post content displayed
- [ ] Clean, readable typography
- [ ] Publication date shown
- [ ] Back to posts list link
### Language Support
- [ ] Content displayed based on current site language
- [ ] Title and body in selected language
- [ ] Date formatting per locale
### Design Requirements
- [ ] Responsive design (mobile-friendly)
- [ ] Professional typography
- [ ] Consistent with brand colors
### Quality Requirements
- [ ] Only published posts visible
- [ ] Fast loading
- [ ] SEO-friendly URLs (optional per PRD)
- [ ] Tests for display logic
## Technical Notes
### Routes
```php
// routes/web.php (public)
Route::get('/posts', \App\Livewire\Posts\Index::class)->name('posts.index');
Route::get('/posts/{post}', \App\Livewire\Posts\Show::class)->name('posts.show');
```
### Posts Index Component
```php
Post::published()
->latest()
->paginate(10),
];
}
}; ?>