Skip to content

Commit

Permalink
rebuild site, increment version
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpollock committed Sep 21, 2018
1 parent 15e7313 commit 8508962
Show file tree
Hide file tree
Showing 11 changed files with 627 additions and 241 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: sparklyr.nested
Title: A sparklyr extension for nested data
Version: 0.0.2
Version: 0.0.3
Authors@R: c(
person("Matt", "Pollock", email = "[email protected]", role = c("aut", "cre")),
person(family = "The MITRE Corporation", role = c("cph"))
Expand Down
35 changes: 26 additions & 9 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

129 changes: 75 additions & 54 deletions docs/index.html

Large diffs are not rendered by default.

81 changes: 75 additions & 6 deletions docs/pkgdown.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
/* Sticker footer */
/* Sticky footer */

/**
* Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
* Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css
*
* .Site -> body > .container
* .Site-content -> body > .container .row
* .footer -> footer
*
* Key idea seems to be to ensure that .container and __all its parents__
* have height set to 100%
*
*/

html, body {
height: 100%;
}

body > .container {
display: flex;
padding-top: 60px;
min-height: calc(100vh);
height: 100%;
flex-direction: column;

padding-top: 60px;
}

body > .container .row {
flex: 1;
flex: 1 0 auto;
}

footer {
Expand All @@ -16,6 +35,7 @@ footer {
border-top: 1px solid #e5e5e5;
color: #666;
display: flex;
flex-shrink: 0;
}
footer p {
margin-bottom: 0;
Expand All @@ -38,6 +58,12 @@ img {
max-width: 100%;
}

/* Typographic tweaking ---------------------------------*/

.contents h1.page-header {
margin-top: calc(-60px + 1em);
}

/* Section anchors ---------------------------------*/

a.anchor {
Expand Down Expand Up @@ -68,7 +94,7 @@ a.anchor {

.contents h1, .contents h2, .contents h3, .contents h4 {
padding-top: 60px;
margin-top: -60px;
margin-top: -40px;
}

/* Static header placement on mobile devices */
Expand Down Expand Up @@ -100,10 +126,14 @@ a.anchor {
margin-bottom: 0.5em;
}

.orcid {
height: 16px;
vertical-align: middle;
}

/* Reference index & topics ----------------------------------------------- */

.ref-index th {font-weight: normal;}
.ref-index h2 {font-size: 20px;}

.ref-index td {vertical-align: top;}
.ref-index .alias {width: 40%;}
Expand Down Expand Up @@ -137,6 +167,12 @@ pre, code {
color: #333;
}

pre code {
overflow: auto;
word-wrap: normal;
white-space: pre;
}

pre .img {
margin: 5px 0;
}
Expand All @@ -151,6 +187,10 @@ code a, pre a {
color: #375f84;
}

a.sourceLine:hover {
text-decoration: none;
}

.fl {color: #1514b5;}
.fu {color: #000000;} /* function */
.ch,.st {color: #036a07;} /* string */
Expand All @@ -161,3 +201,32 @@ code a, pre a {
.error { color: orange; font-weight: bolder;}
.warning { color: #6A0366; font-weight: bolder;}

/* Clipboard --------------------------*/

.hasCopyButton {
position: relative;
}

.btn-copy-ex {
position: absolute;
right: 0;
top: 0;
visibility: hidden;
}

.hasCopyButton:hover button.btn-copy-ex {
visibility: visible;
}

/* mark.js ----------------------------*/

mark {
background-color: rgba(255, 255, 51, 0.5);
border-bottom: 2px solid rgba(255, 153, 51, 0.3);
padding: 1px;
}

/* vertical spacing after htmlwidgets */
.html-widget {
margin-bottom: 10px;
}
133 changes: 99 additions & 34 deletions docs/pkgdown.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,110 @@
$(function() {
$("#sidebar").stick_in_parent({offset_top: 40});
$('body').scrollspy({
target: '#sidebar',
offset: 60
});
/* http://gregfranko.com/blog/jquery-best-practices/ */
(function($) {
$(function() {

$("#sidebar")
.stick_in_parent({offset_top: 40})
.on('sticky_kit:bottom', function(e) {
$(this).parent().css('position', 'static');
})
.on('sticky_kit:unbottom', function(e) {
$(this).parent().css('position', 'relative');
});

$('body').scrollspy({
target: '#sidebar',
offset: 60
});

var cur_path = paths(location.pathname);
$("#navbar ul li a").each(function(index, value) {
if (value.text == "Home")
return;
if (value.getAttribute("href") === "#")
return;

var path = paths(value.pathname);
if (is_prefix(cur_path, path)) {
// Add class to parent <li>, and enclosing <li> if in dropdown
var menu_anchor = $(value);
$('[data-toggle="tooltip"]').tooltip();

var cur_path = paths(location.pathname);
var links = $("#navbar ul li a");
var max_length = -1;
var pos = -1;
for (var i = 0; i < links.length; i++) {
if (links[i].getAttribute("href") === "#")
continue;
var path = paths(links[i].pathname);

var length = prefix_length(cur_path, path);
if (length > max_length) {
max_length = length;
pos = i;
}
}

// Add class to parent <li>, and enclosing <li> if in dropdown
if (pos >= 0) {
var menu_anchor = $(links[pos]);
menu_anchor.parent().addClass("active");
menu_anchor.closest("li.dropdown").addClass("active");
}
});
});

function paths(pathname) {
var pieces = pathname.split("/");
pieces.shift(); // always starts with /
function paths(pathname) {
var pieces = pathname.split("/");
pieces.shift(); // always starts with /

var end = pieces[pieces.length - 1];
if (end === "index.html" || end === "")
pieces.pop();
return(pieces);
}

function prefix_length(needle, haystack) {
if (needle.length > haystack.length)
return(0);

// Special case for length-0 haystack, since for loop won't run
if (haystack.length === 0) {
return(needle.length === 0 ? 1 : 0);
}

for (var i = 0; i < haystack.length; i++) {
if (needle[i] != haystack[i])
return(i);
}

var end = pieces[pieces.length - 1];
if (end === "index.html" || end === "")
pieces.pop();
return(pieces);
}
return(haystack.length);
}

function is_prefix(needle, haystack) {
if (needle.length > haystack.lengh)
return(false);
/* Clipboard --------------------------*/

for (var i = 0; i < haystack.length; i++) {
if (needle[i] != haystack[i])
return(false);
function changeTooltipMessage(element, msg) {
var tooltipOriginalTitle=element.getAttribute('data-original-title');
element.setAttribute('data-original-title', msg);
$(element).tooltip('show');
element.setAttribute('data-original-title', tooltipOriginalTitle);
}

return(true);
}
if(Clipboard.isSupported()) {
$(document).ready(function() {
var copyButton = "<button type='button' class='btn btn-primary btn-copy-ex' type = 'submit' title='Copy to clipboard' aria-hidden='true' data-toggle='tooltip' data-placement='left auto' data-trigger='hover' data-clipboard-copy><i class='fa fa-copy' aria-hidden='true'></i></button>";

$(".examples, div.sourceCode").addClass("hasCopyButton");

// Insert copy buttons:
$(copyButton).prependTo(".hasCopyButton");

// Initialize tooltips:
$('.btn-copy-ex').tooltip({container: 'body'});

// Initialize clipboard:
var clipboardBtnCopies = new Clipboard('[data-clipboard-copy]', {
text: function(trigger) {
return trigger.parentNode.textContent;
}
});

clipboardBtnCopies.on('success', function(e) {
changeTooltipMessage(e.trigger, 'Copied!');
e.clearSelection();
});

clipboardBtnCopies.on('error', function() {
changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy');
});
});
}
})(window.jQuery || window.$)
Loading

0 comments on commit 8508962

Please sign in to comment.