mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(demos): clean up item sliding demo to simplify it
removed the toolbar styling and the reorder so it is just sliding. references #7547
This commit is contained in:
@@ -10,43 +10,9 @@ import { ionicBootstrap, ItemSliding, ToastController } from 'ionic-angular';
|
||||
class ApiDemoPage {
|
||||
chats: any[];
|
||||
logins: any[];
|
||||
editButton: string = 'Edit';
|
||||
editing: boolean = false;
|
||||
|
||||
constructor(private toastCtrl: ToastController) {
|
||||
this.chats = [
|
||||
{
|
||||
img: './avatar-cher.png',
|
||||
name: 'Cher',
|
||||
message: 'Ugh. As if.',
|
||||
time: '9:38 pm'
|
||||
}, {
|
||||
img: './avatar-dionne.png',
|
||||
name: 'Dionne',
|
||||
message: 'Mr. Hall was way harsh.',
|
||||
time: '8:59 pm'
|
||||
}, {
|
||||
img: './avatar-murray.png',
|
||||
name: 'Murray',
|
||||
message: 'Excuse me, "Ms. Dione."',
|
||||
time: 'Wed'
|
||||
},
|
||||
{
|
||||
img: './avatar-cher.png',
|
||||
name: 'Cher',
|
||||
message: 'Ugh. As if.',
|
||||
time: '9:38 pm'
|
||||
}, {
|
||||
img: './avatar-dionne.png',
|
||||
name: 'Dionne',
|
||||
message: 'Mr. Hall was way harsh.',
|
||||
time: '8:59 pm'
|
||||
}, {
|
||||
img: './avatar-murray.png',
|
||||
name: 'Murray',
|
||||
message: 'Excuse me, "Ms. Dione."',
|
||||
time: 'Wed'
|
||||
},
|
||||
{
|
||||
img: './avatar-cher.png',
|
||||
name: 'Cher',
|
||||
@@ -84,15 +50,6 @@ class ApiDemoPage {
|
||||
}];
|
||||
}
|
||||
|
||||
toggleEdit() {
|
||||
this.editing = !this.editing;
|
||||
if (this.editing) {
|
||||
this.editButton = 'Done';
|
||||
} else {
|
||||
this.editButton = 'Edit';
|
||||
}
|
||||
}
|
||||
|
||||
more(item: ItemSliding) {
|
||||
console.log('More');
|
||||
item.close();
|
||||
|
||||
@@ -2,23 +2,18 @@
|
||||
|
||||
<ion-navbar>
|
||||
<ion-title>Item Sliding</ion-title>
|
||||
<ion-buttons end>
|
||||
<button (click)="toggleEdit()">{{editButton}}</button>
|
||||
</ion-buttons>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content class="outer-content" fullscreen>
|
||||
<ion-content class="outer-content">
|
||||
|
||||
<ion-list class="chat-sliding-demo" [sliding]="!editing">
|
||||
<ion-list class="chat-sliding-demo">
|
||||
<ion-list-header>
|
||||
Chats
|
||||
</ion-list-header>
|
||||
|
||||
<ion-item-group [reorder]="editing">
|
||||
|
||||
<ion-item-sliding *ngFor="let chat of chats" #item>
|
||||
<ion-item>
|
||||
<ion-avatar item-left>
|
||||
@@ -53,7 +48,6 @@
|
||||
</button>
|
||||
</ion-item-options>
|
||||
</ion-item-sliding>
|
||||
</ion-item-group>
|
||||
</ion-list>
|
||||
|
||||
<ion-list class="login-sliding-demo">
|
||||
@@ -94,36 +88,23 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.toolbar-background {
|
||||
background-color: rgba(255, 255, 255, 0.65);
|
||||
-webkit-backdrop-filter: saturate(180%) blur(20px);
|
||||
backdrop-filter: saturate(180%) blur(20px);
|
||||
}
|
||||
|
||||
svg circle {
|
||||
stroke: white;
|
||||
}
|
||||
|
||||
.downloading #download-spinner {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.downloading .download-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.chat-sliding-demo ion-note {
|
||||
font-size: 13px;
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
.chat-sliding-demo ion-item-options .button-inner {
|
||||
font-size: 14px;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.chat-sliding-demo ion-item-options ion-icon {
|
||||
padding-right: 0;
|
||||
padding-bottom: 0.3em;
|
||||
}
|
||||
|
||||
.login-sliding-demo .ion-logo-twitter {
|
||||
color: #53ACEB;
|
||||
}
|
||||
@@ -135,5 +116,4 @@
|
||||
.login-sliding-demo .ion-logo-instagram {
|
||||
color: #235D8D;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user