Well, this ones going to be a bit of a read.
Heres what ive been doing:
----- Easy Bits -----CSS:Splitting CSS into smaller chunks like below:
> WebsiteName - Reset
> WebsiteName - SiteElements
> WebsiteName - SiteElements - Lightbox
> WebsiteName - SiteElements - ...
And for production, im using one file "WebsiteName - Styles" that
imports all the styles like below:
{% CSS["WebsiteName-Reset"] %}
</li>
file: newslisting
<div class="news-item"> <!-- module -->
<a href="#">Some link</a>
....
</div>
Javscript:So far, ive been doin a JS build locally using
grunt and im wondering if thers a way to do concatination and minification in kentico.
For page load time, i tend to add my js files before "</body>" tag.
Now, Quiet often im loading different JS files based on page templates, visitor's gender (joke) etc well, i can load it using the "Head" webpart but is it possible to load a script at the of bottom the page?
Theming:This beast has always confused me
What is the recommended way to add a theme ( quiet possibly, a seperate CSS ) based on domain name, or where the user is comming from?
I mean is it possible to load a stylesheet based on conditions like:
- If the domain name contains a certain word ( like "elvis" is "elvis.website.com" ) then load css called "elvis-theme.css"
- If the user is comming from "/latestnews.aspx" to "/news-details.aspx" then load css called "latest-news-theme.css"
I'd be interested to know how you folks get around maintaining websites and get around some of the problems mentioned above.
Cheers
Varinder