Skip to content

Commit

Permalink
Merge branch 'main' into hd-i18n-fr-0-12-0-sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo authored Nov 4, 2023
2 parents c9deb87 + 487ce36 commit abf66dc
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 10 deletions.
3 changes: 2 additions & 1 deletion docs/src/components/about-astro.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ interface Props {
const { title } = Astro.props;
---

<article class="sl-flex not-content" aria-labelledby="about-astro-heading">
<article class="sl-flex" aria-labelledby="about-astro-heading">
<small id="about-astro-heading">
{title}
<span class="sr-only">Astro</span>
Expand Down Expand Up @@ -37,6 +37,7 @@ const { title } = Astro.props;
}
article > :global(*) {
max-width: 50ch;
margin-top: 0 !important;
}
small {
color: var(--sl-color-gray-3);
Expand Down
2 changes: 2 additions & 0 deletions docs/src/components/file-tree.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const processedContent = await fileTreeProcessor.process({
<style is:global>
file-tree {
--x-space: 1.5rem;
--y-space: 0.125rem;
--y-pad: 0;

display: block;
Expand Down Expand Up @@ -88,6 +89,7 @@ const processedContent = await fileTreeProcessor.process({
}

file-tree li {
margin: var(--y-space) 0;
padding: var(--y-pad) 0;
}

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/fr/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ sidebar: [
type SidebarItem = {
label: string;
translations?: Record<string, string>;
badge?: string | BadgeConfig;
} & (
| {
link: string;
badge?: string | BadgeConfig;
attrs?: Record<string, string | number | boolean | undefined>;
}
| { items: SidebarItem[]; collapsed?: boolean }
Expand Down
40 changes: 32 additions & 8 deletions docs/src/content/docs/fr/reference/frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,44 @@ hero:
---
```

Vous pouvez afficher différentes versions de l'image de premier plan en mode clair et sombre.

```md
---
hero:
image:
alt: Un logo scintillant aux couleurs vives
dark: ../../assets/logo-dark.png
light: ../../assets/logo-light.png
---
```

#### `HeroConfig`

```ts
interface HeroConfig {
title?: string;
tagline?: string;
image?: {
alt?: string;
// Chemin relatif vers une image dans votre dépôt.
file?: string;
// HTML brut à utiliser dans l'emplacement de l'image.
// Il peut s'agir d'une balise `<img>` personnalisée ou d'une balise `<svg>` en ligne.
html?: string;
};
image?:
| {
// Chemin relatif vers une image dans votre dépôt.
file: string;
// Alternative textuelle pour rendre l'image accessible aux technologies d'assistance.
alt?: string;
}
| {
// Chemin relatif vers une image dans votre dépôt à utiliser pour le mode sombre.
dark: string;
// Chemin relatif vers une image dans votre dépôt à utiliser pour le mode clair.
light: string;
// Alternative textuelle pour rendre l'image accessible aux technologies d'assistance.
alt?: string;
}
| {
// HTML brut à utiliser dans l'emplacement (slot) de l'image.
// Peut être une balise `<img>` personnalisée ou une balise `<svg>` en ligne.
html: string;
};
actions?: Array<{
text: string;
link: string;
Expand Down

0 comments on commit abf66dc

Please sign in to comment.