Skip to content

Commit bc035ee

Browse files
Jose Ramos-MendezJose Ramos-Mendez
authored andcommitted
Removed news.html and added User Forum link
modified: about.html modified: assets/site.js modified: assets/styles.css modified: collaborators.html modified: contact.html modified: documentation.html modified: download.html modified: index.html deleted: news.html modified: publications.html
1 parent a830ed1 commit bc035ee

10 files changed

Lines changed: 51 additions & 101 deletions

File tree

about.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ <h1>
2323
<a href="about.html" aria-current="page">About</a>
2424
<a href="download.html">Download</a>
2525
<a href="documentation.html">Documentation</a>
26-
<a href="news.html">News</a>
26+
<a href="https://github.com/OpenTOPAS/OpenTOPAS/discussions" target="_blank" rel="noopener">
27+
User Forum <span class="external-icon" aria-hidden="true">&#8599;</span>
28+
</a>
2729
<a href="publications.html">Publications</a>
2830
<a href="contact.html">Contact</a>
2931
</nav>

assets/site.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,25 @@
1212
{ href: 'about.html', label: 'About' },
1313
{ href: 'download.html', label: 'Download' },
1414
{ href: 'documentation.html', label: 'Documentation' },
15-
{ href: 'news.html', label: 'News' },
15+
{ href: 'https://github.com/OpenTOPAS/OpenTOPAS/discussions', label: 'User Forum', external: true },
1616
{ href: 'publications.html', label: 'Publications' },
1717
{ href: 'contact.html', label: 'Contact' },
1818
];
1919

2020
const currentPath = window.location.pathname.split('/').pop() || 'index.html';
2121
nav.innerHTML = navItems
22-
.map(({ href, label }) => {
23-
const isActive = currentPath === href;
24-
const activeAttr = isActive ? ' aria-current="page"' : '';
25-
return `<a href="${href}"${activeAttr}>${label}</a>`;
22+
.map(({ href, label, external }) => {
23+
const isActive = !external && currentPath === href;
24+
const attrs = [
25+
`href="${href}"`,
26+
external ? 'target="_blank"' : '',
27+
external ? 'rel="noopener"' : '',
28+
isActive ? 'aria-current="page"' : '',
29+
]
30+
.filter(Boolean)
31+
.join(' ');
32+
const suffix = external ? ' <span class="external-icon" aria-hidden="true">&#8599;</span>' : '';
33+
return `<a ${attrs}>${label}${suffix}</a>`;
2634
})
2735
.join('');
2836
}

assets/styles.css

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,23 @@ header {
100100
border-bottom: 2px solid transparent;
101101
transition: border-color 0.2s ease;
102102
}
103-
104-
.nav-links a:hover,
105-
.nav-links a:focus {
106-
border-color: var(--accent);
107-
}
103+
104+
.nav-links .external-icon {
105+
display: inline-flex;
106+
align-items: center;
107+
justify-content: center;
108+
margin-left: 0.25rem;
109+
padding: 0.05rem 0.2rem;
110+
border: 1px solid currentColor;
111+
border-radius: 0.2rem;
112+
font-size: 0.65rem;
113+
line-height: 1;
114+
}
115+
116+
.nav-links a:hover,
117+
.nav-links a:focus {
118+
border-color: var(--accent);
119+
}
108120

109121
.nav-links a[aria-current='page'] {
110122
border-color: var(--accent);

collaborators.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ <h1>
2424
<a href="about.html">About</a>
2525
<a href="download.html">Download</a>
2626
<a href="documentation.html">Documentation</a>
27-
<a href="news.html">News</a>
27+
<a href="https://github.com/OpenTOPAS/OpenTOPAS/discussions" target="_blank" rel="noopener">
28+
User Forum <span class="external-icon" aria-hidden="true">&#8599;</span>
29+
</a>
2830
<a href="publications.html">Publications</a>
2931
<a href="contact.html">Contact</a>
3032
</nav>

contact.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ <h1>
2323
<a href="about.html">About</a>
2424
<a href="download.html">Download</a>
2525
<a href="documentation.html">Documentation</a>
26-
<a href="news.html">News</a>
26+
<a href="https://github.com/OpenTOPAS/OpenTOPAS/discussions" target="_blank" rel="noopener">
27+
User Forum <span class="external-icon" aria-hidden="true">&#8599;</span>
28+
</a>
2729
<a href="publications.html">Publications</a>
2830
<a href="contact.html" aria-current="page">Contact</a>
2931
</nav>

documentation.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ <h1>
2323
<a href="about.html">About</a>
2424
<a href="download.html">Download</a>
2525
<a href="documentation.html" aria-current="page">Documentation</a>
26-
<a href="news.html">News</a>
26+
<a href="https://github.com/OpenTOPAS/OpenTOPAS/discussions" target="_blank" rel="noopener">
27+
User Forum <span class="external-icon" aria-hidden="true">&#8599;</span>
28+
</a>
2729
<a href="publications.html">Publications</a>
2830
<a href="contact.html">Contact</a>
2931
</nav>

download.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ <h1>
2323
<a href="about.html">About</a>
2424
<a href="download.html" aria-current="page">Download</a>
2525
<a href="documentation.html">Documentation</a>
26-
<a href="news.html">News</a>
26+
<a href="https://github.com/OpenTOPAS/OpenTOPAS/discussions" target="_blank" rel="noopener">
27+
User Forum <span class="external-icon" aria-hidden="true">&#8599;</span>
28+
</a>
2729
<a href="publications.html">Publications</a>
2830
<a href="contact.html">Contact</a>
2931
</nav>

index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ <h1>
2525
<a href="about.html">About</a>
2626
<a href="download.html">Download</a>
2727
<a href="documentation.html">Documentation</a>
28-
<a href="news.html">News</a>
28+
<a href="https://github.com/OpenTOPAS/OpenTOPAS/discussions" target="_blank" rel="noopener">
29+
User Forum <span class="external-icon" aria-hidden="true">&#8599;</span>
30+
</a>
2931
<a href="publications.html">Publications</a>
3032
<a href="contact.html">Contact</a>
3133
</nav>

news.html

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

publications.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ <h1>
2323
<a href="about.html">About</a>
2424
<a href="download.html">Download</a>
2525
<a href="documentation.html">Documentation</a>
26-
<a href="news.html">News</a>
26+
<a href="https://github.com/OpenTOPAS/OpenTOPAS/discussions" target="_blank" rel="noopener">
27+
User Forum <span class="external-icon" aria-hidden="true">&#8599;</span>
28+
</a>
2729
<a href="publications.html" aria-current="page">Publications</a>
2830
<a href="contact.html">Contact</a>
2931
</nav>

0 commit comments

Comments
 (0)