-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
82 lines (53 loc) · 1.83 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!doctype html>
<html>
<head>
<title>Grocery List</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<link href="assets/css/style.css" rel="stylesheet" type="text/css">
<script src="bower_components/platform/platform.js"></script>
<link rel="import" href="bower_components/core-header-panel/core-header-panel.html">
<link rel="import" href="bower_components/core-toolbar/core-toolbar.html">
<link rel="import" href="bower_components/paper-tabs/paper-tabs.html">
<link rel="import" href="bower_components/paper-checkbox/paper-checkbox.html">
<link rel="import" href="grocery-item.html">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
</head>
<body unresolved touch-action="auto">
<core-header-panel>
<core-toolbar>
<paper-tabs id="tabs" selected="list" valueattr="name" self-end>
<paper-tab name="list">GROCERY LIST</paper-tab>
<paper-tab name="buy" on-tap="{{showToBuy}}">TO BUY</paper-tab>
<paper-tab name="purchased" on-tap="{{showPurchased}}">PURCHASED</paper-tab>
</paper-tabs>
</core-toolbar>
<div class="container" show="list" layout vertical center>
<div class="main-header">
<h2>Grocery List</h2>
<p>Using Polymer & Web Components</p>
</div>
<grocery-item>
<h3>Bread</h3>
</grocery-item>
<grocery-item>
<h3>Apples</h3>
</grocery-item>
<grocery-item>
<h3>Soup</h3>
</grocery-item>
</div>
</core-header-panel>
<script>
Polymer('grocery-item', {
showPurchased: function(event, detail, sender) {
this.show("purchased");
}
});
var tabs = document.querySelector('paper-tabs');
var list = document.querySelector('div');
tabs.addEventListener('core-select', function() {
list.show = tabs.selected;
});
</script>
</body>
</html>