|
| 1 | +import { Analytics } from '@vercel/analytics/react'; |
| 2 | +import { Layout, Navbar, Footer } from 'nextra-theme-docs'; |
| 3 | +import { Banner, Head, Search } from 'nextra/components'; |
| 4 | +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; |
| 5 | +import { faDiscord, faGithub, faTwitter, faMastodon } from '@fortawesome/free-brands-svg-icons'; |
| 6 | +import { faMessage, faSignal } from "@fortawesome/free-solid-svg-icons"; |
| 7 | +import { getPageMap } from 'nextra/page-map'; |
| 8 | +import { config } from '@fortawesome/fontawesome-svg-core'; |
| 9 | +import type { Metadata, Viewport } from 'next'; |
| 10 | +import '@fortawesome/fontawesome-svg-core/styles.css'; |
| 11 | +config.autoAddCss = false; |
| 12 | + |
| 13 | +import '../style.css'; |
| 14 | +import '../styles/globals.css'; |
| 15 | +import 'nextra-theme-docs/style.css'; |
| 16 | + |
| 17 | +const navbarProps = { |
| 18 | + logo: <> |
| 19 | + <span className="logo"></span> |
| 20 | + </>, |
| 21 | + projectLink: 'https://github.com/FOSSBilling/FOSSBilling', |
| 22 | + projectIcon: <FontAwesomeIcon icon={faGithub} size="xl" />, |
| 23 | + chatLink: 'https://fossbilling.org/discord', |
| 24 | + chatIcon: <FontAwesomeIcon icon={faDiscord} size="xl" />, |
| 25 | +}; |
| 26 | + |
| 27 | +const bannerProps = { |
| 28 | + storageKey: 'mollie', |
| 29 | + children: ( |
| 30 | + <a href="https://github.com/NerdbyteIO/FOSSBilling-CyberPanel" target="_blank" rel="noopener noreferrer"> |
| 31 | + ⭐️ There's now a community maintained integration for CyberPanel! Click here to check it out. |
| 32 | + </a> |
| 33 | + ), |
| 34 | +}; |
| 35 | + |
| 36 | +const SiteFooter = () => { |
| 37 | + return ( |
| 38 | + <div> |
| 39 | + <div className="mb-2"> |
| 40 | + <a href="mailto:[email protected]" className="hover:text-gray-500 dark:hover:text-gray-300">[email protected]</a> |
| 41 | + </div> |
| 42 | + <div className="mb-6"> |
| 43 | + <a href="/discord" className="hover:text-gray-500 dark:hover:text-gray-300" target="_blank" rel="noopener noreferrer"><FontAwesomeIcon icon={faDiscord} size="xl" className="mr-4" /></a> |
| 44 | + <a href="https://fosstodon.org/@fossbilling" className="hover:text-gray-500 dark:hover:text-gray-300" target="_blank" rel="noopener noreferrer"><FontAwesomeIcon icon={faMastodon} size="xl" className="mr-4" /></a> |
| 45 | + <a href="https://twitter.com/FOSSBilling" className="hover:text-gray-500 dark:hover:text-gray-300" target="_blank" rel="noopener noreferrer"><FontAwesomeIcon icon={faTwitter} size="xl" className="mr-4" /></a> |
| 46 | + <a href="https://forum.fossbilling.org" className="hover:text-gray-500 dark:hover:text-gray-300" target="_blank" rel="noopener noreferrer"><FontAwesomeIcon icon={faMessage} size="xl" className="mr-4" /></a> |
| 47 | + <a href="https://status.fossbilling.org/" className="hover:text-gray-500 dark:hover:text-gray-300" target="_blank" rel="noopener noreferrer"><FontAwesomeIcon icon={faSignal} size="xl" className="mr-4" /></a> |
| 48 | + </div> |
| 49 | + <p className="mt-6 text-xs">© {new Date().getFullYear()}, The FOSSBilling project. Content licensed under the <a href="https://github.com/FOSSBilling/fossbilling.org/blob/main/LICENSE" target="_blank" rel="noopener noreferrer">Apache 2.0 license</a>.</p> |
| 50 | + </div> |
| 51 | + ); |
| 52 | +}; |
| 53 | + |
| 54 | +export const metadata: Metadata = { |
| 55 | + title: { |
| 56 | + default: 'FOSSBilling', |
| 57 | + template: '%s | FOSSBilling', |
| 58 | + }, |
| 59 | + description: "Empower your hosting business with FOSSBilling, the free and open-source solution for efficient billing and client management.", |
| 60 | + openGraph: { |
| 61 | + title: { |
| 62 | + default: 'FOSSBilling', |
| 63 | + template: '%s | FOSSBilling', |
| 64 | + }, |
| 65 | + description: "Empower your hosting business with FOSSBilling, the free and open-source solution for efficient billing and client management.", |
| 66 | + images: [ |
| 67 | + { |
| 68 | + url: '' |
| 69 | + }, |
| 70 | + ], |
| 71 | + locale: 'en_US', |
| 72 | + type: 'website' |
| 73 | + }, |
| 74 | + twitter: { |
| 75 | + card: "summary_large_image", |
| 76 | + site: "@FOSSBilling", |
| 77 | + images: [''], |
| 78 | + }, |
| 79 | + appleWebApp: { |
| 80 | + title: "FOSSBilling", |
| 81 | + } |
| 82 | +}; |
| 83 | + |
| 84 | +export const viewport: Viewport = { |
| 85 | + width: 'device-width', |
| 86 | + initialScale: 1.0 |
| 87 | +} |
| 88 | + |
| 89 | +export default async function RootLayout({ children }) { |
| 90 | + const pageMap = await getPageMap(); |
| 91 | + return ( |
| 92 | + <html lang="en" dir="ltr" suppressHydrationWarning> |
| 93 | + <Head |
| 94 | + color={{ |
| 95 | + hue: { dark: 200, light: 200 } |
| 96 | + }} |
| 97 | + /> |
| 98 | + <body> |
| 99 | + <Layout |
| 100 | + banner={<Banner {...bannerProps} />} |
| 101 | + navbar={<Navbar {...navbarProps} />} |
| 102 | + pageMap={pageMap} |
| 103 | + docsRepositoryBase="https://github.com/FOSSBilling/FOSSBilling.org/blob/main" |
| 104 | + sidebar={{ defaultMenuCollapseLevel: 1 }} |
| 105 | + feedback={{ content: undefined }} |
| 106 | + footer={<Footer><SiteFooter /></Footer>} |
| 107 | + > |
| 108 | + {children} |
| 109 | + </Layout> |
| 110 | + <Analytics /> |
| 111 | + </body> |
| 112 | + </html> |
| 113 | + ); |
| 114 | +} |
0 commit comments