From e7cd5125a33b35750623cb60b459d009da892086 Mon Sep 17 00:00:00 2001 From: Prateek Saxena Date: Sat, 23 Nov 2019 15:03:37 +0530 Subject: [PATCH] docs: Update docdash --- docs/Perceptron.html | 228 +++++++++++++++++++++---------- docs/close.svg | 1 + docs/global.html | 117 ++++++++++------ docs/index.html | 91 +++++++++---- docs/menu.svg | 1 + docs/styles/jsdoc.css | 256 ++++++++++++++++++++++++++++------- docs/styles/prettify.css | 25 ++-- docs/wink-perceptron.js.html | 95 +++++++++---- package-lock.json | 2 +- package.json | 2 +- 10 files changed, 583 insertions(+), 235 deletions(-) create mode 100644 docs/close.svg create mode 100644 docs/menu.svg diff --git a/docs/Perceptron.html b/docs/Perceptron.html index 090950c..fab9e56 100644 --- a/docs/Perceptron.html +++ b/docs/Perceptron.html @@ -34,6 +34,10 @@ ((window.gitter = {}).chat = {}).options = { room: 'winkjs/Lobby' }; + window.onload = function () { + document.querySelector('.gitter-open-chat-button').innerText = 'Need help?' + document.querySelector('.gitter-open-chat-button').style.display = 'block'; + } @@ -68,7 +72,13 @@ .navbar a { color: #fff; line-height: 60px; + margin-left: 0; +} + +.navbar a.navbar-brand { margin-left: 20px; + display: block; + min-width: 40px; } .navbar-right { @@ -87,10 +97,6 @@ } /* Override docdash */ -nav { - top: 80px; -} - #main { margin-top: 30px; } @@ -98,6 +104,7 @@ /* Gitter */ .gitter-open-chat-button { background: #6C307D; + display: none; } .gitter-open-chat-button:hover { @@ -118,6 +125,16 @@ window.scrollTo( 0, (window.pageYOffset || document.documentElement.scrollTop) - 72); }, 0) } + + document.getElementById('toc-button').addEventListener('click', function () { + if (document.getElementById('side-nav').className === '') { + document.getElementById('side-nav').className = 'is-open'; + document.getElementById('toc-button-img').setAttribute('src','./close.svg'); + } else { + document.getElementById('side-nav').className = ''; + document.getElementById('toc-button-img').setAttribute('src','./menu.svg'); + } + }) }); window.addEventListener( 'hashchange', function (e) { @@ -139,38 +156,34 @@ - + + +
+ +
- - - - - - -
- -

Perceptron

- +
+
+
+ +

Perceptron

+ - + @@ -179,9 +192,9 @@

Perceptron

-

+

Multi-class Averaged Perceptron class.

@@ -196,7 +209,7 @@

- + @@ -213,7 +226,10 @@

Methods

-

defineConfig(config) → {object}

+

+ defineConfig +

+
defineConfig(config) → {object}
defineCon
- + @@ -285,7 +301,7 @@
Example
-
Parameters:
+
Parameters
@@ -310,7 +326,7 @@
Parameters:
- + @@ -357,7 +374,7 @@
Properties
- + @@ -384,7 +402,7 @@
Properties
@@ -397,7 +415,7 @@
Properties
- + @@ -424,7 +443,7 @@
Properties
@@ -437,7 +456,7 @@
Properties
- + @@ -464,7 +484,7 @@
Properties
@@ -503,7 +523,7 @@
Properties
-
Returns:
+
Returns
@@ -521,6 +541,7 @@
Returns:
object + @@ -528,12 +549,17 @@
Returns:
+
+ -

exportJSON() → {string}

+

+ exportJSON +

+
exportJSON() → {string}
exportJSON<
- + @@ -618,7 +644,7 @@
Example
-
Throws:
+
Throws
@@ -632,7 +658,7 @@
Throws:
-
Returns:
+
Returns
@@ -650,6 +676,7 @@
Returns:
string +
@@ -657,12 +684,17 @@
Returns:
+
+ -

importJSON(json) → {boolean}

+

+ importJSON +

+
importJSON(json) → {boolean}
importJSON<
- + @@ -734,7 +766,7 @@
Example
-
Parameters:
+
Parameters
configconfig @@ -319,6 +335,7 @@
Parameters:
object +
shuffleDatashuffleData @@ -366,6 +383,7 @@
Properties
boolean +
- false + false
maxIterationsmaxIterations @@ -406,6 +424,7 @@
Properties
number +
- 9 + 9
featureExtractorfeatureExtractor @@ -446,6 +465,7 @@
Properties
function +
- null + null
@@ -759,7 +791,7 @@
Parameters:
- + @@ -795,7 +828,7 @@
Parameters:
-
Throws:
+
Throws
@@ -809,7 +842,7 @@
Throws:
-
Returns:
+
Returns
@@ -827,6 +860,7 @@
Returns:
boolean + @@ -834,12 +868,17 @@
Returns:
+
+ -

learn(examples) → {number}

+

+ learn +

+
learn(examples) → {number}
learn - + @@ -910,7 +949,7 @@
Example
-
Parameters:
+
Parameters
jsonjson @@ -768,6 +800,7 @@
Parameters:
JSON +
@@ -935,7 +974,7 @@
Parameters:
- + @@ -975,7 +1015,7 @@
Parameters:
-
Throws:
+
Throws
@@ -990,7 +1030,7 @@
Throws:
-
Returns:
+
Returns
@@ -1008,6 +1048,7 @@
Returns:
number + @@ -1015,12 +1056,17 @@
Returns:
+
+ -

predict(features) → {string}

+

+ predict +

+
predict(features) → {string}
predict - + @@ -1091,7 +1137,7 @@
Example
-
Parameters:
+
Parameters
examplesexamples @@ -944,6 +983,7 @@
Parameters:
Array.<array> +
@@ -1116,7 +1162,7 @@
Parameters:
- + @@ -1153,7 +1200,7 @@
Parameters:
-
Throws:
+
Throws
@@ -1167,7 +1214,7 @@
Throws:
-
Returns:
+
Returns
@@ -1185,6 +1232,7 @@
Returns:
string + @@ -1192,12 +1240,17 @@
Returns:
+
+ -

reset() → {boolean}

+

+ reset +

+
reset() → {boolean}
reset - + @@ -1285,7 +1338,7 @@
Example
-
Returns:
+
Returns
@@ -1303,6 +1356,7 @@
Returns:
boolean + @@ -1310,6 +1364,8 @@
Returns:
+
+ @@ -1324,18 +1380,40 @@
Returns:
- + +
+
+ +
- Documentation generated by JSDoc 3.5.5 on Thu Mar 21 2019 09:24:08 GMT+0530 (IST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Sat Nov 23 2019 15:03:09 GMT+0530 (IST) using the docdash theme.
+ + + \ No newline at end of file diff --git a/docs/close.svg b/docs/close.svg new file mode 100644 index 0000000..c6a48f9 --- /dev/null +++ b/docs/close.svg @@ -0,0 +1 @@ + diff --git a/docs/global.html b/docs/global.html index 297d934..1e8a168 100644 --- a/docs/global.html +++ b/docs/global.html @@ -34,6 +34,10 @@ ((window.gitter = {}).chat = {}).options = { room: 'winkjs/Lobby' }; + window.onload = function () { + document.querySelector('.gitter-open-chat-button').innerText = 'Need help?' + document.querySelector('.gitter-open-chat-button').style.display = 'block'; + } @@ -68,7 +72,13 @@ .navbar a { color: #fff; line-height: 60px; + margin-left: 0; +} + +.navbar a.navbar-brand { margin-left: 20px; + display: block; + min-width: 40px; } .navbar-right { @@ -87,10 +97,6 @@ } /* Override docdash */ -nav { - top: 80px; -} - #main { margin-top: 30px; } @@ -98,6 +104,7 @@ /* Gitter */ .gitter-open-chat-button { background: #6C307D; + display: none; } .gitter-open-chat-button:hover { @@ -118,6 +125,16 @@ window.scrollTo( 0, (window.pageYOffset || document.documentElement.scrollTop) - 72); }, 0) } + + document.getElementById('toc-button').addEventListener('click', function () { + if (document.getElementById('side-nav').className === '') { + document.getElementById('side-nav').className = 'is-open'; + document.getElementById('toc-button-img').setAttribute('src','./close.svg'); + } else { + document.getElementById('side-nav').className = ''; + document.getElementById('toc-button-img').setAttribute('src','./menu.svg'); + } + }) }); window.addEventListener( 'hashchange', function (e) { @@ -139,38 +156,34 @@ - + + +
+ +
- - - - - - -
- -

Global

- +
+
+
+ +

Global

+ - + @@ -179,9 +192,9 @@

Global

-

+

@@ -194,7 +207,7 @@

- + @@ -242,7 +255,7 @@

- + @@ -259,7 +272,10 @@

Methods

-

perceptron() → {Perceptron}

+

+ perceptron +

+
perceptron() → {Perceptron}
perceptron<
- + @@ -346,7 +362,7 @@
Example
-
Returns:
+
Returns
@@ -365,6 +381,7 @@
Returns:
Perceptron +
@@ -372,6 +389,8 @@
Returns:
+
+ @@ -386,18 +405,40 @@
Returns:
- + +

+
+ +

- Documentation generated by JSDoc 3.5.5 on Thu Mar 21 2019 09:24:08 GMT+0530 (IST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Sat Nov 23 2019 15:03:09 GMT+0530 (IST) using the docdash theme.
+ + + \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 69e9850..f26ba3b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -34,6 +34,10 @@ ((window.gitter = {}).chat = {}).options = { room: 'winkjs/Lobby' }; + window.onload = function () { + document.querySelector('.gitter-open-chat-button').innerText = 'Need help?' + document.querySelector('.gitter-open-chat-button').style.display = 'block'; + } @@ -68,7 +72,13 @@ .navbar a { color: #fff; line-height: 60px; + margin-left: 0; +} + +.navbar a.navbar-brand { margin-left: 20px; + display: block; + min-width: 40px; } .navbar-right { @@ -87,10 +97,6 @@ } /* Override docdash */ -nav { - top: 80px; -} - #main { margin-top: 30px; } @@ -98,6 +104,7 @@ /* Gitter */ .gitter-open-chat-button { background: #6C307D; + display: none; } .gitter-open-chat-button:hover { @@ -118,6 +125,16 @@ window.scrollTo( 0, (window.pageYOffset || document.documentElement.scrollTop) - 72); }, 0) } + + document.getElementById('toc-button').addEventListener('click', function () { + if (document.getElementById('side-nav').className === '') { + document.getElementById('side-nav').className = 'is-open'; + document.getElementById('toc-button-img').setAttribute('src','./close.svg'); + } else { + document.getElementById('side-nav').className = ''; + document.getElementById('toc-button-img').setAttribute('src','./menu.svg'); + } + }) }); window.addEventListener( 'hashchange', function (e) { @@ -139,36 +156,32 @@ - + +
+
+ +
- - - - - - -
- +
+
+
+ - + @@ -239,18 +252,40 @@

Copyright & License

wink-perceptron is copyright - + +

+
+ +

- Documentation generated by JSDoc 3.5.5 on Thu Mar 21 2019 09:24:08 GMT+0530 (IST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Sat Nov 23 2019 15:03:09 GMT+0530 (IST) using the docdash theme.
+ + + \ No newline at end of file diff --git a/docs/menu.svg b/docs/menu.svg new file mode 100644 index 0000000..eb34854 --- /dev/null +++ b/docs/menu.svg @@ -0,0 +1 @@ + diff --git a/docs/styles/jsdoc.css b/docs/styles/jsdoc.css index 5c016d1..ce679fa 100644 --- a/docs/styles/jsdoc.css +++ b/docs/styles/jsdoc.css @@ -13,7 +13,7 @@ body { color: #4d4e53; background-color: white; margin: 0 auto; - padding: 0 20px; + padding: 0; font-family: 'Helvetica Neue', Helvetica, sans-serif; font-size: 16px; } @@ -55,47 +55,57 @@ h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 { color: #000; - font-weight: 400; margin: 0; } h1 { - font-weight: 300; font-size: 48px; - margin: 1em 0 .5em; + margin: 1em 0 0; } h1.page-title { font-size: 48px; - margin: 1em 30px; + margin: 1em 0; line-height: 100%; word-wrap: break-word; } h2 { font-size: 24px; - margin: 1.5em 0 .3em; + margin: 2em 0 .3em; } h3 { font-size: 24px; - margin: 1.2em 0 .3em; + margin: 1.5em 0 .3em; } h4 { font-size: 18px; - margin: 1em 0 .2em; + margin: 1.3em 0 .2em; color: #4d4e53; } h4.name { - color: #fff; - background: #6d426d; - box-shadow: 0 .25em .5em #d3d3d3; - border-top: 1px solid #d3d3d3; - border-bottom: 1px solid #d3d3d3; - margin: 1.5em 0 0.5em; - padding: .75em 0 .75em 10px; + font-weight: bold; + font-size: 2em; + color: #000; + margin-bottom: 0; + word-break: break-all; +} + +.name-signature, +.name-signature .signature, +.name-signature .signature-attributes, +.name-signature .type-signature, +.name-signature .type-signature:last-child { + color: #aaa; +} + +hr { + margin: 5rem 0; + border: none; + border-top: 2px solid #ddd; } h4.name a { @@ -109,7 +119,7 @@ h4.name a:hover { h5, .container-overview .subsection-title { font-size: 120%; letter-spacing: -0.01em; - margin: 8px 0 3px 0; + margin: 40px 0 3px 0; } h6 { @@ -121,10 +131,14 @@ h6 { tt, code, kbd, samp { font-family: Consolas, Monaco, 'Andale Mono', monospace; - background: #f4f4f4; + background: #fff; padding: 1px 5px; } +iframe code { + background: white; +} + .class-description { font-size: 130%; line-height: 140%; @@ -136,10 +150,22 @@ tt, code, kbd, samp { margin: 0 } +.content-container { + display: flex; + justify-content: space-evenly; + align-items: flex-start; + max-width: 960px; + margin: 0 auto; + margin-top: 64px; +} + +.main-container { + width: 100%; +} + #main { - float: right; min-width: 360px; - width: calc(100% - 240px); + max-width: 660px; } header { @@ -149,7 +175,7 @@ header { section { display: block; background-color: #fff; - padding: 0 0 0 30px; + padding: 0; } .variation { @@ -164,13 +190,15 @@ section { } nav { - float: left; display: block; - width: 250px; + position: sticky; + top: 80px; + width: 300px; background: #fff; overflow: auto; - position: fixed; - height: 100%; + height: calc(100vh - 130px); + padding: 20px 0; + padding-left: 11px; } nav #nav-search{ @@ -190,12 +218,13 @@ nav.wrap a{ nav h3 { margin-top: 12px; - font-size: 13px; + font-size: 15px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; line-height: 24px; - margin: 15px 0 10px; + margin: 0; + margin-top: 30px; padding: 0; color: #000; } @@ -212,10 +241,10 @@ nav ul { nav ul a, nav ul a:active { font-family: 'Montserrat', sans-serif; - line-height: 18px; + line-height: 22px; padding: 0; display: block; - font-size: 12px; + font-size: 15px; } nav a:hover, @@ -233,8 +262,8 @@ nav > ul > li > a { } nav ul ul a { - color: hsl(207, 1%, 60%); - border-left: 1px solid hsl(207, 10%, 86%); + color: #666; + font-size: 14px; } nav ul ul a, @@ -249,10 +278,24 @@ nav h2 { } nav > h2 > a { - margin: 10px 0 -10px; - color: #606 !important; + font-size: 15px; + margin: 10px 0 -10px; + color: #606 !important; + font-weight: normal; +} + +nav a.btn { + display: inline-block; + background: #6C307D; + color: #fff !important; + padding: 3px 11px; + margin-left: -11px; + margin-top: 0; + border-radius: 2px; + z-index: 1000; } + footer { color: hsl(0, 0%, 28%); margin-left: 250px; @@ -348,25 +391,29 @@ footer { .prettyprint { font-size: 14px; overflow: auto; + margin-left: -30px; + margin-right: -30px; + border-radius: 10px; + background-color: #0d152a; } .prettyprint.source { width: inherit; - line-height: 18px; + line-height: 24px; display: block; background-color: #0d152a; color: #aeaeae; } .prettyprint code { - line-height: 18px; + line-height: 24px; display: block; background-color: #0d152a; color: #4D4E53; } .prettyprint > code { - padding: 15px; + padding: 30px; } .prettyprint .linenums code { @@ -410,10 +457,7 @@ footer { table { border-spacing: 0; - border: 1px solid #ddd; border-collapse: collapse; - border-radius: 3px; - box-shadow: 0 1px 3px rgba(0,0,0,0.1); width: 100%; font-size: 14px; margin: 1em 0; @@ -433,10 +477,6 @@ thead tr, thead tr { border-bottom: 1px solid #ddd; } -.params .type { - white-space: nowrap; -} - .params code { white-space: pre; } @@ -466,6 +506,20 @@ span.param-type, .params td .param-type, .param-type dd { font-family: Consolas, Monaco, 'Andale Mono', monospace } +.params td.name { + max-width: 150px; + font-weight: bold; + color: #000; +} + +.paramas td.type { + max-width: 100px +} + +.params td.description { + font-family: 'ff-tisa-sans-web-pro', serif; +} + .param-type dt, .param-type dd { display: inline-block } @@ -612,24 +666,65 @@ html[data-search-mode] .level-hide { display: block; } +.toc-button { + display: none; +} + @media only screen and (min-width: 320px) and (max-width: 680px) { body { overflow-x: hidden; } + table { + display: block; + width: 100%; + overflow: auto; + } + + code.runkit { + display: block; + width: 100% !important; + overflow: auto; + } + + #toc-button { + display: block; + position: fixed; + bottom: 10px; + right: 10px; + background: #6C307D; + box-shadow: 0 0 10px #000; + height: 60px; + width: 60px; + text-align: center; + border-radius: 100px; + z-index: 4; + } + + #toc-button img { + margin-top: 18px; + } + nav { - background: #FFF; - width: 250px; - height: 100%; + background: #fff; + width: 100%; + height: calc(100vh - 60px); position: fixed; - top: 0; + top: 100vh; right: 0; bottom: 0; - left: -250px; + left: 0; z-index: 3; - padding: 0 10px; - transition: left 0.2s; + opacity: 0; + transition: top 0.2s, opacity 0.2s; + padding: 20px; + padding-bottom: 100px; + } + + nav.is-open { + opacity: 1; + top: 65px; } .navicon-button { @@ -646,13 +741,74 @@ html[data-search-mode] .level-hide { } #main h1.page-title { - margin: 1em 0; + margin: 0; } #main section { padding: 0; } + .gitter-open-chat-button { + display: none !important; + } + + .navbar-header span { + display: none; + } + + /* Sausage Links Nav Container */ +.sausage-links { + position: relative; + width: calc(100% - 60px); +} + +/* The left and right "faded" pseudo elements */ +.sausage-links:before, .sausage-links:after { + content: ''; + height: calc(100% - 2em); + pointer-events: none; + position: absolute; + top: 1em; + width: 40px; + z-index: 2; +} +.sausage-links:before { + background: linear-gradient(to right, rgba(255,255,255,0) 0%, #222 100%); + right: 0; +} +.sausage-links:after { + background: linear-gradient(to left, rgba(255,255,255,0) 0%, #222 100%); + left: 0; +} + +/* Basic flexbox to prevent items from breaking lines */ +.sausage-links ul { + display: flex; + flex-wrap: nowrap; + overflow: auto; + -webkit-overflow-scrolling: touch; + padding-left: 10px; +} + +.sausage-links ul li { + white-space: nowrap; + padding-left: 0; + padding-right: 20px; +} + +.sausage-links ul li a, .sausage-links ul li a:visited { + display: inline-block; +} + + .prettyprint { + margin: 0; + border-radius: 2px; + } + + #main { + padding: 0 10px; + } + footer { margin-left: 0; } diff --git a/docs/styles/prettify.css b/docs/styles/prettify.css index d9521ec..c9039e2 100644 --- a/docs/styles/prettify.css +++ b/docs/styles/prettify.css @@ -1,35 +1,36 @@ .pln { - color: #ddd; + color: #abb2bf; } /* string content */ .str { - color: #61ce3c; + color: #98c379; } /* a keyword */ .kwd { - color: #fbde2d; + color: #c678dd; } /* a comment */ .com { - color: #aeaeae; + color: #5c6370; + font-style: italic; } /* a type name */ .typ { - color: #8da6ce; + color: #d19a66; } /* a literal value */ .lit { - color: #fbde2d; + color: #56b6c2; } /* punctuation */ .pun { - color: #ddd; + color: #abb2bf; } /* lisp open bracket */ @@ -44,17 +45,17 @@ /* a markup tag name */ .tag { - color: #8da6ce; + color: #c678dd; } /* a markup attribute name */ .atn { - color: #fbde2d; + color: #98c379; } /* a markup attribute value */ .atv { - color: #ddd; + color: #d19a66; } /* a declaration */ @@ -64,12 +65,12 @@ /* a variable name */ .var { - color: #c82829; + color: #d19a66; } /* a function name */ .fun { - color: #4271ae; + color: #e06c75; } /* Specify class=linenums on a pre to get line numbering */ diff --git a/docs/wink-perceptron.js.html b/docs/wink-perceptron.js.html index dad8a8b..b0408b2 100644 --- a/docs/wink-perceptron.js.html +++ b/docs/wink-perceptron.js.html @@ -34,6 +34,10 @@ ((window.gitter = {}).chat = {}).options = { room: 'winkjs/Lobby' }; + window.onload = function () { + document.querySelector('.gitter-open-chat-button').innerText = 'Need help?' + document.querySelector('.gitter-open-chat-button').style.display = 'block'; + } @@ -68,7 +72,13 @@ .navbar a { color: #fff; line-height: 60px; + margin-left: 0; +} + +.navbar a.navbar-brand { margin-left: 20px; + display: block; + min-width: 40px; } .navbar-right { @@ -87,10 +97,6 @@ } /* Override docdash */ -nav { - top: 80px; -} - #main { margin-top: 30px; } @@ -98,6 +104,7 @@ /* Gitter */ .gitter-open-chat-button { background: #6C307D; + display: none; } .gitter-open-chat-button:hover { @@ -118,6 +125,16 @@ window.scrollTo( 0, (window.pageYOffset || document.documentElement.scrollTop) - 72); }, 0) } + + document.getElementById('toc-button').addEventListener('click', function () { + if (document.getElementById('side-nav').className === '') { + document.getElementById('side-nav').className = 'is-open'; + document.getElementById('toc-button-img').setAttribute('src','./close.svg'); + } else { + document.getElementById('side-nav').className = ''; + document.getElementById('toc-button-img').setAttribute('src','./menu.svg'); + } + }) }); window.addEventListener( 'hashchange', function (e) { @@ -139,38 +156,34 @@ - + +
+
+ +
- - - - - - -
- -

wink-perceptron.js

- +
+
+
+ +

wink-perceptron.js

+ - + @@ -679,18 +692,40 @@

wink-perceptron.js

- + +
+
+ +

- Documentation generated by JSDoc 3.5.5 on Thu Mar 21 2019 09:24:08 GMT+0530 (IST) using the docdash theme. + Documentation generated by JSDoc 3.5.5 on Sat Nov 23 2019 15:03:09 GMT+0530 (IST) using the docdash theme.
+ + + diff --git a/package-lock.json b/package-lock.json index df06de8..cd2b13b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -721,7 +721,7 @@ } }, "docdash": { - "version": "github:winkjs/docdash#6c1c068a1bf8326a39d562ac330d0435714e0eb2", + "version": "github:winkjs/docdash#485da72bf11e577c847129667a25c5ec28dbe8df", "dev": true }, "docker": { diff --git a/package.json b/package.json index 8021ab6..34a0f7f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "devDependencies": { "chai": "^4.2.0", "coveralls": "^3.0.2", - "docdash": "winkjs/docdash", + "docdash": "github:winkjs/docdash", "docker": "^1.0.0", "eslint": "^5.8.0", "istanbul": "^1.1.0-alpha.1",
featuresfeatures @@ -1125,6 +1171,7 @@
Parameters:
object +