diff --git a/doc/sources/.static/default.css b/doc/sources/.static/default.css index 69b1a8007..919a95dc3 100644 --- a/doc/sources/.static/default.css +++ b/doc/sources/.static/default.css @@ -52,6 +52,23 @@ div.anchor { margin-bottom: 10px; } +#toggleheader { + font-size: 10px; + float: right; + background-color: #eceae0; + background-color: #acaaa0; + margin-top: 35px; + margin-right: 10px; + padding: 3px 9px; + cursor: pointer; + border-bottom-left-radius: 15px; + border-bottom-right-radius: 15px; + -moz-border-radius-bottomleft: 15px; + -moz-border-radius-bottomright: 15px; + -webkit-border-radius-bottomleft: 15px; + -webkit-border-radius-topright: 15px; +} + /** Header */ #topbar { @@ -85,18 +102,28 @@ ul.navigation { margin-left: 5px; } +ul.navigation form.search, ul.navigation li a { float: left; margin-right: 20px; outline: 0; font-size: 13px; -} - -ul.navigation li a { color: #adaba8; text-decoration: none; } +ul.navigation input { + font-family: sans-serif; + font-size: 1em; + background: #eceae0 url('search.png') 140px 3px no-repeat; + padding: 3px 5px 3px 10px; + border: none; + border-radius: 15px; + width: 150px; + -moz-border-radius: 15px; + -webkit-border-radius: 15px; +} + ul.navigation li a.selected, ul.navigation li a:hover { background: transparent url('highlight.png') center top no-repeat; diff --git a/doc/sources/.static/jquery.cookie.js b/doc/sources/.static/jquery.cookie.js new file mode 100644 index 000000000..61d3bcef2 --- /dev/null +++ b/doc/sources/.static/jquery.cookie.js @@ -0,0 +1,91 @@ +/*jslint browser: true */ /*global jQuery: true */ + +/** + * jQuery Cookie plugin + * + * Copyright (c) 2010 Klaus Hartl (stilbuero.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +// TODO JsDoc + +/** + * Create a cookie with the given key and value and other optional parameters. + * + * @example $.cookie('the_cookie', 'the_value'); + * @desc Set the value of a cookie. + * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); + * @desc Create a cookie with all available options. + * @example $.cookie('the_cookie', 'the_value'); + * @desc Create a session cookie. + * @example $.cookie('the_cookie', null); + * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain + * used when the cookie was set. + * + * @param String key The key of the cookie. + * @param String value The value of the cookie. + * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. + * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. + * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. + * If set to null or omitted, the cookie will be a session cookie and will not be retained + * when the the browser exits. + * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). + * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). + * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will + * require a secure protocol (like HTTPS). + * @type undefined + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ + +/** + * Get the value of a cookie with the given key. + * + * @example $.cookie('the_cookie'); + * @desc Get the value of a cookie. + * + * @param String key The key of the cookie. + * @return The value of the cookie. + * @type String + * + * @name $.cookie + * @cat Plugins/Cookie + * @author Klaus Hartl/klaus.hartl@stilbuero.de + */ +jQuery.cookie = function (key, value, options) { + + // key and at least value given, set cookie... + if (arguments.length > 1 && String(value) !== "[object Object]") { + options = jQuery.extend({}, options); + + if (value === null || value === undefined) { + options.expires = -1; + } + + if (typeof options.expires === 'number') { + var days = options.expires, t = options.expires = new Date(); + t.setDate(t.getDate() + days); + } + + value = String(value); + + return (document.cookie = [ + encodeURIComponent(key), '=', + options.raw ? value : encodeURIComponent(value), + options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE + options.path ? '; path=' + options.path : '', + options.domain ? '; domain=' + options.domain : '', + options.secure ? '; secure' : '' + ].join('')); + } + + // key and possibly options given, get cookie... + options = value || {}; + var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent; + return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null; +}; diff --git a/doc/sources/.static/kivy.js b/doc/sources/.static/kivy.js index c4b769855..4e16d5204 100644 --- a/doc/sources/.static/kivy.js +++ b/doc/sources/.static/kivy.js @@ -1,4 +1,44 @@ +function updateheadercookie(st) { + $.cookie('kivy.header', st); +} + +function hideheader(do_animation) { + if (do_animation) { + $('#wrapper').animate({'padding-top': '40'}, 500); + $('div.anchor').animate({'margin-top': '-40'}, 500); + $('#topbar').animate({'margin-top': '-120'}, 500); + } else { + $('#wrapper').css('padding-top', '40px'); + $('div.anchor').css('margin-top', '-40px'); + $('#topbar').css('margin-top', '-120px'); + } + $('#toggleheader').html('Expand header'); + updateheadercookie('hide'); +} + +function showheader() { + $('#wrapper').animate({'padding-top': '160'}, 500); + $('div.anchor').animate({'margin-top': '-160'}, 500); + $('#topbar').animate({'margin-top': '0'}, 500); + $('#toggleheader').html('Hide header'); + updateheadercookie('show'); +} + $(document).ready(function () { + + st = $.cookie('kivy.header') + if ( st == 'hide' ) + hideheader(); + else + showheader(); + $('#toggleheader').click(function() { + if ( $.cookie('kivy.header') == 'hide' ) + showheader(); + else + hideheader(true); + }); + + $(['div.section[id]', 'dt[id]']).each(function(i1, elem) { $(elem).each(function(i2, e) { var eid = $(e).attr('id'); diff --git a/doc/sources/.static/search.png b/doc/sources/.static/search.png new file mode 100644 index 000000000..1576d374b Binary files /dev/null and b/doc/sources/.static/search.png differ diff --git a/doc/sources/.templates/layout.html b/doc/sources/.templates/layout.html index ba429c909..4c8a50812 100644 --- a/doc/sources/.templates/layout.html +++ b/doc/sources/.templates/layout.html @@ -68,20 +68,6 @@ {%- if not embedded %}{% if not theme_nosidebar|tobool %}