mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-24 03:16:40 +00:00
Update Footer.tsx
This commit is contained in:
@@ -8,6 +8,7 @@ import { tcls } from '@/lib/tailwind';
|
||||
import { ThemeToggler } from '../ThemeToggler';
|
||||
import { CONTAINER_STYLE } from '../layout';
|
||||
import { FooterLinksGroup } from './FooterLinksGroup';
|
||||
import { SocialLink } from './SocialLink';
|
||||
|
||||
const FOOTER_COLUMNS = 4;
|
||||
|
||||
@@ -23,6 +24,8 @@ export function Footer(props: { context: GitBookSiteContext }) {
|
||||
|
||||
const mobileOnly = !hasLogo && !hasGroups && !hasCopyright && hasThemeToggle;
|
||||
|
||||
const socialLinks = customization.socialAccounts.filter((account) => account.display?.footer);
|
||||
|
||||
return (
|
||||
<footer
|
||||
id="site-footer"
|
||||
@@ -137,6 +140,21 @@ export function Footer(props: { context: GitBookSiteContext }) {
|
||||
) : null
|
||||
}
|
||||
|
||||
{
|
||||
// Social Links
|
||||
socialLinks.length > 0 ? (
|
||||
<div className="col-span-full flex w-full grow items-center justify-center gap-2">
|
||||
{socialLinks.map((account) => (
|
||||
<SocialLink
|
||||
key={`${account.platform}-${account.handle}`}
|
||||
account={account}
|
||||
target={customization.externalLinks.target}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
) : null
|
||||
}
|
||||
|
||||
{
|
||||
// Legal
|
||||
customization.footer.copyright ? (
|
||||
|
||||
Reference in New Issue
Block a user