clean-jsdoc-theme 3.3.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/LICENSE +1 -1
  3. package/README.md +203 -310
  4. package/jsdoc-config.json +7 -5
  5. package/minify.js +48 -0
  6. package/package.json +10 -6
  7. package/publish.js +805 -870
  8. package/static/fonts/Inconsolata-Regular.ttf +0 -0
  9. package/static/fonts/OpenSans-Regular.ttf +0 -0
  10. package/static/fonts/WorkSans-Bold.ttf +0 -0
  11. package/static/scripts/core.js +576 -0
  12. package/static/scripts/core.min.js +23 -0
  13. package/static/scripts/resize.js +59 -54
  14. package/static/scripts/search.js +217 -56
  15. package/static/scripts/search.min.js +11 -0
  16. package/static/scripts/third-party/hljs-line-num.js +1 -0
  17. package/static/scripts/third-party/hljs.js +1173 -0
  18. package/static/scripts/third-party/popper.js +6 -0
  19. package/static/scripts/third-party/tippy.js +2 -0
  20. package/static/scripts/third-party/tocbot.js +1 -0
  21. package/static/styles/clean-jsdoc-theme-base.css +738 -190
  22. package/static/styles/clean-jsdoc-theme-dark.css +208 -121
  23. package/static/styles/clean-jsdoc-theme-light.css +241 -168
  24. package/static/styles/clean-jsdoc-theme.min.css +1 -0
  25. package/tmpl/container.tmpl +13 -12
  26. package/tmpl/details.tmpl +16 -16
  27. package/tmpl/examples.tmpl +3 -1
  28. package/tmpl/icons.tmpl +43 -5
  29. package/tmpl/layout.tmpl +60 -79
  30. package/tmpl/members.tmpl +1 -2
  31. package/tmpl/method.tmpl +3 -4
  32. package/tmpl/mobile-sidebar.tmpl +21 -0
  33. package/tmpl/navbar-actions.tmpl +19 -0
  34. package/tmpl/navbar-menu.tmpl +21 -0
  35. package/tmpl/navbar.tmpl +14 -0
  36. package/tmpl/returns.tmpl +1 -1
  37. package/tmpl/search.tmpl +17 -0
  38. package/tmpl/sidebar-items.tmpl +24 -0
  39. package/tmpl/sidebar-title.tmpl +10 -0
  40. package/tmpl/sidebar.tmpl +9 -0
  41. package/tmpl/source.tmpl +7 -2
  42. package/tmpl/toc.tmpl +4 -0
  43. package/helpers/navbarBuilder.js +0 -0
  44. package/static/fonts/MavenPro-Regular.ttf +0 -0
  45. package/static/fonts/Montserrat-Regular.ttf +0 -0
  46. package/static/fonts/Muli-Black.ttf +0 -0
  47. package/static/fonts/OFL-hind.txt +0 -93
  48. package/static/fonts/OFL-montserrat.txt +0 -93
  49. package/static/scripts/fix-code-block.js +0 -53
  50. package/static/scripts/fix-navbar.js +0 -25
  51. package/static/scripts/linenumber.js +0 -25
  52. package/static/scripts/misc.js +0 -217
  53. package/static/scripts/third-party/lang-css.js +0 -2
  54. package/static/scripts/third-party/prettify.js +0 -28
  55. package/static/styles/reset.css +0 -351
  56. package/static/styles/third-party/ionicons.min.css +0 -11
  57. package/static/styles/third-party/prettify-jsdoc.css +0 -111
  58. package/static/styles/third-party/prettify-tomorrow.css +0 -5
@@ -6,6 +6,7 @@
6
6
  ?>
7
7
 
8
8
  <?js
9
+
9
10
  // we only need to check this once
10
11
  if (typeof isGlobalPage === 'undefined') {
11
12
  isGlobalPage = (doc.kind === 'globalobj');
@@ -23,7 +24,7 @@
23
24
  <header>
24
25
  <?js if (!doc.longname || doc.kind !== 'module') { ?>
25
26
  <?js if ((doc.ancestors && doc.ancestors.length) || doc.name || doc.variation) { ?>
26
- <h2>
27
+ <h1 id="<?js= doc.name ?>-title" class="has-anchor">
27
28
  <?js if (doc.ancestors && doc.ancestors.length) { ?>
28
29
  <span class="ancestors"><?js= doc.ancestors.join('') ?></span>
29
30
  <?js } ?>
@@ -31,7 +32,7 @@
31
32
  <?js if (doc.variation) { ?>
32
33
  <sup class="variation"><?js= doc.variation ?></sup>
33
34
  <?js } ?>
34
- </h2>
35
+ </h1>
35
36
  <?js } ?>
36
37
  <?js if (doc.classdesc) { ?>
37
38
  <div class="class-description"><?js= doc.classdesc ?></div>
@@ -66,20 +67,20 @@
66
67
  <?js= self.partial('details.tmpl', doc) ?>
67
68
 
68
69
  <?js if (doc.examples && doc.examples.length) { ?>
69
- <h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3>
70
+ <h3 id="example" class="has-anchor">Example<?js= doc.examples.length > 1? 's':'' ?></h3>
70
71
  <?js= self.partial('examples.tmpl', doc.examples) ?>
71
72
  <?js } ?>
72
73
  <?js } ?>
73
74
  </div>
74
75
 
75
76
  <?js if (doc.augments && doc.augments.length) { ?>
76
- <h3 class="subsection-title">Extends</h3>
77
+ <h3 id="Extends" class="subsection-title has-anchor">Extends</h3>
77
78
 
78
79
  <?js= self.partial('augments.tmpl', doc) ?>
79
80
  <?js } ?>
80
81
 
81
82
  <?js if (doc.requires && doc.requires.length) { ?>
82
- <h3 class="subsection-title">Requires</h3>
83
+ <h3 id="requires" class="subsection-title has-anchor">Requires</h3>
83
84
 
84
85
  <ul><?js doc.requires.forEach(function(r) { ?>
85
86
  <li><?js= self.linkto(r, r) ?></li>
@@ -90,7 +91,7 @@
90
91
  var classes = self.find({kind: 'class', memberof: doc.longname, inherited: {'!is': self.excludeInherited}});
91
92
  if (!isGlobalPage && classes && classes.length) {
92
93
  ?>
93
- <h3 class="subsection-title">Classes</h3>
94
+ <h3 id="classes" class="subsection-title has-anchor">Classes</h3>
94
95
 
95
96
  <dl><?js classes.forEach(function(c) { ?>
96
97
  <dt><?js= self.linkto(c.longname, c.name) ?></dt>
@@ -102,7 +103,7 @@
102
103
  var mixins = self.find({kind: 'mixin', memberof: doc.longname, inherited: {'!is': self.excludeInherited}});
103
104
  if (!isGlobalPage && mixins && mixins.length) {
104
105
  ?>
105
- <h3 class="subsection-title">Mixins</h3>
106
+ <h3 id="mixins" class="subsection-title has-anchor">Mixins</h3>
106
107
 
107
108
  <dl><?js mixins.forEach(function(m) { ?>
108
109
  <dt><?js= self.linkto(m.longname, m.name) ?></dt>
@@ -114,7 +115,7 @@
114
115
  var namespaces = self.find({kind: 'namespace', memberof: doc.longname, inherited: {'!is': self.excludeInherited}});
115
116
  if (!isGlobalPage && namespaces && namespaces.length) {
116
117
  ?>
117
- <h3 class="subsection-title">Namespaces</h3>
118
+ <h3 id="namespaces" class="subsection-title has-anchor">Namespaces</h3>
118
119
 
119
120
  <dl><?js namespaces.forEach(function(n) { ?>
120
121
  <dt><?js= self.linkto(n.longname, n.name) ?></dt>
@@ -133,7 +134,7 @@
133
134
  }
134
135
  if (members && members.length && members.forEach) {
135
136
  ?>
136
- <h3 class="subsection-title">Members</h3>
137
+ <h3 id="members" class="subsection-title has-anchor">Members</h3>
137
138
 
138
139
  <?js members.forEach(function(p) { ?>
139
140
  <?js= self.partial('members.tmpl', p) ?>
@@ -144,7 +145,7 @@
144
145
  var methods = self.find({kind: 'function', memberof: isGlobalPage ? {isUndefined: true} : doc.longname, inherited: {'!is': self.excludeInherited}});
145
146
  if (methods && methods.length && methods.forEach) {
146
147
  ?>
147
- <h3 class="subsection-title">Methods</h3>
148
+ <h3 id="methods" class="subsection-title has-anchor">Methods</h3>
148
149
 
149
150
  <?js methods.forEach(function(m) { ?>
150
151
  <?js= self.partial('method.tmpl', m) ?>
@@ -155,7 +156,7 @@
155
156
  var typedefs = self.find({kind: 'typedef', memberof: isGlobalPage ? {isUndefined: true} : doc.longname, inherited: {'!is': self.excludeInherited}});
156
157
  if (typedefs && typedefs.length && typedefs.forEach) {
157
158
  ?>
158
- <h3 class="subsection-title">Type Definitions</h3>
159
+ <h3 id="type-definitions" class="subsection-title has-anchor">Type Definitions</h3>
159
160
 
160
161
  <?js typedefs.forEach(function(e) {
161
162
  if (e.signature) {
@@ -175,7 +176,7 @@
175
176
  var events = self.find({kind: 'event', memberof: isGlobalPage ? {isUndefined: true} : doc.longname, inherited: {'!is': self.excludeInherited}});
176
177
  if (events && events.length && events.forEach) {
177
178
  ?>
178
- <h3 class="subsection-title">Events</h3>
179
+ <h3 id="events" class="subsection-title has-anchor">Events</h3>
179
180
 
180
181
  <?js events.forEach(function(e) { ?>
181
182
  <?js= self.partial('method.tmpl', e) ?>
package/tmpl/details.tmpl CHANGED
@@ -55,21 +55,21 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
55
55
 
56
56
  <?js if (data.version) {?>
57
57
  <div class="details-item-container">
58
- <dt class="tag-version">Version:</dt>
58
+ <dt class="tag-version bold">Version</dt>
59
59
  <dd class="tag-version"><ul class="dummy"><li><?js= version ?></li></ul></dd>
60
60
  </div>
61
61
  <?js } ?>
62
62
 
63
63
  <?js if (data.since) {?>
64
64
  <div class="details-item-container">
65
- <dt class="tag-since">Since:</dt>
65
+ <dt class="tag-since bold">Since</dt>
66
66
  <dd class="tag-since"><ul class="dummy"><li><?js= since ?></li></ul></dd>
67
67
  </div>
68
68
  <?js } ?>
69
69
 
70
70
  <?js if (data.inherited && data.inherits && !data.overrides) { ?>
71
71
  <div class="details-item-container">
72
- <dt class="inherited-from">Inherited From:</dt>
72
+ <dt class="inherited-from bold">Inherited From</dt>
73
73
  <dd class="inherited-from"><ul class="dummy"><li>
74
74
  <?js= this.linkto(data.inherits, this.htmlsafe(data.inherits)) ?>
75
75
  </li></ul></dd>
@@ -78,7 +78,7 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
78
78
 
79
79
  <?js if (data.overrides) { ?>
80
80
  <div class="details-item-container">
81
- <dt class="tag-overrides">Overrides:</dt>
81
+ <dt class="tag-overrides bold">Overrides</dt>
82
82
  <dd class="tag-overrides"><ul class="dummy"><li>
83
83
  <?js= this.linkto(data.overrides, this.htmlsafe(data.overrides)) ?>
84
84
  </li></ul></dd>
@@ -87,7 +87,7 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
87
87
 
88
88
  <?js if (data.implementations && data.implementations.length) { ?>
89
89
  <div class="details-item-container">
90
- <dt class="implementations">Implementations:</dt>
90
+ <dt class="implementations bold">Implementations</dt>
91
91
  <dd class="implementations"><ul>
92
92
  <?js data.implementations.forEach(function(impl) { ?>
93
93
  <li><?js= self.linkto(impl, self.htmlsafe(impl)) ?></li>
@@ -98,7 +98,7 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
98
98
 
99
99
  <?js if (data.implements && data.implements.length) { ?>
100
100
  <div class="details-item-container">
101
- <dt class="implements">Implements:</dt>
101
+ <dt class="implements bold">Implements</dt>
102
102
  <dd class="implements"><ul>
103
103
  <?js data.implements.forEach(function(impl) { ?>
104
104
  <li><?js= self.linkto(impl, self.htmlsafe(impl)) ?></li>
@@ -109,7 +109,7 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
109
109
 
110
110
  <?js if (data.mixes && data.mixes.length) { ?>
111
111
  <div class="details-item-container">
112
- <dt class="mixes">Mixes In:</dt>
112
+ <dt class="mixes bold">Mixes In</dt>
113
113
 
114
114
  <dd class="mixes"><ul>
115
115
  <?js data.mixes.forEach(function(a) { ?>
@@ -121,7 +121,7 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
121
121
 
122
122
  <?js if (data.deprecated) { ?>
123
123
  <div class="details-item-container">
124
- <dt class="important tag-deprecated">Deprecated:</dt><?js
124
+ <dt class="important tag-deprecated bold">Deprecated</dt><?js
125
125
  if (data.deprecated === true) { ?><dd class="yes-def tag-deprecated"><ul class="dummy"><li>Yes</li></ul></dd><?js }
126
126
  else { ?><dd><ul class="dummy"><li><?js= data.deprecated ?></li></ul></dd><?js }
127
127
  ?>
@@ -130,7 +130,7 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
130
130
 
131
131
  <?js if (data.author && author.length) {?>
132
132
  <div class="details-item-container">
133
- <dt class="tag-author">Author:</dt>
133
+ <dt class="tag-author bold">Author</dt>
134
134
  <dd class="tag-author">
135
135
  <ul><?js author.forEach(function(a) { ?>
136
136
  <li><?js= self.resolveAuthorLinks(a) ?></li>
@@ -141,21 +141,21 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
141
141
 
142
142
  <?js if (data.copyright) {?>
143
143
  <div class="details-item-container">
144
- <dt class="tag-copyright">Copyright:</dt>
144
+ <dt class="tag-copyright bold">Copyright</dt>
145
145
  <dd class="tag-copyright"><ul class="dummy"><li><?js= copyright ?></li></ul></dd>
146
146
  </div>
147
147
  <?js } ?>
148
148
 
149
149
  <?js if (data.license) {?>
150
150
  <div class="details-item-container">
151
- <dt class="tag-license">License:</dt>
151
+ <dt class="tag-license bold">License</dt>
152
152
  <dd class="tag-license"><ul class="dummy"><li><?js= license ?></li></ul></dd>
153
153
  </div>
154
154
  <?js } ?>
155
155
 
156
156
  <?js if (data.defaultvalue) {?>
157
157
  <div class="details-item-container">
158
- <dt class="tag-default">Default Value:</dt>
158
+ <dt class="tag-default bold">Default Value</dt>
159
159
  <dd class="tag-default"><ul class="dummy">
160
160
  <li <?js= defaultObjectClass ?> ><?js= data.defaultvalue ?></li>
161
161
  </ul></dd>
@@ -164,7 +164,7 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
164
164
 
165
165
  <?js if (data.meta && self.outputSourceFiles) {?>
166
166
  <div class="details-item-container">
167
- <dt class="tag-source">Source:</dt>
167
+ <dt class="tag-source bold">Source</dt>
168
168
  <dd class="tag-source"><ul class="dummy"><li>
169
169
  <?js= self.linkto(meta.shortpath) ?>, <?js= self.linkto(meta.shortpath, 'line ' + meta.lineno, null, 'line' + meta.lineno) ?>
170
170
  </li></ul></dd>
@@ -173,7 +173,7 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
173
173
 
174
174
  <?js if (data.tutorials && tutorials.length) {?>
175
175
  <div class="details-item-container">
176
- <dt class="tag-tutorial">Tutorials:</dt>
176
+ <dt class="tag-tutorial bold">Tutorials</dt>
177
177
  <dd class="tag-tutorial">
178
178
  <ul><?js tutorials.forEach(function(t) { ?>
179
179
  <li><?js= self.tutoriallink(t) ?></li>
@@ -184,7 +184,7 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
184
184
 
185
185
  <?js if (data.see && see.length) {?>
186
186
  <div class="details-item-container">
187
- <dt class="tag-see">See:</dt>
187
+ <dt class="tag-see bold">See</dt>
188
188
  <dd class="tag-see">
189
189
  <ul><?js see.forEach(function(s) { ?>
190
190
  <li><?js= self.linkto(s) ?></li>
@@ -195,7 +195,7 @@ for(; loopVar < detailsKeys.length; loopVar += 1) {
195
195
 
196
196
  <?js if (data.todo && todo.length) {?>
197
197
  <div class="details-item-container">
198
- <dt class="tag-todo">To Do:</dt>
198
+ <dt class="tag-todo bold">To Do</dt>
199
199
  <dd class="tag-todo">
200
200
  <ul><?js todo.forEach(function(t) { ?>
201
201
  <li><?js= t ?></li>
@@ -30,7 +30,9 @@
30
30
  ?>
31
31
  <form action="https://codepen.io/pen/define" method="POST" target="_blank" class="codepen-form">
32
32
  <input type="hidden" name="data" value='{"title": "<?js= example.caption || 'Example' ?>", "js": <?js= jsonString ?>, <?js= optionsString ?> }' />
33
- <input type="image" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-1/cp-arrow-right.svg" value="Create New Pen with Prefilled Data" width="40" height="40" />
33
+ <button class="icon-button codepen-button" type="submit" value="Create New Pen with Prefilled Data">
34
+ <svg><use xlink:href="#codepen-icon"></use></svg>
35
+ </button>
34
36
  </form>
35
37
  <?js } ?>
36
38
  </div>
package/tmpl/icons.tmpl CHANGED
@@ -23,13 +23,51 @@
23
23
  </g>
24
24
  </g>
25
25
  </symbol>
26
+ <symbol id="font-size-icon" viewBox="0 0 24 24">
27
+ <path fill="none" d="M0 0h24v24H0z" />
28
+ <path
29
+ d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z" />
30
+ </symbol>
31
+ <symbol id="add-icon" viewBox="0 0 24 24">
32
+ <path fill="none" d="M0 0h24v24H0z" />
33
+ <path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" />
34
+ </symbol>
35
+ <symbol id="minus-icon" viewBox="0 0 24 24">
36
+ <path fill="none" d="M0 0h24v24H0z" />
37
+ <path d="M5 11h14v2H5z" />
38
+ </symbol>
39
+ <symbol id="dark-theme-icon" viewBox="0 0 24 24">
40
+ <path fill="none" d="M0 0h24v24H0z" />
41
+ <path
42
+ d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z" />
43
+ </symbol>
44
+ <symbol id="light-theme-icon" viewBox="0 0 24 24">
45
+ <path fill="none" d="M0 0h24v24H0z" />
46
+ <path
47
+ d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z" />
48
+ </symbol>
49
+ <symbol id="reset-icon" viewBox="0 0 24 24">
50
+ <path fill="none" d="M0 0h24v24H0z"/>
51
+ <path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/>
52
+ </symbol>
53
+
26
54
  <symbol id="down-icon" viewBox="0 0 16 16">
27
- <path
28
- fill-rule="evenodd"
29
- clip-rule="evenodd"
30
- d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"
31
- >
55
+ <path fill-rule="evenodd" clip-rule="evenodd"
56
+ d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z">
32
57
  </path>
33
58
  </symbol>
59
+
60
+ <symbol id="codepen-icon" viewBox="0 0 24 24">
61
+ <path fill="none" d="M0 0h24v24H0z"/>
62
+ <path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/>
63
+ </symbol>
64
+ <symbol id="close-icon" viewBox="0 0 24 24">
65
+ <path fill="none" d="M0 0h24v24H0z"/>
66
+ <path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/>
67
+ </symbol>
68
+ <symbol id="menu-icon" viewBox="0 0 24 24">
69
+ <path fill="none" d="M0 0h24v24H0z"/>
70
+ <path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/>
71
+ </symbol>
34
72
  </defs>
35
73
  </svg>
package/tmpl/layout.tmpl CHANGED
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <html lang="en" style="font-size: 16px">
3
3
 
4
4
  <head>
5
5
  <meta charset="utf-8">
@@ -45,21 +45,6 @@
45
45
  <?js }) ?>
46
46
  <?js } ?>
47
47
 
48
- <!-- Adding overlay script-->
49
- <?js if(this.overlayScrollbar != undefined) { ?>
50
- <script src="https://cdnjs.cloudflare.com/ajax/libs/overlayscrollbars/1.13.0/js/OverlayScrollbars.min.js"
51
- integrity="sha512-5R3ngaUdvyhXkQkIqTf/k+Noq3phjmrqlUQyQYbgfI34Mzcx7vLIIYTy/K1VMHkL33T709kfh5y6R9Xy/Cbt7Q=="
52
- crossorigin="anonymous"></script>
53
- <?js } ?>
54
-
55
- <!-- Adding overlay style-->
56
- <?js if(this.includeCss != undefined) { ?>
57
- <link rel="stylesheet"
58
- href="https://cdnjs.cloudflare.com/ajax/libs/overlayscrollbars/1.13.0/css/OverlayScrollbars.min.css"
59
- integrity="sha512-pYQcc5kgavar0ah58/O8hw/6Tbo3mWlmQTmvoi1i96cBz7jQYS9as5J+Nfy32rAHY6CgR9ExwnFMcBdGVcKM7g=="
60
- crossorigin="anonymous" />
61
- <?js } ?>
62
-
63
48
 
64
49
  <title>
65
50
  <?js= title ?>
@@ -68,72 +53,72 @@
68
53
  <!--[if lt IE 9]>
69
54
  <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
70
55
  <![endif]-->
71
- <link type="text/css" rel="stylesheet" href="styles/third-party/ionicons.min.css">
72
- <link type="text/css" rel="stylesheet" href="styles/third-party/prettify-tomorrow.css">
73
- <link type="text/css" rel="stylesheet" href="styles/reset.css">
74
- <link type="text/css" rel="stylesheet" href="styles/clean-jsdoc-theme-base.css">
75
- <link type="text/css" rel="stylesheet" href="styles/<?js= this.theme ?>">
56
+
57
+ <script src="scripts/third-party/hljs.js"></script>
58
+ <script src="scripts/third-party/hljs-line-num.js"></script>
59
+ <script src="scripts/third-party/popper.js"></script>
60
+ <script src="scripts/third-party/tippy.js"></script>
61
+ <script src="scripts/third-party/tocbot.js"></script>
62
+
63
+ <script>
64
+ // Global variables
65
+ var baseURL = "<?js= this.baseURL ?>"
66
+ </script>
67
+
68
+ <link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css">
76
69
  <?js if(this.dynamicStyle != undefined ) { ?>
77
70
  <style>
78
71
  <?js= this.dynamicStyle ?>
79
72
  </style>
80
73
  <?js } ?>
81
74
  <?js= this.partial('icons.tmpl') ?>
75
+
82
76
  </head>
83
77
 
84
- <body>
85
-
86
- <nav class="navbar" id="navbar">
87
- <?js= this.nav ?>
88
- <?js if(this.resizeable.navbar !== undefined) { ?>
89
- <div class="navbar-resize" id="navbar-resize">
90
- <div class="resize-dots-container">
91
- <div class="dots"></div>
92
- <div class="dots"></div>
93
- <div class="dots"></div>
94
- </div>
95
- </div>
96
- <?js } ?>
97
-
98
- </nav>
99
- <div class="navbar-ham" id="navbar-ham">
100
- <div>
101
- <div class="first"></div>
102
- <div class="second"></div>
103
- <div class="third"></div>
104
- </div>
78
+ <body class="<?js= this.theme ?>" data-theme="<?js= this.theme?>">
79
+
80
+ <div class="sidebar-container">
81
+ <?js= this.partial('sidebar.tmpl') ?>
82
+ </div>
83
+
84
+ <div class="navbar-container" id="navbar">
85
+ <?js= this.partial('navbar.tmpl') ?>
105
86
  </div>
106
87
 
107
- <div id="main" class="main-content">
108
- <?js if (title != 'Home') { ?>
109
- <h1 id='page-title' class="page-title">
110
- <?js= title ?>
111
- </h1>
112
- <?js } ?>
88
+ <div class="toc-container">
89
+ <?js= this.partial('toc.tmpl') ?>
90
+ </div>
91
+
92
+ <div class="body-wrapper">
93
+ <div class="main-content">
94
+ <div class="main-wrapper">
95
+ <?js= content ?>
96
+
97
+ <?js if(this.footer) {?>
98
+
99
+ <footer class="footer" id="footer">
100
+ <div class="wrapper">
101
+ <?js= this.footer ?>
102
+ </div>
103
+ </footer>
104
+ <?js } ?>
105
+
106
+ </div>
107
+ </div>
113
108
 
114
- <?js= content ?>
115
109
  </div>
116
110
 
117
- <footer class="footer" id="footer">
118
- <?js= this.footer ?>
119
- </footer>
111
+ <?js if(this.navbar.search) { ?>
112
+ <?js= this.partial('search.tmpl')?>
113
+ <?js } ?>
120
114
 
121
- <script src="scripts/third-party/prettify.js"></script>
122
- <script src="scripts/third-party/lang-css.js"></script>
123
- <script type="text/javascript" src="scripts/misc.js"></script>
115
+ <?js= this.partial('mobile-sidebar.tmpl') ?>
124
116
 
125
- <script>prettyPrint();</script>
126
- <script src="scripts/linenumber.js"></script>
127
- <script src="scripts/fix-code-block.js"></script>
128
- <script src="scripts/fix-navbar.js"></script>
129
- <?js if(this.search.options !== 'false') { ?>
130
- <script src="scripts/search.js"></script>
117
+ <script type="text/javascript" src="scripts/core.min.js"></script>
118
+
119
+ <?js if(this.navbar.search !== 'false') { ?>
120
+ <script src="scripts/search.min.js"></script>
131
121
  <script src="scripts/third-party/fuse.js"></script>
132
- <script>
133
- var list = [<?js= this.search.list ?>];
134
- var options = <?js= this.search.options ?>
135
- setupSearch(list, options)
136
- </script>
137
122
  <?js } ?>
138
123
 
139
124
  <?js if(this.dynamicScript != undefined ) { ?>
@@ -142,23 +127,19 @@
142
127
  </script>
143
128
  <?js } ?>
144
129
 
145
- <?js if(this.resizeable.navbar != undefined ) { ?>
146
- <script src="scripts/resize.js"></script>
147
- <script type="text/javascript">
148
- var option = <?js= JSON.stringify(this.resizeable.navbar) ?>
149
- setupResizeOptions(option)
150
- </script>
151
- <?js } ?>
152
130
 
153
- <?js if(this.overlayScrollbar != undefined ) { ?>
154
131
  <script type="text/javascript">
155
- var option = JSON.parse('<?js=this.overlayScrollbar ?>')
156
- document.addEventListener("DOMContentLoaded", function () {
157
- OverlayScrollbars(document.querySelectorAll('body'), option.option || {});
132
+ tocbot.init({
133
+ tocSelector: '#toc',
134
+ contentSelector: '.main-content',
135
+ headingSelector: 'h1, h2, h3, h4',
136
+ hasInnerContainers: true,
137
+ scrollContainer: '.main-content',
138
+ headingsOffset: 130,
139
+ onClick: bringLinkToView
158
140
  });
159
- </script>
160
- <?js } ?>
161
141
 
142
+ </script>
162
143
 
163
144
  </body>
164
145
 
package/tmpl/members.tmpl CHANGED
@@ -2,8 +2,7 @@
2
2
  var data = obj;
3
3
  var self = this;
4
4
  ?>
5
- <h4 class="name" id="<?js= id ?>">
6
- <a href="#<?js= id ?>">#</a>
5
+ <h4 class="name has-anchor" id="<?js= id ?>">
7
6
  <?js= data.attribs + name + (data.signature ? data.signature : '') ?>
8
7
  </h4>
9
8
 
package/tmpl/method.tmpl CHANGED
@@ -2,13 +2,12 @@
2
2
  var data = obj;
3
3
  var self = this;
4
4
  ?>
5
- <?js if (data.kind !== 'module') { ?>
5
+ <?js if (data.kind !== 'module' && !data.hideconstructor) { ?>
6
6
  <?js if (data.kind === 'class' && data.classdesc) { ?>
7
- <h2>Constructor</h2>
7
+ <h2 id="constructor" class="has-anchor">Constructor</h2>
8
8
  <?js } ?>
9
9
 
10
- <h4 class="name" id="<?js= id ?>">
11
- <a href="#<?js= id ?>">#</a>
10
+ <h4 class="name has-anchor" id="<?js= id ?>">
12
11
  <?js= data.attribs + (kind === 'class' ? 'new ' : '') + name + (data.signature || '') ?>
13
12
  </h4>
14
13
 
@@ -0,0 +1,21 @@
1
+ <div class="mobile-menu-icon-container">
2
+ <button class="icon-button" id="mobile-menu" data-isopen="false">
3
+ <svg><use xlink:href="#menu-icon"></use></svg>
4
+ </button>
5
+ </div>
6
+
7
+ <div id="mobile-sidebar" class="mobile-sidebar-container">
8
+ <div class="mobile-sidebar-wrapper">
9
+ <?js= this.partial('sidebar-title.tmpl') ?>
10
+ <div class="mobile-nav-links">
11
+ <?js= this.partial('navbar-menu.tmpl') ?>
12
+ </div>
13
+ <div class="mobile-sidebar-items-c">
14
+ <?js= this.partial('sidebar-items.tmpl') ?>
15
+ </div>
16
+ <div class="mobile-navbar-actions">
17
+ <?js= this.partial('navbar-actions.tmpl') ?>
18
+ </div>
19
+ </div>
20
+
21
+ </div>
@@ -0,0 +1,19 @@
1
+ <?js
2
+ var data = this.navbar
3
+ if(data.search) { ?>
4
+ <div class="navbar-right-item">
5
+ <button class="icon-button search-button">
6
+ <svg><use xlink:href="#search-icon"></use></svg>
7
+ </button>
8
+ </div>
9
+ <?js } ?>
10
+ <div class="navbar-right-item" >
11
+ <button class="icon-button theme-toggle">
12
+ <svg><use class="theme-svg-use" xlink:href="#<?js= (this.theme === 'dark' ? 'light' : 'dark') ?>-theme-icon"></use></svg>
13
+ </button>
14
+ </div>
15
+ <div class="navbar-right-item" >
16
+ <button class="icon-button font-size">
17
+ <svg><use xlink:href="#font-size-icon"></use></svg>
18
+ </button>
19
+ </div>
@@ -0,0 +1,21 @@
1
+ <?js
2
+ var data = this.navbar
3
+ if(data.menu) { ?>
4
+ <?js
5
+ data.menu.forEach(function(item) {
6
+ var className = item.class || '';
7
+ var id = item.id || '';
8
+ var target = item.target || '';
9
+ className += ' navbar-item'
10
+ ?>
11
+
12
+ <div class="<?js=className ?>">
13
+ <a id="<?js= id ?>" href="<?js= item.link ?>" target="<?js= target ?>">
14
+ <?js= item.title?>
15
+ </a>
16
+ </div>
17
+
18
+ <?js
19
+ })
20
+ }
21
+ ?>
@@ -0,0 +1,14 @@
1
+ <?js
2
+ var data = this.navbar;
3
+ ?>
4
+
5
+ <nav class="navbar">
6
+ <div class="navbar-left-items">
7
+ <?js= this.partial('navbar-menu.tmpl') ?>
8
+
9
+ </div>
10
+
11
+ <div class="navbar-right-items">
12
+ <?js= this.partial('navbar-actions.tmpl') ?>
13
+ </div>
14
+ <nav>
package/tmpl/returns.tmpl CHANGED
@@ -10,7 +10,7 @@ if (data.description) {
10
10
  <?js if (data.type && data.type.names) {?>
11
11
  <dl class="param-type">
12
12
  <dt>
13
- Type
13
+ Type:&nbsp;
14
14
  </dt>
15
15
  <dd>
16
16
  <?js= this.partial('type.tmpl', data.type.names) ?>
@@ -0,0 +1,17 @@
1
+ <div class="search-container" id="search-container" style="display: none">
2
+ <div class="wrapper" id="search-wrapper">
3
+ <button class="icon-button search-close-button" id="search-close-button">
4
+ <svg>
5
+ <use xlink:href="#close-icon"></use>
6
+ </svg>
7
+
8
+ </button>
9
+ <div class="search-box-c">
10
+ <svg><use xlink:href="#search-icon"></use></svg>
11
+ <input type="text" id="search-input" class="search-input" placeholder="Search..." autofocus>
12
+ </div>
13
+ <div class="search-result-c" id="search-result-c">
14
+ Type anything to view search result
15
+ </div>
16
+ </div>
17
+ </div>