8000 Redesigned site with modern UI by Sarah-okolo · Pull Request #257 · jsdoc/jsdoc.github.io · GitHub
[go: up one dir, main page]

Skip to content

Redesigned site with modern UI #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed synonyms visibility and index page link
  • Loading branch information
Sarah-okolo committed Sep 9, 2024
commit e7d15574975564dc5793aafceae6e05e26e09284
52 changes: 26 additions & 26 deletions content/includes/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,35 @@
{%- endmacro -%}

{%- block content -%}
{% if title -%}
<h1>{{ title }}</h1>
{%- endif %}
{% if title -%}
<h1>{{ title }}</h1>
{%- endif %}

{%- block synonyms -%}
{%- if synonyms | length -%}
<h2 id="synonyms">Synonyms</h2>
<ul>
{% for synonym in synonyms -%}
<li><code>{{ synonym }}</code></li>
{%- endfor %}
</ul>
{%- endif -%}
{%- endblock -%}

{{ content | safe }}

{%- if related | length -%}
{%- set relatedLinks = related | relatedList(collections) -%}
<h2 id="related-links">Related links</h2>
{%- block synonyms -%}
{%- if synonyms | length -%}
<h2 id="synonyms">Synonyms</h2>
<ul>
{%- for relatedLink in relatedLinks -%}
<li><a href="{{ relatedLink.path }}">{{ relatedLink.title }}</a></li>
{%- endfor -%}
{% for synonym in synonyms -%}
<li><code>{{ synonym }}</code></li>
{%- endfor %}
</ul>
{%- endif -%}
{%- endblock -%}

{{ content | safe }}

{%- if related | length -%}
{%- set relatedLinks = related | relatedList(collections) -%}
<h2 id="related-links">Related links</h2>
<ul>
{%- for relatedLink in relatedLinks -%}
<li><a href="{{ relatedLink.path }}">{{ relatedLink.title }}</a></li>
{%- endfor -%}
</ul>
{%- endif -%}

<!-- Additional content, GitHub ribbon -->
<p>
<a href="https://github.com/jsdoc/jsdoc" class="github-ribbon">Fork me on<br>GitHub</a>
</p>
<!-- Additional content, GitHub ribbon -->
<p>
<a href="https://github.com/jsdoc/jsdoc" class="github-ribbon">Fork me on<br>GitHub</a>
</p>
{% endblock %}
2 changes: 1 addition & 1 deletion content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ layout: index.njk
---


JSDoc 3 is an API documentation generator for JavaScript, similar to Javadoc or phpDocumentor. You
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
add documentation comments directly to your source code, right alongside the code itself. The JSDoc
tool will scan your source code and generate an HTML documentation website for you.

Expand Down
2 changes: 2 additions & 0 deletions lib/nav-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const navLinks = document.querySelectorAll('.nav-sidebar a'); // Select all link
const article = document.querySelector('.article-content');


navLinks[0].href = '/'; // Sets the first link in the nav menu to the index page

navLinks.forEach(link => {
const linkPath = new URL(link.href).pathname;
// Check if the link path matches the current page path
Expand Down
5 changes: 4 additions & 1 deletion styles/usejsdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ body {
font-size: var(--F-size);
color: var(--text-color);
position: relative;
overflow-x: hidden;

}

header {
Expand Down Expand Up @@ -103,7 +105,8 @@ footer {
}

a {
color: var(--tomorrow-blue)
color: var(--tomorrow-blue);
text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
Expand Down
0