I am using the "ExternalScreen" plugin for phonegap, and I am loading a 'local' html file. This 'local' file won't load any of my 'external' assets. In other words, the HTML file links to JavaScript libraries and CSS Stylesheets, but it is not loading them. Even if I do inline styles, it won't load images.
Any idea why no assets are being loaded outside of the .html page with PhoneGap ExternalScreen?
Thanks!
This was a bug in the "localHTMLResource" function of the plugin, and it has been fixed.
Thanks #andytrice
Related
How do you handle links to asset files generated by webpack, when you use .ejs templating engine, if file includes [contenthash] for caching files in browser?
Thanks in advance
I am currently merging a project from server-side rendering to static page rendering. According to the docs since nuxt 2.13 You can set the target to static inside of nuxt.config and run nuxt generate. This is correctly generating an html file for each file within my pages folder, however my pages lack all the styles. I am not sure if this behavior is expected or if I am missing something. I am currently using scss and bootstrap for the project. Any help would be appreciated.
Essentially i want to load my github project through a CDN. (jsdelivr or similar)
this is my repositories https://github.com/shaikatssj/scodec-cdn?files=1
Or i want to host my css js and fonts file and load directly on my webpage.
I need to develop a plugin for Moodle, and i need to have some js and css files in plugin. But i have the next problem - how to work with them from installed plugin? Of course, i can hardcode their path via to moodle structure, but it's a very dirty and bad way. Also, i know that i can place all js and css code inline, but i think that it's a bad decision too. Is there a built-in way to serve assets from plugin? I tried to find it in documentations, but found nothing.
Thanks
I assume you want to know how to include CSS and JS files into your plugin.
You can include a JS file via the command:
$PAGE->requires->js( /relative/path/your_script.js');
You can then call a JS function once the page has been downloaded with the command:
$PAGE->requires->js_init_call ( your_JS_function_name, array_of_parameters_here, bool: on DOM ready);
For example:
$PAGE->requires->js_init_call('init', array($USER->lang), true);
Be sure to make the $PAGE available with global $PAGE;, first.
Your CSS file can be named styles.css and put into the root folder of your plugin. The file will be automatically read by the system and included. It will take precedence over (will overwrite the settings of) the system CSS files. After that you will have to reload the theme caches.
I would like to know how to change the default index.html file. I have created a classic project (for mobile web). In that I have created a .css file which includes my custom styles. Now I would like to include this file in index.html, so that those styles will apply on my application. But haven't seen the index.html file. After build, I am able to see this file in build folder. May I know how to update the index.html file?
Thanks in Advance,
Swathi.
Appcelerator uses XML for views, TSS for styling, and JS for controllers. Then Titanium compiles your source code into the native API (HTML for mobile web). Because you can also compile for iOS, Android, and Windows, your output is converted appropriately to your build directory. When you create a new Alloy project, you will find the default index.xml, index.tss, and index.js in the app views, styles, and controllers directories respectively. So to control index.html, edit these 3 index.* files.