diff --git a/.replit b/.replit index e53b196..bb783a3 100644 --- a/.replit +++ b/.replit @@ -30,6 +30,10 @@ externalPort = 3003 localPort = 43349 externalPort = 3000 +[[ports]] +localPort = 43777 +externalPort = 4200 + [env] PORT = "5000" diff --git a/client/src/components/MainContent.tsx b/client/src/components/MainContent.tsx index 97e6297..df444ec 100644 --- a/client/src/components/MainContent.tsx +++ b/client/src/components/MainContent.tsx @@ -74,6 +74,7 @@ export default function MainContent() { const articleCount = articleCountByOutlet[outlet.id] || 0; const hasArticles = articleCount > 0; const isErlingHaaland = outlet.slug === 'erling-haaland'; + const showSpecialEffect = isErlingHaaland && hasArticles; const animationClass = hasArticles ? 'animate-float ring-2 ring-blue-400/30 shadow-lg' @@ -87,13 +88,36 @@ export default function MainContent() { > {hasArticles && (
- + NEW + {showSpecialEffect && ( +
+ {[...Array(6)].map((_, i) => { + const angle = (i * 60) * Math.PI / 180; + const distance = 20 + (i % 2) * 10; + const x = Math.cos(angle) * distance; + const y = Math.sin(angle) * distance; + const delay = i * 0.2; + + return ( +
+ ); + })} +
+ )}
)} - +
{ }); // 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); diff --git a/server/storage.ts b/server/storage.ts index f2461c2..93a4cf3 100644 --- a/server/storage.ts +++ b/server/storage.ts @@ -43,6 +43,7 @@ export interface IStorage { updateMediaOutlet(id: string, outlet: Partial): Promise; // Article operations + getArticles(): Promise; getArticlesByOutlet(mediaOutletId: string): Promise; getArticleBySlug(slug: string): Promise
; createArticle(article: InsertArticle): Promise
; @@ -144,6 +145,13 @@ export class DatabaseStorage implements IStorage { } // Article operations + async getArticles(): Promise { + return await db + .select() + .from(articles) + .orderBy(desc(articles.publishedAt)); + } + async getArticlesByOutlet(mediaOutletId: string): Promise { return await db .select()