app-logo.html 1.1 KB
<style is="custom-style">
  * {
    --app-logo-color: var(--primary-text-color);
    --app-logo-font-size: 20px;
  }
</style>

<dom-module id="app-logo">
  <style>
    :host {
      font-size: var(--app-logo-font-size);
    }

    a {
      max-width: 125px;
      color: var(--app-logo-color);
      text-transform: none;
      text-decoration: none;
    }

    :host([full]) a {
      max-width: 200px;
    }

    h1 {
      font-size: 18px;
      padding: 0 0 0 16px;
      font-weight: 500;
      color: #606060;
      margin: 0;
    }

    img {
      min-width: 36px;
      padding: 2px;
      box-sizing: border-box;
      margin: 6px;
    }
  </style>
  <template>
    <a href="/" is="pushstate-anchor" class="horizontal layout center">
      <img src="/images/polymer.svg" width="36" alt="Polymer Logo">
      <h1 hidden$="[[!full]]">Polymer Catalog</h1>
      <h1 hidden$="[[full]]">Catalog</h1>
    </a>
  </template>
</dom-module>

<script>
  Polymer({
    is: 'app-logo',
    enableCustomStyleProperties: true,
    properties: {
      full: {
        type: Boolean,
        value: false
      }
    }
  });
</script>