A bunch of misc web stuff.
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
<link rel="import" href="../bower_components/polymer/polymer.html">
|
||||
<link rel="import" href="../bower_components/paper-item/paper-item.html">
|
||||
|
||||
<polymer-element name="xinu-email-unread" attributes="boxes" noscript>
|
||||
<template>
|
||||
<style>
|
||||
<link rel="import" href="../bower_components/iron-flex-layout/iron-flex-layout.html">
|
||||
<dom-module id="xinu-email-unread">
|
||||
<style>
|
||||
/* TODO(polyup): For speed, consider reworking these styles with .classes
|
||||
and #ids rather than [attributes].
|
||||
*/
|
||||
[layout] {
|
||||
@apply(--layout);
|
||||
}
|
||||
[layout][horizontal] {
|
||||
@apply(--layout-horizontal);
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
@@ -20,16 +31,26 @@
|
||||
}
|
||||
*/
|
||||
</style>
|
||||
<template>
|
||||
|
||||
<template repeat="{{box in boxes}}">
|
||||
<template is="dom-repeat" items="{{boxes}}" as="box">
|
||||
<paper-item>
|
||||
<a href="#{{box.name}}" target="_self">
|
||||
<div horizontal layout>
|
||||
<div flex>{{box.name}}</div>
|
||||
<div end>{{box.count}}</div>
|
||||
<a target="_self" href$="{{computeHref(box)}}">
|
||||
<div horizontal="" layout="">
|
||||
<div flex="">{{box.name}}</div>
|
||||
<div end="">{{box.count}}</div>
|
||||
</div>
|
||||
</a>
|
||||
</paper-item>
|
||||
</template>
|
||||
</template>
|
||||
</polymer-element>
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'xinu-email-unread',
|
||||
properties: { boxes: { notify: true } },
|
||||
computeHref: function (box) {
|
||||
return '#' + box.name;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</dom-module>
|
||||
|
||||
Reference in New Issue
Block a user