-
Notifications
You must be signed in to change notification settings - Fork 1
/
allstar-plumbin.html
141 lines (124 loc) · 6.94 KB
/
allstar-plumbin.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 Allstar Plumbing Services</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://static.wixstatic.com/media/1d16be_5d8024ff63604ea4867b0f6f2f1664a4.jpg/v1/fill/w_1397,h_437,al_c,q_85/1d16be_5d8024ff63604ea4867b0f6f2f1664a4.webp" 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="images/logo-default.png" 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">Allstar Plumbing Services</a></h1>
<h2 class="tagline">One of The Best In The League!</h2>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress">3620 Kennesaw North Industrial Pkwy </span>
<span itemprop="addressLocality">Kennesaw</span>
<span itemprop="addressRegion">GA</span>
<span itemprop="telephone">770-425-4524</span>
</div>
<span class="dispatch-desc" itemprop="description">
Over 30 years experience...We can handle any and all plumbing problems.
</span>
</div>
<div class="dispatch-cta pull-left">
<button class="btn btn-lg btn-block btn-cta" onClick="window.open('http://www.allstarplumbingservices.net/')">Home</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/6ed1a6b2-3745-8199-c5e8-7ff6d06a84b6', 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>