Skip to content

Commit

Permalink
Fix current location check for index page
Browse files Browse the repository at this point in the history
Resolves #2805
  • Loading branch information
Gerrit0 committed Dec 9, 2024
1 parent 8680728 commit cf901f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ title: Changelog
- `@include` and `@includeCode` now work for comments on the entry point for projects with a single entry point, #2800.
- Cascaded modifier tags will no longer be copied into type literals, #2802.
- `@summary` now works to describe functions within modules, #2803.
- Corrected navigation showing module link as current when not on module page, #2805.

## v0.27.3 (2024-12-04)

Expand Down
5 changes: 4 additions & 1 deletion src/lib/output/themes/default/partials/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ export function settings(context: DefaultThemeRenderContext) {
export const navigation = function navigation(context: DefaultThemeRenderContext, props: PageEvent<Reflection>) {
return (
<nav class="tsd-navigation">
<a href={context.urlTo(props.project)} class={classNames({ current: props.project === props.model })}>
<a
href={context.urlTo(props.project)}
class={classNames({ current: props.url === props.model.url && props.model.isProject() })}
>
{getDisplayName(props.project)}
</a>
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">
Expand Down

0 comments on commit cf901f4

Please sign in to comment.