Quantcast

Add external stylesheet

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Add external stylesheet

Tomás Antunes
How do I add an external stylesheet in a Qooxdoo mobile application?
I've already added the asset on the top of the file.

#asset(myapp7/css/font-awesome.min.css)

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Add external stylesheet

SQville
Add it to your app's config.json (example below):

Add a variable in the "let" entry and name it whatever you want (I named mine "GRAPHICS_CSS")

"let" :
  {
    "APPLICATION"  : "rapp",
    "APPLICATION_PATH" : "rapp",
    "APPLICATION_CSS" : "${APPLICATION_PATH}/css/mech-blue-styles.css",  // resource id of custom css
    "GRAPHICS_CSS" : "${APPLICATION_PATH}/css/nativegraphics.css",  // resource id of SQville's NativeGraphics css
    "QOOXDOO_PATH" : "../..",
    "LOCALES"      : [ "en" ],
    ...
  }

In the "jobs" section of the config.json file add the variable to the job types:

"source-script" :
    {
      "extend" : ["mobile-common"],
      "add-css" : [
        { "uri" : "./resource/${MOBILE_THEME_PATH}" },
        { "uri" : "./resource/${APPLICATION_CSS}" },
        { "uri" : "./resource/${GRAPHICS_CSS}" }
      ]
    }

For my app i have the variable in "source-script", "source-hybrid", "build-script" and "source-all-script"

If you look at the source of my mobile app using Chrome's web tools you'll see the "nativegraphics.css" as one of the resources (My mobile Qooxdoo app)
Loading...