No Font-Awesome icons of theme

180 Views Asked by At

Can anybody tell me how to set up Font Awesome to work with a theme?

I have put this in my template file:

    <div id="social-media-bar" class="container">
    <div class="row">
        <div class="col-md-2 col-md-offset-2">
            <i class="fa fa-linkedin-square fa-3" aria-hidden="true"></i>
        </div>
        <div class="col-md-2">
            <i class="fa fa-facebook-square fa-3" aria-hidden="true"></i>
        </div>
        <div class="col-md-2">
            <i class="fa fa-xing-square fa-3" aria-hidden="true"></i>
        </div>
        <div class="col-md-2">
            <i class="fa fa-twitter-square fa-3" aria-hidden="true"></i>
        </div>
    </div>
</div>

But there are no icons loaded. They aren't loaded in admin mode either but the IP menus have their FA icons as they should.

What am I doing wrong? Are some LESS entries necessary in my theme?

3

There are 3 best solutions below

0
Doc TheJones On BEST ANSWER

I have used Bootstraps CDN in the head now:

<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
1
Doc TheJones On

Think I got it - I just have added this line to theme.less:

@import "/Ip/Internal/Core/assets/admin/font-awesome/font-awesome.less";
1
Tim Vanden Hende On

Best way to add css in Impresspages is by using ipAddCSS in you theme header before ipHead(). Thats the same way you can add css to plugins.

For example:

<head>
    <?php ipAddCss('Theme/AHS/assets/ahs.css'); ?>
    <?php echo ipHead(); ?>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>