From 752bb8e48a1fdc3eb2d3eb1dceb4350a1813c15e Mon Sep 17 00:00:00 2001 From: Vladimir Lugovsky Date: Tue, 22 Dec 2015 19:20:05 +0300 Subject: [PATCH] feat(tabs): Tabs and accordion --- gulp/server.js | 3 +- src/app/pages/tabs/tabs.html | 136 ++++++++++++++++++++++----- src/sass/app/_tabsPage.scss | 5 + src/sass/theme/components/_tabs.scss | 129 +++++++++++++++++++++++++ 4 files changed, 251 insertions(+), 22 deletions(-) create mode 100644 src/sass/app/_tabsPage.scss create mode 100644 src/sass/theme/components/_tabs.scss 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/pages/tabs/tabs.html b/src/app/pages/tabs/tabs.html index 023d204..dd1259f 100644 --- a/src/app/pages/tabs/tabs.html +++ b/src/app/pages/tabs/tabs.html @@ -1,32 +1,126 @@
- - - + + +

+ 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 + + + +

- 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. + 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.

+
+

- 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. -

- - - Hellooooo - - - - Alert! - - I've got an HTML heading, and a select callback. Pretty cool! - - - +
+
+
+
+
+ + +

+ 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.

+
+
+
+
+
+
+ + + 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/sass/app/_tabsPage.scss b/src/sass/app/_tabsPage.scss new file mode 100644 index 0000000..14ec79d --- /dev/null +++ b/src/sass/app/_tabsPage.scss @@ -0,0 +1,5 @@ +.tabset-group { + > div { + margin-top: 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..38a62bb --- /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: 10px 15px; + background: #ffffff; +} \ No newline at end of file