Add custom intro page by fetching markdown content from a file (#697)

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
Tilman Vatteroth 2021-02-08 15:03:11 +01:00 committed by GitHub
parent 4b2e2a7c93
commit 7f6e0e53a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 373 additions and 173 deletions

View file

@ -1,7 +1,7 @@
/*
SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
SPDX-License-Identifier: AGPL-3.0-only
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import equal from 'fast-deep-equal'
@ -43,10 +43,10 @@ export const VersionInfo: React.FC = () => {
return (
<Fragment>
<Link id='version' to={ '#' } className={ 'text-light' } onClick={ handleShow }>
<Link data-cy={ 'show-version-modal' } to={ '#' } className={ 'text-light' } onClick={ handleShow }>
<Trans i18nKey={ 'landing.versionInfo.versionInfo' }/>
</Link>
<Modal id='versionModal' show={ show } onHide={ handleClose } animation={ true }>
<Modal data-cy={ 'version-modal' } show={ show } onHide={ handleClose } animation={ true }>
<Modal.Body className="text-dark">
<h3><Trans i18nKey={ 'landing.versionInfo.title' }/></h3>
<Row>
@ -55,7 +55,7 @@ export const VersionInfo: React.FC = () => {
</Row>
</Modal.Body>
<Modal.Footer>
<Button variant="secondary" onClick={ handleClose }>
<Button variant="secondary" onClick={ handleClose } data-cy={ 'close-version-modal-button' }>
<Trans i18nKey={ 'common.close' }/>
</Button>
</Modal.Footer>

View file

@ -1,7 +1,7 @@
/*
SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
SPDX-License-Identifier: AGPL-3.0-only
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
*
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React from 'react'
@ -13,9 +13,7 @@ import { LinkContainer } from 'react-router-bootstrap'
import { ApplicationState } from '../../../redux'
import { ShowIf } from '../../common/show-if/show-if'
type SignInButtonProps = {
className?: string
} & Omit<ButtonProps, 'href'>
export type SignInButtonProps = Omit<ButtonProps, 'href'>
export const SignInButton: React.FC<SignInButtonProps> = ({ variant, ...props }) => {
const { t } = useTranslation()
@ -25,9 +23,9 @@ export const SignInButton: React.FC<SignInButtonProps> = ({ variant, ...props })
<ShowIf condition={ anyAuthProviderActive }>
<LinkContainer to="/login" title={ t('login.signIn') }>
<Button
data-cy={ 'sign-in-button' }
variant={ variant || 'success' }
{ ...props }
>
{ ...props }>
<Trans i18nKey="login.signIn"/>
</Button>
</LinkContainer>