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

@ -69,6 +69,16 @@ export async function registerRoutes(app: Express): Promise<Server> {
});
// Article routes
app.get('/api/articles', async (req, res) => {
try {
const articles = await storage.getArticles();
res.json(articles);
} catch (error) {
console.error("Error fetching articles:", error);
res.status(500).json({ message: "Failed to fetch articles" });
}
});
app.get('/api/media-outlets/:slug/articles', async (req, res) => {
try {
const outlet = await storage.getMediaOutletBySlug(req.params.slug);