Skip to content

Instantly share code, notes, and snippets.

@marcus7777
Created August 25, 2014 09:59
Show Gist options
  • Select an option

  • Save marcus7777/2090d60ce7c397c343d8 to your computer and use it in GitHub Desktop.

Select an option

Save marcus7777/2090d60ce7c397c343d8 to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="site-banner" attributes="shortname">
<template>
<style>
</style>
<link rel="stylesheet" href="../css/elements/site-banner.css"></link>
<core-media-query query="max-width: 581px" querymatches="{{isPhone}}"></core-media-query>
<template if="{{isPhone && shortname}}"></template>
<content></content>
</template>
<script>
Polymer('site-banner', {
shortname: '',
isPhone: false,
isPhoneChanged: function () {
this.parentElement.classList.toggle('mobile', this.isPhone);
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment