Skip to content

Instantly share code, notes, and snippets.

@c0d3rm0nk3y
Created July 2, 2014 16:10
Show Gist options
  • Save c0d3rm0nk3y/b0f0ee0cf95a95471f37 to your computer and use it in GitHub Desktop.
Save c0d3rm0nk3y/b0f0ee0cf95a95471f37 to your computer and use it in GitHub Desktop.
designer
<link rel="import" href="../paper-progress/paper-progress.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="x-news-card">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
box-sizing: border-box;
}
#core_card {
position: absolute;
width: 300px;
height: 300px;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 2px;
box-shadow: rgba(0, 0, 0, 0.0980392) 0px 2px 4px, rgba(0, 0, 0, 0.0980392) 0px 0px 3px;
left: 0px;
top: 0px;
background-color: rgb(255, 255, 255);
}
#paper_progress {
margin: 25px 0px;
}
#word {
margin: 35px;
}
</style>
<core-card id="core_card" layout vertical center>
<h1 id="newsTitle">{{ theTitle }}</h1>
<h3 id="newsAuthor">{{ theAuthor }}</h3>
<p id="word">{{ word }}</p>
<div id="controlContainer" layout vertical center>
<paper-progress value="35" ratio="35" id="paper_progress"></paper-progress>
<div id="btnContainer" layout horizontal center-justified>
<paper-button label="Play" id="btnTogglePlay"></paper-button>
<paper-button label="Faster" id="btnFaster"></paper-button>
<paper-button label="Slower" id="btnSlower"></paper-button>
</div>
</div>
</core-card>
</template>
<script>
Polymer('x-news-card', {
theTitle: 'title',
theAuthor: 'author',
word: 'word',
link: '',
attributeChanged: function (attrName, oldVal, newVal) {
//var newVal = this.getAttribute(attrName);
console.log(attrName, 'old: ' + oldVal, 'new:', newVal);
}
});
</script>
</polymer-element>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment