-
Notifications
You must be signed in to change notification settings - Fork 1
/
proline-plumbing.html
141 lines (124 loc) · 6.96 KB
/
proline-plumbing.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Dispatch Ratings for Proline Plumbing & Sewer</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="stylesheets/normalize2.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/bootstrap.min2.css">
<link rel="stylesheet" type="text/css" href="stylesheets/stylesheet2.css" media="screen">
<link rel="stylesheet" type="text/css" href="stylesheets/github-light2.css" media="screen">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- papaparse for parsing csv-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/4.1.2/papaparse.min.js"></script>
<link href="https://www.jqueryscript.net/css/jquerysctipttop.css" rel="stylesheet" type="text/css">
<link rel="icon" href="http://www.dispatch.me/favicon.ico">
<!-- extra style -->
<style type="text/css">
#container {
margin-left: auto;
margin-right: auto;
width: 100%;
}
</style>
</head>
<body>
<div class="top-branding">
<img src="images/top_logo.png" alt="dispatch ratings" class="img-responsive center-block">
</div>
<div class="header-section">
<div class="container">
<div class="header-box" itemscope itemtype="http://schema.org/LocalBusiness">
<div class="dispatch-banner">
<img src="https://scontent-iad3-1.xx.fbcdn.net/t31.0-8/14543780_193424687760434_8162494343516267082_o.jpg" alt="airmax" class="img-responsive" style="width:100%" style="max-height:300px">
</div>
<div class="header-info clearfix">
<div class="dispatch-logo pull-left">
<img itemprop="logo" src="https://scontent-iad3-1.xx.fbcdn.net/v/t1.0-9/14495525_193423527760550_8578829941784927991_n.jpg?oh=e24083d0160cb0408468a448a21d863f&oe=58977583" class="img-responsive center-block" style="width:150px" style=”height:150px”>
<div class="ratings-container text-center">
<div class="ratings">
<span class="active">1</span>
<span class="active">2</span>
<span class="active">3</span>
<span class="active">4</span>
<span>5</span>
</div>
<span class="ratings-count"><span class="review-count-number"></span> Reviews</span>
</div>
</div>
<div class="dispatch-info pull-left">
<h1><a href="#" itemprop="url" itemprop="name">Proline Plumbing & Sewer</a></h1>
<h2 class="tagline">Proudly serving the Vancouver-Portland area! </h2>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress">2918 NW 31st Avenue </span>
<span itemprop="addressLocality">Camas</span>
<span itemprop="addressRegion">WA</span>
<span itemprop="telephone">8773762713</span>
</div>
<span class="dispatch-desc" itemprop="description">
24/7 Plumbing and Drain Cleaning
</span>
</div>
<div class="dispatch-cta pull-left">
<button class="btn btn-lg btn-block btn-cta" onClick="window.open('https://www.facebook.com/ProlinePlumbing/')">Contact Us</button>
</div>
</div>
</div>
</div>
</div>
<section class="main-content">
<!-- where the content will go -->
<div id="container"></div>
<script>
var bgColors = [ '#FE9496', '#94C2FC', '#82E48F', '#E6CA84'];
function randomBg() {
var index = Math.floor(Math.random() * (bgColors.length));
return bgColors[index];
}
$.get('https://www.periscopedata.com/api/dispatch/chart/csv/dc22c5f8-c627-19f5-7b47-278efbd0a931', function(data) {
var html = "";
Papa.parse(data, {
complete:function(results) {
$('.review-count-number').html(results.data.length - 2)
results.data.forEach(function(columns, index){
//hide for 1st row and last where theres no data
if(index != results.data.length - 1 && index != 0 ) {
// templating
html += "<div class='review-row clearfix'>";
html += "<div class='avatar pull-left'><span class='initials' style='background-color:" + randomBg() +"'>"+ columns[3][0] + '' + columns[4][0] +"</span></div>";
html += "<div class='review-wrap pull-left'>";
html += "<div class='review-box clearfix' itemscope itemtype='http://schema.org/Review'>";
html += "<div itemprop='itemReviewed' class='item-name' itemscope itemtype='http://schema.org/LocalBusiness'>";
html += "<span itemprop='name'>"+ columns[0] +"</span></div>";
html += "<div class='review-header clearfix'>";
html += "<div class='ratings inline-block'><span class='" + (columns[0] > 1 ? 'active' : '') +"'></span><span class='" + (columns[0] > 2 ? 'active' : '') +"'></span><span class='" + (columns[0] > 3 ? 'active' : '') +"'></span><span class='" + (columns[0] >= 4 ? 'active' : '') +"'></span><span class='" + (columns[0] >= 5 ? 'active' : '') +"'></span></div>";
html += "<div itemprop='author' class='inline-block font-18' itemscope='' itemtype='http://schema.org/Person'>";
html += " <span itemprop='name'>"+ columns[3] + " "+ columns[4][0] + "." + "</span></div>";
html += "<div class='inline-block review-date pull-right font-18'>";
html += "<time itemprop='datePublished' datetime='" + columns[2] +"'></time><span>" + columns[2] +"</span></div></div>";
html += "<div class='font-16' itemprop='reviewRating' itemscope='' itemtype='http://schema.org/Rating'>";
html += "<span class='hidden' itemprop='ratingValue'>" + columns[0] +"</span>";
html += "<span itemprop='description'>" + columns[1] +"</span>";
html +="</div></div></div></div>";
}
});
}
});
// insert into div
$('#container').append(html);
});
</script>
<footer class="site-footer">
<span class="site-footer-owner">Powered by <a href="http://dispatch.me">Dispatch</a>.</span>
</footer>
</section>
</body>
</html>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-44476010-14', 'auto');
ga('send', 'pageview');
</script>