Skip to content

Commit 4aec8d9

Browse files
committed
Refine cheatsheet category bar rounding
1 parent 9f3a80b commit 4aec8d9

3 files changed

Lines changed: 20 additions & 17 deletions

File tree

internal/etch/help.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,9 @@ EOF`},
353353
Blocks: []HelpBlock{
354354
{Kind: "paragraph", Text: "On Markdown paths, bare structured selectors mutate YAML frontmatter. Markdown address flags such as --body, --section, --item, and --task switch set and delete to Dataview-style inline fields in the Markdown body."},
355355
{Kind: "paragraph", Text: "Frontmatter fits whole-note schema fields such as owner, source, status, and stable IDs. Inline fields fit metadata attached to a paragraph, list item, task, or local note context."},
356+
{Kind: "paragraph", Text: `Dataview inline fields are Markdown annotations shaped like [field:: value] or (field:: value). The bracket form is visible in reading view; the parenthesized form is hidden. Etch preserves the surrounding line or list item and rewrites only the addressed field annotation.`},
356357
{Kind: "paragraph", Text: "Existing fields match first by exact source field name, then by Dataview-normalized field name if the normalized match is unique. Dataview implicit fields such as file.name, task status, and task text are reserved and not writable."},
358+
{Kind: "paragraph", Text: "For full Dataview metadata syntax and indexing behavior, see https://blacksmithgu.github.io/obsidian-dataview/."},
357359
{Kind: "heading", Heading: "Examples"},
358360
{Kind: "pre", Text: ` etch set note.md status Driving
359361
etch set note.md last "2026-05-02" --body

site/assets/css/style.css

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,14 @@ pre code { background: none; padding: 0; font-size: inherit; }
562562
--cheatsheet-category-chrome-height: 132px;
563563
overflow: visible;
564564
}
565+
.browser-cats-shell {
566+
position: sticky;
567+
top: var(--site-nav-height);
568+
z-index: 60;
569+
margin-bottom: 16px;
570+
background: var(--surface);
571+
border-radius: 0 0 8px 8px;
572+
}
565573
.browser-cats {
566574
display: flex;
567575
flex-wrap: nowrap;
@@ -571,15 +579,9 @@ pre code { background: none; padding: 0; font-size: inherit; }
571579
border: 1px solid var(--border);
572580
border-radius: 8px;
573581
background: var(--surface);
574-
margin-bottom: 16px;
575-
}
576-
.browser-cats::-webkit-scrollbar { display: none; }
577-
.browser-static .browser-cats {
578-
position: sticky;
579-
top: var(--site-nav-height);
580-
z-index: 60;
581582
box-shadow: 0 1px 0 var(--border);
582583
}
584+
.browser-cats::-webkit-scrollbar { display: none; }
583585
.cat-btn {
584586
flex: 0 0 auto;
585587
display: block;
@@ -602,18 +604,15 @@ pre code { background: none; padding: 0; font-size: inherit; }
602604
border: 1px solid var(--border);
603605
border-radius: 8px;
604606
background: var(--bg);
607+
overflow: hidden;
605608
scroll-margin-top: calc(var(--site-nav-height) + var(--cheatsheet-catbar-height));
606609
}
607610
.browser-category + .browser-category {
608611
margin-top: 18px;
609612
}
610613
.browser-category-chrome {
611-
position: sticky;
612-
top: calc(var(--site-nav-height) + var(--cheatsheet-catbar-height));
613-
z-index: 50;
614614
background: var(--bg);
615615
border-bottom: 1px solid var(--border);
616-
border-radius: 7px 7px 0 0;
617616
}
618617
.browser-category-head {
619618
padding: 18px 24px 8px;
@@ -664,7 +663,7 @@ pre code { background: none; padding: 0; font-size: inherit; }
664663
.detail-empty { color: var(--fg-dim); font-size: 0.9rem; text-align: center; padding: 48px 0; }
665664

666665
.command-detail {
667-
scroll-margin-top: calc(var(--site-nav-height) + var(--cheatsheet-catbar-height) + var(--cheatsheet-category-chrome-height));
666+
scroll-margin-top: calc(var(--site-nav-height) + var(--cheatsheet-catbar-height) + 16px);
668667
padding-bottom: 28px;
669668
margin-bottom: 28px;
670669
border-bottom: 1px solid var(--border);

site/layouts/_default/cheatsheet.html

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@
2525
<h1>Cheatsheet</h1>
2626

2727
<div class="browser browser-static">
28-
<nav class="browser-cats" aria-label="Command categories">
29-
{{ range $cats }}
30-
<a class="cat-btn" href="#cat-{{ anchorize . }}">{{ . }}</a>
31-
{{ end }}
32-
</nav>
28+
<div class="browser-cats-shell">
29+
<nav class="browser-cats" aria-label="Command categories">
30+
{{ range $cats }}
31+
<a class="cat-btn" href="#cat-{{ anchorize . }}">{{ . }}</a>
32+
{{ end }}
33+
</nav>
34+
</div>
3335

3436
{{ range $cats }}
3537
{{ $cat := . }}

0 commit comments

Comments
 (0)