Template source: base.html

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> {% block addMetaTags %} {% endblock %} {% block titleTag %} {% endblock %} <!-- JQuery --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.js" type="text/javascript"></script> {% load static from staticfiles %} {% load loc_tags %} <!-- Static files necessary for autocomplete --> {% include 'autocomplete_light/static.html' %} <!-- Bootstrap --> <link rel="shortcut icon" type="image/png" href="{% static 'img/16x16_crop_favicon__3_.png' %}"/> <!-- <link rel="icon" href="{% static 'img/favicon.ico' %}"> --> <link rel="stylesheet" type="text/css" href="{% static 'css/font-awesome.min.css' %} "> <link rel="stylesheet" type="text/css" href="{% static 'css/bootstrap.min.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'css/style1.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'css/servicepage.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'css/footer.css' %}"> {% block loadAdditionalCSS %} {% endblock %} <script type="text/javascript" src="{% static 'autocomplete_light/autocomplete_custom.js' %}"></script> <script src="{% static 'smart-selects/admin/js/chainedfk.js' %}"></script> <!-- Start of versatilekids Zendesk Widget script --> <script>/*<![CDATA[*/window.zEmbed||function(e,t){var n,o,d,i,s,a=[],r=document.createElement("iframe");window.zEmbed=function(){a.push(arguments)},window.zE=window.zE||window.zEmbed,r.src="javascript:false",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="display: none",d=document.getElementsByTagName("script"),d=d[d.length-1],d.parentNode.insertBefore(r,d),i=r.contentWindow,s=i.document;try{o=s}catch(c){n=document.domain,r.src='javascript:var d=document.open();d.domain="'+n+'";void(0);',o=s}o.open()._l=function(){var o=this.createElement("script");n&&(this.domain=n),o.id="js-iframe-async",o.src=e,this.t=+new Date,this.zendeskHost=t,this.zEQueue=a,this.body.appendChild(o)},o.write('<body onload="document._l();">'),o.close()}("https://assets.zendesk.com/embeddable_framework/main.js","versatilekids.zendesk.com");/*]]>*/</script> <!-- End of versatilekids Zendesk Widget script --> {% block loadAdditionalHeadJS %} {% endblock %} <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> <script> if (document.location.hostname.search("www.versatilekids.com") !== -1) { (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','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-60950544-1', 'auto'); ga('send', 'pageview'); } </script> </head> <div class="global-ht big-footer"> {% with request_loc_slug=request|get_loc_slug %} <body> {% include "locations/change_location_template.html" %} <header class="header user-logged" > <div class="container-fluid"> <div class="row"> <div class="col-md-2 col-xs-12"> <a href="/"> <img id="logo" src="{% static 'img/LOGO6.png' %}"> </a> </div> <div class="col-md-7 col-md-offset-1 col-xs-12"> <div class="row"> <form role="search" method="GET" class="" id="search_form"> {% csrf_token %} <div class="col-md-5 col-sm-5 col-xs-12 header_box" id="main_search_box"> <input type="text" class="form-control" placeholder="Find dance, music, sports etc." name="q"> </div> <div class="col-md-5 col-sm-5 col-xs-12 header_box" id="location_box"> {{ "dummy" | locform }} </div> <div class="col-xs-12 col-sm-2 col-md-2"> <button class="btn btn-primary" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'SearchButton', 'eventAction': 'ButtonClickedAction', 'eventLabel': 'clickedSearchButton' });" type="submit">Search</button> </div> </form> </div> </div> <div class="col-md-2 col-xs-12"> <ul class="nav navbar-nav navbar-right"> <li class="dropdown" id="login_dropdown"> {% if user.first_name %} <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{user.first_name|slice:":10"}}<b class="caret"></b></a> {% else %} {% if user.username and user.service %} <a href="#" class="dropdown-toggle" data-toggle="dropdown" >{{user.service.service_name|slice:":10"}}<b class="caret"></b> </a> {% else %} <!-- case for admin users --> {% if user.username %} <a href="#" class="dropdown-toggle" data-toggle="dropdown" >{{user.username|slice:":10"}}<b class="caret"></b> </a> {% endif %} {% endif %} {% endif %} {% if user.username and not user.service %} <ul class="dropdown-menu" style="margin-right: 15px; background-color: #34495e;"> {% if not user %} <li><a href="/accounts/login">Sign In</a></li> {% endif %} {% if favorites.count > 0 %} <li><a href="/services/view_favorite_providers">My Favorite Providers</a></li> {% endif %} <li><a href="/accounts/profile">Account Settings</a></li> <li><a href="/accounts/logout">Log Out</a></li> </ul> {% elif user.username and user.service %} <ul class="dropdown-menu" style="background-color: #34495e;"> {% if not user %} <li><a href="/accounts/login">Sign In</a></li> {% endif %} {% if user.service.regular_service == True %} <li><a href="/dashboard/view/{{user.username}}"> Dashboard</a></li> {% endif %} <li><a href="/accounts/profile">Account Settings</a></li> <li><a href="/accounts/logout">Log Out</a></li> </ul> {% else %} <a class="def-user-link" href="/accounts/register">Sign Up </a> <a class="def-user-link" href="/accounts/login">Login </a> {% endif %} </li> </ul> </div> </div> </div> </header> <nav class="navbar navbar-default" role="navigation" style="margin-bottom: 0px; "> <div class="container-fluid"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav"> <li class="link" id="nav_home"><a href="/" title="Home">Home</a></li> <li class="link" id="nav_classproviders"><a href="/kidsactivities/all-providers/{{ request_loc_slug }}" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'ClassProvidersLink', 'eventAction': 'clickAction', 'eventLabel': 'clickedClassProvidersLink' });" title="classproviders">Browse Providers</a></li> <li class="link" id="nav_classes"><a href="/classes-camps/all/{{ request_loc_slug }}" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'ClassesAndCampsLink', 'eventAction': 'clickAction', 'eventLabel': 'clickedClassesAndCampsLink' });" title="classesandcamps">Classes and Camps</a></li> <li class="link" id="nav_events"><a href="/kidsevents/{{ request_loc_slug }}" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'EventsLink', 'eventAction': 'clickAction', 'eventLabel': 'clickedEventsLink' });" title="events">Events</a></li> {% if request.user.is_authenticated %} <li class="link" id="nav_community"><a href="/community" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'CommunityLink', 'eventAction': 'clickAction', 'eventLabel': 'clickedCommunityLink' });" title="community">Community</a></li> {% else %} <li class="link" id="nav_community"><a href="/accounts/register-redirect?next=/community" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'CommunityLink', 'eventAction': 'clickAction', 'eventLabel': 'clickedCommunityLink' });" title="community">Community</a></li> {% endif %} {% if request.user.is_authenticated %} <li class="link" id="nav_review"><a href="/write-a-review" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'WriteReviewLink', 'eventAction': 'clickAction', 'eventLabel': 'clickedWriteReviewLink' });" title="review">Write a Review</a></li> {% else %} <li class="link" id="nav_review"><a href="/accounts/register-redirect?next=/write-a-review" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'WriteReviewLink', 'eventAction': 'clickAction', 'eventLabel': 'clickedWriteReviewLink' });" title="review">Write a Review</a></li> {% endif %} <li class="link" id="nav_blog"><a href="https://blog.versatilekids.com/" onClick="ga('send', {'hitType': 'event', 'eventCategory': 'BlogLink', 'eventAction': 'clickAction', 'eventLabel': 'clickedBlogLink' });" title="blog">Blog</a></li> </ul> </div> </div> </nav> {% if messages %} <div class = 'row base-messaging'> <div class = 'col-xs-12'> {% for message in messages %} <div {% if message.tags == "success" %} class = "alert alert-success"{% endif %} {% if message.tags == "warning" %} class = "alert alert-danger"{% endif %} role="alert"> {{message}} <button type="button" class="close" data-dismiss="alert"> <span aria-hidden="true">&times;</span> <span class="sr-only">Close</span> </button> </div> {% endfor %} </div> </div> {% endif %} <div class="modal fade" id="feedback" data-keyboard="false" data-backdrop="static"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" style="font-weight:bold;">Help us make VersatileKids Better!</h4> </div> <div class="modal-body"> <p> Please take a few minutes to answer some simple questions about your experience on our website. </p> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal" id="noThanks" style="margin-top:5px">No, Thanks</button> <button type="button" class="btn btn-primary" data-dismiss="modal" id="remindMeLater" style="background-color:#68c3a3; border-color:#68c3a3;margin-top:5px;" >Remind me later</button> <a href="https://docs.google.com/forms/d/1EQ4bRb1wMgVGmORXR9L-hVmw-ER1Igjz-ceEjbhUp-k/edit?usp=sharing" class="btn btn-primary" id="sureICanHelp" target="_blank" style="margin-top:5px">Sure, I can help</a> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> {% block content %} {% endblock %} </div> {% include "footer.html" %} <script> $(document).ready(function() { cookie_or_null = (document.cookie.match(/^(?:.*;)?\s*displaySurveyModal\s*=\s*([^;]+)(?:.*)?$/)||[,null])[1] if(localStorage.getItem('popState') == 'shown' || cookie_or_null != null){ $('#feedback').modal('hide'); } else{ $('#feedback').modal('show'); } $("#noThanks").click(function(){ localStorage.setItem('popState','shown') }); //survey popup will be seen again in 24 hours $("#remindMeLater").click(function(){ var now = new Date(); //(24 hours * 3600 second in an hour) * 1000 to convert to milliseconds now.setTime(now.getTime() + (24 * 3600 * 1000)); document.cookie = "displaySurveyModal=true; expires=" + now.toUTCString() + "; path=/"; }); $("#sureICanHelp").click(function(){ localStorage.setItem('popState','shown') }); }); </script> {% if not request.user.service %} <script type="text/JavaScript"> window.zESettings = { webWidget: { contactForm: { title: { '*': 'Give Your Feedback' } }, launcher: { label: { '*': 'Feedback' } } } }; </script> {% endif %} {% with loc_name=request|get_loc%} <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="{% static 'js/bootstrap.min.js' %}"></script> <script> // returns url params as a dictionary // for example ...?a=b&c=d would return {'a':'b', 'c':'d'} function getUrlParameters(url) { qMark = url.indexOf('?'); if (qMark != -1) { var sPageURL = url.substring(qMark + 1); var sURLVariables = sPageURL.split('&'); var params = {}; for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables[i].split('='); params[sParameterName[0]] = sParameterName[1]; } return params; } else { return {}; } } $(document).ready(function() { // when the main search button is pressed, we redirect to the right url $('#search_form').on('submit', function(e) { e.preventDefault(); var query = $('#main_search_box input').serialize(); var location = $('#location_box option').val(); var url = "{% url 'search_results' %}"; {# url = url.replace(/tobereplaced/g, location);#} url = url + "?" + query + '&loc=' + location; window.location = url; }); $('#main_search_box').find('input:visible').yourlabsAutocomplete( $.extend({}, CustomAutocomplete, { url: '{% url "show_autocomplete" %}', choiceSelector: 'a', minimumCharacters: 3, addDataToRequest: function() { this.data['loc'] = $('#location_box option').val(); }, }) ); }); $('#id_location_field-wrapper').on('widgetCreated', function(e, widget) { autocomplete = widget.autocomplete; autocomplete.fixPosition(); choice = '<span class="div" data-value="{{ request_loc_slug }}">{{loc_name}}</span>'; autocomplete.box.html(choice); params = [autocomplete.box.find(":first-child"), autocomplete]; autocomplete.input.trigger('selectChoice', params); $('#location_box').find('input').val("{{loc_name}}"); $('#main_search_box').find('input').focus(); }); $('#id_location_field-autocomplete').bind('selectChoice', function(e, choice, autocomplete) { $('#search_form').find(':submit').prop('disabled', false); }); $('#id_location_field-autocomplete').bind('change input', function(e, choice, autocomplete) { $('#search_form').find(':submit').prop('disabled', true); }); </script> <script src="{% static "locations/change_location_js.js" %}"></script> {% endwith %} {% block loadAdditionalJS %} {% endblock %} </body> {% endwith %} </html>