Skip to content

Commit e7d1557

Browse files
committed
fixed synonyms visibility and index page link
1 parent c033dad commit e7d1557

File tree

4 files changed

+33
-28
lines changed

4 files changed

+33
-28
lines changed

content/includes/index.njk

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -33,35 +33,35 @@
3333
{%- endmacro -%}
3434

3535
{%- block content -%}
36-
{% if title -%}
37-
<h1>{{ title }}</h1>
38-
{%- endif %}
36+
{% if title -%}
37+
<h1>{{ title }}</h1>
38+
{%- endif %}
3939

40-
{%- block synonyms -%}
41-
{%- if synonyms | length -%}
42-
<h2 id="synonyms">Synonyms</h2>
43-
<ul>
44-
{% for synonym in synonyms -%}
45-
<li><code>{{ synonym }}</code></li>
46-
{%- endfor %}
47-
</ul>
48-
{%- endif -%}
49-
{%- endblock -%}
50-
51-
{{ content | safe }}
52-
53-
{%- if related | length -%}
54-
{%- set relatedLinks = related | relatedList(collections) -%}
55-
<h2 id="related-links">Related links</h2>
40+
{%- block synonyms -%}
41+
{%- if synonyms | length -%}
42+
<h2 id="synonyms">Synonyms</h2>
5643
<ul>
57-
{%- for relatedLink in relatedLinks -%}
58-
<li><a href="{{ relatedLink.path }}">{{ relatedLink.title }}</a></li>
59-
{%- endfor -%}
44+
{% for synonym in synonyms -%}
45+
<li><code>{{ synonym }}</code></li>
46+
{%- endfor %}
6047
</ul>
6148
{%- endif -%}
49+
{%- endblock -%}
50+
51+
{{ content | safe }}
52+
53+
{%- if related | length -%}
54+
{%- set relatedLinks = related | relatedList(collections) -%}
55+
<h2 id="related-links">Related links</h2>
56+
<ul>
57+
{%- for relatedLink in relatedLinks -%}
58+
<li><a href="{{ relatedLink.path }}">{{ relatedLink.title }}</a></li>
59+
{%- endfor -%}
60+
</ul>
61+
{%- endif -%}
6262

63-
<!-- Additional content, GitHub ribbon -->
64-
<p>
65-
<a href="https://github.com/jsdoc/jsdoc" class="github-ribbon">Fork me on<br>GitHub</a>
66-
</p>
63+
<!-- Additional content, GitHub ribbon -->
64+
<p>
65+
<a href="https://github.com/jsdoc/jsdoc" class="github-ribbon">Fork me on<br>GitHub</a>
66+
</p>
6767
{% endblock %}

content/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ layout: index.njk
55
---
66

77

8-
JSDoc 3 is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor. You
8+
JSDoc 3 is an API documentation generator for JavaScript, similar to [Javadoc](https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html) or [phpDocumentor](https://www.phpdoc.org/). You
99
add documentation comments directly to your source code, right alongside the code itself. The JSDoc
1010
tool will scan your source code and generate an HTML documentation website for you.
1111

lib/nav-sidebar.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ const navLinks = document.querySelectorAll('.nav-sidebar a'); // Select all link
1010
const article = document.querySelector('.article-content');
1111

1212

13+
navLinks[0].href = '/'; // Sets the first link in the nav menu to the index page
14+
1315
navLinks.forEach(link => {
1416
const linkPath = new URL(link.href).pathname;
1517
// Check if the link path matches the current page path

styles/usejsdoc.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ body {
2222
font-size: var(--F-size);
2323
color: var(--text-color);
2424
position: relative;
25+
overflow-x: hidden;
26+
2527
}
2628

2729
header {
@@ -103,7 +105,8 @@ footer {
103105
}
104106

105107
a {
106-
color: var(--tomorrow-blue)
108+
color: var(--tomorrow-blue);
109+
text-decoration: none;
107110
}
108111

109112
h1, h2, h3, h4, h5, h6 {

0 commit comments

Comments
 (0)