Add a visual sparkle effect for new news updates on the Erling Haaland media outlet

Introduces a new API endpoint `/api/articles` and implements a client-side animation to visually alert users of new articles on the 'erling-haaland' outlet using CSS keyframes and conditional rendering.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d9e77062-eeec-4c95-9131-905f69a78072
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/d9e77062-eeec-4c95-9131-905f69a78072/VftcvwB
This commit is contained in:
kimjaehyeon0101
2025-10-01 06:07:35 +00:00
parent b5e8cf3d3a
commit 0eee17a43e
5 changed files with 86 additions and 2 deletions

View File

@ -43,6 +43,7 @@ export interface IStorage {
updateMediaOutlet(id: string, outlet: Partial<InsertMediaOutlet>): Promise<MediaOutlet>;
// Article operations
getArticles(): Promise<Article[]>;
getArticlesByOutlet(mediaOutletId: string): Promise<Article[]>;
getArticleBySlug(slug: string): Promise<Article | undefined>;
createArticle(article: InsertArticle): Promise<Article>;
@ -144,6 +145,13 @@ export class DatabaseStorage implements IStorage {
}
// Article operations
async getArticles(): Promise<Article[]> {
return await db
.select()
.from(articles)
.orderBy(desc(articles.publishedAt));
}
async getArticlesByOutlet(mediaOutletId: string): Promise<Article[]> {
return await db
.select()