-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
132 additions
and
13 deletions.
There are no files selected for viewing
123 changes: 122 additions & 1 deletion
123
.starters/default/content/3.components/3.app/1.header.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,122 @@ | ||
# Header | ||
# Header | ||
|
||
App header component. Used inside [`AppLayout`](/components/layout/app-layout) component. | ||
|
||
It has several components, which renders depending on app configuration or context. Those components includes: `AppHeaderDrawer`, `AppHeaderLogo`, `AppNavigation`, `AppSearch`, `AppTextDirection`, `AppColorMode`, `AppSocialIcons`. | ||
|
||
::callout | ||
This is not a MDC component, but you can control it's visibility with configuration or front-matter (WIP 🚧). | ||
:: | ||
|
||
## Configuration | ||
|
||
```ts [app.config.ts] | ||
export default defineAppConfig({ | ||
docus: { | ||
header: { | ||
title: '', | ||
logo: false, | ||
showLinkIcon: false, | ||
fluid: false, | ||
exclude: [] | ||
}, | ||
} | ||
}) | ||
``` | ||
|
||
## Design Tokens | ||
|
||
```ts [tokens.config.ts] | ||
import { defineTheme } from 'pinceau' | ||
|
||
export default defineTheme({ | ||
docus: { | ||
header: { | ||
height: '64px', | ||
logo: { | ||
height: { | ||
initial: '{space.6}', | ||
sm: '{space.7}' | ||
} | ||
}, | ||
backdropFilter: '{elements.backdrop.filter}', | ||
backgroundColor: '{elements.backdrop.background}', | ||
borderBottomWidth: '1px', | ||
borderBottomStyle: 'solid', | ||
borderBottomColor: '{elements.border.primary.static}', | ||
title: { | ||
fontSize: '{fontSize.2xl}', | ||
fontWeight: '{fontWeight.bold}', | ||
color: { | ||
static: { | ||
initial: '{color.gray.900}', | ||
dark: '{color.gray.100}' | ||
}, | ||
hover: '{color.primary.500}' | ||
} | ||
}, | ||
icon: { | ||
size: '{space.4}' | ||
}, | ||
layout: { | ||
gridTemplateColumns: 'repeat(12, minmax(0, 1fr))', | ||
gap: '{space.2}', | ||
left: { | ||
gridColumn: 'span 4 / span 4' | ||
}, | ||
center: { | ||
gridColumn: 'span 4 / span 4' | ||
}, | ||
right: { | ||
gridColumn: 'span 4 / span 4' | ||
} | ||
}, | ||
drawer: { | ||
button: { | ||
color: { | ||
static: { | ||
initial: '{color.gray.500}', | ||
dark: '{color.gray.400}' | ||
}, | ||
hover: { | ||
initial: '{color.gray.700}', | ||
dark: '{color.gray.200}' | ||
} | ||
}, | ||
zIndex: '10', | ||
padding: '{space.4}', | ||
paddingInlineStart: '0px' | ||
}, | ||
menu: { | ||
borderRightWidth: '1px', | ||
borderRightStyle: 'solid', | ||
borderRightColor: '{elements.border.primary.static}', | ||
backgroundColor: { | ||
initial: '{color.gray.50}', | ||
dark: '{color.gray.900}' | ||
}, | ||
paddingX: { | ||
initial: '{space.4}', | ||
sm: '{space.6}' | ||
}, | ||
header: { | ||
height: '{docus.app.header.height}', | ||
alignItems: 'center', | ||
justifyContent: 'space-between', | ||
borderBottomWidth: '1px', | ||
borderBottomStyle: 'solid', | ||
borderBottomColor: '{elements.border.primary.static}', | ||
gap: '{space.2}', | ||
icon: { | ||
size: '{space.4}' | ||
} | ||
}, | ||
links: { | ||
paddingTop: '{space.6}' | ||
} | ||
} | ||
} | ||
}, | ||
} | ||
}) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters