Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add all to dashboard and topics menu #1137

Merged
merged 3 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions content/english/dashboards/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ menu:
name: Dashboards
identifier: dashboards
post: Dashboards are pages describing research done on a given subject. They include visualisations of and links to data from the research groups(s) involved. <a href="/dashboards/">See all dashboards <i class="bi bi-arrow-right-circle-fill"></i></a>
dashboard_menu:
identifier: all_dashboards
name: "All dashboards"
weight: 1
aliases:
- /dashboards
- /visualisations
Expand Down
8 changes: 8 additions & 0 deletions content/english/topics/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Topics
menu:
topics_menu:
name: All topics
identifier: all_topics
weight: 1
---
4 changes: 4 additions & 0 deletions content/svenska/dashboards/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ menu:
name: Dashboards
identifier: dashboards
post: Visualiseringar av datasets samt en översikt över pågående forskning kring en viss fråga. <a href="/sv/dashboards/">Se alla dashboards <i class="bi bi-arrow-right-circle-fill"></i></a>
dashboard_menu:
identifier: all_dashboards
name: "Alla dashboards"
weight: 1
---
2 changes: 1 addition & 1 deletion layouts/partials/dashboards.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{{/* Compile list of highlight to show depending upon the page */}}
{{ if eq $currentPage.File "dashboards" }}
{{ $dashboards_to_show = $dashboards_to_show | append $dashboards }}
{{ $dashboards_to_show = $dashboards_to_show | append (where $dashboards "Identifier" "ne" "all_dashboards") }}
{{ else if $displayed_in_homepage }}
{{ $dashboards_to_show = $dashboards_to_show | append (where $dashboards "Identifier" "in" $homepage_dashboards) }}
{{ else if strings.HasSuffix $currentPage.Dir "/topics/" }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/topics.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="row row-cols-1 row-cols-sm-2 row-cols-lg-3 g-2 g-lg-3">
{{ range .Site.Menus.topics_menu }}
{{ range where .Site.Menus.topics_menu "Identifier" "ne" "all_topics"}}
<div class="col">
<div class="bg-card">
<figure class="figure">
Expand Down
Loading