Skip to content

Commit

Permalink
fix: wrap links in current_page? example in <li> tags
Browse files Browse the repository at this point in the history
  • Loading branch information
wout committed Oct 19, 2023
1 parent c83d64a commit 191d4f1
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/actions/guides/frontend/rendering_html.cr
Original file line number Diff line number Diff line change
Expand Up @@ -466,20 +466,19 @@ class Guides::Frontend::RenderingHtml < GuideAction
```crystal
nav do
ul do
link "Home",
to: Home::Index,
data_selected: current_page?(Home::Index)
li data_current: current_page?(Home::Index) do
link "Home", to: Home::Index,
end
link "Your dashboard",
to: Dashboard::Index,
data_selected: current_page?(Dashboard::Index)
li data_current: current_page?(Dashboard::Index) do
link "Your dashboard", to: Dashboard::Index,
end
link "Your profile",
to: Me::Show,
data_selected: current_page?(Me::Show)
li data_current: current_page?(Me::Show) do
link "Your profile", to: Me::Show
end
end
end
```
### Advanced usage
Expand Down

0 comments on commit 191d4f1

Please sign in to comment.