Skip to content

Commit b90a413

Browse files
woutjwoertink
andauthored
Fix error in current page example (#1262)
* Add docs for the new inline_svg macro * Remove SVG builder from awesome page * fix: wrap links in current_page? example in <li> tags * Update src/actions/guides/frontend/rendering_html.cr Co-authored-by: Jeremy Woertink <[email protected]> * Update src/actions/guides/frontend/rendering_html.cr Co-authored-by: Jeremy Woertink <[email protected]> --------- Co-authored-by: Jeremy Woertink <[email protected]>
1 parent 04b488d commit b90a413

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/actions/guides/frontend/rendering_html.cr

+9-10
Original file line numberDiff line numberDiff line change
@@ -466,20 +466,19 @@ class Guides::Frontend::RenderingHtml < GuideAction
466466
```crystal
467467
nav do
468468
ul do
469-
link "Home",
470-
to: Home::Index,
471-
data_selected: current_page?(Home::Index)
469+
li data_current: current_page?(Home::Index) do
470+
link "Home", to: Home::Index
471+
end
472472
473-
link "Your dashboard",
474-
to: Dashboard::Index,
475-
data_selected: current_page?(Dashboard::Index)
473+
li data_current: current_page?(Dashboard::Index) do
474+
link "Your dashboard", to: Dashboard::Index
475+
end
476476
477-
link "Your profile",
478-
to: Me::Show,
479-
data_selected: current_page?(Me::Show)
477+
li data_current: current_page?(Me::Show) do
478+
link "Your profile", to: Me::Show
479+
end
480480
end
481481
end
482-
483482
```
484483
485484
### Advanced usage

0 commit comments

Comments
 (0)