Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
14,106 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ gem 'middleman', '~> 4.2' | |
gem 'middleman-livereload', '~> 3.4' | ||
|
||
gem 'yard' | ||
gem 'byebug', require: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
body { | ||
margin: 0; | ||
font-family: Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif; | ||
font-size: 13px; | ||
height: 101%; | ||
overflow-x: hidden; | ||
background: #fafafa; | ||
} | ||
|
||
h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; } | ||
.clear { clear: both; } | ||
.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; } | ||
#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; } | ||
#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJ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zQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; } | ||
#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; } | ||
#full_list ul { padding: 0; } | ||
#full_list li { padding: 0; margin: 0; list-style: none; } | ||
#full_list li .item { padding: 5px 5px 5px 12px; } | ||
#noresults { padding: 7px 12px; background: #fff; } | ||
#content.insearch #noresults { margin-left: 7px; } | ||
li.collapsed ul { display: none; } | ||
li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; } | ||
li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; } | ||
li { color: #888; cursor: pointer; } | ||
li.deprecated { text-decoration: line-through; font-style: italic; } | ||
li.odd { background: #f0f0f0; } | ||
li.even { background: #fafafa; } | ||
.item:hover { background: #ddd; } | ||
li small:before { content: "("; } | ||
li small:after { content: ")"; } | ||
li small.search_info { display: none; } | ||
a, a:visited { text-decoration: none; color: #685d9f; } | ||
li.clicked > .item { background: #685d9f; color: #ccc; } | ||
li.clicked > .item a, li.clicked > .item a:visited { color: #eee; } | ||
li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; } | ||
li.collapsed.clicked a.toggle { background-position: top right; } | ||
#search input { border: 1px solid #bbb; border-radius: 3px; } | ||
#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; } | ||
#full_list_nav a, #nav a:visited { color: #358; } | ||
#full_list_nav a:hover { background: transparent; color: #5af; } | ||
#full_list_nav span:after { content: ' | '; } | ||
#full_list_nav span:last-child:after { content: ''; } | ||
|
||
#content h1 { margin-top: 0; } | ||
li { white-space: nowrap; cursor: normal; } | ||
li small { display: block; font-size: 0.8em; } | ||
li small:before { content: ""; } | ||
li small:after { content: ""; } | ||
li small.search_info { display: none; } | ||
#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; } | ||
#content.insearch #search { background-position: center right; } | ||
#search input { width: 110px; } | ||
|
||
#full_list.insearch ul { display: block; } | ||
#full_list.insearch .item { display: none; } | ||
#full_list.insearch .found { display: block; padding-left: 11px !important; } | ||
#full_list.insearch li a.toggle { display: none; } | ||
#full_list.insearch li small.search_info { display: block; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,216 @@ | ||
(function() { | ||
|
||
var $clicked = $(null); | ||
var searchTimeout = null; | ||
var searchCache = []; | ||
var caseSensitiveMatch = false; | ||
var ignoreKeyCodeMin = 8; | ||
var ignoreKeyCodeMax = 46; | ||
var commandKey = 91; | ||
|
||
RegExp.escape = function(text) { | ||
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); | ||
} | ||
|
||
function escapeShortcut() { | ||
$(document).keydown(function(evt) { | ||
if (evt.which == 27) { | ||
window.parent.postMessage('navEscape', '*'); | ||
} | ||
}); | ||
} | ||
|
||
function navResizer() { | ||
$(window).mousemove(function(e) { | ||
window.parent.postMessage({ | ||
action: 'mousemove', event: {pageX: e.pageX, which: e.which} | ||
}, '*'); | ||
}).mouseup(function(e) { | ||
window.parent.postMessage({action: 'mouseup'}, '*'); | ||
}); | ||
window.parent.postMessage("navReady", "*"); | ||
} | ||
|
||
function clearSearchTimeout() { | ||
clearTimeout(searchTimeout); | ||
searchTimeout = null; | ||
} | ||
|
||
function enableLinks() { | ||
// load the target page in the parent window | ||
$('#full_list li').on('click', function(evt) { | ||
$('#full_list li').removeClass('clicked'); | ||
$clicked = $(this); | ||
$clicked.addClass('clicked'); | ||
evt.stopPropagation(); | ||
|
||
if (evt.target.tagName === 'A') return true; | ||
|
||
var elem = $clicked.find('> .item .object_link a')[0]; | ||
var e = evt.originalEvent; | ||
var newEvent = new MouseEvent(evt.originalEvent.type); | ||
newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget); | ||
elem.dispatchEvent(newEvent); | ||
evt.preventDefault(); | ||
return false; | ||
}); | ||
} | ||
|
||
function enableToggles() { | ||
// show/hide nested classes on toggle click | ||
$('#full_list a.toggle').on('click', function(evt) { | ||
evt.stopPropagation(); | ||
evt.preventDefault(); | ||
$(this).parent().parent().toggleClass('collapsed'); | ||
highlight(); | ||
}); | ||
} | ||
|
||
function populateSearchCache() { | ||
$('#full_list li .item').each(function() { | ||
var $node = $(this); | ||
var $link = $node.find('.object_link a'); | ||
if ($link.length > 0) { | ||
searchCache.push({ | ||
node: $node, | ||
link: $link, | ||
name: $link.text(), | ||
fullName: $link.attr('title').split(' ')[0] | ||
}); | ||
} | ||
}); | ||
} | ||
|
||
function enableSearch() { | ||
$('#search input').keyup(function(event) { | ||
if (ignoredKeyPress(event)) return; | ||
if (this.value === "") { | ||
clearSearch(); | ||
} else { | ||
performSearch(this.value); | ||
} | ||
}); | ||
|
||
$('#full_list').after("<div id='noresults' style='display:none'></div>"); | ||
} | ||
|
||
function ignoredKeyPress(event) { | ||
if ( | ||
(event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) || | ||
(event.keyCode == commandKey) | ||
) { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
|
||
function clearSearch() { | ||
clearSearchTimeout(); | ||
$('#full_list .found').removeClass('found').each(function() { | ||
var $link = $(this).find('.object_link a'); | ||
$link.text($link.text()); | ||
}); | ||
$('#full_list, #content').removeClass('insearch'); | ||
$clicked.parents().removeClass('collapsed'); | ||
highlight(); | ||
} | ||
|
||
function performSearch(searchString) { | ||
clearSearchTimeout(); | ||
$('#full_list, #content').addClass('insearch'); | ||
$('#noresults').text('').hide(); | ||
partialSearch(searchString, 0); | ||
} | ||
|
||
function partialSearch(searchString, offset) { | ||
var lastRowClass = ''; | ||
var i = null; | ||
for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) { | ||
var item = searchCache[i]; | ||
var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name); | ||
var matchString = buildMatchString(searchString); | ||
var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i"); | ||
if (searchName.match(matchRegexp) == null) { | ||
item.node.removeClass('found'); | ||
item.link.text(item.link.text()); | ||
} | ||
else { | ||
item.node.addClass('found'); | ||
item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1'); | ||
lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2'; | ||
item.link.html(item.name.replace(matchRegexp, "<strong>$&</strong>")); | ||
} | ||
} | ||
if(i == searchCache.length) { | ||
searchDone(); | ||
} else { | ||
searchTimeout = setTimeout(function() { | ||
partialSearch(searchString, i); | ||
}, 0); | ||
} | ||
} | ||
|
||
function searchDone() { | ||
searchTimeout = null; | ||
highlight(); | ||
if ($('#full_list li:visible').size() === 0) { | ||
$('#noresults').text('No results were found.').hide().fadeIn(); | ||
} else { | ||
$('#noresults').text('').hide(); | ||
} | ||
$('#content').removeClass('insearch'); | ||
} | ||
|
||
function buildMatchString(searchString, event) { | ||
caseSensitiveMatch = searchString.match(/[A-Z]/) != null; | ||
var regexSearchString = RegExp.escape(searchString); | ||
if (caseSensitiveMatch) { | ||
regexSearchString += "|" + | ||
$.map(searchString.split(''), function(e) { return RegExp.escape(e); }). | ||
join('.+?'); | ||
} | ||
return regexSearchString; | ||
} | ||
|
||
function highlight() { | ||
$('#full_list li:visible').each(function(n) { | ||
$(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even'); | ||
}); | ||
} | ||
|
||
/** | ||
* Expands the tree to the target element and its immediate | ||
* children. | ||
*/ | ||
function expandTo(path) { | ||
var $target = $(document.getElementById('object_' + path)); | ||
$target.addClass('clicked'); | ||
$target.removeClass('collapsed'); | ||
$target.parentsUntil('#full_list', 'li').removeClass('collapsed'); | ||
if($target[0]) { | ||
window.scrollTo(window.scrollX, $target.offset().top - 250); | ||
highlight(); | ||
} | ||
} | ||
|
||
function windowEvents(event) { | ||
var msg = event.data; | ||
if (msg.action === "expand") { | ||
expandTo(msg.path); | ||
} | ||
return false; | ||
} | ||
|
||
window.addEventListener("message", windowEvents, false); | ||
|
||
$(document).ready(function() { | ||
escapeShortcut(); | ||
navResizer(); | ||
enableLinks(); | ||
enableToggles(); | ||
populateSearchCache(); | ||
enableSearch(); | ||
}); | ||
|
||
})(); |
Oops, something went wrong.