Skip to content

Commit

Permalink
feat: add "Help" to sidebar (#108)
Browse files Browse the repository at this point in the history
* feat: add "Help" to sidebar

* Add noopener to help link

* Remove open-in-new icon
  • Loading branch information
taoky committed Aug 29, 2023
1 parent 3573bbd commit 4564c17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/css/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
text-decoration: none;
margin: 0;
width: $sidebar;
height: $sidebar;
min-height: $sidebar;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}

/* Active/current link */
Expand Down
5 changes: 5 additions & 0 deletions src/ui/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import Monitor from "./Monitor";
import { useIsoInfoList, useMirrorsList, useMirrorzSites, useSitesList, useScoring } from "./hooks";
import { Page404 } from "./404";

import config from "../config/config.json";

// eslint-disable-next-line react/display-name
export default React.memo(() => {
const { t, i18n } = useTranslation();
Expand Down Expand Up @@ -55,6 +57,9 @@ export default React.memo(() => {
<NavLink to="/site" activeClassName="active">
<h2 dangerouslySetInnerHTML={{__html: t("site.site")}} />
</NavLink>
{config.mirrorz_help && <a href={config.mirrorz_help} target="_blank" rel="noopener">
<h2 dangerouslySetInnerHTML={{__html: t("help")}} />
</a>}
<NavLink to="/about" activeClassName="active">
<h2>{t("about.about")}</h2>
</NavLink>
Expand Down

0 comments on commit 4564c17

Please sign in to comment.