Discussion:
Add external stylesheet
(too old to reply)
Tomás Antunes
2016-03-29 09:57:45 UTC
Permalink
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)
SQville
2016-04-14 00:35:18 UTC
Permalink
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
<https://vivid-fire-1034.firebaseapp.com/#%2Fbasic> )



--
View this message in context: http://qooxdoo.678.n2.nabble.com/Add-external-stylesheet-tp7588212p7588264.html
Sent from the qooxdoo mailing list archive at Nabble.com.

Loading...