code style
Improve example, add non-navBar condition