Skip to content

Commit ce23e31

Browse files
authored
Sidebar nav styling changes (#751)
* Sidebar nav styling changes * revert
1 parent 0475050 commit ce23e31

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Elastic.Markdown/Slices/Layout/_TableOfContents.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{
77
<div class="mb-4">
88
<div class="font-bold mb-2">On this page</div>
9-
<ul class="block w-full relative">
9+
<ul class="block w-full relative font-body">
1010
<div class="toc-progress-indicator absolute top-0 h-0 left-2 w-[1px] bg-blue-elastic transition-all duration-200 ease-out "></div>
1111
@foreach (var item in Model.PageTocItems)
1212
{

src/Elastic.Markdown/Slices/Layout/_TocTree.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
@using Elastic.Markdown.Helpers
22
@inherits RazorSlice<NavigationViewModel>
3-
<div class="pt-6 pb-20">
3+
<div class="pt-6 pb-20 font-body">
44

55
@{
66
var current = Model.TopLevelItems.FirstOrDefault(i => i.Id == Model.Tree.Id);
77
}
88

99
@if (Model.Features.IsPrimaryNavEnabled)
1010
{
11-
<details class="block group border-b-1 border-grey-20 pb-6">
11+
<details class="block group border-b-1 border-grey-20 pb-8 font-sans">
1212
<summary class="inline-grid md:grid grid-cols-[1fr_auto] cursor-pointer font-semibold gap-2 hover:text-black">
1313
<span>
1414
@current?.Group.Index?.NavigationTitle

src/Elastic.Markdown/Slices/Layout/_TocTreeNav.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
if (item is FileNavigation file && Model.SubTree.Index?.FileName != file.File.FileName)
1212
{
1313
var f = file.File;
14-
<li class="flex group/li @(item.Depth == topLevelFile ? "font-semibold py-6 not-last:border-b-1 border-grey-20" : "ml-5 lg:ml-4 mt-4 lg:mt-3")">
14+
<li class="flex group/li @(item.Depth == topLevelFile ? "font-semibold py-8 not-last:border-b-1 border-grey-20" : "ml-5 lg:ml-4 mt-4 lg:mt-3")">
1515
<a
1616
hx-get="@f.Url"
1717
hx-select-oob="@Htmx.GetHxSelectOob(Model.Features, Model.CurrentDocument.UrlPathPrefix, Model.CurrentDocument.Url, f.Url)"
@@ -35,7 +35,7 @@
3535
var g = folder.Group;
3636
// const int initialExpandLevel = 3;
3737
// var shouldInitiallyExpand = g.Depth <= initialExpandLevel;
38-
<li class="flex flex-wrap group-navigation @(g.Depth == topLevelGroup ? "py-6 not-last:border-b-1 border-grey-20" : "mt-4 lg:mt-3")">
38+
<li class="flex flex-wrap group-navigation @(g.Depth == topLevelGroup ? "py-8 not-last:border-b-1 border-grey-20" : "mt-4 lg:mt-3")">
3939
<div class="peer flex items-start gap-1">
4040
<label for="@id" class="group/label">
4141
<svg
@@ -60,7 +60,7 @@
6060
href="@(g.Index?.Url ?? "")"
6161
@Htmx.GetHxAttributes(Model.Features, Model.CurrentDocument.UrlPathPrefix, Model.CurrentDocument.Url, g.Index?.Url ?? "")
6262
id="page-@(g.Index?.Id ?? id)"
63-
class="sidebar-link @(g.Depth == topLevelGroup ? "font-semibold mb-1" : "")">
63+
class="sidebar-link @(g.Depth == topLevelGroup ? "font-semibold font-sans mb-1 text-base" : "")">
6464
@(g.Index?.NavigationTitle ?? "Untitled")
6565
</a>
6666
</div>

0 commit comments

Comments
 (0)