diff --git a/doc/sources/.static/default.css b/doc/sources/.static/default.css index cbc35150b..3c95c4f44 100644 --- a/doc/sources/.static/default.css +++ b/doc/sources/.static/default.css @@ -572,12 +572,12 @@ table.field-list th.field-name { /** Image link */ -img.align-right { +div.body .align-right { float: right; margin: 0 0 20px 20px; } -img.align-center { +div.body .align-center { text-align: center; margin: 20px auto; display: block; @@ -620,3 +620,4 @@ dl.exception > dt.hover { dl.api-level dt { cursor: pointer; } + diff --git a/doc/sources/.static/kivy.js b/doc/sources/.static/kivy.js index 4e280190a..739699978 100644 --- a/doc/sources/.static/kivy.js +++ b/doc/sources/.static/kivy.js @@ -108,17 +108,10 @@ $(document).ready(function () { $('#api-toggle').html('Expand All ⇓'); } - //$('div.body dl[class]:first-child').hide(); - /** - $('dl[class]:first-child > a[class="headerlink"]').each(function(i1, elem) { - console.log(i1); - console.log(elem); - $(elem).each(function(i2, e) { - var eid = $(e).attr('id'); - $(e).removeAttr('id'); - $('
').attr('id', eid).addClass('anchor').insertBefore(e); - }); - }); - **/ + //---------------------------------------------------------------------------- + // Image reflexions + //---------------------------------------------------------------------------- + + $('div.body img').reflect({'opacity': .35, 'height': 40}); }); diff --git a/doc/sources/.static/reflection.js b/doc/sources/.static/reflection.js new file mode 100644 index 000000000..1df6ec2ad --- /dev/null +++ b/doc/sources/.static/reflection.js @@ -0,0 +1,11 @@ +/*! + reflection.js for jQuery v1.1 + (c) 2006-2011 Christophe Beyls + MIT-style license. +*/ +(function(a){a.fn.extend({reflect:function(b){b=a.extend({height:1/3,opacity:0.5},b);return this.unreflect().each(function(){var c=this;if(/^img$/i.test(c.tagName)){function d(){var g=c.width,f=c.height,l,i,m,h,k;i=Math.floor((b.height>1)?Math.min(f,b.height):f*b.height);l=a("")[0];if(l.getContext){h=l.getContext("2d");try{a(l).attr({width:g,height:i});h.save();h.translate(0,f-1);h.scale(1,-1);h.drawImage(c,0,0,g,f);h.restore();h.globalCompositeOperation="destination-out";k=h.createLinearGradient(0,0,0,i);k.addColorStop(0,"rgba(255, 255, 255, "+(1-b.opacity)+")");k.addColorStop(1,"rgba(255, 255, 255, 1.0)");h.fillStyle=k;h.rect(0,0,g,i);h.fill()}catch(j){return}}else{if(!a.browser.msie){return}l=a("").attr("src",c.src).css({width:g,height:f,marginBottom:i-f,filter:"FlipV progid:DXImageTransform.Microsoft.Alpha(Opacity="+(b.opacity*100)+", FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=0, FinishY="+(i/f*100)+")"})[0]}a(l).css({display:"block",border:0});m=a(/^a$/i.test(c.parentNode.tagName)?"":"
").insertAfter(c).append([c,l])[0];m.className=c.className;a.data(c,"reflected",m.style.cssText=c.style.cssText);a(m).css({width:g,height:f+i,overflow:"hidden"});c.style.cssText="display: block; border: 0px";c.className="reflected"}if(c.complete){d()}else{a(c).load(d)}}})},unreflect:function(){return this.unbind("load").each(function(){var c=this,b=a.data(this,"reflected"),d;if(b!==undefined){d=c.parentNode;c.className=d.className;c.style.cssText=b;a.removeData(c,"reflected");d.parentNode.replaceChild(c,d)}})}})})(jQuery); + +// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED) +jQuery(function($) { + $("img.reflect").reflect({/* Put custom options here */}); +}); \ No newline at end of file diff --git a/doc/sources/.templates/layout.html b/doc/sources/.templates/layout.html index 7f40b5376..1519dfbc6 100644 --- a/doc/sources/.templates/layout.html +++ b/doc/sources/.templates/layout.html @@ -122,6 +122,7 @@ {%- endfor %} + {%- if use_opensearch %}