diff options
Diffstat (limited to '_static')
| -rw-r--r-- | _static/basic.css | 22 | ||||
| -rw-r--r-- | _static/doctools.js | 28 | ||||
| -rw-r--r-- | _static/pygments.css | 2 | ||||
| -rw-r--r-- | _static/searchtools.js | 53 | ||||
| -rw-r--r-- | _static/websupport.js | 4 |
5 files changed, 21 insertions, 88 deletions
diff --git a/_static/basic.css b/_static/basic.css index 0b79414..9fa77d8 100644 --- a/_static/basic.css +++ b/_static/basic.css | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * | 4 | * |
| 5 | * Sphinx stylesheet -- basic theme. | 5 | * Sphinx stylesheet -- basic theme. |
| 6 | * | 6 | * |
| 7 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. | 7 | * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. |
| 8 | * :license: BSD, see LICENSE for details. | 8 | * :license: BSD, see LICENSE for details. |
| 9 | * | 9 | * |
| 10 | */ | 10 | */ |
| @@ -52,8 +52,6 @@ div.sphinxsidebar { | |||
| 52 | width: 230px; | 52 | width: 230px; |
| 53 | margin-left: -100%; | 53 | margin-left: -100%; |
| 54 | font-size: 90%; | 54 | font-size: 90%; |
| 55 | word-wrap: break-word; | ||
| 56 | overflow-wrap : break-word; | ||
| 57 | } | 55 | } |
| 58 | 56 | ||
| 59 | div.sphinxsidebar ul { | 57 | div.sphinxsidebar ul { |
| @@ -85,6 +83,10 @@ div.sphinxsidebar #searchbox input[type="text"] { | |||
| 85 | width: 170px; | 83 | width: 170px; |
| 86 | } | 84 | } |
| 87 | 85 | ||
| 86 | div.sphinxsidebar #searchbox input[type="submit"] { | ||
| 87 | width: 30px; | ||
| 88 | } | ||
| 89 | |||
| 88 | img { | 90 | img { |
| 89 | border: 0; | 91 | border: 0; |
| 90 | max-width: 100%; | 92 | max-width: 100%; |
| @@ -185,13 +187,6 @@ div.genindex-jumpbox { | |||
| 185 | 187 | ||
| 186 | /* -- general body styles --------------------------------------------------- */ | 188 | /* -- general body styles --------------------------------------------------- */ |
| 187 | 189 | ||
| 188 | div.body p, div.body dd, div.body li, div.body blockquote { | ||
| 189 | -moz-hyphens: auto; | ||
| 190 | -ms-hyphens: auto; | ||
| 191 | -webkit-hyphens: auto; | ||
| 192 | hyphens: auto; | ||
| 193 | } | ||
| 194 | |||
| 195 | a.headerlink { | 190 | a.headerlink { |
| 196 | visibility: hidden; | 191 | visibility: hidden; |
| 197 | } | 192 | } |
| @@ -494,13 +489,6 @@ pre { | |||
| 494 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ | 489 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ |
| 495 | } | 490 | } |
| 496 | 491 | ||
| 497 | span.pre { | ||
| 498 | -moz-hyphens: none; | ||
| 499 | -ms-hyphens: none; | ||
| 500 | -webkit-hyphens: none; | ||
| 501 | hyphens: none; | ||
| 502 | } | ||
| 503 | |||
| 504 | td.linenos pre { | 492 | td.linenos pre { |
| 505 | padding: 5px 0px; | 493 | padding: 5px 0px; |
| 506 | border: 0; | 494 | border: 0; |
diff --git a/_static/doctools.js b/_static/doctools.js index 8163495..c7bfe76 100644 --- a/_static/doctools.js +++ b/_static/doctools.js | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * | 4 | * |
| 5 | * Sphinx JavaScript utilities for all documentation. | 5 | * Sphinx JavaScript utilities for all documentation. |
| 6 | * | 6 | * |
| 7 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. | 7 | * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. |
| 8 | * :license: BSD, see LICENSE for details. | 8 | * :license: BSD, see LICENSE for details. |
| 9 | * | 9 | * |
| 10 | */ | 10 | */ |
| @@ -124,7 +124,6 @@ var Documentation = { | |||
| 124 | this.fixFirefoxAnchorBug(); | 124 | this.fixFirefoxAnchorBug(); |
| 125 | this.highlightSearchWords(); | 125 | this.highlightSearchWords(); |
| 126 | this.initIndexTable(); | 126 | this.initIndexTable(); |
| 127 | |||
| 128 | }, | 127 | }, |
| 129 | 128 | ||
| 130 | /** | 129 | /** |
| @@ -253,29 +252,6 @@ var Documentation = { | |||
| 253 | }); | 252 | }); |
| 254 | var url = parts.join('/'); | 253 | var url = parts.join('/'); |
| 255 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); | 254 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); |
| 256 | }, | ||
| 257 | |||
| 258 | initOnKeyListeners: function() { | ||
| 259 | $(document).keyup(function(event) { | ||
| 260 | var activeElementType = document.activeElement.tagName; | ||
| 261 | // don't navigate when in search box or textarea | ||
| 262 | if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { | ||
| 263 | switch (event.keyCode) { | ||
| 264 | case 37: // left | ||
| 265 | var prevHref = $('link[rel="prev"]').prop('href'); | ||
| 266 | if (prevHref) { | ||
| 267 | window.location.href = prevHref; | ||
| 268 | return false; | ||
| 269 | } | ||
| 270 | case 39: // right | ||
| 271 | var nextHref = $('link[rel="next"]').prop('href'); | ||
| 272 | if (nextHref) { | ||
| 273 | window.location.href = nextHref; | ||
| 274 | return false; | ||
| 275 | } | ||
| 276 | } | ||
| 277 | } | ||
| 278 | }); | ||
| 279 | } | 255 | } |
| 280 | }; | 256 | }; |
| 281 | 257 | ||
| @@ -284,4 +260,4 @@ _ = Documentation.gettext; | |||
| 284 | 260 | ||
| 285 | $(document).ready(function() { | 261 | $(document).ready(function() { |
| 286 | Documentation.init(); | 262 | Documentation.init(); |
| 287 | }); \ No newline at end of file | 263 | }); |
diff --git a/_static/pygments.css b/_static/pygments.css index 8213e90..57eadc0 100644 --- a/_static/pygments.css +++ b/_static/pygments.css | |||
| @@ -4,10 +4,8 @@ | |||
| 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ | 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ |
| 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ | 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ |
| 6 | .highlight .o { color: #666666 } /* Operator */ | 6 | .highlight .o { color: #666666 } /* Operator */ |
| 7 | .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ | ||
| 8 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ | 7 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ |
| 9 | .highlight .cp { color: #007020 } /* Comment.Preproc */ | 8 | .highlight .cp { color: #007020 } /* Comment.Preproc */ |
| 10 | .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ | ||
| 11 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ | 9 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ |
| 12 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ | 10 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ |
| 13 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ | 11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ |
diff --git a/_static/searchtools.js b/_static/searchtools.js index a51e0dc..0e794fd 100644 --- a/_static/searchtools.js +++ b/_static/searchtools.js | |||
| @@ -2,15 +2,14 @@ | |||
| 2 | * searchtools.js_t | 2 | * searchtools.js_t |
| 3 | * ~~~~~~~~~~~~~~~~ | 3 | * ~~~~~~~~~~~~~~~~ |
| 4 | * | 4 | * |
| 5 | * Sphinx JavaScript utilities for the full-text search. | 5 | * Sphinx JavaScript utilties for the full-text search. |
| 6 | * | 6 | * |
| 7 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. | 7 | * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. |
| 8 | * :license: BSD, see LICENSE for details. | 8 | * :license: BSD, see LICENSE for details. |
| 9 | * | 9 | * |
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | /* Non-minified version JS is _stemmer.js if file is provided */ | ||
| 14 | /** | 13 | /** |
| 15 | * Porter Stemmer | 14 | * Porter Stemmer |
| 16 | */ | 15 | */ |
| @@ -324,7 +323,7 @@ var Search = { | |||
| 324 | var searchterms = []; | 323 | var searchterms = []; |
| 325 | var excluded = []; | 324 | var excluded = []; |
| 326 | var hlterms = []; | 325 | var hlterms = []; |
| 327 | var tmp = query.split(/\W+/); | 326 | var tmp = query.split(/\s+/); |
| 328 | var objectterms = []; | 327 | var objectterms = []; |
| 329 | for (i = 0; i < tmp.length; i++) { | 328 | for (i = 0; i < tmp.length; i++) { |
| 330 | if (tmp[i] !== "") { | 329 | if (tmp[i] !== "") { |
| @@ -374,7 +373,8 @@ var Search = { | |||
| 374 | } | 373 | } |
| 375 | 374 | ||
| 376 | // lookup as search terms in fulltext | 375 | // lookup as search terms in fulltext |
| 377 | results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms)); | 376 | results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term)) |
| 377 | .concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title)); | ||
| 378 | 378 | ||
| 379 | // let the scorer override scores with a custom scoring function | 379 | // let the scorer override scores with a custom scoring function |
| 380 | if (Scorer.score) { | 380 | if (Scorer.score) { |
| @@ -538,47 +538,23 @@ var Search = { | |||
| 538 | /** | 538 | /** |
| 539 | * search for full-text terms in the index | 539 | * search for full-text terms in the index |
| 540 | */ | 540 | */ |
| 541 | performTermsSearch : function(searchterms, excluded, terms, titleterms) { | 541 | performTermsSearch : function(searchterms, excluded, terms, score) { |
| 542 | var filenames = this._index.filenames; | 542 | var filenames = this._index.filenames; |
| 543 | var titles = this._index.titles; | 543 | var titles = this._index.titles; |
| 544 | 544 | ||
| 545 | var i, j, file; | 545 | var i, j, file, files; |
| 546 | var fileMap = {}; | 546 | var fileMap = {}; |
| 547 | var scoreMap = {}; | ||
| 548 | var results = []; | 547 | var results = []; |
| 549 | 548 | ||
| 550 | // perform the search on the required terms | 549 | // perform the search on the required terms |
| 551 | for (i = 0; i < searchterms.length; i++) { | 550 | for (i = 0; i < searchterms.length; i++) { |
| 552 | var word = searchterms[i]; | 551 | var word = searchterms[i]; |
| 553 | var files = []; | ||
| 554 | var _o = [ | ||
| 555 | {files: terms[word], score: Scorer.term}, | ||
| 556 | {files: titleterms[word], score: Scorer.title} | ||
| 557 | ]; | ||
| 558 | |||
| 559 | // no match but word was a required one | 552 | // no match but word was a required one |
| 560 | if ($u.every(_o, function(o){return o.files === undefined;})) { | 553 | if ((files = terms[word]) === undefined) |
| 561 | break; | 554 | break; |
| 555 | if (files.length === undefined) { | ||
| 556 | files = [files]; | ||
| 562 | } | 557 | } |
| 563 | // found search word in contents | ||
| 564 | $u.each(_o, function(o) { | ||
| 565 | var _files = o.files; | ||
| 566 | if (_files === undefined) | ||
| 567 | return | ||
| 568 | |||
| 569 | if (_files.length === undefined) | ||
| 570 | _files = [_files]; | ||
| 571 | files = files.concat(_files); | ||
| 572 | |||
| 573 | // set score for the word in each file to Scorer.term | ||
| 574 | for (j = 0; j < _files.length; j++) { | ||
| 575 | file = _files[j]; | ||
| 576 | if (!(file in scoreMap)) | ||
| 577 | scoreMap[file] = {} | ||
| 578 | scoreMap[file][word] = o.score; | ||
| 579 | } | ||
| 580 | }); | ||
| 581 | |||
| 582 | // create the mapping | 558 | // create the mapping |
| 583 | for (j = 0; j < files.length; j++) { | 559 | for (j = 0; j < files.length; j++) { |
| 584 | file = files[j]; | 560 | file = files[j]; |
| @@ -600,9 +576,7 @@ var Search = { | |||
| 600 | // ensure that none of the excluded terms is in the search result | 576 | // ensure that none of the excluded terms is in the search result |
| 601 | for (i = 0; i < excluded.length; i++) { | 577 | for (i = 0; i < excluded.length; i++) { |
| 602 | if (terms[excluded[i]] == file || | 578 | if (terms[excluded[i]] == file || |
| 603 | titleterms[excluded[i]] == file || | 579 | $u.contains(terms[excluded[i]] || [], file)) { |
| 604 | $u.contains(terms[excluded[i]] || [], file) || | ||
| 605 | $u.contains(titleterms[excluded[i]] || [], file)) { | ||
| 606 | valid = false; | 580 | valid = false; |
| 607 | break; | 581 | break; |
| 608 | } | 582 | } |
| @@ -610,9 +584,6 @@ var Search = { | |||
| 610 | 584 | ||
| 611 | // if we have still a valid result we can add it to the result list | 585 | // if we have still a valid result we can add it to the result list |
| 612 | if (valid) { | 586 | if (valid) { |
| 613 | // select one (max) score for the file. | ||
| 614 | // for better ranking, we should calculate ranking by using words statistics like basic tf-idf... | ||
| 615 | var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]})); | ||
| 616 | results.push([filenames[file], titles[file], '', null, score]); | 587 | results.push([filenames[file], titles[file], '', null, score]); |
| 617 | } | 588 | } |
| 618 | } | 589 | } |
| @@ -623,7 +594,7 @@ var Search = { | |||
| 623 | * helper function to return a node containing the | 594 | * helper function to return a node containing the |
| 624 | * search summary for a given text. keywords is a list | 595 | * search summary for a given text. keywords is a list |
| 625 | * of stemmed words, hlwords is the list of normal, unstemmed | 596 | * of stemmed words, hlwords is the list of normal, unstemmed |
| 626 | * words. the first one is used to find the occurrence, the | 597 | * words. the first one is used to find the occurance, the |
| 627 | * latter for highlighting it. | 598 | * latter for highlighting it. |
| 628 | */ | 599 | */ |
| 629 | makeSearchSummary : function(text, keywords, hlwords) { | 600 | makeSearchSummary : function(text, keywords, hlwords) { |
diff --git a/_static/websupport.js b/_static/websupport.js index 98e7f40..28d65db 100644 --- a/_static/websupport.js +++ b/_static/websupport.js | |||
| @@ -2,9 +2,9 @@ | |||
| 2 | * websupport.js | 2 | * websupport.js |
| 3 | * ~~~~~~~~~~~~~ | 3 | * ~~~~~~~~~~~~~ |
| 4 | * | 4 | * |
| 5 | * sphinx.websupport utilities for all documentation. | 5 | * sphinx.websupport utilties for all documentation. |
| 6 | * | 6 | * |
| 7 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. | 7 | * :copyright: Copyright 2007-2015 by the Sphinx team, see AUTHORS. |
| 8 | * :license: BSD, see LICENSE for details. | 8 | * :license: BSD, see LICENSE for details. |
| 9 | * | 9 | * |
| 10 | */ | 10 | */ |