From 4b5301f02ffd356c3332460e059f3b973cb3a9a2 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 19 Mar 2015 15:58:12 -0500 Subject: [PATCH] bar --- playground/layouts/view.css | 25 +-------------- playground/views/main.html | 20 ++++++++---- playground/views/main.js | 6 ++-- src/components/app/_scaffolding.scss | 12 ------- src/components/app/ionic.scss | 3 +- src/components/tool-bar/tool-bar.scss | 46 +++++++++++++++++++++++++++ src/components/view/content.js | 18 +++++++++++ src/components/view/view.js | 43 ------------------------- 8 files changed, 83 insertions(+), 90 deletions(-) create mode 100644 src/components/tool-bar/tool-bar.scss create mode 100644 src/components/view/content.js delete mode 100644 src/components/view/view.js diff --git a/playground/layouts/view.css b/playground/layouts/view.css index 4bf90f3d7e..9af76fd998 100644 --- a/playground/layouts/view.css +++ b/playground/layouts/view.css @@ -2,38 +2,15 @@ body { text-align: center; } -.tool-bar button { - /*position: absolute; - right: 0;*/ -} - .tab-bar .tab-item { color: blue; } -.tool-bar { +.bar { min-height: 50px; background: linear-gradient(45deg, #4c4c4c 0%,#595959 12%,#666666 25%,#474747 39%,#2c2c2c 50%,#000000 51%,#111111 60%,#2b2b2b 76%,#1c1c1c 91%,#131313 100%); color: white; } - -.nav-bar { - display: -webkit-box; - display: -webkit-flex; - display: -moz-box; - display: -moz-flex; - display: -ms-flexbox; - display: flex; - - -webkit-justify-content: center; - -webkit-align-items: center; -} - -.nav-bar > .nav-item { - -webkit-flex: 1; - max-width: 120px; -} - .view > .container > .content { background: linear-gradient(135deg, #f2f6f8 0%,#d8e1e7 50%,#b5c6d0 51%,#e0eff9 100%); } diff --git a/playground/views/main.html b/playground/views/main.html index bf128ce460..64e8ccc4b6 100644 --- a/playground/views/main.html +++ b/playground/views/main.html @@ -1,12 +1,18 @@ - + - - NAV Title - + + + + + + + + + + --> CONTENT!! diff --git a/playground/views/main.js b/playground/views/main.js index d64cfb482d..7df8dc2cf2 100644 --- a/playground/views/main.js +++ b/playground/views/main.js @@ -1,6 +1,7 @@ import {bootstrap} from 'angular2/core'; import {Component, Template} from 'angular2/angular2'; -import {View, Content} from 'ionic/components/view/view'; +import {View} from 'ionic/components/view/view'; +import {Content} from 'ionic/components/view/content'; @Component({ selector: '[ion-app]' }) @@ -10,8 +11,7 @@ import {View, Content} from 'ionic/components/view/view'; }) class IonicApp { constructor() { - console.log('IonicApp Start'); - this.attrTitle = 'banana title'; + console.log('IonicApp Start') } } diff --git a/src/components/app/_scaffolding.scss b/src/components/app/_scaffolding.scss index 36728b31b9..16af418664 100644 --- a/src/components/app/_scaffolding.scss +++ b/src/components/app/_scaffolding.scss @@ -27,18 +27,6 @@ html { width: 100%; } - .tool-bar { - display: block; - } - - .tool-bar-top { - @include flex-order(20); - } - - .tool-bar-bottom { - @include flex-order(80); - } - .view > .container { position: relative; overflow: hidden; diff --git a/src/components/app/ionic.scss b/src/components/app/ionic.scss index 1e1c60dd36..8510edc05a 100644 --- a/src/components/app/ionic.scss +++ b/src/components/app/ionic.scss @@ -22,4 +22,5 @@ "../modal/modal", "../sidemenu/sidemenu", "../switch/switch", - "../tabs/tabs"; + "../tabs/tabs", + "../tool-bar/tool-bar"; diff --git a/src/components/tool-bar/tool-bar.scss b/src/components/tool-bar/tool-bar.scss new file mode 100644 index 0000000000..b2979ae9e1 --- /dev/null +++ b/src/components/tool-bar/tool-bar.scss @@ -0,0 +1,46 @@ + +.bar { + position: relative; + @include flex-display(); + @include flex-direction(row); + @include flex-align-items(center); + @include flex-justify-content(space-between); +} + +.bar-top { + @include flex-order(20); +} + +.bar-bottom { + @include flex-order(80); +} + +.bar > .title { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + @include flex-display(); + display:none; +} + +.bar > .title > .inner-title { + /*text-align: center; + @include flex-align-self(center);*/ +} + +.bar-accessories { + @include flex(1); + @include flex-display(); + @include flex-justify-content(space-between); +} + +.bar > .accessory-primary { + /*@include flex-align-self(flex-start);*/ +} + +.bar > .accessory-secondary { + /*@include flex-align-self(flex-end);*/ + /*display:none;*/ +} diff --git a/src/components/view/content.js b/src/components/view/content.js new file mode 100644 index 0000000000..4d2d34b564 --- /dev/null +++ b/src/components/view/content.js @@ -0,0 +1,18 @@ +import {NgElement, Component, Template} from 'angular2/angular2'; +import {Ion} from '../ion'; + + +@Component({ + selector: 'ion-content' +}) +@Template({ + inline: ` +
+ +
` +}) +export class Content extends Ion { + constructor(@NgElement() ele:NgElement) { + ele.domElement.classList.add('content'); + } +} diff --git a/src/components/view/view.js b/src/components/view/view.js deleted file mode 100644 index f14397828c..0000000000 --- a/src/components/view/view.js +++ /dev/null @@ -1,43 +0,0 @@ -import {NgElement, Component, Template} from 'angular2/angular2'; -import {Ion} from '../ion'; - -@Component({ - selector: 'ion-view', - bind: { - title: 'view-title' - } -}) -@Template({ - inline: ` -
-
-
- {{title}} - -
-
- -
` -}) -export class View extends Ion { - constructor(@NgElement() ele:NgElement) { - ele.domElement.classList.add('view'); - } -} - - -@Component({ - selector: 'ion-content' -}) -@Template({ - inline: ` -
- -
` -}) -export class Content extends Ion { - constructor(@NgElement() ele:NgElement) { - console.log('content!') - ele.domElement.classList.add('content'); - } -}