brouilleursdeblanc/_includes/scripts.html

57 lines
2.2 KiB
HTML
Raw Normal View History

2013-06-25 20:19:49 +00:00
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="{{ site.url }}/assets/js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
2013-09-11 13:45:12 +00:00
<script src="{{ site.url }}/assets/js/scripts.min.js"></script>
{% if site.search %}
<!-- Jekyll Simple Search option -->
<script>
$(document).ready(function() {
$('.search-field').simpleJekyllSearch({
jsonFile : '{{ site.url }}/search.json',
searchResults : '.search-results',
template : '<li><article><a href="{url}">{title} <span class="entry-date"><time datetime="{date}">{shortdate}</time></span></a></article></li>',
noResults: '<p>Nothing found.</p>'
});
});
(function( $, window, undefined ) {
var bs = {
close: $(".icon-remove-sign"),
searchform: $(".search-form"),
canvas: $("body"),
dothis: $('.dosearch')
};
bs.dothis.on('click', function() {
$('.search-wrapper').css({ display: "block" });
bs.searchform.toggleClass('active');
bs.searchform.find('input').focus();
bs.canvas.toggleClass('search-overlay');
});
bs.close.on('click', function() {
$('.search-wrapper').removeAttr( 'style' );
bs.searchform.toggleClass('active');
bs.canvas.removeClass('search-overlay');
});
})( jQuery, window );
</script>
{% endif %}
2013-07-17 13:02:00 +00:00
{% if site.google_analytics %}
2013-06-25 20:19:49 +00:00
<!-- Asynchronous Google Analytics snippet -->
<script>
var _gaq = _gaq || [];
var pluginUrl =
'//www.google-analytics.com/plugins/ga/inpage_linkid.js';
_gaq.push(['_require', 'inpage_linkid', pluginUrl]);
_gaq.push(['_setAccount', '{{ site.google_analytics }}']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
2013-06-26 13:18:48 +00:00
</script>
2013-07-17 02:04:40 +00:00
{% endif %}
{% if site.disqus_shortname %}{% if page.comments %}{% include disqus_comments.html %}{% endif %}{% endif %}