Advertisement
Guest User

Untitled

a guest
Oct 18th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. <style>
  2. .wr-min-damage-right-content li::before{
  3. content: "• ";
  4. color: #d52d37;
  5. font-size: 2rem;
  6. font-family: sans-serif;
  7. margin-top: 9px;
  8. margin-left:7px;
  9. height: 0px;
  10. display: block;
  11. float: left;
  12. line-height: 0.5rem;
  13. margin-right: 2.5rem;
  14. }
  15. .wr-min-damage-right-content li{
  16. list-style:none;
  17. }
  18. .readMoreLink{
  19. font-size: 1.3rem;
  20. text-decoration: underline;
  21. color: #2e449f;
  22. font-family: "din-condensed-web", "DIN Condensed Web", "din-condensed", "Gnuolane", "Impact", sans-serif;
  23. text-transform: uppercase;
  24. }
  25. .hiddenContent{
  26. display:none;
  27. }
  28.  
  29. .wrTopContent{
  30. padding-bottom: 50px;
  31. }
  32.  
  33. .summary-content{
  34. background:#3F5BAE;
  35. color:#fff;
  36. }
  37.  
  38. .summary-content h6{
  39. color: #fff;
  40. text-transform: uppercase;
  41. padding-bottom: 1px;
  42. margin-bottom: 0;
  43. font-size: 12px;
  44. line-height: 19px;
  45. font-weight:100;
  46. }
  47. .summary-content a, .summary-content p{
  48. color:#fff;
  49. }
  50.  
  51. .summary-content p{
  52. font-size:14px;
  53. margin-bottom:0;
  54. }
  55.  
  56. .summary-map-wrap h2{
  57. color: #6274be;
  58. font-size: 2rem;
  59. margin-bottom: 2rem;
  60. }
  61.  
  62. .readMoreLink:hover{
  63. cursor:pointer;
  64. text-decoration:none;
  65.  
  66. }
  67.  
  68. .summary-content strong{
  69. font-weight:normal;
  70. text-transform:uppercase;
  71. }
  72.  
  73. .summary-content .hcard-info{
  74. margin-bottom:10px;
  75. }
  76. .summary-service-available{
  77. padding-bottom:20px;
  78. }
  79. #map{
  80. height:204px;
  81. width:100%;
  82. }
  83.  
  84. #summary-map-marker{
  85. width:24px;
  86. }
  87. #summary-map-marker path {
  88. fill:#fff;
  89.  
  90. }
  91.  
  92. .mapCol{
  93. text-align:center;
  94. }
  95. .summary-map-col{
  96. padding-top:20px;
  97. padding-bottom:10px;
  98. }
  99.  
  100. .wr-national h2{
  101. line-height:31px;
  102. }
  103.  
  104. .plumbing-residential-red-block{
  105. margin-top:10px;
  106. }
  107.  
  108. .franchise-location-set .wr-min-damage-right-content li p{
  109. text-indent:-59px;
  110.  
  111. }
  112.  
  113. @media (max-width: 768px) {
  114. .summary-map-col{
  115. padding-top:10px;
  116. }
  117. .summary-content .row{
  118. background:#3F5BAE;
  119. }
  120. .mapCol{
  121. text-align:left;
  122. }
  123. .wr-desc-right-img{
  124. display:none;
  125. }
  126. }
  127. </style>
  128.  
  129. <script>
  130.  
  131. document.addEventListener("DOMContentLoaded", function(){
  132. var hiddenContentEl = document.querySelectorAll('.hiddenContent');
  133. var readMoreLink = document.querySelectorAll('.readMoreLink');
  134. var wrTechImageBlock = document.querySelector('.wr-tech-block') == null ? null : document.querySelector('.wr-tech-block');
  135. for(var i=0; i < readMoreLink.length; i++){
  136. readMoreLink[i].addEventListener('click', function(e){
  137. e.preventDefault();
  138. if(!(this.classList.contains('showing'))){
  139. this.classList.add('showing');
  140. this.previousElementSibling.style.display = 'block';
  141. this.text = 'Read Less';
  142. if(!!wrTechImageBlock) {
  143. wrTechImageBlock.classList.add('wr-tech-block-showmore')
  144. }
  145. } else {
  146. this.classList.remove('showing');
  147. this.previousElementSibling.style.display = 'none';
  148. this.text = 'Read More';
  149. if(!!wrTechImageBlock) {
  150. wrTechImageBlock.classList.remove('wr-tech-block-showmore')
  151. }
  152. }
  153. });
  154. }
  155. // restrict logic to local page
  156. var isLocalPage = document.querySelectorAll('.franchise-location-set').length > 0 ? true : false;
  157.  
  158. if(isLocalPage){
  159. // hide counties served area if empty
  160. var counties = document.getElementById('countiesServedCol').innerHTML.trim();
  161. var countiesContainer = document.getElementById('countyContainer');
  162.  
  163. if(counties == ""){
  164. countiesContainer.style.display = 'none';
  165. }
  166.  
  167. var cityName = "Cincinnati, OH";
  168. var city = "$!market";
  169. var state = "$!marketState";
  170. if (city && state) {
  171. cityName = city + ", " + state;
  172. }
  173. var geolocationUrl = "https://maps.googleapis.com/maps/api/geocode/json?address=";
  174. var geoLocationApiKey = "AIzaSyBGDTrqkNdyflKeHRGXA8SnRfuHSXz4pIM";
  175. var url = geolocationUrl + cityName + "&key=" + geoLocationApiKey;
  176.  
  177. var isMobile = (window.screen.availWidth <= 767) || (navigator.userAgent.match(/(iPod|iPhone|BlackBerry|Windows Phone|iemobile)/));
  178. if (!isMobile) {
  179. window.getGeolocation = function() {
  180. var xhr = new XMLHttpRequest();
  181. xhr.open('GET', url);
  182. xhr.onload = function () {
  183. if (xhr.status === 200) {
  184. var myLatLng = JSON.parse(xhr.responseText).results[0].geometry.location;
  185. if(window.google){
  186.  
  187. initMap(myLatLng);
  188. }
  189. }
  190. else {
  191. console.log('Request failed.');
  192. }
  193. };
  194. xhr.send();
  195. }
  196.  
  197. function initMap(myLatLng) {
  198. var map = new google.maps.Map(document.getElementById('map'), {
  199. zoom: 12,
  200. center: myLatLng
  201. });
  202.  
  203. var marker = new google.maps.Marker({
  204. position: myLatLng,
  205. map: map,
  206. });
  207. }
  208. getGeolocation();
  209.  
  210. if(!(window.google)) {
  211. var cb = function() {
  212. var scriptTag = document.createElement('script');
  213. scriptTag.setAttribute("type","text/javascript");
  214. scriptTag.setAttribute("src","https:maps.googleapis.com/maps/api/js?key=AIzaSyBGDTrqkNdyflKeHRGXA8SnRfuHSXz4pIM&callback=getGeolocation");
  215. var headerTag = document.getElementsByTagName('head')[0];
  216. headerTag.parentNode.insertBefore(scriptTag, headerTag);
  217. };
  218. var raf = requestAnimationFrame || mozRequestAnimationFrame || webkitRequestAnimationFrame || msRequestAnimationFrame;
  219. if (raf) raf(cb);
  220. else {
  221. window.addEventListener('load', cb);
  222. }
  223.  
  224. }
  225. }
  226. }
  227.  
  228. });
  229.  
  230. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement