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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

Adding custom SVG icons to navigation menu items

theme

Started by Jon 4 years ago · 1 replies · 1174 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 Pedro M, 2 months ago
4 224 2 months ago
Themes & Styling · by Ian, 2 months ago
3 118 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 481 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 72 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 152 3 months ago