Commit 252cd490 by Torkel Ödegaard

ux(): added style guide page

parent a2b69e96
......@@ -186,6 +186,11 @@ function setupAngularRoutes($routeProvider, $locationProvider) {
.when('/global-alerts', {
templateUrl: 'public/app/features/dashboard/partials/globalAlerts.html',
})
.when('/styleguide', {
controller: 'StyleGuideCtrl',
controllerAs: 'ctrl',
templateUrl: 'public/app/features/styleguide/styleguide.html',
})
.otherwise({
templateUrl: 'public/app/partials/error.html',
controller: 'ErrorCtrl'
......
......@@ -10,4 +10,5 @@ define([
'./profile/profileCtrl',
'./profile/changePasswordCtrl',
'./profile/selectOrgCtrl',
'./styleguide/styleguide',
], function () {});
<navbar icon="fa fa-fw fa-adjust" title="Style Guide">
</navbar>
<div class="page-container">
<div class="page-header">
<h1>Style Guide</h1>
<a class="btn btn-success" ng-click="ctrl.switchTheme()">
<i class="fa fa-random"></i>
Switch theme
</a>
</div>
<h3 class="page-heading">Colors</h3>
<ul>
<li class="style-guide-color-card">
</li>
</ul>
</div>
import coreModule from 'app/core/core_module';
import config from 'app/core/config';
class StyleGuideCtrl {
switchTheme() {
var other = config.bootData.user.lightTheme ? 'dark' : 'light';
window.location.href = config.appSubUrl + '/styleguide?theme=' + other;
}
}
coreModule.controller('StyleGuideCtrl', StyleGuideCtrl);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment