Ultima attività 6 months ago

after_footer.html Raw
{% comment %}
Add content to be output at the bottom of each page. (You might use this for analytics scripts, for example)
{% endcomment %}
<!-- Load jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery.noConflict(); // ender.js conflicts with jQuery
</script>
<!-- Load Fancybox -->
<script src="https://raw.github.com/fancyapps/fancyBox/master/source/jquery.fancybox.pack.js" type="text/javascript"></script>
<script src="{{ root_url }}/javascripts/fancybox-integration.js" type="text/javascript"></script>
fancybox-integration.js Raw
1// taken from https://raw.github.com/ervwalter/octopress-ewal/5dd64d3b52f183e18e1bb035ee288b09ac70c554/source/javascripts/slash.js
2
3(function($){
4 // Open external links in new window
5 var externalLinks = function(){
6 var host = location.host;
7
8 $('body').on('click', 'a', function(e){
9 var href = this.href,
10 link = href.replace(/https?:\/\/([^\/]+)(.*)/, '$1');
11
12 if (link != '' && link != host && !$(this).hasClass('fancybox')){
13 window.open(href);
14 e.preventDefault();
15 }
16 });
17 };
18
19 // Append caption after pictures
20 var appendCaption = function(){
21 $('.entry-content').each(function(i){
22 var _i = i;
23 $(this).find('img').each(function(){
24 var alt = this.alt;
25
26 if (alt != ''){
27 $(this).after('<span class="caption">'+alt+'</span>');
28 }
29
30 $(this).wrap('<a href="'+this.src+'" title="'+alt+'" class="fancybox" rel="gallery'+_i+'" />');
31 });
32 });
33 };
34
35 $('.entry-content').each(function(i){
36 var _i = i;
37 $(this).find('img.fancybox').each(function(){
38 var img = $(this);
39 var title = img.attr("title");
40 var classes = img.attr("class");
41 img.removeAttr("class");
42 img.wrap('<a href="'+this.src+'" class="' + classes + '" rel="gallery'+_i+'" />');
43 if (title != "")
44 {
45 img.parent().attr("title", title);
46 }
47 });
48 });
49 $('.fancybox').fancybox();
50})(jQuery);
head.html Raw
1<!-- fancybox stylesheet -->
2<link href="https://raw.github.com/fancyapps/fancyBox/master/source/jquery.fancybox.css" media="screen, projection" rel="stylesheet" type="text/css">