Skip to content

Commit

Permalink
fix: prevent icon_font and fontawesome mix
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Sketon committed Dec 1, 2024
1 parent c5149b3 commit 0d71651
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layout/_partial/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<% } else { %>
<% for (let item of theme.menu) { %>
<span class="main-nav-link-wrap">
<div class="main-nav-icon icon <%= item.icon === 'e62b' || item.icon === 'f6ad' || !item.icon ? 'rotate' : '' %>">
<div class="main-nav-icon icon <%= (item.icon === 'e62b' && theme.icon_font) || (item.icon === 'f6ad' && !theme.icon_font) || !item.icon ? 'rotate' : '' %>">
<%- item.icon ? `&#x${item.icon};` : (theme.icon_font ? '&#xe62b;' : '&#xf6ad;') %>
</div>
<a class="main-nav-link" href="<%- url_for(item.url) %>"><%= __(item.name) %></a>
Expand Down
2 changes: 1 addition & 1 deletion layout/_partial/sidebar/common-sidebar.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<% for (let item of theme.menu) { %>
<div class="sidebar-menu-link-wrap">
<a class="sidebar-menu-link-dummy" href="<%- url_for(item.url) %>" aria-label="<%= __(item.name) %>"></a>
<div class="sidebar-menu-icon icon <%= item.icon === 'e62b' || item.icon === 'f6ad' || !item.icon ? 'rotate' : '' %>">
<div class="sidebar-menu-icon icon <%= (item.icon === 'e62b' && theme.icon_font) || (item.icon === 'f6ad' && !theme.icon_font) || !item.icon ? 'rotate' : '' %>">
<%- item.icon ? `&#x${item.icon};` : (theme.icon_font ? '&#xe62b;' : '&#xf6ad;') %>
</div>
<div class="sidebar-menu-link"><%= __(item.name) %></div>
Expand Down

0 comments on commit 0d71651

Please sign in to comment.