Skip to content

Commit 239cc78

Browse files
committed
Redesigned site look, layout and mobile view
1 parent 47a182a commit 239cc78

File tree

95 files changed

+806
-249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+806
-249
lines changed

content/about-block-inline-tags.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Block and inline tags
33
tags: gettingStarted
4+
layout: index.njk
45
---
56

67
## Overview

content/about-commandline.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
---
22
title: Command-line arguments to JSDoc
33
tags: gettingStarted
4+
layout: index.njk
45
related:
56
- /about-configuring-jsdoc
67
---
78

89
At its most basic level, JSDoc is used like so:
910

10-
/path/to/jsdoc yourSourceCodeFile.js anotherSourceCodeFile.js ...
11+
`/path/to/jsdoc yourSourceCodeFile.js anotherSourceCodeFile.js ...`
1112

1213
where `...` are paths to other files to generate documentation for.
1314

content/about-configuring-default-template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Configuring JSDoc's default template
33
tags: gettingStarted
4+
layout: index.njk
45
related:
56
- /about-configuring-jsdoc
67
---

content/about-configuring-jsdoc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Configuring JSDoc with a configuration file
33
tags: gettingStarted
4+
layout: index.njk
45
related:
56
- /about-commandline
67
- /about-plugins

content/about-getting-started.md

Lines changed: 0 additions & 85 deletions
This file was deleted.

content/about-including-package.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Including a Package File
33
tags: gettingStarted
4+
layout: index.njk
45
---
56

67
Package files contain information that can be useful for your project's documentation, such as

content/about-including-readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Including a README File
33
tags: gettingStarted
4+
layout: index.njk
45
---
56

67
There are two ways to incorporate a `README` file into your documentation:

content/about-license-jsdoc3.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: License
33
tags: gettingStarted
4+
layout: index.njk
45
---
56

67
JSDoc is free software, licensed under the [Apache License, Version 2.0][apache-license]. Commercial

content/about-namepaths.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
22
title: Using namepaths with JSDoc
33
tags: gettingStarted
4+
layout: index.njk
45
related:
56
- /about-block-inline-tags
67
- /tags-inline-link
78
---
89

9-
## Namepaths in JSDoc
10-
1110
When referring to a JavaScript variable that is elsewhere in your documentation, you must provide a unique identifier that maps to that variable. A namepath provides a way to do so and disambiguate between instance members, static members and inner variables.
1211

1312
::: example "Basic Syntax Examples of Namepaths in JSDoc"

content/about-plugins.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: About JSDoc plugins
33
tags: gettingStarted
4+
layout: index.njk
45
---
56

67
## Creating and Enabling a Plugin

content/about-tutorials.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Tutorials
33
tags: gettingStarted
4+
layout: index.njk
45
---
56

67
JSDoc allows you to include tutorials alongside your API documentation. You can use this feature to

content/data/redirects.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,16 @@ redirects:
77
to: /tags-inline-link
88
- from: /tags-method
99
to: /tags-function
10+
11+
12+
# ---
13+
# toc:
14+
# - section: "Introduction"
15+
# generated: "introduction"
16+
# - section: "Other Section"
17+
# contents:
18+
# - title: "Subsection 1"
19+
# path: "/other-section/#subsection-1"
20+
# - title: "Subsection 2"
21+
# path: "/other-section/#subsection-2"
22+
# ---

content/howto-amd-modules.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: AMD Modules
3+
layout: index.njk
34
related:
45
- /about-namepaths
56
- /tags-exports

content/howto-commonjs-modules.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: CommonJS Modules
3+
layout: index.njk
34
related:
45
- /about-namepaths
56
- /tags-exports

content/howto-es2015-classes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: ES 2015 Classes
3+
layout: index.njk
34
related:
45
- /tags-augments
56
---

content/howto-es2015-modules.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: ES 2015 Modules
3+
layout: index.njk
34
related:
45
- /about-namepaths
56
- /tags-module

content/includes/index.njk

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,26 @@
99
{%- endmacro -%}
1010

1111
{%- macro generateSection(tocSection) -%}
12-
<dl>
12+
<ul>
1313
{%- for item in collections[tocSection.generated] | sortTags -%}
1414
{%- set tagName = item.data.tag -%}
15-
<dt>
15+
<li>
1616
<a href="{{ item.filePathStem }}">{{ formatTag(tagName, tocSection.generated) }}</a>
17-
{{ synonyms(item, tocSection.generated) }}
18-
</dt>
19-
<dd>{{ item.data.description }}</dd>
17+
</li>
2018
{%- endfor -%}
21-
</dl>
19+
</ul>
2220
{%- endmacro -%}
2321

2422
{%- macro renderSection(tocSection) -%}
2523
<h2 id="{{ tocSection.section | slugify }}">{{ tocSection.section }}</h2>
2624
{%- if tocSection.generated -%}
2725
{{ generateSection(tocSection) }}
2826
{%- else -%}
29-
<dl>
27+
<ul>
3028
{%- for item in tocSection.contents -%}
31-
<dt><a href="{{ item.path | default('') }}">{{ item.title | default('') }}</a></dt>
32-
<dd>{{ item.description | default('') }}</dd>
29+
<li><a href="{{ item.path | default('') }}">{{ item.title | default('') }}</a></li>
3330
{%- endfor -%}
34-
</dl>
31+
</ul>
3532
{%- endif -%}
3633
{%- endmacro -%}
3734

@@ -44,12 +41,35 @@
4441
{%- endif -%}
4542
{%- endmacro -%}
4643

44+
4745
{%- block content -%}
48-
{%- for tocSection in toc -%}
49-
{{- renderSection(tocSection) -}}
50-
{%- endfor -%}
51-
52-
<p>
53-
<a href="https://github.com/jsdoc/jsdoc" class="github-ribbon">Fork me on GitHub</a>
54-
</p>
55-
{% endblock %}
46+
<nav class="nav-sidebar">
47+
<ion-icon name="close-outline" id="closeMenuIcon"></ion-icon>
48+
{%- for tocSection in toc -%}
49+
{{ renderSection(tocSection) }}
50+
{%- endfor -%}
51+
</nav>
52+
53+
<article class="article-content">
54+
{% if title -%}
55+
<h1>{{ title }}</h1>
56+
{%- endif %}
57+
58+
{{ content | safe }}
59+
60+
{%- if related | length -%}
61+
{%- set relatedLinks = related | relatedList(collections) -%}
62+
<h2 id="related-links">Related links</h2>
63+
<ul>
64+
{%- for relatedLink in relatedLinks -%}
65+
<li><a href="{{ relatedLink.path }}">{{ relatedLink.title }}</a></li>
66+
{%- endfor -%}
67+
</ul>
68+
{%- endif -%}
69+
70+
<!-- Additional content, GitHub ribbon -->
71+
<p>
72+
<a href="https://github.com/jsdoc/jsdoc" class="github-ribbon">Fork me on<br>GitHub</a>
73+
</p>
74+
</article>
75+
{% endblock %}

content/includes/layout.njk

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@
2525
<body>
2626
<header>
2727
<a href="/">@use JSDoc</a>
28-
</header>
2928

30-
<article>
31-
{% if title -%}
32-
<h1>{{ title }}</h1>
33-
{%- endif %}
29+
<div class="menu-wrapper">
30+
<div id="theme-toggle-btn">
31+
<ion-icon name="sunny" id="theme-icon"></ion-icon>
32+
</div>
33+
<ion-icon name="menu-outline" id="burger-menu"></ion-icon>
34+
</div>
35+
</header>
3436

37+
<main class="main-secion">
3538
{%- block synonyms -%}
3639
{%- if synonyms | length -%}
3740
<h2 id="synonyms">Synonyms</h2>
@@ -44,20 +47,9 @@
4447
{%- endblock -%}
4548

4649
{%- block content -%}
47-
{{ content | safe }}
50+
<!-- Generated contents goes here-->
4851
{%- endblock -%}
49-
50-
{%- if related | length -%}
51-
{%- set relatedLinks = related | relatedList(collections) -%}
52-
<h2 id="related-links">Related links</h2>
53-
<ul>
54-
{%- for relatedLink in relatedLinks -%}
55-
<li><a href="{{ relatedLink.path }}">{{ relatedLink.title }}</a></li>
56-
{%- endfor -%}
57-
</ul>
58-
{%- endif -%}
59-
60-
</article>
52+
</main>
6153

6254
<footer>
6355
<a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a>
@@ -71,5 +63,11 @@
7163
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons
7264
Attribution-ShareAlike 3.0 Unported License</a>.
7365
</footer>
66+
67+
{%- block script -%}
68+
<script type="module" src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js"></script>
69+
<script nomodule src="https://unpkg.com/[email protected]/dist/ionicons/ionicons.js"></script>
70+
<script type="text/javascript" src="/lib/nav-sidebar.js"></script>
71+
{%- endblock -%}
7472
</body>
7573
</html>

0 commit comments

Comments
 (0)