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
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@
@if (row.Endpoint is { Rows.Count: > 0 } endpoint)
{
@(await RenderPartialAsync<_HttpMethodBadge, string>(endpoint.Rows[0].Method))
<span class="api-index-item-text">
<span class="api-index-item-title">@row.Title</span>
<code class="api-index-item-path">@endpoint.Rows[0].Route</code>
</span>
}
else
{
<span class="api-index-item-title">@row.Title</span>
}
<span class="api-index-item-title">@row.Title</span>
</a>
</li>
}
Expand Down
18 changes: 18 additions & 0 deletions src/Elastic.Documentation.Site/Assets/api-docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,24 @@
overflow-wrap: anywhere;
}

/* The path sits under the title, so a familiar endpoint is easy to spot. The chip stays centered on the two lines. */
.api-index-item-text {
display: flex;
flex-direction: column;
min-width: 0;
}

#markdown-content .api-index-item-path {
padding: 0;
border: 0;
background: none;
color: var(--color-subdued, #516381);
font-family: var(--font-mono, ui-monospace, monospace);
font-size: 12px;
line-height: 16px;
overflow-wrap: anywhere;
}

#markdown-content a.api-index-item:hover,
#markdown-content a.api-index-item:focus-visible {
background: var(--color-grey-10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,24 @@
overflow-wrap: anywhere;
}

/* The path sits under the title, so a familiar endpoint is easy to spot. The chip stays centered on the two lines. */
.api-index-item-text {
display: flex;
flex-direction: column;
min-width: 0;
}

#markdown-content .api-index-item-path {
padding: 0;
border: 0;
background: none;
color: var(--color-text-muted);
font-family: var(--font-mono);
font-size: 12px;
line-height: 16px;
overflow-wrap: anywhere;
}

#markdown-content a.api-index-item:hover,
#markdown-content a.api-index-item:focus-visible {
background: var(--color-surface-sunken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ <h3 class="api-index-group-title">
</span>
<span class="api-method-label">GET</span>
</span>
<span class="api-index-item-title">Get Spaces</span>
<span class="api-index-item-text">
<span class="api-index-item-title">Get Spaces</span>
<code class="api-index-item-path">/spaces</code>
</span>
</a>
</li>
</ul>
Expand Down
Loading