Skip to content

Commit 0796804

Browse files
authored
9.x adjustments to the landing page (#1665)
* Remove 9.0 banner * Adjust landing page * Use the current stack version in the landing page
1 parent 484338d commit 0796804

File tree

6 files changed

+10
-48
lines changed

6 files changed

+10
-48
lines changed

src/Elastic.Documentation.Site/Assets/dismissible-banner.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/Elastic.Documentation.Site/Assets/main.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { initCopyButton } from './copybutton'
2-
import { initDismissibleBanner } from './dismissible-banner'
32
import { initHighlight } from './hljs'
43
import { initImageCarousel } from './image-carousel'
54
import './markdown/applies-to'
@@ -33,7 +32,6 @@ document.addEventListener('htmx:load', function (event) {
3332
}
3433
initSmoothScroll()
3534
openDetailsWithAnchor()
36-
initDismissibleBanner()
3735
initImageCarousel()
3836

3937
const urlParams = new URLSearchParams(window.location.search)

src/Elastic.Documentation.Site/Assets/styles.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -215,17 +215,6 @@ body {
215215
display: none;
216216
}
217217

218-
#dismissible-banner {
219-
@apply font-body sticky bottom-0 z-50 mt-0 hidden flex-row items-center justify-between p-4 text-sm;
220-
}
221-
222-
#dismissible-button {
223-
@apply text-blue-developer cursor-pointer text-base font-bold;
224-
&:hover {
225-
@apply bg-grey-20 rounded-2xl;
226-
}
227-
}
228-
229218
.tippy-content {
230219
white-space: pre-line;
231220
}

src/Elastic.Markdown/Layout/_LandingPage.cshtml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
<div class="container mx-auto pt-16 pb-10 grid md:grid-cols-2 items-center gap-6">
1111
<div>
1212
<h1 class="text-4xl font-bold font-sans text-black">Elastic Docs</h1>
13-
<p class="mt-4">Find the help you need, wherever you are in your Elastic journey.</p>
13+
<p class="mt-4">Welcome to the docs that cover all changes in <span class="whitespace-nowrap">Elastic Stack 9.0.0</span> and later, including <span class="whitespace-nowrap">Elastic Stack @Model.CurrentVersion</span> and <span class="whitespace-nowrap">Elastic Cloud Serverless</span>.
14+
For easy reference, changes in 9.1.0 are marked inline. For details, check <a href="https://www.elastic.co/docs/get-started/versioning-availability" class="link">Understanding versioning and availability.</a></p>
1415
<div class="flex md:inline-flex gap-3 mt-6">
1516
<a href="@Model.Link("/get-started/")" class="grow select-none cursor-pointer text-white text-nowrap bg-blue-elastic hover:bg-blue-elastic-110 focus:ring-4 focus:ring-blue-elastic-50 font-semibold font-sans rounded-sm px-6 py-2 focus:outline-none h-10 flex items-center justify-center">
1617
Get started
@@ -53,8 +54,8 @@
5354
<p class="font-sans font-bold text-xl">Elasticsearch</p>
5455
<p class="mt-2 grow">Build powerful search and RAG applications using Elasticsearch's vector database, AI toolkit, and advanced retrieval capabilities.</p>
5556
<div class="grid grid-cols-1 mt-6 gap-2">
56-
<a href="@Model.Link("/solutions/search")" class="text-blue-elastic hover:text-blue-elastic-100 font-sans font-semibold">View @Model.CurrentVersion docs</a>
57-
<a href="https://www.elastic.co/guide/en/elasticsearch/reference/index.html" class="text-sm text-grey-70 hover:text-grey-100 font-sans font-semibold">View other versions</a>
57+
<a href="@Model.Link("/solutions/search")" class="text-blue-elastic hover:text-blue-elastic-100 font-sans font-semibold">9.0+ (latest @Model.CurrentVersion) docs</a>
58+
<a href="https://www.elastic.co/guide/en/elasticsearch/reference/index.html" class="text-sm text-grey-70 hover:text-grey-100 font-sans font-semibold">Previous versions</a>
5859
</div>
5960
</div>
6061
</div>
@@ -66,8 +67,8 @@
6667
<p class="font-sans font-bold text-xl">Observability</p>
6768
<p class="mt-2 grow">Resolve problems with open, flexible, and unified observability powered by advanced machine learning and analytics.</p>
6869
<div class="grid grid-cols-1 mt-6 gap-2">
69-
<a href="@Model.Link("/solutions/observability")" class="text-blue-elastic hover:text-blue-elastic-100 font-sans font-semibold">View @Model.CurrentVersion docs</a>
70-
<a href="https://www.elastic.co/guide/en/observability/index.html" class="text-sm text-grey-70 hover:text-grey-100 font-sans font-semibold">View other versions</a>
70+
<a href="@Model.Link("/solutions/observability")" class="text-blue-elastic hover:text-blue-elastic-100 font-sans font-semibold">9.0+ (latest @Model.CurrentVersion) docs</a>
71+
<a href="https://www.elastic.co/guide/en/observability/index.html" class="text-sm text-grey-70 hover:text-grey-100 font-sans font-semibold">Previous versions</a>
7172
</div>
7273
</div>
7374
</div>
@@ -80,8 +81,8 @@
8081
<p class="font-sans font-bold text-xl">Security</p>
8182
<p class="mt-2 grow">Detect, investigate, and respond to threats with AI-driven security analytics to protect your organization at scale.</p>
8283
<div class="grid grid-cols-1 mt-6 gap-2">
83-
<a href="@Model.Link("/solutions/security")" class="text-blue-elastic hover:text-blue-elastic-100 font-sans font-semibold">View @Model.CurrentVersion docs</a>
84-
<a href="https://www.elastic.co/guide/en/security/index.html" class="text-sm text-grey-70 hover:text-grey-100 font-sans font-semibold">View other versions</a>
84+
<a href="@Model.Link("/solutions/security")" class="text-blue-elastic hover:text-blue-elastic-100 font-sans font-semibold">9.0+ (latest @Model.CurrentVersion) docs</a>
85+
<a href="https://www.elastic.co/guide/en/security/index.html" class="text-sm text-grey-70 hover:text-grey-100 font-sans font-semibold">Previous versions</a>
8586
</div>
8687
</div>
8788
</div>
@@ -224,7 +225,7 @@
224225
<div class="grid gap-6 md:grid-cols-2 lg:grid-cols-4 mt-6 bg-ink-dark text-white">
225226
<div class="flex flex-col p-6">
226227
<h3 class="font-sans font-bold text-2xl">Release notes</h3>
227-
<p class="grow mt-4">Explore the latest features and changes in Elastic.</p>
228+
<p class="grow mt-4">Explore the latest features and changes in Elastic, including the latest 9.1.0 version of the Elastic Stack.</p>
228229
<div class="mt-6">
229230
<a href="@Model.Link("/release-notes/")" class="link text-white">
230231
View release notes

src/Elastic.Markdown/Page/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
StaticFileContentHashProvider = Model.StaticFileContentHashProvider,
3838
ReportIssueUrl = Model.ReportIssueUrl,
3939
LegacyPages = Model.LegacyPages,
40-
CurrentVersion = Model.CurrentVersion,
40+
CurrentVersion = Model.CurrentDocument.YamlFrontMatter?.Layout == MarkdownPageLayout.LandingPage ? Model.VersionsConfig.VersioningSystems[0].Current : Model.CurrentVersion,
4141
AllVersionsUrl = Model.AllVersionsUrl,
4242
VersionDropdownSerializedModel = JsonSerializer.Serialize(Model.VersionDropdownItems,
4343
ViewModelSerializerContext.Default.VersionDrownDownItemViewModelArray),

src/Elastic.Markdown/_Layout.cshtml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,6 @@
77
{
88
if (name == GlobalSections.Footer && Model.Layout is not MarkdownPageLayout.Archive)
99
{
10-
<aside id="dismissible-banner" class="admonition tip">
11-
<div class="container flex justify-between items-center mx-auto">
12-
<p>
13-
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.
14-
To view previous versions, go to <a class="link text-base" target="_blank" href="https://elastic.co/guide">elastic.co/guide</a>.
15-
</p>
16-
<button id="dismissible-button">
17-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6">
18-
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"/>
19-
</svg>
20-
</button>
21-
</div>
22-
</aside>
2310
//this ensures we forward footer sections declared in this project into to GlobalLayout view's section
2411
await RenderSectionAsync(GlobalSections.Footer);
2512
}

0 commit comments

Comments
 (0)