|
2 | 2 | @implements IUsesLayout<Elastic.Documentation.Site._GlobalLayout, GlobalLayoutViewModel> |
3 | 3 | @functions { |
4 | 4 | public GlobalLayoutViewModel LayoutModel => Model; |
5 | | - protected override Task ExecuteSectionAsync(string name) |
| 5 | + protected override async Task ExecuteSectionAsync(string name) |
6 | 6 | { |
7 | | - if (name == GlobalSections.Footer && Model.Layout is not LayoutName.Archive) |
| 7 | + switch (name) |
8 | 8 | { |
9 | | - <aside id="dismissible-banner" class="admonition tip"> |
10 | | - <div class="container flex justify-between items-center mx-auto"> |
11 | | - <p> |
12 | | - Welcome to the docs for the <a class="link text-base" href="/docs/get-started/versioning-availability#find-docs-for-your-product-version">latest Elastic product versions</a>, including Elastic Stack 9.0 and Elastic Cloud Serverless. |
13 | | - To view previous versions, go to <a class="link text-base" target="_blank" href="https://elastic.co/guide">elastic.co/guide</a>. |
14 | | - </p> |
15 | | - <button id="dismissible-button"> |
16 | | - <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> |
17 | | - <path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/> |
18 | | - </svg> |
19 | | - </button> |
20 | | - </div> |
21 | | - </aside> |
| 9 | + case GlobalSections.Head: |
| 10 | + await RenderSectionAsync(GlobalSections.Head); |
| 11 | + break; |
| 12 | + case GlobalSections.Footer when Model.Layout is not LayoutName.Archive: |
| 13 | + <aside id="dismissible-banner" class="admonition tip"> |
| 14 | + <div class="container flex justify-between items-center mx-auto"> |
| 15 | + <p> |
| 16 | + Welcome to the docs for the <a class="link text-base" href="/docs/get-started/versioning-availability#find-docs-for-your-product-version">latest Elastic product versions</a>, including Elastic Stack 9.0 and Elastic Cloud Serverless. |
| 17 | + To view previous versions, go to <a class="link text-base" target="_blank" href="https://elastic.co/guide">elastic.co/guide</a>. |
| 18 | + </p> |
| 19 | + <button id="dismissible-button"> |
| 20 | + <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> |
| 21 | + <path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/> |
| 22 | + </svg> |
| 23 | + </button> |
| 24 | + </div> |
| 25 | + </aside> |
| 26 | + break; |
22 | 27 | } |
23 | | - return Task.CompletedTask; |
24 | 28 | } |
25 | 29 | private async Task RenderDefault() |
26 | 30 | { |
|
0 commit comments