-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(documentation-website): make social links into icons (#479)
- Loading branch information
Showing
11 changed files
with
204 additions
and
123 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
import React from 'react'; | ||
import IAB from '../assets/iab.svg'; | ||
import { | ||
NavLink, | ||
} from 'react-router-dom'; | ||
import pkg from '../../package.json' with { | ||
type: 'json' | ||
}; | ||
import { | ||
Lang, | ||
} from './lang.tsx'; | ||
import DarkModeButton from './dark-mode-button.tsx'; | ||
import SocialLink from './social-link.tsx'; | ||
|
||
const Header = ({ | ||
window, | ||
}: {window: Window},) => <header> | ||
<div> | ||
<img src={IAB} alt="@idrinth/api-bench" /> | ||
<strong>@idrinth/api-bench</strong> | ||
<em>v{pkg.version}</em> | ||
</div> | ||
<nav> | ||
<ul> | ||
<SocialLink | ||
to="https://www.npmjs.com/package/@idrinth/api-bench" | ||
label={'npm'} | ||
/> | ||
<SocialLink | ||
to="https://github.com/Idrinth/api-bench" | ||
label={'github'} | ||
/> | ||
<SocialLink | ||
to="https://www.linkedin.com/groups/9588634/" | ||
label={'linkedin'} | ||
/> | ||
<SocialLink | ||
to={ | ||
'https://idrinth-api-bench.slack.com/' + | ||
'join/shared_invite/' + | ||
'zt-2f4zmw2sz-c3etHzCFq3LtZpkR15xXMA' + | ||
'#/shared-invite/email' | ||
} | ||
label={'slack'} | ||
/> | ||
</ul> | ||
</nav> | ||
<nav> | ||
<ul> | ||
<li> | ||
<NavLink to="/"><Lang lnkey='home.nav' /></NavLink> | ||
</li> | ||
<li> | ||
<NavLink to="/quick-start/"> | ||
<Lang lnkey='quick-start.nav' /> | ||
</NavLink> | ||
</li> | ||
<li> | ||
<NavLink to="/contributing/"> | ||
<Lang lnkey='contributing.nav' /> | ||
</NavLink> | ||
<ul> | ||
<li> | ||
<NavLink to="/contributing/contributors/"> | ||
<Lang lnkey='contributors.nav' /> | ||
</NavLink> | ||
</li> | ||
<li> | ||
<NavLink to="/contributing/sponsors/"> | ||
<Lang lnkey='sponsors.nav' /> | ||
</NavLink> | ||
</li> | ||
</ul> | ||
</li> | ||
<li> | ||
<NavLink to="/usage/"> | ||
<Lang lnkey='usage.nav' /> | ||
</NavLink> | ||
<ul> | ||
<li> | ||
<NavLink to="/usage/autowiring/"> | ||
<Lang lnkey='autowiring.nav' /> | ||
</NavLink> | ||
</li> | ||
<li> | ||
<NavLink to="/usage/results/"> | ||
<Lang lnkey='results.nav' /> | ||
</NavLink> | ||
</li> | ||
<li> | ||
<NavLink to="/usage/logging/"> | ||
<Lang lnkey='logging.nav' /> | ||
</NavLink> | ||
</li> | ||
<li> | ||
<NavLink to="/usage/middlewares/"> | ||
<Lang lnkey='middlewares.nav' /> | ||
</NavLink> | ||
</li> | ||
<li> | ||
<NavLink to="/usage/storage/"> | ||
<Lang lnkey='storage.nav' /> | ||
</NavLink> | ||
</li> | ||
<li> | ||
<NavLink to="/usage/routes/"> | ||
<Lang lnkey='routes.nav' /> | ||
</NavLink> | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</nav> | ||
<DarkModeButton window={window} /> | ||
</header>; | ||
export default Header; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
|
||
interface SocialLinkType { | ||
to: string; | ||
label: string; | ||
} | ||
const SocialLink = ({ | ||
to, | ||
label, | ||
}: SocialLinkType,) => <li id={label}> | ||
<a | ||
href={to} | ||
target='_blank' | ||
rel='noreferrer' | ||
title={label} | ||
> | ||
<img alt={label} src={'../../public/assets/' + label + '.svg'}/> | ||
</a> | ||
</li>; | ||
export default SocialLink; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import SL from '../../src/components/social-link.tsx'; | ||
import { | ||
expect, | ||
} from 'chai'; | ||
|
||
describe('components/breadcrumbs', () => { | ||
it('should be a function', () => { | ||
expect(SL,).to.be.a('function',); | ||
},); | ||
it('() should be an object', () => { | ||
const result = SL({ | ||
to: '/', | ||
label: '', | ||
},); | ||
expect(result,).to.be.a('object',); | ||
},); | ||
},); |