initial upload
This commit is contained in:
461
docs/_site/assets/tipuesearch/css/normalize.css
vendored
Executable file
461
docs/_site/assets/tipuesearch/css/normalize.css
vendored
Executable file
@@ -0,0 +1,461 @@
|
||||
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/**
|
||||
* 1. Change the default font family in all browsers (opinionated).
|
||||
* 2. Correct the line height in all browsers.
|
||||
* 3. Prevent adjustments of font size after orientation changes in
|
||||
* IE on Windows Phone and in iOS.
|
||||
*/
|
||||
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
line-height: 1.15; /* 2 */
|
||||
-ms-text-size-adjust: 100%; /* 3 */
|
||||
-webkit-text-size-adjust: 100%; /* 3 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the margin in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
footer,
|
||||
header,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
* 1. Add the correct display in IE.
|
||||
*/
|
||||
|
||||
figcaption,
|
||||
figure,
|
||||
main { /* 1 */
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct margin in IE 8.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 1em 40px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Remove the gray background on active links in IE 10.
|
||||
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent; /* 1 */
|
||||
-webkit-text-decoration-skip: objects; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the outline on focused links when they are also active or hovered
|
||||
* in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Firefox 39-.
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font style in Android 4.3-.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct background and color in IE 9-.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background-color: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
audio,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in iOS 4-7.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the border on images inside links in IE 10-.
|
||||
*/
|
||||
|
||||
img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the overflow in IE.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Change the font styles in all browsers (opinionated).
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: sans-serif; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||
* controls in Android 4.
|
||||
* 2. Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
html [type="button"], /* 1 */
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the border, margin, and padding in all browsers (opinionated).
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct display in IE 9-.
|
||||
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
display: inline-block; /* 1 */
|
||||
vertical-align: baseline; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10-.
|
||||
* 2. Remove the padding in IE 10-.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in IE 9-.
|
||||
* 1. Add the correct display in Edge, IE, and Firefox.
|
||||
*/
|
||||
|
||||
details, /* 1 */
|
||||
menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Scripting
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 9-.
|
||||
*/
|
||||
|
||||
canvas {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE.
|
||||
*/
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hidden
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10-.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
242
docs/_site/assets/tipuesearch/css/tipuesearch.css
Executable file
242
docs/_site/assets/tipuesearch/css/tipuesearch.css
Executable file
@@ -0,0 +1,242 @@
|
||||
|
||||
/*
|
||||
Tipue Search 6.1
|
||||
Copyright (c) 2017 Tipue
|
||||
Tipue Search is released under the MIT License
|
||||
http://www.tipue.com/search
|
||||
*/
|
||||
|
||||
|
||||
/* fonts */
|
||||
|
||||
|
||||
#tipue_search_input, #tipue_search_foot_boxes
|
||||
{
|
||||
/*font: 300 14px/1 Roboto, sans-serif;*/
|
||||
}
|
||||
#tipue_search_results_count, #tipue_search_warning, .tipue_search_content_url, .tipue_search_content_debug, .tipue_search_related_text
|
||||
{
|
||||
font: 300 14px/1.7 Roboto, sans-serif;
|
||||
}
|
||||
.tipue_search_content_title
|
||||
{
|
||||
font: 100 26px/1.7 Roboto, sans-serif;
|
||||
}
|
||||
.tipue_search_content_text, .tipue_search_related_title
|
||||
{
|
||||
font: 300 15px/1.7 Roboto, sans-serif;
|
||||
}
|
||||
.tipue_search_content_bold, .tipue_search_related_bold
|
||||
{
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
|
||||
/* search box */
|
||||
|
||||
|
||||
#tipue_search_input
|
||||
{
|
||||
|
||||
}
|
||||
.tipue_search_icon
|
||||
{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.tipue_search_left
|
||||
{
|
||||
float: left;
|
||||
padding: 15px 9px 0 0;
|
||||
}
|
||||
.tipue_search_right
|
||||
{
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
/* search results */
|
||||
|
||||
|
||||
#tipue_search_content
|
||||
{
|
||||
max-width: 750px;
|
||||
padding-top: 15px;
|
||||
margin: 0;
|
||||
}
|
||||
#tipue_search_results_count
|
||||
{
|
||||
color: #333;
|
||||
}
|
||||
#tipue_search_warning
|
||||
{
|
||||
color: #333;
|
||||
margin: 7px 0;
|
||||
}
|
||||
#tipue_search_warning a
|
||||
{
|
||||
color: #5396ea;
|
||||
text-decoration: none;
|
||||
}
|
||||
#tipue_search_warning a:hover
|
||||
{
|
||||
color: #555;
|
||||
}
|
||||
.tipue_search_content_title
|
||||
{
|
||||
color: #666;
|
||||
margin-top: 21px;
|
||||
}
|
||||
.tipue_search_content_title a
|
||||
{
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
}
|
||||
.tipue_search_content_title a:hover
|
||||
{
|
||||
color: #666;
|
||||
}
|
||||
.tipue_search_content_url
|
||||
{
|
||||
word-wrap: break-word;
|
||||
hyphens: auto;
|
||||
}
|
||||
.tipue_search_content_url a, .tipue_search_related_text a
|
||||
{
|
||||
color: #5396ea;
|
||||
text-decoration: none;
|
||||
}
|
||||
.tipue_search_content_url a:hover, .tipue_search_related_text a:hover, .tipue_search_related_before, .tipue_search_related_after
|
||||
{
|
||||
color: #555;
|
||||
}
|
||||
.tipue_search_content_text
|
||||
{
|
||||
color: #333;
|
||||
word-wrap: break-word;
|
||||
hyphens: auto;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.tipue_search_content_bold
|
||||
{
|
||||
color: #333;
|
||||
}
|
||||
.tipue_search_content_debug
|
||||
{
|
||||
color: #333;
|
||||
margin: 5px 0;
|
||||
}
|
||||
.tipue_search_related_title
|
||||
{
|
||||
color: #333;
|
||||
margin: 26px 0 7px 0;
|
||||
}
|
||||
.tipue_search_related_cols
|
||||
{
|
||||
-webkit-columns: 230px 2;
|
||||
-moz-columns: 230px 2;
|
||||
columns: 230px 2;
|
||||
}
|
||||
|
||||
#tipue_search_foot
|
||||
{
|
||||
margin: 51px 0 21px 0;
|
||||
}
|
||||
#tipue_search_foot_boxes
|
||||
{
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
#tipue_search_foot_boxes li
|
||||
{
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: inline;
|
||||
}
|
||||
#tipue_search_foot_boxes li a
|
||||
{
|
||||
padding: 10px 17px 11px 17px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #e3e3e3;
|
||||
border-radius: 1px;
|
||||
color: #333;
|
||||
margin-right: 7px;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
}
|
||||
#tipue_search_foot_boxes li.current
|
||||
{
|
||||
padding: 10px 17px 11px 17px;
|
||||
background: #f6f6f6;
|
||||
border: 1px solid #e3e3e3;
|
||||
border-radius: 1px;
|
||||
color: #333;
|
||||
margin-right: 7px;
|
||||
text-align: center;
|
||||
}
|
||||
#tipue_search_foot_boxes li a:hover
|
||||
{
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
|
||||
/* spinner */
|
||||
|
||||
|
||||
.tipue_search_spinner
|
||||
{
|
||||
width: 50px;
|
||||
height: 28px;
|
||||
}
|
||||
.tipue_search_spinner > div
|
||||
{
|
||||
background-color: #e3e3e3;
|
||||
height: 100%;
|
||||
width: 2px;
|
||||
display: inline-block;
|
||||
margin-right: 2px;
|
||||
-webkit-animation: stretchdelay 1.2s infinite ease-in-out;
|
||||
animation: stretchdelay 1.2s infinite ease-in-out;
|
||||
}
|
||||
.tipue_search_spinner .tipue_search_rect2
|
||||
{
|
||||
-webkit-animation-delay: -1.1s;
|
||||
animation-delay: -1.1s;
|
||||
}
|
||||
.tipue_search_spinner .tipue_search_rect3
|
||||
{
|
||||
-webkit-animation-delay: -1.0s;
|
||||
animation-delay: -1.0s;
|
||||
}
|
||||
@-webkit-keyframes stretchdelay
|
||||
{
|
||||
0%, 40%, 100%
|
||||
{
|
||||
-webkit-transform: scaleY(0.4)
|
||||
}
|
||||
20%
|
||||
{
|
||||
-webkit-transform: scaleY(1.0)
|
||||
}
|
||||
}
|
||||
@keyframes stretchdelay
|
||||
{
|
||||
0%, 40%, 100%
|
||||
{
|
||||
transform: scaleY(0.4);
|
||||
-webkit-transform: scaleY(0.4);
|
||||
}
|
||||
20%
|
||||
{
|
||||
transform: scaleY(1.0);
|
||||
-webkit-transform: scaleY(1.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
docs/_site/assets/tipuesearch/search.png
Executable file
BIN
docs/_site/assets/tipuesearch/search.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
178
docs/_site/assets/tipuesearch/tipuesearch.min.js
vendored
Executable file
178
docs/_site/assets/tipuesearch/tipuesearch.min.js
vendored
Executable file
@@ -0,0 +1,178 @@
|
||||
(function($){$.fn.tipuesearch=function(options){var set=$.extend({'contentLocation':'tipuesearch/tipuesearch_content.json','contextBuffer':60,'contextLength':60,'contextStart':90,'debug':false,'descriptiveWords':25,'highlightTerms':true,'liveContent':'*','liveDescription':'*','minimumLength':3,'mode':'static','newWindow':false,'show':9,'showContext':true,'showRelated':true,'showTime':true,'showTitleCount':true,'showURL':true,'wholeWords':true},options);return this.each(function(){var tipuesearch_in={pages:[]};$.ajaxSetup({async:false});var tipuesearch_t_c=0;$('#tipue_search_content').hide().html('<div class="tipue_search_spinner"><div class="tipue_search_rect1"></div><div class="tipue_search_rect2"></div><div class="rect3"></div></div>').show();if(set.mode=='live')
|
||||
{for(var i=0;i<tipuesearch_pages.length;i++)
|
||||
{$.get(tipuesearch_pages[i]).done(function(html)
|
||||
{var cont=$(set.liveContent,html).text();cont=cont.replace(/\s+/g,' ');var desc=$(set.liveDescription,html).text();desc=desc.replace(/\s+/g,' ');var t_1=html.toLowerCase().indexOf('<title>');var t_2=html.toLowerCase().indexOf('</title>',t_1+7);if(t_1!=-1&&t_2!=-1)
|
||||
{var tit=html.slice(t_1+7,t_2);}
|
||||
else
|
||||
{var tit=tipuesearch_string_1;}
|
||||
tipuesearch_in.pages.push({"title":tit,"text":desc,"tags":cont,"url":tipuesearch_pages[i]});});}}
|
||||
if(set.mode=='json')
|
||||
{$.getJSON(set.contentLocation).done(function(json)
|
||||
{tipuesearch_in=$.extend({},json);});}
|
||||
if(set.mode=='static')
|
||||
{tipuesearch_in=$.extend({},tipuesearch);}
|
||||
var tipue_search_w='';if(set.newWindow)
|
||||
{tipue_search_w=' target="_blank"';}
|
||||
function getURLP(name)
|
||||
{var _locSearch=location.search;var _splitted=(new RegExp('[?|&]'+name+'='+'([^&;]+?)(&|#|;|$)').exec(_locSearch)||[,""]);var searchString=_splitted[1].replace(/\+/g,'%20');try
|
||||
{searchString=decodeURIComponent(searchString);}
|
||||
catch(e)
|
||||
{searchString=unescape(searchString);}
|
||||
return searchString||null;}
|
||||
if(getURLP('q'))
|
||||
{$('#tipue_search_input').val(getURLP('q'));getTipueSearch(0,true);}
|
||||
$(this).keyup(function(event)
|
||||
{if(event.keyCode=='13')
|
||||
{getTipueSearch(0,true);}});function getTipueSearch(start,replace)
|
||||
{var out='';var show_replace=false;var show_stop=false;var standard=true;var c=0;found=[];var d_o=$('#tipue_search_input').val();var d=d_o.toLowerCase();d=$.trim(d);if((d.match("^\"")&&d.match("\"$"))||(d.match("^'")&&d.match("'$")))
|
||||
{standard=false;}
|
||||
var d_w=d.split(' ');if(standard)
|
||||
{d='';for(var i=0;i<d_w.length;i++)
|
||||
{var a_w=true;for(var f=0;f<tipuesearch_stop_words.length;f++)
|
||||
{if(d_w[i]==tipuesearch_stop_words[f])
|
||||
{a_w=false;show_stop=true;}}
|
||||
if(a_w)
|
||||
{d=d+' '+d_w[i];}}
|
||||
d=$.trim(d);d_w=d.split(' ');}
|
||||
else
|
||||
{d=d.substring(1,d.length-1);}
|
||||
if(d.length>=set.minimumLength)
|
||||
{if(standard)
|
||||
{if(replace)
|
||||
{var d_r=d;for(var i=0;i<d_w.length;i++)
|
||||
{for(var f=0;f<tipuesearch_replace.words.length;f++)
|
||||
{if(d_w[i]==tipuesearch_replace.words[f].word)
|
||||
{d=d.replace(d_w[i],tipuesearch_replace.words[f].replace_with);show_replace=true;}}}
|
||||
d_w=d.split(' ');}
|
||||
var d_t=d;for(var i=0;i<d_w.length;i++)
|
||||
{for(var f=0;f<tipuesearch_stem.words.length;f++)
|
||||
{if(d_w[i]==tipuesearch_stem.words[f].word)
|
||||
{d_t=d_t+' '+tipuesearch_stem.words[f].stem;}}}
|
||||
d_w=d_t.split(' ');for(var i=0;i<tipuesearch_in.pages.length;i++)
|
||||
{var score=0;var s_t=tipuesearch_in.pages[i].text;for(var f=0;f<d_w.length;f++)
|
||||
{if(set.wholeWords)
|
||||
{var pat=new RegExp('\\b'+d_w[f]+'\\b','gi');}
|
||||
else
|
||||
{var pat=new RegExp(d_w[f],'gi');}
|
||||
if(tipuesearch_in.pages[i].title.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].title.match(pat).length;score+=(20*m_c);}
|
||||
if(tipuesearch_in.pages[i].text.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].text.match(pat).length;score+=(20*m_c);}
|
||||
if(tipuesearch_in.pages[i].tags.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].tags.match(pat).length;score+=(10*m_c);}
|
||||
if(tipuesearch_in.pages[i].url.search(pat)!=-1)
|
||||
{score+=20;}
|
||||
if(score!=0)
|
||||
{for(var e=0;e<tipuesearch_weight.weight.length;e++)
|
||||
{if(tipuesearch_in.pages[i].url==tipuesearch_weight.weight[e].url)
|
||||
{score+=tipuesearch_weight.weight[e].score;}}}
|
||||
if(d_w[f].match('^-'))
|
||||
{pat=new RegExp(d_w[f].substring(1),'i');if(tipuesearch_in.pages[i].title.search(pat)!=-1||tipuesearch_in.pages[i].text.search(pat)!=-1||tipuesearch_in.pages[i].tags.search(pat)!=-1)
|
||||
{score=0;}}}
|
||||
if(score!=0)
|
||||
{found.push({"score":score,"title":tipuesearch_in.pages[i].title,"desc":s_t,"url":tipuesearch_in.pages[i].url});c++;}}}
|
||||
else
|
||||
{for(var i=0;i<tipuesearch_in.pages.length;i++)
|
||||
{var score=0;var s_t=tipuesearch_in.pages[i].text;var pat=new RegExp(d,'gi');if(tipuesearch_in.pages[i].title.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].title.match(pat).length;score+=(20*m_c);}
|
||||
if(tipuesearch_in.pages[i].text.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].text.match(pat).length;score+=(20*m_c);}
|
||||
if(tipuesearch_in.pages[i].tags.search(pat)!=-1)
|
||||
{var m_c=tipuesearch_in.pages[i].tags.match(pat).length;score+=(10*m_c);}
|
||||
if(tipuesearch_in.pages[i].url.search(pat)!=-1)
|
||||
{score+=20;}
|
||||
if(score!=0)
|
||||
{for(var e=0;e<tipuesearch_weight.weight.length;e++)
|
||||
{if(tipuesearch_in.pages[i].url==tipuesearch_weight.weight[e].url)
|
||||
{score+=tipuesearch_weight.weight[e].score;}}}
|
||||
if(score!=0)
|
||||
{found.push({"score":score,"title":tipuesearch_in.pages[i].title,"desc":s_t,"url":tipuesearch_in.pages[i].url});c++;}}}
|
||||
if(c!=0)
|
||||
{if(set.showTitleCount&&tipuesearch_t_c==0)
|
||||
{var title=document.title;document.title='('+c+') '+title;tipuesearch_t_c++;}
|
||||
if(show_replace)
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_2+' '+d+'. '+tipuesearch_string_3+' <a id="tipue_search_replaced">'+d_r+'</a></div>';}
|
||||
if(c==1)
|
||||
{out+='<div id="tipue_search_results_count">'+tipuesearch_string_4;}
|
||||
else
|
||||
{c_c=c.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",");out+='<div id="tipue_search_results_count">'+c_c+' '+tipuesearch_string_5;}
|
||||
if(set.showTime)
|
||||
{var endTimer=new Date().getTime();var time=(endTimer-startTimer)/ 1000;out+=' ('+time.toFixed(2)+' '+tipuesearch_string_14+')';set.showTime=false;}
|
||||
out+='</div>';found.sort(function(a,b){return b.score-a.score});var l_o=0;for(var i=0;i<found.length;i++)
|
||||
{if(l_o>=start&&l_o<set.show+start)
|
||||
{out+='<div class="tipue_search_content_title"><a href="'+found[i].url+'"'+tipue_search_w+'>'+found[i].title+'</a></div>';if(set.debug)
|
||||
{out+='<div class="tipue_search_content_debug">Score: '+found[i].score+'</div>';}
|
||||
if(set.showURL)
|
||||
{var s_u=found[i].url.toLowerCase();if(s_u.indexOf('http://')==0)
|
||||
{s_u=s_u.slice(7);}
|
||||
out+='<div class="tipue_search_content_url"><a href="'+found[i].url+'"'+tipue_search_w+'>'+s_u+'</a></div>';}
|
||||
if(found[i].desc)
|
||||
{var t=found[i].desc;if(set.showContext)
|
||||
{d_w=d.split(' ');var s_1=found[i].desc.toLowerCase().indexOf(d_w[0]);if(s_1>set.contextStart)
|
||||
{var t_1=t.substr(s_1-set.contextBuffer);var s_2=t_1.indexOf(' ');t_1=t.substr(s_1-set.contextBuffer+s_2);t_1=$.trim(t_1);if(t_1.length>set.contextLength)
|
||||
{t='... '+t_1;}}}
|
||||
if(standard)
|
||||
{d_w=d.split(' ');for(var f=0;f<d_w.length;f++)
|
||||
{if(set.highlightTerms)
|
||||
{var patr=new RegExp('('+d_w[f]+')','gi');t=t.replace(patr,"<h0011>$1<h0012>");}}}
|
||||
else if(set.highlightTerms)
|
||||
{var patr=new RegExp('('+d+')','gi');t=t.replace(patr,"<span class=\"tipue_search_content_bold\">$1</span>");}
|
||||
var t_d='';var t_w=t.split(' ');if(t_w.length<set.descriptiveWords)
|
||||
{t_d=t;}
|
||||
else
|
||||
{for(var f=0;f<set.descriptiveWords;f++)
|
||||
{t_d+=t_w[f]+' ';}}
|
||||
t_d=$.trim(t_d);if(t_d.charAt(t_d.length-1)!='.')
|
||||
{t_d+=' ...';}
|
||||
t_d=t_d.replace(/h0011/g,'span class=\"tipue_search_content_bold\"');t_d=t_d.replace(/h0012/g,'/span');out+='<div class="tipue_search_content_text">'+t_d+'</div>';}}
|
||||
l_o++;}
|
||||
if(set.showRelated&&standard)
|
||||
{f=0;for(var i=0;i<tipuesearch_related.searches.length;i++)
|
||||
{if(d==tipuesearch_related.searches[i].search)
|
||||
{if(show_replace)
|
||||
{d_o=d;}
|
||||
if(!f)
|
||||
{out+='<div class="tipue_search_related_title">'+tipuesearch_string_15+' <span class="tipue_search_related_bold">'+d_o+'</span></div><div class="tipue_search_related_cols">';}
|
||||
out+='<div class="tipue_search_related_text"><a class="tipue_search_related" id="'+tipuesearch_related.searches[i].related+'">';if(tipuesearch_related.searches[i].before)
|
||||
{out+='<span class="tipue_search_related_before">'+tipuesearch_related.searches[i].before+'</span> ';}
|
||||
out+=tipuesearch_related.searches[i].related;if(tipuesearch_related.searches[i].after)
|
||||
{out+=' <span class="tipue_search_related_after">'+tipuesearch_related.searches[i].after+'</span>';}
|
||||
out+='</a></div>';f++;}}
|
||||
if(f)
|
||||
{out+='</div>';}}
|
||||
if(c>set.show)
|
||||
{var pages=Math.ceil(c / set.show);var page=(start / set.show);out+='<nav><div id="tipue_search_foot"><ul id="tipue_search_foot_boxes">';if(start>0)
|
||||
{out+='<li role="navigation"><a class="tipue_search_foot_box" accesskey="b" id="'+(start-set.show)+'_'+replace+'">'+tipuesearch_string_6+'</a></li>';}
|
||||
if(page<=2)
|
||||
{var p_b=pages;if(pages>3)
|
||||
{p_b=3;}
|
||||
for(var f=0;f<p_b;f++)
|
||||
{if(f==page)
|
||||
{out+='<li class="current" role="navigation">'+(f+1)+'</li>';}
|
||||
else
|
||||
{out+='<li role="navigation"><a class="tipue_search_foot_box" id="'+(f*set.show)+'_'+replace+'">'+(f+1)+'</a></li>';}}}
|
||||
else
|
||||
{var p_b=page+2;if(p_b>pages)
|
||||
{p_b=pages;}
|
||||
for(var f=page-1;f<p_b;f++)
|
||||
{if(f==page)
|
||||
{out+='<li class="current" role="navigation">'+(f+1)+'</li>';}
|
||||
else
|
||||
{out+='<li role="navigation"><a class="tipue_search_foot_box" id="'+(f*set.show)+'_'+replace+'">'+(f+1)+'</a></li>';}}}
|
||||
if(page+1!=pages)
|
||||
{out+='<li role="navigation"><a class="tipue_search_foot_box" accesskey="m" id="'+(start+set.show)+'_'+replace+'">'+tipuesearch_string_7+'</a></li>';}
|
||||
out+='</ul></div></nav>';}}
|
||||
else
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_8+'</div>';}}
|
||||
else
|
||||
{if(show_stop)
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_8+'. '+tipuesearch_string_9+'</div>';}
|
||||
else
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_10+'</div>';if(set.minimumLength==1)
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_11+'</div>';}
|
||||
else
|
||||
{out+='<div id="tipue_search_warning">'+tipuesearch_string_12+' '+set.minimumLength+' '+tipuesearch_string_13+'</div>';}}}
|
||||
$('#tipue_search_content').hide().html(out).slideDown(200);$('#tipue_search_replaced').click(function()
|
||||
{getTipueSearch(0,false);});$('.tipue_search_related').click(function()
|
||||
{$('#tipue_search_input').val($(this).attr('id'));getTipueSearch(0,true);});$('.tipue_search_foot_box').click(function()
|
||||
{var id_v=$(this).attr('id');var id_a=id_v.split('_');getTipueSearch(parseInt(id_a[0]),id_a[1]);});}});};})(jQuery);
|
||||
1686
docs/_site/assets/tipuesearch/tipuesearch_content.js
Normal file
1686
docs/_site/assets/tipuesearch/tipuesearch_content.js
Normal file
File diff suppressed because one or more lines are too long
81
docs/_site/assets/tipuesearch/tipuesearch_set.js
Executable file
81
docs/_site/assets/tipuesearch/tipuesearch_set.js
Executable file
@@ -0,0 +1,81 @@
|
||||
|
||||
/*
|
||||
Tipue Search 6.1
|
||||
Copyright (c) 2017 Tipue
|
||||
Tipue Search is released under the MIT License
|
||||
http://www.tipue.com/search
|
||||
*/
|
||||
|
||||
var tipuesearch_pages = ["/", "/approvals", "/docs"];
|
||||
|
||||
/*
|
||||
Stop words
|
||||
Stop words list from http://www.ranks.nl/stopwords
|
||||
*/
|
||||
|
||||
var tipuesearch_stop_words = ["a", "about", "above", "after", "again", "against", "all", "am", "an", "and", "any", "are", "aren't", "as", "at", "be", "because", "been", "before", "being", "below", "between", "both", "but", "by", "can't", "cannot", "could", "couldn't", "did", "didn't", "do", "does", "doesn't", "doing", "don't", "down", "during", "each", "few", "for", "from", "further", "had", "hadn't", "has", "hasn't", "have", "haven't", "having", "he", "he'd", "he'll", "he's", "her", "here", "here's", "hers", "herself", "him", "himself", "his", "how", "how's", "i", "i'd", "i'll", "i'm", "i've", "if", "in", "into", "is", "isn't", "it", "it's", "its", "itself", "let's", "me", "more", "most", "mustn't", "my", "myself", "no", "nor", "not", "of", "off", "on", "once", "only", "or", "other", "ought", "our", "ours", "ourselves", "out", "over", "own", "same", "shan't", "she", "she'd", "she'll", "she's", "should", "shouldn't", "so", "some", "such", "than", "that", "that's", "the", "their", "theirs", "them", "themselves", "then", "there", "there's", "these", "they", "they'd", "they'll", "they're", "they've", "this", "those", "through", "to", "too", "under", "until", "up", "very", "was", "wasn't", "we", "we'd", "we'll", "we're", "we've", "were", "weren't", "what", "what's", "when", "when's", "where", "where's", "which", "while", "who", "who's", "whom", "why", "why's", "with", "won't", "would", "wouldn't", "you", "you'd", "you'll", "you're", "you've", "your", "yours", "yourself", "yourselves"];
|
||||
|
||||
|
||||
// Word replace
|
||||
|
||||
var tipuesearch_replace = {'words': [
|
||||
{'word': 'tip', 'replace_with': 'tipue'},
|
||||
{'word': 'javscript', 'replace_with': 'javascript'},
|
||||
{'word': 'jqeury', 'replace_with': 'jquery'}
|
||||
]};
|
||||
|
||||
|
||||
// Weighting
|
||||
|
||||
var tipuesearch_weight = {'weight': [
|
||||
{'url': 'http://www.tipue.com', 'score': 20},
|
||||
{'url': 'http://www.tipue.com/search', 'score': 30},
|
||||
{'url': 'http://www.tipue.com/is', 'score': 10}
|
||||
]};
|
||||
|
||||
|
||||
// Illogical stemming
|
||||
|
||||
var tipuesearch_stem = {'words': [
|
||||
{'word': 'e-mail', 'stem': 'email'},
|
||||
{'word': 'javascript', 'stem': 'jquery'},
|
||||
{'word': 'javascript', 'stem': 'js'}
|
||||
]};
|
||||
|
||||
|
||||
// Related searches
|
||||
|
||||
var tipuesearch_related = {'searches': [
|
||||
{'search': 'tipue', 'related': 'Tipue Search'},
|
||||
{'search': 'tipue', 'before': 'Tipue Search', 'related': 'Getting Started'},
|
||||
{'search': 'tipue', 'before': 'Tipue', 'related': 'jQuery'},
|
||||
{'search': 'tipue', 'before': 'Tipue', 'related': 'Blog'}
|
||||
]};
|
||||
|
||||
|
||||
// Internal strings
|
||||
|
||||
var tipuesearch_string_1 = 'No title';
|
||||
var tipuesearch_string_2 = 'Showing results for';
|
||||
var tipuesearch_string_3 = 'Search instead for';
|
||||
var tipuesearch_string_4 = '1 result';
|
||||
var tipuesearch_string_5 = 'results';
|
||||
var tipuesearch_string_6 = 'Back';
|
||||
var tipuesearch_string_7 = 'More';
|
||||
var tipuesearch_string_8 = 'Nothing found.';
|
||||
var tipuesearch_string_9 = 'Common words are largely ignored.';
|
||||
var tipuesearch_string_10 = 'Search too short';
|
||||
var tipuesearch_string_11 = 'Should be one character or more.';
|
||||
var tipuesearch_string_12 = 'Should be';
|
||||
var tipuesearch_string_13 = 'characters or more.';
|
||||
var tipuesearch_string_14 = 'seconds';
|
||||
var tipuesearch_string_15 = 'Searches related to';
|
||||
|
||||
|
||||
// Internals
|
||||
|
||||
|
||||
// Timer for showTime
|
||||
|
||||
var startTimer = new Date().getTime();
|
||||
|
||||
Reference in New Issue
Block a user