Skip to content

Commit

Permalink
Fix main navi entry: Use alchemy-icon
Browse files Browse the repository at this point in the history
Using the alchemy-icon so we can make use of the already loaded
svg icon sprite.
  • Loading branch information
tvdeyen committed Oct 4, 2024
1 parent 45206fe commit 896ff3c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
<% elsif navigation["inline_image"] %>
<%== navigation["inline_image"] %>
<% elsif navigation["icon"] %>
<%# Cannot use the render_icon helper, because the navigation["icon"] includes the style %>
<svg class="icon">
<use href="<%= asset_path("remixicon.symbol.svg") %>#ri-<%= navigation["icon"] %>" />
</svg>
<%= content_tag :"alchemy-icon", nil,
name: navigation["icon"],
"icon-style": navigation["icon-style"] %>
<% else %>
<%= render_icon :table %>
<% end %>
Expand Down
13 changes: 7 additions & 6 deletions config/alchemy/modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
name: Home
controller: "/alchemy/admin/dashboard"
action: index
icon: home-2-line
icon: home-2

- name: pages
engine_name: alchemy
Expand All @@ -16,7 +16,7 @@
name: "modules.pages"
controller: "/alchemy/admin/pages"
action: index
icon: pages-line
icon: pages
sub_navigation:
- name: "modules.pages"
controller: "/alchemy/admin/pages"
Expand All @@ -35,7 +35,7 @@
name: "modules.menus"
controller: "/alchemy/admin/nodes"
action: index
icon: menu-2-line
icon: menu-2

- name: languages
engine_name: alchemy
Expand All @@ -45,6 +45,7 @@
controller: "/alchemy/admin/languages"
action: index
icon: translate-2
icon-style: none

- name: sites
engine_name: alchemy
Expand All @@ -53,7 +54,7 @@
name: "modules.sites"
controller: "/alchemy/admin/sites"
action: index
icon: global-line
icon: global

- name: tags
engine_name: alchemy
Expand All @@ -62,7 +63,7 @@
name: "modules.tags"
controller: "/alchemy/admin/tags"
action: index
icon: price-tag-3-line
icon: price-tag-3

- name: archive
engine_name: alchemy
Expand All @@ -71,7 +72,7 @@
controller: "/alchemy/admin/pictures"
action: index
name: "modules.library"
icon: archive-drawer-line
icon: archive-drawer
sub_navigation:
- name: "modules.pictures"
controller: "/alchemy/admin/pictures"
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/config/initializers/alchemy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
name: "Events",
controller: "/admin/events",
action: "index",
icon: "calendar-event-line",
icon: "calendar-event",
sub_navigation: [{
name: "Events",
controller: "/admin/events",
Expand Down

0 comments on commit 896ff3c

Please sign in to comment.