Skip to content

Commit

Permalink
fix(menu): fix content going under header
Browse files Browse the repository at this point in the history
Closes #7084
  • Loading branch information
adamdbradley committed Jun 28, 2016
1 parent 4980659 commit 3cd31c3
Show file tree
Hide file tree
Showing 15 changed files with 132 additions and 72 deletions.
8 changes: 5 additions & 3 deletions demos/events/app.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ion-menu #menu [content]="content">

<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand Down
16 changes: 10 additions & 6 deletions demos/menu/app.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ion-menu [content]="content" id="menu1">

<ion-toolbar secondary>
<ion-title>Menu 1</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Menu 1</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>
<ion-list>
Expand All @@ -17,9 +19,11 @@

<ion-menu [content]="content" id="menu2">

<ion-toolbar danger>
<ion-title>Menu 2</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar danger>
<ion-title>Menu 2</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>
<ion-list>
Expand Down
8 changes: 5 additions & 3 deletions src/components/app/test/cordova/app.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ion-menu [content]="content" side="left">

<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand Down
6 changes: 6 additions & 0 deletions src/components/menu/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ ion-menu {
transform: translate3d(-9999px, 0, 0);
}

ion-menu > ion-header,
ion-menu > ion-content,
ion-menu > ion-footer {
position: relative;
}

ion-menu[side=right] {
right: 0;
left: auto;
Expand Down
22 changes: 16 additions & 6 deletions src/components/menu/test/basic/main.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ion-menu [content]="content" side="left" persistent="true" (ionDrag)="onDrag($event)" (ionOpen)="onOpen($event)" (ionClose)="onClose($event)">

<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand Down Expand Up @@ -63,14 +65,22 @@
</ion-list>
</ion-content>

<ion-footer>
<ion-toolbar secondary>
<ion-title>Footer</ion-title>
</ion-toolbar>
</ion-footer>

</ion-menu>


<ion-menu [content]="content" side="right">

<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand Down
16 changes: 10 additions & 6 deletions src/components/menu/test/disable-swipe/main.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ion-menu [content]="content" side="left">

<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand All @@ -18,9 +20,11 @@

<ion-menu [content]="content" side="right" swipeEnabled="false">

<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand Down
24 changes: 15 additions & 9 deletions src/components/menu/test/enable-disable/main.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ion-menu [content]="content" id="menu1">

<ion-toolbar secondary>
<ion-title>Menu 1</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Menu 1</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>
<ion-list>
Expand All @@ -26,9 +28,11 @@

<ion-menu [content]="content" id="menu2">

<ion-toolbar danger>
<ion-title>Menu 2</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar danger>
<ion-title>Menu 2</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>
<ion-list>
Expand All @@ -51,9 +55,11 @@

<ion-menu [content]="content" id="menu3">

<ion-toolbar primary>
<ion-title>Menu 3</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar primary>
<ion-title>Menu 3</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>
<ion-list>
Expand Down
16 changes: 10 additions & 6 deletions src/components/menu/test/multiple/main.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ion-menu [content]="content" id="menu1">

<ion-toolbar secondary>
<ion-title>Menu 1</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Menu 1</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>
<ion-list>
Expand All @@ -17,9 +19,11 @@

<ion-menu [content]="content" id="menu2">

<ion-toolbar danger>
<ion-title>Menu 2</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar danger>
<ion-title>Menu 2</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>
<ion-list>
Expand Down
16 changes: 10 additions & 6 deletions src/components/menu/test/overlay/main.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ion-menu [content]="content" id="myMenuId" type="overlay" side="left">

<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand All @@ -22,9 +24,11 @@

<ion-menu [content]="content" id="myMenuId2" type="overlay" side="right">

<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand Down
16 changes: 10 additions & 6 deletions src/components/menu/test/push/main.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ion-menu [content]="content" type="push" side="left">

<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand All @@ -22,9 +24,11 @@

<ion-menu [content]="content" type="push" side="right">

<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand Down
16 changes: 10 additions & 6 deletions src/components/menu/test/reveal/main.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ion-menu [content]="content" type="reveal">

<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand All @@ -19,9 +21,11 @@

<ion-menu [content]="content" type="reveal" side="right">

<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand Down
8 changes: 5 additions & 3 deletions src/components/nav/test/nested/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ export class Login {
@Component({
template: `
<ion-menu [content]="content">
<ion-toolbar secondary>
<ion-title>Account Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Account Menu</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<button ion-item (click)="goToProfile()">
Expand Down
16 changes: 10 additions & 6 deletions src/components/range/test/basic/main.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<ion-menu [content]="content" side="left" persistent="true">

<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Left Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand Down Expand Up @@ -64,9 +66,11 @@

<ion-menu [content]="content" side="right">

<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar danger>
<ion-title>Right Menu</ion-title>
</ion-toolbar>
</ion-header>

<ion-content>

Expand Down
8 changes: 5 additions & 3 deletions src/components/tabs/test/basic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,11 @@ export class Tab3 {
@Component({
template: `
<ion-menu [content]="content">
<ion-toolbar secondary>
<ion-title>Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Menu</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<button ion-item menuClose detail-none>
Expand Down
8 changes: 5 additions & 3 deletions src/components/tabs/test/ghost/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ class QuesaritoPage {
@Component({
template: `
<ion-menu [content]="content">
<ion-toolbar secondary>
<ion-title>Secret Menu</ion-title>
</ion-toolbar>
<ion-header>
<ion-toolbar secondary>
<ion-title>Secret Menu</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-list>
<button ion-item menuClose detail-none (click)="openPage('quesarito')">
Expand Down

0 comments on commit 3cd31c3

Please sign in to comment.