Skip to content

Commit

Permalink
fix image in readme and clarify why the ids are needed
Browse files Browse the repository at this point in the history
  • Loading branch information
cjrace committed Sep 6, 2024
1 parent c7db974 commit 6e67cd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Create contents and subcontents links to sidebar to navigate page.

![](man/figures/contents_link.png)

Important: `contents_link()` requires the following UI structure to enable the js to work. This can also be found in `run_example()`:
Important: `contents_link()` requires the following UI structure to enable the js to work as it relies on the IDs for each section to then point a users focus to. This can also be found in `run_example()`:

```
shiny::fluidpage(
Expand All @@ -133,8 +133,8 @@ shiny::fluidpage(
width = 3,
id = "nav", # DO NOT REMOVE ID
shiny::tags$div(
id = "govuk-contents-box", #DO NOT REMOVE ID
class = "govuk-contents-box", #DO NOT REMOVE CLASS
id = "govuk-contents-box", # DO NOT REMOVE ID
class = "govuk-contents-box", # DO NOT REMOVE CLASS
shiny::tags$h2("contents"),
# CONTENTS LINKS GO HERE
Expand Down
File renamed without changes

0 comments on commit 6e67cd3

Please sign in to comment.