From 4bd4606c76dfc152547e0f5899a98494a4290d33 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 1 Mar 2018 09:48:02 +0100 Subject: Rebuild static documentation with current pkdown --- docs/authors.html | 20 ++++-- docs/index.html | 26 ++++++-- docs/pkgdown.css | 129 ++++++++++++++++++++++++++++++------- docs/pkgdown.js | 88 ++++++++++++++++++++++++- docs/reference/chent-1.png | Bin 0 -> 34969 bytes docs/reference/chent.html | 81 ++++++++++++++--------- docs/reference/draw_svg.chent.html | 56 +++++++++++----- docs/reference/index.html | 122 ++++++++++++++++++++++------------- docs/reference/pai.html | 38 +++++++---- docs/reference/plot.chent-1.png | Bin 0 -> 34969 bytes docs/reference/plot.chent.html | 50 +++++++++----- docs/reference/pp.html | 35 +++++++--- docs/reference/print.chent.html | 38 ++++++++--- docs/reference/print.pai.html | 38 ++++++++--- 14 files changed, 541 insertions(+), 180 deletions(-) create mode 100644 docs/reference/chent-1.png create mode 100644 docs/reference/plot.chent-1.png (limited to 'docs') diff --git a/docs/authors.html b/docs/authors.html index 9f174b2..7e1fe6b 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -18,19 +18,25 @@ + + - + + + - + + + @@ -49,6 +55,12 @@
-

Site built with pkgdown.

+

Site built with pkgdown.

diff --git a/docs/index.html b/docs/index.html index 991bab9..f16ddf7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,8 +8,16 @@ Chemical Entities as R Objects • chents - - + + + + @@ -28,6 +36,12 @@
-

Site built with pkgdown.

+

Site built with pkgdown.

diff --git a/docs/pkgdown.css b/docs/pkgdown.css index fd7b0ba..181fe63 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -34,13 +34,14 @@ img.icon { float: right; } -/* Section anchors ---------------------------------*/ - -.hasAnchor { - margin-left: -30px; +img { + max-width: 100%; } +/* Section anchors ---------------------------------*/ + a.anchor { + margin-left: -30px; display:inline-block; width: 30px; height: 30px; @@ -56,6 +57,13 @@ a.anchor { visibility: visible; } +@media (max-width: 767px) { + .hasAnchor:hover a.anchor { + visibility: hidden; + } +} + + /* Fixes for fixed navbar --------------------------*/ .contents h1, .contents h2, .contents h3, .contents h4 { @@ -63,6 +71,17 @@ a.anchor { margin-top: -60px; } +/* Static header placement on mobile devices */ +@media (max-width: 767px) { + .navbar-fixed-top { + position: absolute; + } + .navbar { + padding: 0; + } +} + + /* Sidebar --------------------------*/ #sidebar { @@ -81,33 +100,95 @@ 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%;} +.ref-index .title {width: 60%;} + +.ref-index .alias {width: 40%;} +.ref-index .title {width: 60%;} + +.ref-arguments th {text-align: right; padding-right: 10px;} +.ref-arguments th, .ref-arguments td {vertical-align: top;} +.ref-arguments .name {width: 20%;} +.ref-arguments .desc {width: 80%;} + +/* Nice scrolling for wide elements --------------------------------------- */ + +table { + display: block; + overflow: auto; +} + /* Syntax highlighting ---------------------------------------------------- */ -code { - background-color: #f7f7f7; - color: #333; +pre { + word-wrap: normal; + word-break: normal; + border: 1px solid #eee; } -code a { - color: #375f84; + +pre, code { + background-color: #f8f8f8; + color: #333; } -.warning { color: red; } -.message { font-weight: bolder; } -.error { color: red; font-weight: bolder; } +pre code { + overflow: auto; + word-wrap: normal; + white-space: pre; +} -.fl,.number {color:rgb(21,20,181);} -.fu,.functioncall {color:#264D66 ;} -.ch,.st,.string {color:#375D81 ;} -.kw,.keyword {color:black;} -.argument {color:#264D66 ;} -.co,.comment {color: #777;} -.formalargs {color: #264D66;} -.eqformalargs {color:#264D66;} -.slot {font-style:italic;} -.symbol {color:black ;} -.prompt {color:black ;} +pre .img { + margin: 5px 0; +} -pre img { +pre .img img { background-color: #fff; display: block; + height: auto; +} + +code a, pre a { + color: #375f84; +} + +a.sourceLine:hover { + text-decoration: none; +} + +.fl {color: #1514b5;} +.fu {color: #000000;} /* function */ +.ch,.st {color: #036a07;} /* string */ +.kw {color: #264D66;} /* keyword */ +.co {color: #888888;} /* comment */ + +.message { color: black; font-weight: bolder;} +.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; } diff --git a/docs/pkgdown.js b/docs/pkgdown.js index c8b38c4..64b20df 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -1,8 +1,94 @@ $(function() { - $("#sidebar").stick_in_parent({offset_top: 40}); + + $("#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
  • , and enclosing
  • if in dropdown + var menu_anchor = $(value); + menu_anchor.parent().addClass("active"); + menu_anchor.closest("li.dropdown").addClass("active"); + } + }); }); + +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 is_prefix(needle, haystack) { + if (needle.length > haystack.lengh) + return(false); + + for (var i = 0; i < haystack.length; i++) { + if (needle[i] != haystack[i]) + return(false); + } + + return(true); +} + +/* Clipboard --------------------------*/ + +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); +} + +if(Clipboard.isSupported()) { + $(document).ready(function() { + var copyButton = ""; + + $(".examples").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'); + }); + }); +} + diff --git a/docs/reference/chent-1.png b/docs/reference/chent-1.png new file mode 100644 index 0000000..8731cf1 Binary files /dev/null and b/docs/reference/chent-1.png differ diff --git a/docs/reference/chent.html b/docs/reference/chent.html index 15c4d10..ef683ef 100644 --- a/docs/reference/chent.html +++ b/docs/reference/chent.html @@ -18,19 +18,30 @@ + + + + + + + - + + + @@ -49,6 +60,12 @@
    plot(caffeine)
    -

    Site built with pkgdown.

    +

    Site built with pkgdown.

    diff --git a/docs/reference/draw_svg.chent.html b/docs/reference/draw_svg.chent.html index 2cc3804..5342eca 100644 --- a/docs/reference/draw_svg.chent.html +++ b/docs/reference/draw_svg.chent.html @@ -18,19 +18,28 @@ + + + + + + + - + + + @@ -49,6 +58,12 @@ @@ -107,7 +133,7 @@
    -

    Site built with pkgdown.

    +

    Site built with pkgdown.

    diff --git a/docs/reference/index.html b/docs/reference/index.html index 52967a5..29771c9 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -18,19 +18,25 @@ + + - + + + - + + + @@ -49,6 +55,12 @@
    -

    Site built with pkgdown.

    +

    Site built with pkgdown.

    diff --git a/docs/reference/plot.chent-1.png b/docs/reference/plot.chent-1.png new file mode 100644 index 0000000..8731cf1 Binary files /dev/null and b/docs/reference/plot.chent-1.png differ diff --git a/docs/reference/plot.chent.html b/docs/reference/plot.chent.html index 3cc23d9..cc3b96b 100644 --- a/docs/reference/plot.chent.html +++ b/docs/reference/plot.chent.html @@ -18,19 +18,28 @@ + + + + + + + - + + + @@ -49,6 +58,12 @@
    plot(caffeine)
    +#> [1] "2519" "caffeine" +#> [3] "1,3,7-Trimethylxanthine" "58-08-2" +#> [5] "Guaranine" "Thein" +#> [7] "Cafeina" "Methyltheobromine" +#> [9] "Koffein" "Mateina"
    plot(caffeine)
    -

    Site built with pkgdown.

    +

    Site built with pkgdown.

    diff --git a/docs/reference/pp.html b/docs/reference/pp.html index 4569a6f..538b885 100644 --- a/docs/reference/pp.html +++ b/docs/reference/pp.html @@ -18,19 +18,28 @@ + + + + + + + - + + + @@ -49,6 +58,12 @@ @@ -109,7 +124,7 @@
    -

    Site built with pkgdown.

    +

    Site built with pkgdown.

    diff --git a/docs/reference/print.chent.html b/docs/reference/print.chent.html index 29b215a..81fde0d 100644 --- a/docs/reference/print.chent.html +++ b/docs/reference/print.chent.html @@ -18,19 +18,28 @@ + + + + + + + - + + + @@ -49,6 +58,12 @@ @@ -101,7 +121,7 @@
    -

    Site built with pkgdown.

    +

    Site built with pkgdown.

    diff --git a/docs/reference/print.pai.html b/docs/reference/print.pai.html index d2da6b8..08966de 100644 --- a/docs/reference/print.pai.html +++ b/docs/reference/print.pai.html @@ -18,19 +18,28 @@ + + + + + + + - + + + @@ -49,6 +58,12 @@ @@ -101,7 +121,7 @@
    -

    Site built with pkgdown.

    +

    Site built with pkgdown.

    -- cgit v1.2.1