Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit 98d433b

Browse files
committed
first draft of contacts address card
1 parent c9bcbbf commit 98d433b

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

dfreedm/polymer-ui-address/index.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Polymer UI Address</title>
6+
<script src="../../../polymer/polymer.js"></script>
7+
<link rel="import" href="polymer-ui-address.html">
8+
</head>
9+
<body>
10+
<polymer-ui-address first="Dan" last="Freedman">
11+
<img src="photo.jpg" alt="">
12+
</polymer-ui-address>
13+
</body>
14+
</html>

dfreedm/polymer-ui-address/photo.jpg

3.85 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!--
2+
Copyright 2013 The Polymer Authors. All rights reserved.
3+
Use of this source code is governed by a BSD-style
4+
license that can be found in the LICENSE file.
5+
-->
6+
7+
<polymer-element name="polymer-ui-address" attributes="first last">
8+
<template>
9+
<style>
10+
/* Copied from polymer-ui-card */
11+
@host {
12+
* {
13+
display: inline-block;
14+
background-color: #fff;
15+
border-radius: 2px;
16+
box-shadow: rgba(0, 0, 0, 0.098) 0 2px 4px, rgba(0, 0, 0, 0.098) 0 0 3px;
17+
height: 48px;
18+
width: 152px;
19+
}
20+
}
21+
22+
/* @polyfill > img */
23+
#pic::content img {
24+
display: inline-block;
25+
border-radius: 100%;
26+
height: 40px;
27+
margin: 4px;
28+
}
29+
30+
#name {
31+
font-family: 'Helvetica Neue', 'Roboto', 'Arial';
32+
height: 48px;
33+
line-height: 48px;
34+
margin-left: 8px;
35+
overflow: hidden;
36+
position: absolute;
37+
text-overflow: ellipsis;
38+
white-space: nowrap;
39+
width: 88px;
40+
}
41+
</style>
42+
<content id="pic" select="img"></content>
43+
<span id="name">{{first}} {{last}}</span>
44+
</template>
45+
<script>
46+
Polymer('polymer-ui-address', {
47+
});
48+
</script>
49+
</polymer-element>

0 commit comments

Comments
 (0)