Skip to content

Commit

Permalink
Update shared-data.md
Browse files Browse the repository at this point in the history
Change <content> to <article>
  • Loading branch information
Shaglock authored and skryukov committed Aug 22, 2024
1 parent d6765b4 commit ebfe201
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions docs/guide/shared-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ Once you have shared the data server-side, you will be able to access it within
<template>
<main>
<header>You are logged in as: {{ user.name }}</header>
<content>
<article>
<slot />
</content>
</article>
</main>
</template>
Expand Down Expand Up @@ -74,9 +74,9 @@ const user = computed(() => page.props.auth.user)
<template>
<main>
<header>You are logged in as: {{ user.name }}</header>
<content>
<article>
<slot />
</content>
</article>
</main>
</template>
```
Expand All @@ -92,7 +92,7 @@ export default function Layout({ children }) {
return (
<main>
<header>You are logged in as: {auth.user.name}</header>
<content>{children}</content>
<article>{children}</article>
</main>
)
}
Expand All @@ -109,9 +109,9 @@ export default function Layout({ children }) {
<header>
You are logged in as: {$page.props.auth.user.name}
</header>
<content>
<article>
<slot />
</content>
</article>
</main>
```

Expand All @@ -138,15 +138,15 @@ Next, display the flash message in a frontend component, such as the site layout
<template>
<main>
<header></header>
<content>
<article>
<div v-if="$page.props.flash.alert" class="alert">
{{ $page.props.flash.alert }}
</div>
<div v-if="$page.props.flash.notice" class="notice">
{{ $page.props.flash.notice }}
</div>
<slot />
</content>
</article>
<footer></footer>
</main>
</template>
Expand All @@ -158,15 +158,15 @@ Next, display the flash message in a frontend component, such as the site layout
<template>
<main>
<header></header>
<content>
<article>
<div v-if="$page.props.flash.alert" class="alert">
{{ $page.props.flash.alert }}
</div>
<div v-if="$page.props.flash.notice" class="notice">
{{ $page.props.flash.notice }}
</div>
<slot />
</content>
</article>
<footer></footer>
</main>
</template>
Expand All @@ -183,11 +183,11 @@ export default function Layout({ children }) {
return (
<main>
<header></header>
<content>
<article>
{flash.alert && <div className="alert">{flash.alert}</div>}
{flash.notice && <div className="notice">{flash.notice}</div>}
{children}
</content>
</article>
<footer></footer>
</main>
)
Expand All @@ -203,15 +203,15 @@ export default function Layout({ children }) {
<main>
<header></header>
<content>
<article>
{#if $page.props.flash.alert}
<div class="alert">{$page.props.flash.alert}</div>
{/if}
{#if $page.props.flash.notice}
<div class="notice">{$page.props.flash.notice}</div>
{/if}
<slot />
</content>
</article>
<footer></footer>
</main>
```
Expand Down

0 comments on commit ebfe201

Please sign in to comment.