Not the exact solution but still it's worth to look:
ASP.NET MVC Dynamic Themes[
^]
You can customize the code as per your need.
And apart from this, you can do it using
jQuery
. Create the different
.css
files for each theme and based on the selection, load the theme for the page.
See,
$(".changeStyle").click(function (e) {
e.preventDefault();
var style = $(this).attr("data-style");
$("#siteStyle").attr("href", style);
localStorage.setItem("selected-skin", style);
});
if (localStorage.getItem("furnitureshop-skin"))
{
$("#siteStyle").attr("href", localStorage.getItem("selected-skin"));
}
HTML:
<div class="panel-body">
<label>Select the color theme</label>
<ul class="skin-colors">
<li>
<a href="#" class="changeStyle" style="background-color: rgba(125, 63, 10, 1)" data-style="/Content/Site.css"></a>
</li>
<li>
<a href="#" class="changeStyle" style="background-color:#000" data-style="/Content/Black-Skin.css"></a>
</li>
<li>
<a href="#" class="changeStyle" style="background-color: #8C489F" data-style="/Content/Purple-Skin.css"></a>
</li>
<li>
<a href="#" class="changeStyle" style="background-color: #DF3232" data-style="/Content/Red-Skin.css"></a>
</li>
</ul>
</div>
-KR