This is an automated email from the ASF dual-hosted git repository.

kparisa pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iggy-website.git


The following commit(s) were added to refs/heads/main by this push:
     new c7c38eb4 Add announcement bar to home page (#84)
c7c38eb4 is described below

commit c7c38eb4d7e1e2549b9f76bce755b23a25f7ca20
Author: Justin Mclean <[email protected]>
AuthorDate: Tue Sep 8 13:01:33 2026 +1000

    Add announcement bar to home page (#84)
    
    default message to to star us on Github
---
 src/app/(home)/layout.tsx           | 12 +++++---
 src/components/announcement-bar.tsx | 61 +++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+), 4 deletions(-)

diff --git a/src/app/(home)/layout.tsx b/src/app/(home)/layout.tsx
index a931a375..93bd2cd7 100644
--- a/src/app/(home)/layout.tsx
+++ b/src/app/(home)/layout.tsx
@@ -20,12 +20,16 @@
 import { HomeLayout } from "fumadocs-ui/layouts/home";
 import { homeOptions } from "@/lib/layout.shared";
 import { ForceDarkTheme } from "@/components/force-dark-theme";
+import { AnnouncementBar } from "@/components/announcement-bar";
 
 export default function Layout({ children }: { children: React.ReactNode }) {
   return (
-    <HomeLayout {...homeOptions()} themeSwitch={{ enabled: false }}>
-      <ForceDarkTheme />
-      {children}
-    </HomeLayout>
+    <>
+      <AnnouncementBar />
+      <HomeLayout {...homeOptions()} themeSwitch={{ enabled: false }}>
+        <ForceDarkTheme />
+        {children}
+      </HomeLayout>
+    </>
   );
 }
diff --git a/src/components/announcement-bar.tsx 
b/src/components/announcement-bar.tsx
new file mode 100644
index 00000000..e302a8b0
--- /dev/null
+++ b/src/components/announcement-bar.tsx
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { ArrowRight, Star } from "lucide-react";
+import Link from "next/link";
+
+// The one bar shown site-wide, above the header. Edit this to change what it
+// says, or set `enabled: false` to take it down. It is deliberately generic:
+// the same slot carries a release, an event or a call for contributors.
+const ANNOUNCEMENT = {
+  enabled: true,
+  text: "If Apache Iggy is useful to you, give it a star on GitHub",
+  linkText: "Star apache/iggy",
+  href: "https://github.com/apache/iggy";,
+};
+
+export function AnnouncementBar() {
+  if (!ANNOUNCEMENT.enabled) return null;
+
+  return (
+    <div className="relative border-b border-white/[0.08] bg-gradient-to-r 
from-[#f9923f]/15 via-[#5f87fd]/15 to-[#fa5e8a]/15">
+      <div
+        aria-hidden
+        className="absolute inset-x-0 bottom-0 h-0.5 bg-gradient-to-r 
from-[#f9923f] via-[#5f87fd] to-[#fa5e8a]"
+      />
+      <Link
+        href={ANNOUNCEMENT.href}
+        className="group flex items-center justify-center gap-2 px-4 py-2.5 
text-center text-[13px] text-fd-muted-foreground transition-colors 
hover:text-fd-foreground"
+      >
+        <Star
+          className="hidden size-3.5 shrink-0 text-[#f9923f] sm:block"
+          aria-hidden
+        />
+        <span>{ANNOUNCEMENT.text}</span>
+        <span className="inline-flex items-center gap-1 font-semibold 
text-fd-foreground">
+          {ANNOUNCEMENT.linkText}
+          <ArrowRight
+            className="size-3.5 transition-transform 
group-hover:translate-x-0.5"
+            aria-hidden
+          />
+        </span>
+      </Link>
+    </div>
+  );
+}

Reply via email to