diff --git a/AMOVA.html b/AMOVA.html index c6aa3da..41999e8 100644 --- a/AMOVA.html +++ b/AMOVA.html @@ -198,10 +198,11 @@ +
- + diff --git a/Authors.html b/Authors.html index e49fc4b..fa81076 100644 --- a/Authors.html +++ b/Authors.html @@ -155,10 +155,11 @@ +
- + diff --git a/DAPC.html b/DAPC.html index 99712a8..3bc7f01 100644 --- a/DAPC.html +++ b/DAPC.html @@ -198,10 +198,11 @@ +
- + diff --git a/Data_Preparation.html b/Data_Preparation.html index 9310726..c908c42 100644 --- a/Data_Preparation.html +++ b/Data_Preparation.html @@ -198,10 +198,11 @@ +
- + diff --git a/Data_sets.html b/Data_sets.html index 0febdb5..4ee15ab 100644 --- a/Data_sets.html +++ b/Data_sets.html @@ -155,10 +155,11 @@ +
- + diff --git a/First_Steps.html b/First_Steps.html index 2631f25..e691d86 100644 --- a/First_Steps.html +++ b/First_Steps.html @@ -198,10 +198,11 @@ +
- + diff --git a/Function_Glossary.html b/Function_Glossary.html index a1e9200..e54586c 100644 --- a/Function_Glossary.html +++ b/Function_Glossary.html @@ -198,10 +198,11 @@ +
- + diff --git a/Genotypic_EvenRichDiv.html b/Genotypic_EvenRichDiv.html index c618679..1f3e631 100644 --- a/Genotypic_EvenRichDiv.html +++ b/Genotypic_EvenRichDiv.html @@ -198,10 +198,11 @@ +
- + diff --git a/Getting_ready_to_use_R.html b/Getting_ready_to_use_R.html index 9bc2050..73f199e 100644 --- a/Getting_ready_to_use_R.html +++ b/Getting_ready_to_use_R.html @@ -198,10 +198,11 @@ +
- + diff --git a/Intro_to_R.html b/Intro_to_R.html index d3c7a65..17d6a91 100644 --- a/Intro_to_R.html +++ b/Intro_to_R.html @@ -198,10 +198,11 @@ +
- + diff --git a/Introduction.html b/Introduction.html index 33021ac..eca900c 100644 --- a/Introduction.html +++ b/Introduction.html @@ -155,10 +155,11 @@ +
- + diff --git a/Linkage_disequilibrium.html b/Linkage_disequilibrium.html index 70014d3..29f5afd 100644 --- a/Linkage_disequilibrium.html +++ b/Linkage_disequilibrium.html @@ -198,10 +198,11 @@ +
- + diff --git a/Locus_Stats.html b/Locus_Stats.html index 347e0ad..858269c 100644 --- a/Locus_Stats.html +++ b/Locus_Stats.html @@ -198,10 +198,11 @@ +
- + diff --git a/Minimum_Spanning_Networks.html b/Minimum_Spanning_Networks.html index 56d7112..bcf719b 100644 --- a/Minimum_Spanning_Networks.html +++ b/Minimum_Spanning_Networks.html @@ -198,10 +198,11 @@ +
- + diff --git a/Pop_Structure.html b/Pop_Structure.html index 7919174..acd40ee 100644 --- a/Pop_Structure.html +++ b/Pop_Structure.html @@ -198,10 +198,11 @@ +
- + diff --git a/Population_Strata.html b/Population_Strata.html index 8aa4dca..9725514 100644 --- a/Population_Strata.html +++ b/Population_Strata.html @@ -198,10 +198,11 @@ +
- + diff --git a/Preface.html b/Preface.html index fb25b56..d717f50 100644 --- a/Preface.html +++ b/Preface.html @@ -155,10 +155,11 @@ +
- + diff --git a/funpendix.html b/funpendix.html index f899ffb..9cd46a1 100644 --- a/funpendix.html +++ b/funpendix.html @@ -155,10 +155,11 @@ +
- + diff --git a/index.html b/index.html index 39e5a0a..0137647 100644 --- a/index.html +++ b/index.html @@ -155,10 +155,11 @@ +
- + diff --git a/libs/navigation-1.1/FileSaver.min.js b/libs/navigation-1.1/FileSaver.min.js new file mode 100644 index 0000000..6268ec9 --- /dev/null +++ b/libs/navigation-1.1/FileSaver.min.js @@ -0,0 +1,2 @@ +/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ +var saveAs=saveAs||function(e){"use strict";if("undefined"==typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var t=e.document,n=function(){return e.URL||e.webkitURL||e},o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),r="download"in o,i=function(e){var t=new MouseEvent("click");e.dispatchEvent(t)},a=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),c=e.webkitRequestFileSystem,f=e.requestFileSystem||c||e.mozRequestFileSystem,u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},d="application/octet-stream",s=0,l=4e4,v=function(e){var t=function(){"string"==typeof e?n().revokeObjectURL(e):e.remove()};setTimeout(t,l)},p=function(e,t,n){t=[].concat(t);for(var o=t.length;o--;){var r=e["on"+t[o]];if("function"==typeof r)try{r.call(e,n||e)}catch(i){u(i)}}},w=function(e){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e},y=function(t,u,l){l||(t=w(t));var y,m,S,h=this,R=t.type,O=!1,g=function(){p(h,"writestart progress write writeend".split(" "))},b=function(){if(m&&a&&"undefined"!=typeof FileReader){var o=new FileReader;return o.onloadend=function(){var e=o.result;m.location.href="data:attachment/file"+e.slice(e.search(/[,;]/)),h.readyState=h.DONE,g()},o.readAsDataURL(t),void(h.readyState=h.INIT)}if((O||!y)&&(y=n().createObjectURL(t)),m)m.location.href=y;else{var r=e.open(y,"_blank");void 0===r&&a&&(e.location.href=y)}h.readyState=h.DONE,g(),v(y)},E=function(e){return function(){return h.readyState!==h.DONE?e.apply(this,arguments):void 0}},N={create:!0,exclusive:!1};return h.readyState=h.INIT,u||(u="download"),r?(y=n().createObjectURL(t),void setTimeout(function(){o.href=y,o.download=u,i(o),g(),v(y),h.readyState=h.DONE})):(e.chrome&&R&&R!==d&&(S=t.slice||t.webkitSlice,t=S.call(t,0,t.size,d),O=!0),c&&"download"!==u&&(u+=".download"),(R===d||c)&&(m=e),f?(s+=t.size,void f(e.TEMPORARY,s,E(function(e){e.root.getDirectory("saved",N,E(function(e){var n=function(){e.getFile(u,N,E(function(e){e.createWriter(E(function(n){n.onwriteend=function(t){m.location.href=e.toURL(),h.readyState=h.DONE,p(h,"writeend",t),v(e)},n.onerror=function(){var e=n.error;e.code!==e.ABORT_ERR&&b()},"writestart progress write abort".split(" ").forEach(function(e){n["on"+e]=h["on"+e]}),n.write(t),h.abort=function(){n.abort(),h.readyState=h.DONE},h.readyState=h.WRITING}),b)}),b)};e.getFile(u,{create:!1},E(function(e){e.remove(),n()}),E(function(e){e.code===e.NOT_FOUND_ERR?n():b()}))}),b)}),b)):void b())},m=y.prototype,S=function(e,t,n){return new y(e,t,n)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(e,t,n){return n||(e=w(e)),navigator.msSaveOrOpenBlob(e,t||"download")}:(m.abort=function(){var e=this;e.readyState=e.DONE,p(e,"abort")},m.readyState=m.INIT=0,m.WRITING=1,m.DONE=2,m.error=m.onwritestart=m.onprogress=m.onwrite=m.onabort=m.onerror=m.onwriteend=null,S)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);"undefined"!=typeof module&&module.exports?module.exports.saveAs=saveAs:"undefined"!=typeof define&&null!==define&&null!==define.amd&&define([],function(){return saveAs}); \ No newline at end of file diff --git a/libs/navigation-1.1/codefolding.js b/libs/navigation-1.1/codefolding.js new file mode 100644 index 0000000..4938425 --- /dev/null +++ b/libs/navigation-1.1/codefolding.js @@ -0,0 +1,59 @@ + +window.initializeCodeFolding = function(show) { + + // handlers for show-all and hide all + $("#rmd-show-all-code").click(function() { + $('div.r-code-collapse').each(function() { + $(this).collapse('show'); + }); + }); + $("#rmd-hide-all-code").click(function() { + $('div.r-code-collapse').each(function() { + $(this).collapse('hide'); + }); + }); + + // index for unique code element ids + var currentIndex = 1; + + // select all R code blocks + var rCodeBlocks = $('pre.r'); + rCodeBlocks.each(function() { + + // create a collapsable div to wrap the code in + var div = $('
'); + if (show) + div.addClass('in'); + var id = 'rcode-643E0F36' + currentIndex++; + div.attr('id', id); + $(this).before(div); + $(this).detach().appendTo(div); + + // add a show code button right above + var showCodeText = $('' + (show ? 'Hide' : 'Code') + ''); + var showCodeButton = $(''); + showCodeButton.append(showCodeText); + showCodeButton + .attr('data-toggle', 'collapse') + .attr('data-target', '#' + id) + .attr('aria-expanded', show) + .attr('aria-controls', id); + + var buttonRow = $('
'); + var buttonCol = $('
'); + + buttonCol.append(showCodeButton); + buttonRow.append(buttonCol); + + div.before(buttonRow); + + // update state of button on show/hide + div.on('hidden.bs.collapse', function () { + showCodeText.text('Code'); + }); + div.on('show.bs.collapse', function () { + showCodeText.text('Hide'); + }); + }); + +} diff --git a/libs/navigation-1.1/sourceembed.js b/libs/navigation-1.1/sourceembed.js new file mode 100644 index 0000000..e1b2cf8 --- /dev/null +++ b/libs/navigation-1.1/sourceembed.js @@ -0,0 +1,9 @@ + + +window.initializeSourceEmbed = function(filename) { + $("#rmd-download-source").click(function() { + var src = window.atob($("#rmd-source-code").html()); + var blob = new Blob([src], {type: "text/x-r-markdown"}); + saveAs(blob, filename); + }); +}; diff --git a/libs/navigation-1.1/tabsets.js b/libs/navigation-1.1/tabsets.js new file mode 100644 index 0000000..27848af --- /dev/null +++ b/libs/navigation-1.1/tabsets.js @@ -0,0 +1,86 @@ + + +window.buildTabsets = function(tocID) { + + // build a tabset from a section div with the .tabset class + function buildTabset(tabset) { + + // check for fade and pills options + var fade = tabset.hasClass("tabset-fade"); + var pills = tabset.hasClass("tabset-pills"); + var navClass = pills ? "nav-pills" : "nav-tabs"; + + // determine the heading level of the tabset and tabs + var match = tabset.attr('class').match(/level(\d) /); + if (match === null) + return; + var tabsetLevel = Number(match[1]); + var tabLevel = tabsetLevel + 1; + + // find all subheadings immediately below + var tabs = tabset.find("div.section.level" + tabLevel); + if (!tabs.length) + return; + + // create tablist and tab-content elements + var tabList = $(''); + $(tabs[0]).before(tabList); + var tabContent = $('
'); + $(tabs[0]).before(tabContent); + + // build the tabset + tabs.each(function(i) { + + // get the tab div + var tab = $(tabs[i]); + + // get the id then sanitize it for use with bootstrap tabs + var id = tab.attr('id'); + + // remove any table of contents entries associated with + // this ID (since we'll be removing the heading element) + $("div#" + tocID + " li a[href='#" + id + "']").parent().remove(); + + // sanitize the id for use with bootstrap tabs + id = id.replace(/[.\/?&!#<>]/g, '').replace(/\s/g, '_'); + tab.attr('id', id); + + // get the heading element within it, grab it's text, then remove it + var heading = tab.find('h' + tabLevel + ':first'); + var headingText = heading.html(); + heading.remove(); + + // build and append the tab list item + var a = $('' + headingText + ''); + a.attr('href', '#' + id); + a.attr('aria-controls', id); + var li = $('
  • '); + li.append(a); + if (i === 0) + li.attr('class', 'active'); + tabList.append(li); + + // set it's attributes + tab.attr('role', 'tabpanel'); + tab.addClass('tab-pane'); + tab.addClass('tabbed-pane'); + if (fade) + tab.addClass('fade'); + if (i === 0) { + tab.addClass('active'); + if (fade) + tab.addClass('in'); + } + + // move it into the tab content div + tab.detach().appendTo(tabContent); + }); + } + + // convert section divs with the .tabset class to tabsets + var tabsets = $("div.section.tabset"); + tabsets.each(function(i) { + buildTabset($(tabsets[i])); + }); +}; +