I'm pretty new to Polymer, and am developing a small Web-App to display staff members who have entered or exited the building using their electronic tags.
Currently, they are all displaying in a list, with text that says "Entered at hh:mm" or "Exited at hh:mm".
I would like to be able to grey out the avatar and reduce the elevation of the "staff-card" element.
I have a my-list element that uses iron-ajax to acquire the data and then a dom-repeat template which iterates through and displays a staff-card.
<iron-ajax
auto
url="../../api/database.json"
handle-as="json"
last-response="{{ajaxData}}"
debounce-duration="300">
</iron-ajax>
<template is="dom-repeat" items="[[ajaxData]]">
<staff-card>
<img src="{{computeAvatar()}}">
<h2>{{item.FirstName}} {{item.Surname}}</h2>
<p>{{setLocation(item.lastknownlocation)}} {{prettyTime(item.LastAccessTime.date)}}</p>
</staff-card>
</template>
My staff-card element looks like this:
<paper-material elevation="2">
<div class="card-header" layout horizontal center>
<content select="img"></content>
<content select="h2"></content>
<content select="p"></content>
</div>
<div style="clear:both;"></div>
</paper-material>
So, if the item.lastknownlocation is "outside" I want to reduce the elevation of the paper-material in my staff-card and set the img to be grayscale. (I have the css for this, just not the means to apply it)