diff --git a/src/app/(home)/layout.tsx b/src/app/(home)/layout.tsx index a931a3754..93bd2cd7e 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 ( - - - {children} - + <> + + + + {children} + + ); } diff --git a/src/components/announcement-bar.tsx b/src/components/announcement-bar.tsx new file mode 100644 index 000000000..e302a8b0c --- /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 ( +
+
+ + + {ANNOUNCEMENT.text} + + {ANNOUNCEMENT.linkText} + + + +
+ ); +}