Allow big image in ion-nav-bar
Currently I am trying to get a big image (700 x 300) as a header image in my app.
I want the image to be stationary and not change per view, so I placed it in ion-nav-bar.
Yet ion-nav-bar has a set height of 44 which, as you might guess, screwed up my image.
I would like the ability to set the nav-bar as high as i want without breaking the site. Now i've hacked it so that when I load the first page, it sets the height of nav-bar to the size of my image and increases the offset of the ion-content:
$('.nav-bar').height(height);
$('head').append('<style> ion-view .scroll-content:first-of-type { top: ' + ($('.nav-bar').height() + 20) + 'px; } </style>');
I would really really love the feature. And if it is something worth adding, there are a few connected things that would be nice:
- the nav buttons should be (optionally) vertically centered
- The view title should be placeable above, over or below the image, or hidden alltogether.
Is this something worth considering?
Add a class my-bar or the like to fix this.
/* <ion-nav-bar class="my-bar"> */
.my-bar {
height: 700px;
}
/* <ion-content class="has-my-bar"> */
.has-my-bar {
top: 700px;
}
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.