mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
bar
This commit is contained in:
@@ -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%);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
<ion-view [view-title]="attrTitle + '!!!'">
|
||||
<ion-view>
|
||||
|
||||
<ion-nav-title>
|
||||
NAV Title <button (click)></button>
|
||||
</ion-nav-title>
|
||||
<!-- <ion-view-title>
|
||||
ele Title
|
||||
</ion-view-title>
|
||||
|
||||
<!-- <ion-nav-buttons side="left">
|
||||
<button>left</button>
|
||||
</ion-nav-buttons> -->
|
||||
<ion-view-buttons side="primary">
|
||||
<button>p1</button>
|
||||
<button>p2</button>
|
||||
<button>p3</button>
|
||||
</ion-view-buttons>
|
||||
|
||||
<ion-view-buttons side="secondary">
|
||||
<button>s1</button>
|
||||
</ion-view-buttons> -->
|
||||
|
||||
<ion-content>
|
||||
CONTENT!!
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -22,4 +22,5 @@
|
||||
"../modal/modal",
|
||||
"../sidemenu/sidemenu",
|
||||
"../switch/switch",
|
||||
"../tabs/tabs";
|
||||
"../tabs/tabs",
|
||||
"../tool-bar/tool-bar";
|
||||
|
||||
46
src/components/tool-bar/tool-bar.scss
Normal file
46
src/components/tool-bar/tool-bar.scss
Normal file
@@ -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;*/
|
||||
}
|
||||
18
src/components/view/content.js
Normal file
18
src/components/view/content.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import {NgElement, Component, Template} from 'angular2/angular2';
|
||||
import {Ion} from '../ion';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'ion-content'
|
||||
})
|
||||
@Template({
|
||||
inline: `
|
||||
<div class="scroll-content">
|
||||
<content></content>
|
||||
</div>`
|
||||
})
|
||||
export class Content extends Ion {
|
||||
constructor(@NgElement() ele:NgElement) {
|
||||
ele.domElement.classList.add('content');
|
||||
}
|
||||
}
|
||||
@@ -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: `
|
||||
<div class="container">
|
||||
<div class="tool-bar">
|
||||
<div class="title">
|
||||
{{title}}
|
||||
<content select="ion-nav-title"></content>
|
||||
</div>
|
||||
</div>
|
||||
<content></content>
|
||||
</div>`
|
||||
})
|
||||
export class View extends Ion {
|
||||
constructor(@NgElement() ele:NgElement) {
|
||||
ele.domElement.classList.add('view');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'ion-content'
|
||||
})
|
||||
@Template({
|
||||
inline: `
|
||||
<div class="scroll-content">
|
||||
<content></content>
|
||||
</div>`
|
||||
})
|
||||
export class Content extends Ion {
|
||||
constructor(@NgElement() ele:NgElement) {
|
||||
console.log('content!')
|
||||
ele.domElement.classList.add('content');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user