Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 2 additions & 12 deletions src/Elastic.ApiExplorer/_Partials/_HttpMethodBadge.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,11 @@
<span class="api-method-icon" aria-hidden="true">
@if (Model == "delete")
{
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
<path
fill="currentColor"
fill-rule="evenodd"
clip-rule="evenodd"
d="M5.46967 6 1.98484 2.51517 2.51517 1.98484 6 5.46967 9.48484 1.98484 10.0152 2.51517 6.53033 6 10.0152 9.48484 9.48484 10.0152 6 6.53033 2.51517 10.0152 1.98484 9.48484 5.46967 6Z"/>
</svg>
<svg width="12" height="12" viewBox="0 0 12 12"><use href="#icon-api-x"/></svg>
}
else
{
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12">
<path
fill="currentColor"
d="M9.75 6.75H9V3.53027L2.51514 10.0151 1.98486 9.48486 8.46973 3H5.25V2.25h4.5V6.75Z"/>
</svg>
<svg width="12" height="12" viewBox="0 0 12 12"><use href="#icon-api-arrow"/></svg>
}
</span>
<span class="api-method-label">@Model.ToUpperInvariant()</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,17 @@
@inherits RazorSlice<Elastic.Documentation.Site.Navigation.NavigationRenderNode>
@if (Model.IsMultiOperation)
{
<span
class="nav-v2-api-method nav-v2-api-method-multi"
aria-label="Multiple operations"
title="Multiple operations">
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 16 16" aria-hidden="true">
<path
fill="currentColor"
fill-rule="evenodd"
clip-rule="evenodd"
d="M5 1a1.998 1.998 0 0 1 .5 3.934v4.163C6.105 8.476 7.053 8 8.5 8c1.654 0 2.372-.47 2.687-.83.082-.093.14-.187.185-.273a2 2 0 1 1 1.053.056 2.321 2.321 0 0 1-.487.876C11.378 8.47 10.346 9 8.5 9c-1.574 0-2.284.657-2.63 1.252a2.797 2.797 0 0 0-.313.828 2 2 0 1 1-1.057-.015V4.934A1.998 1.998 0 0 1 5 1Zm0 11a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm7-8a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM5 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/>
</svg>
</span>
<span class="nav-v2-api-method nav-v2-api-method-multi" aria-label="Multiple operations" title="Multiple operations"><svg width="12" height="12" viewBox="0 0 16 16" aria-hidden="true"><use href="#icon-api-multi"/></svg></span>
}
else if (Model.HttpMethod is { } httpMethod)
{
<span
class="nav-v2-api-method nav-v2-api-method-@httpMethod"
aria-label="@httpMethod.ToUpperInvariant()"
title="@httpMethod.ToUpperInvariant()">
@if (httpMethod == "delete")
{
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" aria-hidden="true">
<path
fill="currentColor"
fill-rule="evenodd"
clip-rule="evenodd"
d="M5.46967 6 1.98484 2.51517 2.51517 1.98484 6 5.46967 9.48484 1.98484 10.0152 2.51517 6.53033 6 10.0152 9.48484 9.48484 10.0152 6 6.53033 2.51517 10.0152 1.98484 9.48484 5.46967 6Z"/>
</svg>
}
else
{
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" aria-hidden="true">
<path
fill="currentColor"
d="M9.75 6.75H9V3.53027L2.51514 10.0151 1.98486 9.48486 8.46973 3H5.25V2.25h4.5V6.75Z"/>
</svg>
}
</span>
var m = httpMethod.ToUpperInvariant();
if (httpMethod == "delete")
{
<span class="nav-v2-api-method nav-v2-api-method-@httpMethod" aria-label="@m" title="@m"><svg width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><use href="#icon-api-x"/></svg></span>
}
else
{
<span class="nav-v2-api-method nav-v2-api-method-@httpMethod" aria-label="@m" title="@m"><svg width="12" height="12" viewBox="0 0 12 12" aria-hidden="true"><use href="#icon-api-arrow"/></svg></span>
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@
</label>
}
</div>
<ul class="nav-subtree">
@await RenderPartialAsync(_TocTreeNavLegacy.Create(item.NavigationItems))
</ul>
<div class="nav-subtree-clip">
<ul class="nav-subtree">
@await RenderPartialAsync(_TocTreeNavLegacy.Create(item.NavigationItems))
</ul>
</div>
</li>
}
else
Expand All @@ -82,9 +84,11 @@
</label>
}
</div>
<ul class="nav-subtree">
@await RenderPartialAsync(_TocTreeNavLegacy.Create(item.NavigationItems))
</ul>
<div class="nav-subtree-clip">
<ul class="nav-subtree">
@await RenderPartialAsync(_TocTreeNavLegacy.Create(item.NavigationItems))
</ul>
</div>
</li>
}
}
13 changes: 13 additions & 0 deletions src/Elastic.Documentation.Site/_GlobalLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@
<path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M7.754 13.995a4.5 4.5 0 1 1 7.491-4.99 4.5 4.5 0 0 1-7.49 4.99ZM15 11.5a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z"/>
<path fill="currentColor" d="M7.222 14.957a5.501 5.501 0 0 1-.713-1.144A6.003 6.003 0 0 1 3.757 3.757l.007-.007.003-.002.013-.014A4.337 4.337 0 0 1 4 3.525V6h1V2H1v1h2.1l-.03.03-.018.019-.004.004a7.001 7.001 0 0 0 4.175 11.904Zm7.735-7.735A7.001 7.001 0 0 0 8 1v1a6.003 6.003 0 0 1 5.813 4.509c.412.19.796.431 1.144.713Z"/>
</symbol>
<symbol id="icon-chevron-double-down" viewBox="0 0 24 24">
<path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="m12 10.293 5.646-5.647.708.708L12 11.707l-6.354-6.353.708-.708L12 10.293Z"/>
<path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="m12 16.293 5.646-5.647.708.708L12 17.707l-6.354-6.353.708-.708L12 16.293Z"/>
</symbol>
<symbol id="icon-api-arrow" viewBox="0 0 12 12">
<path fill="currentColor" d="M9.75 6.75H9V3.53027L2.51514 10.0151 1.98486 9.48486 8.46973 3H5.25V2.25h4.5V6.75Z"/>
</symbol>
<symbol id="icon-api-x" viewBox="0 0 12 12">
<path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M5.46967 6 1.98484 2.51517 2.51517 1.98484 6 5.46967 9.48484 1.98484 10.0152 2.51517 6.53033 6 10.0152 9.48484 9.48484 10.0152 6 6.53033 2.51517 10.0152 1.98484 9.48484 5.46967 6Z"/>
</symbol>
<symbol id="icon-api-multi" viewBox="0 0 16 16">
<path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M5 1a1.998 1.998 0 0 1 .5 3.934v4.163C6.105 8.476 7.053 8 8.5 8c1.654 0 2.372-.47 2.687-.83.082-.093.14-.187.185-.273a2 2 0 1 1 1.053.056 2.321 2.321 0 0 1-.487.876C11.378 8.47 10.346 9 8.5 9c-1.574 0-2.284.657-2.63 1.252a2.797 2.797 0 0 0-.313.828 2 2 0 1 1-1.057-.015V4.934A1.998 1.998 0 0 1 5 1Zm0 11a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm7-8a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM5 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/>
</symbol>
</defs>
</svg>
@if (Model.GoogleTagManager.Enabled)
Expand Down
Loading