Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions src/Elastic.Markdown/Slices/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,29 @@
@implements IUsesLayout<Elastic.Documentation.Site._GlobalLayout, GlobalLayoutViewModel>
@functions {
public GlobalLayoutViewModel LayoutModel => Model;
protected override Task ExecuteSectionAsync(string name)
protected override async Task ExecuteSectionAsync(string name)
{
if (name == GlobalSections.Footer && Model.Layout is not LayoutName.Archive)
switch (name)
{
<aside id="dismissible-banner" class="admonition tip">
<div class="container flex justify-between items-center mx-auto">
<p>
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.
To view previous versions, go to <a class="link text-base" target="_blank" href="https://elastic.co/guide">elastic.co/guide</a>.
</p>
<button id="dismissible-button">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/>
</svg>
</button>
</div>
</aside>
case GlobalSections.Head:
await RenderSectionAsync(GlobalSections.Head);
break;
case GlobalSections.Footer when Model.Layout is not LayoutName.Archive:
<aside id="dismissible-banner" class="admonition tip">
<div class="container flex justify-between items-center mx-auto">
<p>
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.
To view previous versions, go to <a class="link text-base" target="_blank" href="https://elastic.co/guide">elastic.co/guide</a>.
</p>
<button id="dismissible-button">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/>
</svg>
</button>
</div>
</aside>
break;
}
return Task.CompletedTask;
}
private async Task RenderDefault()
{
Expand Down
Loading