teqo-backup/src/app/(frontend)/layout.tsx
Francisco Ignácio Fontoura Solla 14961c5fea feat: overhaul petition UX, add contact/signature data model, and refresh shadcn theming
- redesign petition page layout with responsive hero, content section, and form card
  ()
- refactor frontend theming setup:
  - add  with  in frontend layout
  - migrate/clean global style tokens and base styles in
  - adjust header/social visuals for theme-aware rendering
  (, ,
   , , )
- expand petition form with additional fields and new UI primitives
  (native select, textarea, button, state/city flow)
  (, , , )
- add new Payload collections and wire them into config:
  , ,
  (, ,
   , ,
   )
- update petition collection admin grouping and project config
  (, , )
- add supporting dependency/lockfile updates and workspace tooling tweaks
  (, , , )
2026-02-22 20:02:51 -03:00

85 lines
2.3 KiB
TypeScript

import { Footer } from '@/components/Footer'
import { Header } from '@/components/Header'
import { getCachedDocumentById } from '@/utilities/documents'
import { getCachedGlobal } from '@/utilities/globals'
import { RefreshRouteOnSave } from '@/utilities/RefreshRouteOnSave'
import { Metadata } from 'next'
import React from 'react'
import './styles.css'
import { ThemeProvider } from '@/components/ThemeProvider'
import { Inter } from 'next/font/google'
const inter = Inter({ subsets: ['latin'], variable: '--font-sans' })
export async function generateMetadata(): Promise<Metadata> {
const payload = await getCachedGlobal('metadata')
let image = payload.image
if (typeof image === 'number') {
image = await getCachedDocumentById('media', String(payload.image))
}
return {
title: payload.title,
description: payload.description,
keywords: payload.keywords.filter((keyword) => typeof keyword === 'string'),
authors: [
{ name: 'Francisco Solla', url: 'https://solla.dev' },
{ name: 'Teqo', url: 'https://teqo.app' },
],
creator: 'Francisco Solla',
publisher: 'Teqo',
robots: {
index: true,
follow: true,
},
openGraph: {
type: 'website',
locale: 'pt-BR',
url: payload.URL,
siteName: payload.openGraph.siteName,
title: payload.title,
description: payload.description,
images: image?.url
? [
{
url: image.url,
width: image.width!,
height: image.height!,
alt: image.alt,
},
]
: [],
},
twitter: {
card: 'summary_large_image',
title: payload.title,
description: payload.twitter.description,
creator: payload.twitter.creator,
images: image?.url ? [image.url] : [],
},
}
}
export default async function RootLayout(props: { children: React.ReactNode }) {
const { children } = props
return (
<html lang="pt-BR" className={inter.variable} suppressHydrationWarning>
<body className="antialiased">
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<RefreshRouteOnSave />
<Header />
{children}
<Footer />
</ThemeProvider>
</body>
</html>
)
}