mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 22:17:40 +08:00
docs(header): update header markup
This commit is contained in:
@ -33,7 +33,9 @@ import {MenuController} from './menu-controller';
|
|||||||
* the `<ion-buttons>` element:
|
* the `<ion-buttons>` element:
|
||||||
*
|
*
|
||||||
* ```html
|
* ```html
|
||||||
* <ion-navbar *navbar>
|
* <ion-header>
|
||||||
|
*
|
||||||
|
* <ion-navbar>
|
||||||
* <ion-buttons start>
|
* <ion-buttons start>
|
||||||
* <button>
|
* <button>
|
||||||
* <ion-icon name="contact"></ion-icon>
|
* <ion-icon name="contact"></ion-icon>
|
||||||
@ -51,6 +53,8 @@ import {MenuController} from './menu-controller';
|
|||||||
* </button>
|
* </button>
|
||||||
* </ion-buttons>
|
* </ion-buttons>
|
||||||
* </ion-navbar>
|
* </ion-navbar>
|
||||||
|
*
|
||||||
|
* </ion-header>
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Similar to `<ion-buttons>`, the `menuToggle` can be positioned using
|
* Similar to `<ion-buttons>`, the `menuToggle` can be positioned using
|
||||||
|
@ -62,12 +62,16 @@ class ToolbarBackground {
|
|||||||
/**
|
/**
|
||||||
* @name Navbar
|
* @name Navbar
|
||||||
* @description
|
* @description
|
||||||
* Navbar is a global level toolbar that gets updated every time a page gets
|
* Navbar acts as the navigational toolbar, which also comes with a back
|
||||||
* loaded. You can pass the navbar an `ion-title`, any number of buttons, a segment, or a searchbar.
|
* button. A navbar can contain a `ion-title`, any number of buttons,
|
||||||
|
* a segment, or a searchbar. Navbars must be placed within an
|
||||||
|
* `<ion-header>` in order for them to be placed above the content.
|
||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```html
|
* ```html
|
||||||
* <ion-navbar *navbar>
|
* <ion-header>
|
||||||
|
*
|
||||||
|
* <ion-navbar>
|
||||||
* <button menuToggle>
|
* <button menuToggle>
|
||||||
* <ion-icon name="menu"></ion-icon>
|
* <ion-icon name="menu"></ion-icon>
|
||||||
* </button>
|
* </button>
|
||||||
@ -82,6 +86,8 @@ class ToolbarBackground {
|
|||||||
* </button>
|
* </button>
|
||||||
* </ion-buttons>
|
* </ion-buttons>
|
||||||
* </ion-navbar>
|
* </ion-navbar>
|
||||||
|
*
|
||||||
|
* </ion-header>
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @demo /docs/v2/demos/navbar/
|
* @demo /docs/v2/demos/navbar/
|
||||||
@ -221,9 +227,6 @@ export class Navbar extends ToolbarBase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* Used to find and register headers in a view, and this directive's
|
|
||||||
* content will be moved up to the common navbar location, and created
|
|
||||||
* using the same context as the view's content area.
|
|
||||||
*/
|
*/
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: 'template[navbar]'
|
selector: 'template[navbar]'
|
||||||
|
@ -14,9 +14,11 @@ import {Toolbar} from './toolbar';
|
|||||||
*
|
*
|
||||||
* ```html
|
* ```html
|
||||||
* <ion-header>
|
* <ion-header>
|
||||||
|
*
|
||||||
* <ion-navbar>
|
* <ion-navbar>
|
||||||
* <ion-title>Tab 1</ion-title>
|
* <ion-title>Settings</ion-title>
|
||||||
* </ion-navbar>
|
* </ion-navbar>
|
||||||
|
*
|
||||||
* </ion-header>
|
* </ion-header>
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
@ -24,14 +26,16 @@ import {Toolbar} from './toolbar';
|
|||||||
*
|
*
|
||||||
* ```html
|
* ```html
|
||||||
* <ion-header>
|
* <ion-header>
|
||||||
|
*
|
||||||
* <ion-navbar>
|
* <ion-navbar>
|
||||||
* <ion-title>Tab 1</ion-title>
|
* <ion-title>Main Heder</ion-title>
|
||||||
* </ion-navbar>
|
* </ion-navbar>
|
||||||
* </ion-header>
|
|
||||||
*
|
*
|
||||||
* <ion-toolbar>
|
* <ion-toolbar>
|
||||||
* <ion-title>Subheader</ion-title>
|
* <ion-title>Subheader</ion-title>
|
||||||
* </ion-toolbar>
|
* </ion-toolbar>
|
||||||
|
*
|
||||||
|
* </ion-header>
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @demo /docs/v2/demos/title/
|
* @demo /docs/v2/demos/title/
|
||||||
|
@ -108,8 +108,9 @@ export class ToolbarBase extends Ion {
|
|||||||
* @description
|
* @description
|
||||||
* A Toolbar is a generic bar that is positioned above or below content.
|
* A Toolbar is a generic bar that is positioned above or below content.
|
||||||
* Unlike a [Navbar](../../nav/Navbar), a toolbar can be used as a subheader.
|
* Unlike a [Navbar](../../nav/Navbar), a toolbar can be used as a subheader.
|
||||||
* Toolbars are positioned automatically at the `top`, but they can be
|
* When toolbars are placed within an `<ion-header>` or `<ion-footer>`,
|
||||||
* positioned at the bottom by setting `position="bottom"` on the component.
|
* they stay fixed in their respective location. When placed within
|
||||||
|
* `<ion-content>`, toolbars will scroll with the content.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* ### Buttons in a Toolbar
|
* ### Buttons in a Toolbar
|
||||||
@ -132,6 +133,8 @@ export class ToolbarBase extends Ion {
|
|||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```html
|
* ```html
|
||||||
|
* <ion-header>
|
||||||
|
*
|
||||||
* <ion-toolbar>
|
* <ion-toolbar>
|
||||||
* <ion-buttons start>
|
* <ion-buttons start>
|
||||||
* <button>
|
* <button>
|
||||||
@ -148,9 +151,21 @@ export class ToolbarBase extends Ion {
|
|||||||
* <ion-title>I'm a subheader</ion-title>
|
* <ion-title>I'm a subheader</ion-title>
|
||||||
* </ion-toolbar>
|
* </ion-toolbar>
|
||||||
*
|
*
|
||||||
* <ion-content></ion-content>
|
* <ion-header>
|
||||||
*
|
*
|
||||||
* <ion-toolbar position="bottom">
|
*
|
||||||
|
* <ion-content>
|
||||||
|
*
|
||||||
|
* <ion-toolbar>
|
||||||
|
* <ion-title>Scrolls with the content</ion-title>
|
||||||
|
* </ion-toolbar>
|
||||||
|
*
|
||||||
|
* </ion-content>
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* <ion-footer>
|
||||||
|
*
|
||||||
|
* <ion-toolbar>
|
||||||
* <ion-title>I'm a subfooter</ion-title>
|
* <ion-title>I'm a subfooter</ion-title>
|
||||||
* <ion-buttons right>
|
* <ion-buttons right>
|
||||||
* <button>
|
* <button>
|
||||||
@ -159,7 +174,7 @@ export class ToolbarBase extends Ion {
|
|||||||
* </ion-buttons>
|
* </ion-buttons>
|
||||||
* </ion-toolbar>
|
* </ion-toolbar>
|
||||||
*
|
*
|
||||||
* <ion-toolbar position="bottom">
|
* <ion-toolbar>
|
||||||
* <ion-title>I'm a footer</ion-title>
|
* <ion-title>I'm a footer</ion-title>
|
||||||
* <ion-buttons end>
|
* <ion-buttons end>
|
||||||
* <button>
|
* <button>
|
||||||
@ -170,10 +185,10 @@ export class ToolbarBase extends Ion {
|
|||||||
* </button>
|
* </button>
|
||||||
* </ion-buttons>
|
* </ion-buttons>
|
||||||
* </ion-toolbar>
|
* </ion-toolbar>
|
||||||
|
*
|
||||||
|
* </ion-footer>
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @property {any} [position] - set position of the toolbar, `top` or `bottom`.
|
|
||||||
* Default `top`.
|
|
||||||
* @demo /docs/v2/demos/toolbar/
|
* @demo /docs/v2/demos/toolbar/
|
||||||
* @see {@link ../../navbar/Navbar/ Navbar API Docs}
|
* @see {@link ../../navbar/Navbar/ Navbar API Docs}
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user