+ {/* LEFT SIDE – MAIN ARTICLE */}
+ {mainArticle ? (
+
+
-
-
- {article?.categories?.[0]?.title || "TANPA KATEGORI"}
-
-
- {article.title}
-
-
- {" "}
- {new Date(article.createdAt).toLocaleDateString("id-ID", {
- day: "2-digit",
- month: "long",
- year: "numeric",
- })}
-
+
+ {/* White Card Overlay */}
+
+
+ {mainArticle.categoryName ||
+ mainArticle.categories?.[0]?.title ||
+ "Berita"}
+
+
+
+ {mainArticle.title}
+
+
+
+
+ By{" "}
+ {mainArticle.customCreatorName ||
+ mainArticle.createdByName ||
+ "Admin"}
+
+ •
+
+ {new Date(mainArticle.publishedAt).toLocaleDateString(
+ "id-ID",
+ {
+ day: "2-digit",
+ month: "long",
+ year: "numeric",
+ },
+ )}
+
+
- ))}
+ ) : (
+
Loading...
+ )}
+
+ {/* RIGHT SIDE – RECENT POSTS */}
+
+
Recent Posts
+
+
+ {recentPosts.map((item) => (
+
+
+
+
+
+
+
+ {item.title}
+
+
+ {new Date(item.publishedAt).toLocaleDateString("id-ID", {
+ day: "2-digit",
+ month: "long",
+ year: "numeric",
+ })}
+
+
+
+ ))}
+
+
+
+
+ {/* LOAD MORE */}
+
+
+ {/* KOLOM PPS BOTTOM BANNER */}
+
+
);
diff --git a/components/landing-page/headers-economy.tsx b/components/landing-page/headers-economy.tsx
index 0195a79..ff2605f 100644
--- a/components/landing-page/headers-economy.tsx
+++ b/components/landing-page/headers-economy.tsx
@@ -81,7 +81,7 @@ export default function HeaderEkonomi() {
height={400}
className="w-full h-[250px] object-cover rounded-md"
/>
-
+
{article.categories?.[0]?.title ||
article.categoryName ||
"BERITA"}
@@ -100,7 +100,7 @@ export default function HeaderEkonomi() {
READ MORE >
@@ -116,7 +116,7 @@ export default function HeaderEkonomi() {
onClick={() => setPage(i + 1)}
className={`w-9 h-9 rounded-full border border-gray-300 text-sm ${
page === i + 1
- ? "bg-yellow-400 text-white font-bold"
+ ? "bg-red-400 text-white font-bold"
: "text-gray-700 hover:bg-gray-200"
}`}
>
@@ -139,7 +139,7 @@ export default function HeaderEkonomi() {
className="w-20 h-20 object-cover rounded-md"
/>
-
+
{post.categories?.[0]?.title ||
post.categoryName ||
"BERITA"}
@@ -155,7 +155,7 @@ export default function HeaderEkonomi() {
})}
-
+
{String(index + 1).padStart(2, "0")}
@@ -185,11 +185,11 @@ export default function HeaderEkonomi() {
id="email"
type="email"
placeholder="Your email address"
- className="w-full border rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-yellow-400"
+ className="w-full border rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-red-400"
/>
-
diff --git a/components/landing-page/headers-health.tsx b/components/landing-page/headers-health.tsx
index af7b619..1600924 100644
--- a/components/landing-page/headers-health.tsx
+++ b/components/landing-page/headers-health.tsx
@@ -80,7 +80,7 @@ export default function HeaderHealth() {
height={400}
className="w-full h-[250px] object-cover rounded-md"
/>
-
{article.categories?.[0]?.title ||
article.categoryName ||
"BERITA"}
@@ -99,7 +99,7 @@ export default function HeaderHealth() {
-
+
{post.categories?.[0]?.title ||
post.categoryName ||
"BERITA"}
@@ -154,7 +154,7 @@ export default function HeaderHealth() {
})}
-
+
{String(index + 1).padStart(2, "0")}
@@ -184,11 +184,11 @@ export default function HeaderHealth() {
id="email"
type="email"
placeholder="Your email address"
- className="w-full border rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-yellow-400"
+ className="w-full border rounded px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-red-400"
/>
-