0

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?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
  • have you included there script or css file – Redhya Mar 04 '17 at 12:19
  • And please show us the declarations. The Font name is `Fontawesome` and not `Font-Awesome` – Psi Mar 04 '17 at 12:21
  • Thanks for your fast reply! I haven't included it in my less files yet because I thought that it's included by default via the ipContent.less. Looks like I was wrong ;-) Am I right that I should include it via my theme.less? How exactly? I would like to avoid to load thing twice ;-) – Doc TheJones Mar 04 '17 at 12:28

3 Answers3

0

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

@import "/Ip/Internal/Core/assets/admin/font-awesome/font-awesome.less";
0

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">
0

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>