diff options
author | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-08-30 00:19:31 -0400 |
---|---|---|
committer | Andy Belle-Isle <drumsetmonkey@gmail.com> | 2019-08-30 00:19:31 -0400 |
commit | bd3fe0cac583739bc0d7c4b5c8f301bb350abca0 (patch) | |
tree | 7eeb1aabcebd6999de1c3457d0882246ec0ff4d4 /lib/sol2/docs/source/_themes | |
parent | 2662ac356ce14dacfbc91689fd37244facff4989 (diff) |
Renamed lib to deps so github will ignore it for language stats
Diffstat (limited to 'lib/sol2/docs/source/_themes')
-rw-r--r-- | lib/sol2/docs/source/_themes/sol2/layout.html | 16 | ||||
-rw-r--r-- | lib/sol2/docs/source/_themes/sol2/static/search-fix.js_t | 152 | ||||
-rw-r--r-- | lib/sol2/docs/source/_themes/sol2/static/sol2.css_t | 18 | ||||
-rw-r--r-- | lib/sol2/docs/source/_themes/sol2/theme.conf | 4 |
4 files changed, 0 insertions, 190 deletions
diff --git a/lib/sol2/docs/source/_themes/sol2/layout.html b/lib/sol2/docs/source/_themes/sol2/layout.html deleted file mode 100644 index 412e5ff..0000000 --- a/lib/sol2/docs/source/_themes/sol2/layout.html +++ /dev/null @@ -1,16 +0,0 @@ -{%- extends "haiku/layout.html" %} - -{% set script_files = script_files + ["_static/search-fix.js"] %} - -{% block haikuheader %} - <div class="header-left"> - {{ super() }} - </div> - <div class="header-right"> - <h3>Search the Documentation</h3> - <form action="{{ pathto('search') }}" method="get"> - <input type="text" name="q" value=""> - <input type="submit" value="search"> - </form> - </div> -{% endblock %} diff --git a/lib/sol2/docs/source/_themes/sol2/static/search-fix.js_t b/lib/sol2/docs/source/_themes/sol2/static/search-fix.js_t deleted file mode 100644 index 998ac40..0000000 --- a/lib/sol2/docs/source/_themes/sol2/static/search-fix.js_t +++ /dev/null @@ -1,152 +0,0 @@ -if (typeof window.SphinxRtdTheme !== 'undefined') {
- Search.query = function(query) {
- var i;
- var stopwords = {{ search_language_stop_words }};
-
- // stem the searchterms and add them to the correct list
- var stemmer = new Stemmer();
- var searchterms = [];
- var excluded = [];
- var hlterms = [];
- var tmp = query.split(/\s+/);
- var objectterms = [];
- for (i = 0; i < tmp.length; i++) {
- if (tmp[i] !== "") {
- objectterms.push(tmp[i].toLowerCase());
- }
-
- if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
- tmp[i] === "") {
- // skip this "word"
- continue;
- }
- // stem the word
- var word = stemmer.stemWord(tmp[i].toLowerCase());
- var toAppend;
- // select the correct list
- if (word[0] == '-') {
- toAppend = excluded;
- word = word.substr(1);
- }
- else {
- toAppend = searchterms;
- hlterms.push(tmp[i].toLowerCase());
- }
- // only add if not already in the list
- if (!$u.contains(toAppend, word))
- toAppend.push(word);
- }
- var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
-
- // prepare search
- var terms = this._index.terms;
- var titleterms = this._index.titleterms;
-
- // array of [filename, title, anchor, descr, score]
- var results = [];
- $('#search-progress').empty();
-
- // lookup as object
- for (i = 0; i < objectterms.length; i++) {
- var others = [].concat(objectterms.slice(0, i),
- objectterms.slice(i+1, objectterms.length));
- results = results.concat(this.performObjectSearch(objectterms[i], others));
- }
-
- // lookup as search terms in fulltext
- results = results.concat(this.performTermsSearch(searchterms, excluded, terms, Scorer.term))
- .concat(this.performTermsSearch(searchterms, excluded, titleterms, Scorer.title));
-
- // let the scorer override scores with a custom scoring function
- if (Scorer.score) {
- for (i = 0; i < results.length; i++)
- results[i][4] = Scorer.score(results[i]);
- }
-
- // now sort the results by score (in opposite order of appearance, since the
- // display function below uses pop() to retrieve items) and then
- // alphabetically
- results.sort(function(a, b) {
- var left = a[4];
- var right = b[4];
- if (left > right) {
- return 1;
- } else if (left < right) {
- return -1;
- } else {
- // same score: sort alphabetically
- left = a[1].toLowerCase();
- right = b[1].toLowerCase();
- return (left > right) ? -1 : ((left < right) ? 1 : 0);
- }
- });
-
- // for debugging
- //Search.lastresults = results.slice(); // a copy
- //console.info('search results:', Search.lastresults);
-
- // print the results
- var resultCount = results.length;
- function displayNextItem() {
- // results left, load the summary and display it
- if (results.length) {
- var item = results.pop();
- var listItem = $('<li style="display:none"></li>');
- if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
- // dirhtml builder
- var dirname = item[0].replace(/\.rst$/, '') + '/';
- if (dirname.match(/\/index\/$/)) {
- dirname = dirname.substring(0, dirname.length-6);
- } else if (dirname == 'index/') {
- dirname = '';
- }
- listItem.append($('<a/>').attr('href',
- DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
- highlightstring + item[2]).html(item[1]));
- } else {
- // normal html builders
- listItem.append($('<a/>').attr('href',
- item[0].replace(/\.rst$/, '') + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
- highlightstring + item[2]).html(item[1]));
- }
- if (item[3]) {
- listItem.append($('<span> (' + item[3] + ')</span>'));
- Search.output.append(listItem);
- listItem.slideDown(5, function() {
- displayNextItem();
- });
- } else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
- $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[0] + '.txt',
- dataType: "text",
- complete: function(jqxhr, textstatus) {
- var data = jqxhr.responseText;
- if (data !== '' && data !== undefined) {
- listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
- }
- Search.output.append(listItem);
- listItem.slideDown(5, function() {
- displayNextItem();
- });
- }});
- } else {
- // no source available, just display title
- Search.output.append(listItem);
- listItem.slideDown(5, function() {
- displayNextItem();
- });
- }
- }
- // search finished, update title and status message
- else {
- Search.stopPulse();
- Search.title.text(_('Search Results'));
- if (!resultCount)
- Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
- else
- Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
- Search.status.fadeIn(500);
- }
- }
- displayNextItem();
- };
-}
\ No newline at end of file diff --git a/lib/sol2/docs/source/_themes/sol2/static/sol2.css_t b/lib/sol2/docs/source/_themes/sol2/static/sol2.css_t deleted file mode 100644 index b0ab0dc..0000000 --- a/lib/sol2/docs/source/_themes/sol2/static/sol2.css_t +++ /dev/null @@ -1,18 +0,0 @@ -@import url('haiku.css'); - -.header-left { - float: left; - display: inline-block; - vertical-align: top; -} - -.header-right { - float: right; - display: inline-block; - vertical-align: top; -} - -.header-right h3 { - margin: 0; - padding-top: 15px; -}
\ No newline at end of file diff --git a/lib/sol2/docs/source/_themes/sol2/theme.conf b/lib/sol2/docs/source/_themes/sol2/theme.conf deleted file mode 100644 index 03601ad..0000000 --- a/lib/sol2/docs/source/_themes/sol2/theme.conf +++ /dev/null @@ -1,4 +0,0 @@ -[theme] -inherit = haiku -stylesheet = sol2.css -pygments_style = autumn
\ No newline at end of file |