diff --git a/bower.json b/bower.json index 86a8bd1..caac1d1 100644 --- a/bower.json +++ b/bower.json @@ -48,7 +48,9 @@ "angular-chartist.js": "~3.3.12", "angular-morris-chart": "~1.1.0", "angular-ui-tree": "~2.12.0", - "ionrangeslider": "~2.1.2" + "ionrangeslider": "~2.1.2", + "angular-bootstrap": "~0.14.3", + "angular-animate": "~1.4.8" }, "overrides": { "amcharts": { @@ -82,8 +84,5 @@ "font-awesome": { "main": "css/font-awesome.css" } - }, - "devDependencies": { - "angular-ui-router": "~0.2.15" } } diff --git a/gulp/server.js b/gulp/server.js index 500b0c0..9800867 100644 --- a/gulp/server.js +++ b/gulp/server.js @@ -38,7 +38,8 @@ function browserSyncInit(baseDir, browser) { browserSync.instance = browserSync.init({ startPath: '/', server: server, - browser: browser + browser: browser, + ghostMode: false }); } diff --git a/src/app/app.js b/src/app/app.js index 5b617e9..6197801 100644 --- a/src/app/app.js +++ b/src/app/app.js @@ -1,6 +1,8 @@ 'use strict'; angular.module('BlurAdmin', [ + 'ngAnimate', + 'ui.bootstrap', 'ui.sortable', 'ui.router', 'ngTouch', diff --git a/src/app/pages/pages.module.js b/src/app/pages/pages.module.js index 27ea9ea..f80dc67 100644 --- a/src/app/pages/pages.module.js +++ b/src/app/pages/pages.module.js @@ -24,6 +24,7 @@ 'BlurAdmin.pages.slider', 'BlurAdmin.pages.tables', 'BlurAdmin.pages.tree', + 'BlurAdmin.pages.tabs', 'BlurAdmin.pages.typography' ]) .config(routeConfig); diff --git a/src/app/pages/tabs/mainTabs.html b/src/app/pages/tabs/mainTabs.html new file mode 100644 index 0000000..c7c4a3b --- /dev/null +++ b/src/app/pages/tabs/mainTabs.html @@ -0,0 +1,40 @@ + + +

+ Take up one idea. Make that one idea your life--think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone. This is the way to success. +

+

+ People who succeed have momentum. The more they succeed, the more they want to succeed, and the more they find a way to succeed. Similarly, when someone is failing, the tendency is to get on a downward spiral that can even become a self-fulfilling prophecy. +

+
+ +

+ You can't connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something--your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life. +

+

+ The reason most people never reach their goals is that they don't define them, or ever seriously consider them as believable or achievable. Winners can tell you where they are going, what they plan to do along the way, and who will be sharing the adventure with them. +

+
+ + + + Dropdown tab + + + +
+

+ Success is ... knowing your purpose in life, growing to reach your maximum potential, and sowing seeds that benefit others. +

+

Failure is the condiment that gives success its flavor.

+
+
+

+ +

+
+
+
\ No newline at end of file diff --git a/src/app/pages/tabs/sampleAccordion.html b/src/app/pages/tabs/sampleAccordion.html new file mode 100644 index 0000000..eb9e443 --- /dev/null +++ b/src/app/pages/tabs/sampleAccordion.html @@ -0,0 +1,22 @@ + + + This content is straight in the template. + + +

The body of the uib-accordion group grows to fit the contents

+ +
+ + Hello + + +

Please, to delete your account, click the button below

+ +
+ + + I can have markup, too! + + This is just some content to illustrate fancy headings. + +
\ No newline at end of file diff --git a/src/app/pages/tabs/sideTabs.html b/src/app/pages/tabs/sideTabs.html new file mode 100644 index 0000000..6807ab6 --- /dev/null +++ b/src/app/pages/tabs/sideTabs.html @@ -0,0 +1,49 @@ + + +

+ Take up one idea. Make that one idea your life--think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone. This is the way to success. +

+

+ People who succeed have momentum. The more they succeed, the more they want to succeed, and the more they find a way to succeed. Similarly, when someone is failing, the tendency is to get on a downward spiral that can even become a self-fulfilling prophecy. +

+
+ +

+ You can't connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something--your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life. +

+

+ The reason most people never reach their goals is that they don't define them, or ever seriously consider them as believable or achievable. Winners can tell you where they are going, what they plan to do along the way, and who will be sharing the adventure with them. +

+
+ +

+ Success is ... knowing your purpose in life, growing to reach your maximum potential, and sowing seeds that benefit others. +

+

Failure is the condiment that gives success its flavor.

+
+
+ + + +

+ Take up one idea. Make that one idea your life--think of it, dream of it, live on that idea. Let the brain, muscles, nerves, every part of your body, be full of that idea, and just leave every other idea alone. This is the way to success. +

+

+ People who succeed have momentum. The more they succeed, the more they want to succeed, and the more they find a way to succeed. Similarly, when someone is failing, the tendency is to get on a downward spiral that can even become a self-fulfilling prophecy. +

+
+ +

+ You can't connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something--your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life. +

+

+ The reason most people never reach their goals is that they don't define them, or ever seriously consider them as believable or achievable. Winners can tell you where they are going, what they plan to do along the way, and who will be sharing the adventure with them. +

+
+ +

+ Success is ... knowing your purpose in life, growing to reach your maximum potential, and sowing seeds that benefit others. +

+

Failure is the condiment that gives success its flavor.

+
+
\ No newline at end of file diff --git a/src/app/pages/tabs/tabs.html b/src/app/pages/tabs/tabs.html new file mode 100644 index 0000000..32d0761 --- /dev/null +++ b/src/app/pages/tabs/tabs.html @@ -0,0 +1,10 @@ +
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/src/app/pages/tabs/tabs.module.js b/src/app/pages/tabs/tabs.module.js new file mode 100644 index 0000000..7f9e78e --- /dev/null +++ b/src/app/pages/tabs/tabs.module.js @@ -0,0 +1,20 @@ +/** + * @author v.lugovsky + * created on 21.12.2015 + */ +(function () { + 'use strict'; + + angular.module('BlurAdmin.pages.tabs', []) + .config(routeConfig); + + /** @ngInject */ + function routeConfig($stateProvider) { + $stateProvider + .state('tabs', { + url: '/tabs', + templateUrl: 'app/pages/tabs/tabs.html' + }); + } + +})(); diff --git a/src/app/theme/components/sidebar/SidebarCtrl.js b/src/app/theme/components/sidebar/SidebarCtrl.js index a03b01e..0735b27 100644 --- a/src/app/theme/components/sidebar/SidebarCtrl.js +++ b/src/app/theme/components/sidebar/SidebarCtrl.js @@ -93,6 +93,10 @@ title: 'Notifications', root: '#/notifications' }, + { + title: 'Tabs and Accordions', + root: '#/tabs' + }, { title: 'Tree View', root: '#/tree' diff --git a/src/sass/app/_tabsPage.scss b/src/sass/app/_tabsPage.scss new file mode 100644 index 0000000..5d56213 --- /dev/null +++ b/src/sass/app/_tabsPage.scss @@ -0,0 +1,9 @@ +.tabset-group { + > div + div { + margin-top: 15px; + } +} + +.accordions-row { + margin-top: 30px; +} \ No newline at end of file diff --git a/src/sass/theme/components/_accordion.scss b/src/sass/theme/components/_accordion.scss new file mode 100644 index 0000000..61208df --- /dev/null +++ b/src/sass/theme/components/_accordion.scss @@ -0,0 +1,27 @@ +.panel-group { + > .panel { + > .panel-heading { + padding: 0; + + > h4.panel-title { + height: 50px; + width: 100%; + padding: 0; + + > a { + display: block; + padding: 15px 22px; + width: 100%; + } + } + } + } + +} + +.panel-collapse { + transition: height $default-animation-duration $default-animation-style; + .panel-body { + padding: 15px; + } +} \ No newline at end of file diff --git a/src/sass/theme/components/_tabs.scss b/src/sass/theme/components/_tabs.scss new file mode 100644 index 0000000..fba7f52 --- /dev/null +++ b/src/sass/theme/components/_tabs.scss @@ -0,0 +1,129 @@ +/** Different tabs positions, which were removed from bootstrap */ +.tabs-below, .tabs-right, .tabs-left { + .nav-tabs { + border-bottom: 0; + } +} + +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} + +.tab-content > .active, +.pill-content > .active { + display: block; +} + +.tabs-below { + > .nav-tabs { + border-top: 1px solid #ddd; + + > li { + margin-top: -1px; + margin-bottom: 0; + + > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; + + &:hover, &:focus { + border-top-color: #ddd; + border-bottom-color: transparent; + } + } + } + > .active a { + &, &:hover, &:focus { + border-color: transparent #ddd #ddd #ddd; + } + } + } +} + +.tabs-left, .tabs-right { + > .nav-tabs > li { + float: none; + + > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; + } + } +} + +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; + + > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; + + &:hover, &:focus { + border-color: #eee #ddd #eee #eee; + } + } + + > .active a { + &, &:hover, &:focus { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #fff; + } + } +} + +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; + + > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; + + &:hover, &:focus { + border-color: #eee #eee #eee #ddd; + } + } + + > .active a { + &, &:hover, &:focus { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #fff; + } + } +} + +/** /Different tabs positions, which were removed from bootstrap */ + +.nav-tabs { + border-bottom: none; + background-color: #ddd; + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} + +.nav-tabs > li.with-dropdown { + > a { + padding: 0; + } + + .dropdown-toggle { + padding: 10px 15px; + display: inline-block; + cursor: pointer; + } +} + +.tab-content { + padding: 15px; + background: #ffffff; +} \ No newline at end of file diff --git a/src/sass/theme/conf/_variables.scss b/src/sass/theme/conf/_variables.scss index 2e29df8..0859fc9 100644 --- a/src/sass/theme/conf/_variables.scss +++ b/src/sass/theme/conf/_variables.scss @@ -58,6 +58,9 @@ $medium-panel-height: 400px; $extra-medium-panel-height: 550px; $large-panel-height: 974px; +$default-animation-duration: 0.2s; +$default-animation-style: ease-out; + $assets-root: '../assets/'; $images-root: $assets-root + 'img/'; $fonts-root: $assets-root + 'fonts/'; \ No newline at end of file