Skip to content

Commit

Permalink
Configure contents-list component as navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
matthillco committed Oct 17, 2024
1 parent 276583c commit f899118
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
6 changes: 5 additions & 1 deletion app/views/landing_page/blocks/_side_navigation.html.erb
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
<%= render "govuk_publishing_components/components/contents_list", contents: contents_list(request.path, block.links) %>
<%= render "govuk_publishing_components/components/contents_list", {
alternative_line_style: block.data["alternative_line_style"],
title: block.data["title"],
contents: contents_list(request.path, block.links)
} %>
11 changes: 3 additions & 8 deletions lib/data/landing_page_content_items/landing_page.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ blocks:
- type: two_column_layout
theme: one_third_two_thirds
blocks:
- type: govspeak
content: <p>Left content!</p>
- type: side_navigation
title: Alternate title
alternative_line_style: true
- type: blocks_container
blocks:
- type: card
Expand Down Expand Up @@ -162,9 +163,3 @@ blocks:
- href: "/youtube-share-link"
text: "YouTube"
icon: "youtube"
- type: two_column_layout
theme: one_third_two_thirds
blocks:
- type: side_navigation
- type: govspeak
content: <h2>On the right</h2>
11 changes: 3 additions & 8 deletions spec/fixtures/landing_page.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ blocks:
- type: two_column_layout
theme: one_third_two_thirds
blocks:
- type: govspeak
content: <p>Left content!</p>
- type: side_navigation
title: Alternate title
alternative_line_style: true
- type: blocks_container
blocks:
- type: card
Expand All @@ -145,9 +146,3 @@ blocks:
- type: govspeak
inverse: true
content: <h2><a href="http://gov.uk">Title 2 govspeak title goes here</a></h2>
- type: two_column_layout
theme: one_third_two_thirds
blocks:
- type: side_navigation
- type: govspeak
content: <h2>On the right</h2>

0 comments on commit f899118

Please sign in to comment.