Page 1 of 1

How to add external CSS resource?

Posted: Sun Feb 23, 2014 2:13 pm
by Chris A

Adding codehttp://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css/code to the User-defined Resources in the App settings will result in this:

code<script type="text/javascript" src="http:&#47;&#47;netdna&#46;bootstrapcdn&#46;com/font-awesome/4&#46;0&#46;3/css/font-awesome&#46;css"></script>/code

So it won't work... I know I can copy to a new CSS file, but it doesn't seem very convenient.


How to add external CSS resource?

Posted: Sun Feb 23, 2014 2:42 pm
by Igor

You could create new CSS file see below doc:
http://docs.appery.io/documentation/w...


How to add external CSS resource?

Posted: Sun Feb 23, 2014 11:50 pm
by Chris A

Hi igor,

as I said, I know I can copy to a new file, but it isn't convenient. For example, if you want to use font-awesome you'll have to modify the src links to complete the urls etc... So every time there is an update you'll have to hack into the file, risking errors.

It would be a better feature if your system could recognize external css files and add them to the correctly.


How to add external CSS resource?

Posted: Mon Feb 24, 2014 2:48 pm
by Maryna Brodina

Hello!
You have to use new CSS and change all relative paths, or add in project resources (images, fonts) so that they are available on relative addresses in created CSS. It is the only way.


How to add external CSS resource?

Posted: Wed Feb 26, 2014 12:10 am
by Chris A

So I guess it's also not possible to link to external fonts? As you surely know, importing via CSS blocks parallel downloading slowing down load times.


How to add external CSS resource?

Posted: Wed Feb 26, 2014 11:46 am
by Maryna Brodina

Hello!
[quote:]link to external fonts[/quote]why do you need links to external fonts? Upload necessary fonts in project, it speeds us app.
You need to refer to external resources only if you use external API which changes constantly (for example Google maps API). If you need css, font, image or some plugin (in JS file) it's better to upload it to project.


How to add external CSS resource?

Posted: Fri Feb 28, 2014 1:39 am
by Chris A

Upload it in the media manager?


How to add external CSS resource?

Posted: Fri Feb 28, 2014 2:10 am
by Igor

Create new - CSS

Image Image