Skip to content

Commit 26acb8f

Browse files
committed
fix: make active navigation links visible
refs #4131
1 parent 32b327a commit 26acb8f

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<bna-editor (contentChanged)="readTextFromEditor($event)"/>
1+
<bna-editor (contentChanged)="readTextFromEditor($event)" />
22

33
<h2>Result</h2>
44
<div
5-
class="border border-black bg-background rounded min-h-20 w-full p-2 max-h-[400px] overflow-auto"
6-
>
7-
<pre><code>{{ editorContent | json }}</code></pre>
8-
</div>
5+
class="border border-black bg-background rounded min-h-20 w-full p-2 max-h-[400px] overflow-auto"
6+
>
7+
<pre><code>{{ editorContent | json }}</code></pre>
8+
</div>

docs/src/pages/examples/examples.page.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,40 +20,50 @@ import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
2020
>
2121
<aside class="flex flex-col p-3">
2222
Basic
23-
<a hlmBtn variant="ghost" routerLink="basic/minimal" class="justify-start"
23+
<a
24+
hlmBtn
25+
variant="ghost"
26+
routerLinkActive="active-link"
27+
routerLink="basic/minimal"
28+
class="justify-start"
2429
>Basic Setup</a
2530
>
2631
<a
2732
hlmBtn
2833
variant="ghost"
34+
routerLinkActive="active-link"
2935
routerLink="basic/manipulating-blocks"
3036
class="justify-start"
3137
>Manipulating Blocks</a
3238
>
3339
<a
3440
hlmBtn
3541
variant="ghost"
42+
routerLinkActive="active-link"
3643
routerLink="basic/removing-default-blocks"
3744
class="justify-start"
3845
>Removing Default Blocks</a
3946
>
4047
<a
4148
hlmBtn
4249
variant="ghost"
50+
routerLinkActive="active-link"
4351
routerLink="basic/selection-blocks"
4452
class="justify-start"
4553
>Displaying Selected Blocks</a
4654
>
4755
<a
4856
hlmBtn
4957
variant="ghost"
58+
routerLinkActive="active-link"
5059
routerLink="basic/blocks-json"
5160
class="justify-start"
5261
>Displaying Document JSON</a
5362
>
5463
<a
5564
hlmBtn
5665
variant="ghost"
66+
routerLinkActive="active-link"
5767
routerLink="basic/all-blocks"
5868
class="justify-start"
5969
>Default Schema Showcase</a
@@ -63,13 +73,15 @@ import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
6373
<a
6474
hlmBtn
6575
variant="ghost"
76+
routerLinkActive="active-link"
6677
routerLink="backend/saving-and-loading"
6778
class="justify-start"
6879
>Saving & Loading</a
6980
>
7081
<a
7182
hlmBtn
7283
variant="ghost"
84+
routerLinkActive="active-link"
7385
routerLink="backend/upload-files"
7486
class="justify-start"
7587
>Upload Files</a
@@ -80,13 +92,15 @@ import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
8092
hlmBtn
8193
variant="ghost"
8294
class="justify-start"
95+
routerLinkActive="active-link"
8396
routerLink="custom/alert-block"
8497
>Alert Block</a
8598
>
8699
<a
87100
hlmBtn
88101
variant="ghost"
89102
class="justify-start"
103+
routerLinkActive="active-link"
90104
routerLink="custom/api-content-block"
91105
>Api Content Block</a
92106
>
@@ -95,6 +109,7 @@ import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
95109
hlmBtn
96110
variant="ghost"
97111
class="justify-start"
112+
routerLinkActive="active-link"
98113
routerLink="interoperability/convert-to-html"
99114
>Converting Blocks to HTML</a
100115
>
@@ -103,13 +118,15 @@ import { HlmButtonDirective } from '@spartan-ng/ui-button-helm';
103118
hlmBtn
104119
variant="ghost"
105120
class="justify-start"
121+
routerLinkActive="active-link"
106122
routerLink="ui-components/formatting-toolbar-buttons"
107123
>Formatting Toolbar Buttons</a
108124
>
109125
<a
110126
hlmBtn
111127
variant="ghost"
112128
class="justify-start"
129+
routerLinkActive="active-link"
113130
routerLink="ui-components/formatting-side-menu-buttons"
114131
>Formatting Side Menu Buttons</a
115132
>

styles/block-note-common.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ NESTED BLOCKS
321321
width: 100%;
322322
}
323323

324+
/* TODO: is additional specificity here used to overwrite 3rd party styles? */
325+
.active-link,
324326
[data-file-block] .bn-file-default-preview:hover,
325327
.ProseMirror-selectednode .bn-file-default-preview {
326328
background-color: rgb(225, 225, 225);

0 commit comments

Comments
 (0)