<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<script src="../bower_components/page/page.js"></script>
<script>
  window.addEventListener('WebComponentsReady', function() {

    // We use Page.js for routing. This is a Micro
    // client-side router inspired by the Express router
    // More info: https://visionmedia.github.io/page.js/
    page('/', function () {
      app.route = 'home';
      app.scrollPageToTop();
    });

    page('/users', function () {
      app.route = 'users';
      app.scrollPageToTop();
    });

    page('/users/:name', function (data) {
      app.route = 'user-info';
      app.params = data.params;
      app.scrollPageToTop();
    });

    page('/contact', function () {
      app.route = 'contact';
      app.scrollPageToTop();
    });

    // add #! before urls
    page({
      hashbang: true
    });

  });
</script>

<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<script src="../bower_components/page/page.js"></script>
<script>
  window.addEventListener('WebComponentsReady', function() {

    var headerPanel = document.querySelector('paper-scroll-header-panel[main]');

    // We use Page.js for routing. This is a Micro
    // client-side router inspired by the Express router
    // More info: https://visionmedia.github.io/page.js/
    page('/', function () {
      app.route = 'home';
      app.scrollPageToTop();
    });

    page('/users', function () {
      app.route = 'users';
      headerPanel.scrollToTop(false);
      headerPanel.condense(false);
    });

    page('/users/:name', function (data) {
      app.route = 'user-info';
      app.params = data.params;
      headerPanel.scrollToTop(false);
      headerPanel.condense(false);
    });

    page('/contact', function () {
      app.route = 'contact';
      headerPanel.scrollToTop(false);
      headerPanel.condense(false);
    });

    // add #! before urls
    page({
      hashbang: true
    });

  });
</script>

Enable to condense header panel in non root page
Enable to condense header panel in non root page
