transforms landing, about and schedule page content to data driven
This commit is contained in:
@@ -3,11 +3,7 @@
|
||||
<div class="events-header">
|
||||
<img src="svg/small-flower.svg" alt="" class="events-flower" aria-hidden="true">
|
||||
<h2>Upcoming <span class="text-accent">Events</span></h2>
|
||||
<p class="section-intro">
|
||||
Come meet the team, enjoy live music, and support public radio in
|
||||
person. All events are open to the community — friends and family of
|
||||
listeners welcome.
|
||||
</p>
|
||||
<p class="section-intro">{{ config().events_intro }}</p>
|
||||
</div>
|
||||
|
||||
@if (events$ | async; as state) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { AsyncPipe, DatePipe, NgFor } from '@angular/common';
|
||||
import { map, Observable, startWith } from 'rxjs';
|
||||
|
||||
import { EventService } from '../services/event.service';
|
||||
import { StationConfigService } from '../services/station-config.service';
|
||||
import { Event } from '../interfaces/event';
|
||||
|
||||
interface EventsState {
|
||||
@@ -19,6 +20,7 @@ interface EventsState {
|
||||
})
|
||||
export class EventsComponent {
|
||||
private eventService = inject(EventService);
|
||||
readonly config = inject(StationConfigService).config;
|
||||
|
||||
/** Async pipe drives the template — guarantees change detection on every emission. */
|
||||
readonly events$: Observable<EventsState> =
|
||||
|
||||
Reference in New Issue
Block a user