mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 12:07:08 -04:00
imported current state of the mockup into the public repo
Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de> Signed-off-by: Philip Molares <philip.molares@udo.edu> Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
commit
93ce059577
161 changed files with 17419 additions and 0 deletions
51
src/components/landing/layout/footer/powered-by-links.tsx
Normal file
51
src/components/landing/layout/footer/powered-by-links.tsx
Normal file
|
@ -0,0 +1,51 @@
|
|||
import {Trans, useTranslation} from "react-i18next";
|
||||
import {TranslatedLink} from "./translated-link";
|
||||
import React, {Fragment} from "react";
|
||||
import {ExternalLink} from "./external-link";
|
||||
import {useSelector} from "react-redux";
|
||||
import {ApplicationState} from "../../../../redux";
|
||||
|
||||
const PoweredByLinks: React.FC = () => {
|
||||
useTranslation();
|
||||
const defaultLinks = [
|
||||
{
|
||||
href: '/s/release-notes',
|
||||
i18nKey: 'releases'
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/codimd/server/tree/41b13e71b6b1d499238c04b15d65e3bd76442f1d',
|
||||
i18nKey: 'sourceCode'
|
||||
}
|
||||
]
|
||||
|
||||
const config = useSelector((state: ApplicationState) => state.applicationConfig);
|
||||
|
||||
const specialLinks = Object.entries(config.specialLinks)
|
||||
.filter(([_, value]) => value !== "")
|
||||
.map(([key, value]) => {
|
||||
return {
|
||||
href: value,
|
||||
i18nKey: key
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<p>
|
||||
<Trans i18nKey="poweredBy" components={[<ExternalLink href="https://codimd.org" text="CodiMD"/>]}/>
|
||||
|
||||
{
|
||||
(defaultLinks.concat(specialLinks)).map(({href, i18nKey}) =>
|
||||
<Fragment key={i18nKey}>
|
||||
|
|
||||
<TranslatedLink
|
||||
href={href}
|
||||
i18nKey={i18nKey}
|
||||
/>
|
||||
</Fragment>
|
||||
)
|
||||
}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
||||
export { PoweredByLinks }
|
Loading…
Add table
Add a link
Reference in a new issue