mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
caa74cf48f
* fix tab multiline * OpenAPI improvements (#127) * Fix display of authentication infos * Fix property names * Fix body / request starting with oneOf * CSS fixes * Show description * Format * Fix code samples * Convert swagger 2.0 to OpenAPI v3 (#128) * Convert swagger 2.0 to OpenAPI 3 * Format * Fix page with one api block shown as empty (#129) * Fix page with one api block shown as empty * Format * Style sprint (#126) * V1 code blocks fix * equalize modal text label + fix safari bug with fixed position stroke * code block adjustments * fix search result spacing * remove metal + adjust light and dark mode * remove metal from tw config * Add colordebugger + remove unused global colors * correct opacities on all colors * first part of cleaning up colors * fix tab colors * search modal color changes * adjust global colors * expandable + code color changes * add delay to loading panes * adjust globals * improve select table type * improve light mode checkbox * fix delay * content * uncomment debug * expandable fixes * OpenAPI improvements (#127) * Fix display of authentication infos * Fix property names * Fix body / request starting with oneOf * CSS fixes * Show description * Format * Fix code samples * Fix empty API responses not being displayed (#130) * Fix response not being displayed when contains no body * Fix padding * Resolve any JSON/YAML OpenAPI file and resolve common parameters (#132) * Fix parsing of OpenAPI when content-type is unknown * Resolve common parameters * Format * Add support for straight corners (#131) * Add class to body and tailwind variant * Use it on the search button * Use it for buttons and cookies banner * Use it for cards * Use it in more places * Lint * More * page feedback * theme toggler * Rename Authentication to Authorization (#133) * remove unused color light-5 * fix dupe css --------- Co-authored-by: Samy Pessé <samypesse@gmail.com>
31 lines
978 B
TypeScript
31 lines
978 B
TypeScript
import { RevisionPageDocument } from '@gitbook/api';
|
|
|
|
import { Emoji } from '@/components/primitives';
|
|
import { tcls } from '@/lib/tailwind';
|
|
|
|
export function PageHeader(props: { page: RevisionPageDocument }) {
|
|
const { page } = props;
|
|
|
|
if (!page.layout.title && !page.layout.description) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<header
|
|
className={tcls('max-w-3xl', 'mx-auto', 'mb-6', 'space-y-3', 'page-api-block:ml-0')}
|
|
>
|
|
{page.layout.title ? (
|
|
<h1 className={tcls('text-4xl', 'font-bold')}>
|
|
{page.emoji ? <Emoji code={page.emoji} style={['mr-3']} /> : null}
|
|
{page.title}
|
|
</h1>
|
|
) : null}
|
|
{page.description && page.layout.description ? (
|
|
<p className={tcls('text-lg', 'text-dark-4', 'dark:text-light-4')}>
|
|
{page.description}
|
|
</p>
|
|
) : null}
|
|
</header>
|
|
);
|
|
}
|