Skip to content
Grav 2.0 is officially stable. Read the announcement →
Themes & Styling

Adding custom SVG icons to navigation menu items

theme

Started by Jon 4 years ago · 1 replies · 1269 views
4 years ago

Hello and thank you for a CMS that is a breath of fresh air! Really enjoying the flat file cms approach.

I am building a small web-store using the shop skeleton , which uses the antimatter theme. I have inherited the antimatter theme and using a custom.css and base.html.twig to get the site looking unique.

I have a number of SVG files that i have added to the footer and managed to get the SVG main site logo working (after reading this discord forum) by adding the following to base.html.twig

HTML
<div id="logo">
    <h3>
       <a href="{{ base_url == '' ? '/' : base_url }}">
          <img src="{{ url('theme://images/myshoplogo.svg') }}" />
       </a>
    </h3>
</div>

But how can i use custom SVG icons in the menu items. I looked at inheriting navigation.html.twig but then get a little lost. Is anyone able to help me here and give me a few pointers?

Thanks

last edited 05/29/22 by Jon
4 years ago

@jon,

I looked at inheriting navigation.html.twig

That seems to be a proper approach...

but then get a little lost.

  • What have you tried?
  • On what part did you get lost?
👍 1

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by stuart young, 2 weeks ago
3 251 2 weeks ago
Themes & Styling · by Sebadamus, 3 weeks ago
5 317 3 weeks ago
Themes & Styling · by martynfoster735, 4 weeks ago
1 310 4 weeks ago
Themes & Styling · by Justin Young, 1 month ago
1 348 1 month ago
Themes & Styling · by Slebeig, 2 months ago
4 474 2 months ago