Skip to content

Commit

Permalink
perf: optimize the matching of menu navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
XPoet committed May 28, 2024
1 parent 1df7acb commit 0ada7b9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion layout/_partial/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
const { title: bi_title, logo: bi_logo } = theme?.base_info || {}
const { enable: s_fs_enable } = theme?.first_screen || {}
const { enable: local_search_enable } = theme?.local_search || {}
const h_menu_nav_object = theme?.menu || { archives: '/archives' }
const origin_h_menu_nav_object = theme?.menu || { archives: '/archives' }
const h_menu_nav_object = {}
for (const key in origin_h_menu_nav_object) {
const temp_key = key.trim().toLowerCase()
h_menu_nav_object[temp_key] = origin_h_menu_nav_object[key]
}
%>
<header class="header-wrapper<%= s_fs_enable === true && is_home() ? ' transparent-1' : '' %>">
Expand Down

0 comments on commit 0ada7b9

Please sign in to comment.