Font Awesome in cmsms

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
Bigge

Font Awesome in cmsms

Post by Bigge »

Could someone please guide me how to implement http://fortawesome.github.io/Font-Awesome/ into CMS Made Simple?
I only get a strange symbol (attached image)
I tried to create a separate stylesheet in CMSMS, and I tried to import it like:
@import url("[[root_url]]/uploads/fonts/font-awesome.min.css");
(and the font file also are placed in /uploads/fonts)
I tried to edit the font-awesome.min.css with path to the font files.

What am I missing??
/Birger
Attachments
awesomeNot.png
awesomeNot.png (6.82 KiB) Viewed 3202 times
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Font Awesome in cmsms

Post by Rolf »

Add to the default .htaccess file this line:

Code: Select all

...
...
<IfModule mod_expires.c>
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
# Set expires tags on various files... so that the browser wont attempt to reload them.
ExpiresActive On
ExpiresDefault "access plus 1 year"
<IfModule mod_headers.c>
  # Setting cache control to public allows proxy servers to cache the items too.
  Header set Cache-Control "public"
  Header add Access-Control-Allow-Origin "*"     <-----------------------------
</IfModule>
</FilesMatch>
</IfModule>

ps. And don't forget the first "fa": <span class="fa fa-something></span>
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
wmdvanzyl
Forum Members
Forum Members
Posts: 214
Joined: Fri May 06, 2011 12:48 pm

Re: Font Awesome in cmsms

Post by wmdvanzyl »

Rolf makes an excellent point about checking whether it is blocked from .htaccess file.

I can just confirm that it does work. I use it on a few sites and i followed the guide on their website. I used the CDN option and it worked perfectly.

One note, i noticed that if you put the <i> tag in the WYSIWYG editor, it gets stripped out. You can use <span> instead or add an UDT {icon}.

Let me know if you need me to post it here.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Font Awesome in cmsms

Post by Rolf »

Or simply use:

Code: Select all

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Locked

Return to “Layout and Design (CSS & HTML)”