From 5658441ab9b703c95a48e654d41e45cc3a55ffd3 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Fri, 28 Nov 2025 22:46:47 -0500 Subject: middleware: migrate to tailwindcss --- middleware/src/app/[gameName]/page.tsx | 203 ++++++--------------------------- middleware/src/app/globals.css | 73 +----------- 2 files changed, 33 insertions(+), 243 deletions(-) (limited to 'middleware/src') diff --git a/middleware/src/app/[gameName]/page.tsx b/middleware/src/app/[gameName]/page.tsx index f87edc1..ed5361a 100644 --- a/middleware/src/app/[gameName]/page.tsx +++ b/middleware/src/app/[gameName]/page.tsx @@ -91,7 +91,7 @@ export async function generateMetadata({ const images = imagesResult.rows.map((img) => ({ image: img.image_url, link: img.link_url, - })); + })); const dbPost = { news_id: row.news_id, date: row.date, @@ -356,92 +356,36 @@ function NewsPostPage({ : null; return ( -
-
-
+
+
+
{/* Post Header */} -
-
+
+
{date}
{newsPost.type && ( -
+
{newsPost.type}
)}
{/* Content */} -
+
{displayHeadline && ( -

+

{displayHeadline}

)} -
+ +
{displayContent .split(/(\[.*?\]\(.*?\)|https?:\/\/[^\s]+)/g) .map((part, idx) => { const linkMatch = part.match(/\[(.*?)\]\((.*?)\)/); const urlMatch = part.match(/https?:\/\/[^\s]+/); + if (linkMatch) { return ( {linkMatch[1]} ); } + if (urlMatch) { return ( {urlMatch[0]} ); } - return part; + + return ( + + {part} + + ); })}
{/* AI Disclaimer */} {newsPost.is_ai_summary && ( -
+
This content was generated using AI and may contain inaccuracies
)} {/* Machine Translation Disclaimer */} {(newsPost.en_headline || newsPost.en_content) && lang === "en" && ( -
+
This is a machine translation and may contain errors
)} {/* Images */} {newsPost.images && newsPost.images.length > 0 && ( -
+
News visual
)} {/* Read More Link */} {newsPost.url && ( -
+
READ MORE @@ -563,29 +464,11 @@ function NewsPostPage({
{/* About 573 UPDATES */} -
-

+
+

This is a perma-link hosted on 573 UPDATES

-

+

A news aggregator for some arcade (and some not-so arcade) games. Image data is loaded from external sources, and as such may not always be available. @@ -593,32 +476,10 @@ function NewsPostPage({

{/* Navigation Buttons */} -
+
Back to 573 UPDATES diff --git a/middleware/src/app/globals.css b/middleware/src/app/globals.css index ff7d975..a461c50 100644 --- a/middleware/src/app/globals.css +++ b/middleware/src/app/globals.css @@ -1,72 +1 @@ -:root { - --dark-bg: #000000; - --text-primary: #ffffff; - --text-secondary: #888888; - --accent: #666666; -} - -* { - box-sizing: border-box; - padding: 0; - margin: 0; -} - -html, -body { - height: 100%; - overflow: hidden; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; -} - -body { - background: var(--dark-bg); - color: var(--text-primary); - display: flex; - align-items: center; - justify-content: center; -} - -/* Main container */ -.main { - width: 100%; - height: 100vh; - display: flex; - align-items: center; - justify-content: center; -} - -.content-wrapper { - text-align: center; -} - -.title { - font-size: 3rem; - font-weight: 300; - letter-spacing: 0.5rem; - margin-bottom: 3rem; - color: var(--text-primary); -} - -.redirect-link { - color: var(--text-secondary); - font-size: 2rem; - text-decoration: none; - transition: color 0.3s ease; - letter-spacing: 0.1rem; -} - -.redirect-link:hover { - color: var(--text-primary); -} - -/* Responsive */ -@media (max-width: 768px) { - .title { - font-size: 2rem; - letter-spacing: 0.3rem; - } - - .redirect-link { - font-size: 0.75rem; - } -} +@import "tailwindcss"; \ No newline at end of file -- cgit v1.2.3