0

Glyphicons are not showing in my appfuse app. As much as I could see, appfuse includes bootstrap as jar file. I tried to fix the problem by manualy including bootstrap by adding:

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

and that fixes problem with glyphicons, but then some other things start to bug.

Is there a way to fix this?

legionar
  • 75
  • 2
  • 8
  • You're right, this appears to be a bug. I tried it with both AppFuse and AppFuse Light (which doesn't use Bootswatch). It happens with both. I've entered it into JIRA. http://issues.appfuse.org/browse/APF-1469 – Matt Raible Feb 28 '15 at 16:16

2 Answers2

0

As far as I know, you can include <css>classpath:META-INF/resources/webjars/bootstrap/{the_version_you_have}/css/bootstrap.min.css</css> in your wro.xml file under webapp/WEB-INF directory.

You may want to comment out the <css>classpath:META-INF/resources/webjars/bootswatch-spacelab/{the_version_you_have}/css/bootstrap.min.css</css> record (if it's there).

Dimis
  • 41
  • 4
0

I tried for 5 minutes and couldn't get the glyphicons to work. I'd recommend using Font Awesome instead. Here's how:

  1. Add the font-awesome webjar to your pom.xml:

    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>font-awesome</artifactId>
        <version>4.3.0-1</version>
    </dependency>
    
  2. Add it to wro.xml, just after the bootstrap CSS.

    <css>classpath:META-INF/resources/webjars/bootswatch-spacelab/3.3.1+2/css/bootstrap.min.css</css>
    <css>classpath:META-INF/resources/webjars/font-awesome/4.3.0/css/font-awesome.min.css</css>
    
  3. Add the icons to your page. For example:

    <i class="fa fa-plus-circle"></i>
    
Matt Raible
  • 8,187
  • 9
  • 61
  • 120