Skin switch functionality in layout's skin list

pull/436/head
freezy 2015-05-17 12:07:03 +02:00
parent d3494a468e
commit 1ca9859367
4 changed files with 34 additions and 28 deletions

View File

@ -27,18 +27,18 @@
<p class="lead">Skins can be found in the dist/css/skins folder.
Choose and the skin file that you want then add the appropriate
class to the body tag to change the template's appearance. Here is the list of available skins:</p>
<ul class="bring-up">
<li><code>skin-blue</code></li>
<li><code>skin-blue-light</code></li>
<li><code>skin-yellow</code></li>
<li><code>skin-yellow-light</code></li>
<li><code>skin-purple</code></li>
<li><code>skin-purple-light</code></li>
<li><code>skin-green</code></li>
<li><code>skin-green-light</code></li>
<li><code>skin-red</code></li>
<li><code>skin-red-light</code></li>
<li><code>skin-black</code></li>
<li><code>skin-black-light</code></li>
<ul id="layout-skins-list" class="bring-up">
<li><code>skin-blue</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-blue-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-yellow</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-yellow-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-purple</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-purple-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-green</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-green-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-red</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-red-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-black</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-black-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
</ul>
</section>

View File

@ -13,7 +13,7 @@
<link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<!-- Theme style -->
<link href="../dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
<link href="../dist/css/skins/skin-blue.min.css" rel="stylesheet" type="text/css" />
<link href="../dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->

View File

@ -51,4 +51,10 @@ $(function () {
}, 500);
}
});
//Skin switcher
$('#layout-skins-list a').click(function(e) {
e.preventDefault();
var skinName = $(this).siblings('code').text();
$('body').attr('class', skinName + ' fixed');
});
});

View File

@ -13,7 +13,7 @@
<link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<!-- Theme style -->
<link href="../dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
<link href="../dist/css/skins/skin-blue.min.css" rel="stylesheet" type="text/css" />
<link href="../dist/css/skins/_all-skins.min.css" rel="stylesheet" type="text/css" />
<link href="style.css" rel="stylesheet" type="text/css" />
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
@ -234,19 +234,19 @@ AdminLTE/
<p class="lead">Skins can be found in the dist/css/skins folder.
Choose and the skin file that you want then add the appropriate
class to the body tag to change the template's appearance. Here is the list of available skins:</p>
<ul class="bring-up">
<li><code>skin-blue</code></li>
<li><code>skin-blue-light</code></li>
<li><code>skin-yellow</code></li>
<li><code>skin-yellow-light</code></li>
<li><code>skin-purple</code></li>
<li><code>skin-purple-light</code></li>
<li><code>skin-green</code></li>
<li><code>skin-green-light</code></li>
<li><code>skin-red</code></li>
<li><code>skin-red-light</code></li>
<li><code>skin-black</code></li>
<li><code>skin-black-light</code></li>
<ul id="layout-skins-list" class="bring-up">
<li><code>skin-blue</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-blue-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-yellow</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-yellow-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-purple</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-purple-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-green</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-green-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-red</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-red-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-black</code> <a href="#"><i class="fa fa-eye"></i></a></li>
<li><code>skin-black-light</code> <a href="#"><i class="fa fa-eye"></i></a></li>
</ul>
</section>