Skip to content

Commit

Permalink
fix: redirect to wiki space default page on click of logo
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Apr 5, 2024
1 parent 6f61545 commit f8e11c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion wiki/wiki/doctype/wiki_page/templates/wiki_navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<nav class="wiki-navbar navbar navbar-light navbar-expand-lg sticky-top pr-4">
<div class="navbar-brand-container">
<a class="navbar-brand" alt="Go to home page" href="{{ url_prefix or "" }}{{ home_page or "/" }}">
<a class="navbar-brand" alt="Go to home page" data-prefix="{{ url_prefix }}" href="{{ url_prefix or "" }}{{ home_page or "/" }}">
{%- if light_mode_logo -%}
<img alt="Logo" data-alt-src="{{ dark_mode_logo }}" src='{{ light_mode_logo }}'>
{%- elif dark_mode_logo -%}
Expand Down
5 changes: 2 additions & 3 deletions wiki/wiki/doctype/wiki_page/wiki_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,8 @@ def get_context(self, context):
context.add_dark_mode = wiki_settings.add_dark_mode
context.light_mode_logo = wiki_space.light_mode_logo or wiki_settings.logo
context.dark_mode_logo = wiki_space.dark_mode_logo or wiki_settings.dark_mode_logo
context.home_page = (
wiki_space.route if wiki_space.light_mode_logo or wiki_space.dark_mode_logo else "/"
)
if wiki_space.light_mode_logo or wiki_space.dark_mode_logo:
context.home_page = "/" + wiki_space.route
context.script = wiki_settings.javascript
context.show_feedback = wiki_settings.enable_feedback
context.ask_for_contact_details = wiki_settings.ask_for_contact_details
Expand Down

0 comments on commit f8e11c0

Please sign in to comment.