How to: Use custom CSS and JavaScript

This tutorial will how you how to add custom CSS and JavaScript to your project. The default Web Cube base template webcube/base.html comes with two Django template blocks, one at the top of the template called extra-head where custom CSS can be added and one close to the bottom of the template called extra_js where custom JavaScript can be inserted from other templates that inherit from webcube/base.html.

 

 

Screen_Shot_2013-07-17_at_9.44.55_AM.png

 

Screen_Shot_2013-07-17_at_9.45.19_AM.png

 

Custom CSS and JavaScript files can be loaded to your Web Cube installation using the Media Uploads. The webcube/base.html has been loaded to the project using the HTML Templates.

 

Then if for example the template used by the Pages needs custom CSS and JavaScript add the Django template blocks extra-head and extra_js to your flatpages/default.html template that's used by Pages.

 

Screen_Shot_2013-07-17_at_10.07.53_AM.png

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk