-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
107 lines (94 loc) · 4.53 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="pwa demo app">
<link rel="manifest" href="/manifest.json">
<title>PWA DEMO</title>
<link rel="stylesheet" type="text/css" href="resources/material-design-lite/material.red-indigo.min.css">
<script src="resources/material-design-lite/material.min.js"></script>
<meta name="apple-mobile-web-app-title" content="My demo pwa">
<meta name="application-name" content="My demo pwa">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" sizes="60x60" href="/icons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="76x76" href="/icons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="120x120" href="/icons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="152x152" href="/icons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/icons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/icons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/icons/favicon-16x16.png" sizes="16x16">
<link rel="mask-icon" href="/icons/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="/icons/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
<style>
.center{text-align:center;padding:10px;}
.mdl-card{cursor: pointer;color:#ffffff;height: 250px;background-size: cover;}
.mdl-card__title-text{color:#ffffff;background-color:rgba(0,0,0,0.5);padding:15px;position: absolute;left:0;bottom:0;width:100%;box-sizing: border-box;}
</style>
</head>
<body>
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<span class="mdl-layout-title">Car Deals</span>
<div class="mdl-layout-spacer"></div>
<nav class="mdl-navigation">
<button
onclick="location.reload()"
class="mdl-button mdl-js-button mdl-button--raised mdl-button--accent mdl-js-ripple-effect">
Refresh
</button>
</nav>
</div>
</header>
<main class="mdl-layout__content">
<div id="first-load" class="center" >
<svg fill="#f44336" height="300" viewBox="0 0 24 24" width="300" xmlns="http://www.w3.org/2000/svg">
<path d="M18.92 6.01C18.72 5.42 18.16 5 17.5 5h-11c-.66 0-1.21.42-1.42 1.01L3 12v8c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-1h12v1c0 .55.45 1 1 1h1c.55 0 1-.45 1-1v-8l-2.08-5.99zM6.5 16c-.83 0-1.5-.67-1.5-1.5S5.67 13 6.5 13s1.5.67 1.5 1.5S7.33 16 6.5 16zm11 0c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM5 11l1.5-4.5h11L19 11H5z"></path>
<path d="M0 0h24v24H0z" fill="none"></path>
</svg>
<p>Parking your car deals</p>
</div>
<div id="connection-status" class="center"></div>
<div class="mdl-grid">
</div>
<div class="center">
<button onclick="pageEvents.loadMore()" class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored mdl-js-ripple-effect">
Show more
</button>
</div>
</div>
<script id="car-card" type="text/template">
<div class="mdl-card mdl-cell mdl-cell--4-col mdl-shadow--6dp" style="background-image: url('{{image}}')"
onclick="pageEvents.loadCarPage('{{details-id}}')">
<div class="mdl-card__title">
<span class="mdl-card__title-text">{{title}} (${{price}})</span>
</div>
</div>
</script>
<script
src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="resources/es6-promise.js"></script>
<script src="resources/fetch.js"></script>
<script src="resources/system.js"></script>
<script src="resources/localforage/localforage.min.js"></script>
<script src="resources/localforage/localforage-getitems.js"></script>
<script src="resources/localforage/localforage-setitems.js"></script>
<script>
System.import('./js/app.js');
</script>
<script type="text/javascript">
x=3;
$('#showLess').click(function () {
x=(x-5<0) ? 3 : x-5;
$('.mdl-card').not(':lt('+x+')').hide();
});
</script>
</body>
</html>