Add prettier for codestyle and re-format everything (#1294)

This commit is contained in:
Erik Michelson 2021-06-06 23:14:00 +02:00 committed by GitHub
parent 8b78154075
commit 0aae1f70d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
319 changed files with 4809 additions and 3936 deletions

View file

@ -17,33 +17,25 @@ import './cover-buttons.scss'
export const CoverButtons: React.FC = () => {
useTranslation()
const userExists = useSelector((state: ApplicationState) => !!state.user)
const anyAuthProviderActivated = useSelector((state: ApplicationState) => Object.values(state.config.authProviders)
.includes(true))
const anyAuthProviderActivated = useSelector((state: ApplicationState) =>
Object.values(state.config.authProviders).includes(true)
)
if (userExists) {
return null
}
return (
<div className="mb-5">
<SignInButton
className="cover-button"
variant="success"
size="lg"
/>
<ShowIf condition={ anyAuthProviderActivated }>
<span className="m-2">
<Trans i18nKey="common.or"/>
<div className='mb-5'>
<SignInButton className='cover-button' variant='success' size='lg' />
<ShowIf condition={anyAuthProviderActivated}>
<span className='m-2'>
<Trans i18nKey='common.or' />
</span>
</ShowIf>
<Link to="/n/features">
<Button
data-cy={ 'features-button' }
className="cover-button"
variant="primary"
size="lg"
>
<Trans i18nKey="landing.intro.exploreFeatures"/>
<Link to='/n/features'>
<Button data-cy={'features-button'} className='cover-button' variant='primary' size='lg'>
<Trans i18nKey='landing.intro.exploreFeatures' />
</Button>
</Link>
</div>

View file

@ -13,28 +13,28 @@ import { ForkAwesomeIcon } from '../common/fork-awesome/fork-awesome-icon'
export const FeatureLinks: React.FC = () => {
useTranslation()
return (
<Row className="mb-5 d-flex flex-row justify-content-center">
<Col md={ 3 }>
<Link to={ '/n/features#Share-Notes' } className="text-light">
<ForkAwesomeIcon icon="bolt" size="2x"/>
<Row className='mb-5 d-flex flex-row justify-content-center'>
<Col md={3}>
<Link to={'/n/features#Share-Notes'} className='text-light'>
<ForkAwesomeIcon icon='bolt' size='2x' />
<h6>
<Trans i18nKey="landing.intro.features.collaboration"/>
<Trans i18nKey='landing.intro.features.collaboration' />
</h6>
</Link>
</Col>
<Col md={ 3 }>
<Link to={ '/n/features#MathJax' } className="text-light">
<ForkAwesomeIcon icon="bar-chart" size="2x"/>
<Col md={3}>
<Link to={'/n/features#MathJax'} className='text-light'>
<ForkAwesomeIcon icon='bar-chart' size='2x' />
<h6>
<Trans i18nKey="landing.intro.features.katex"/>
<Trans i18nKey='landing.intro.features.katex' />
</h6>
</Link>
</Col>
<Col md={ 3 }>
<Link to={ '/n/features#Slide-Mode' } className="text-light">
<ForkAwesomeIcon icon="television" size="2x"/>
<Col md={3}>
<Link to={'/n/features#Slide-Mode'} className='text-light'>
<ForkAwesomeIcon icon='television' size='2x' />
<h6>
<Trans i18nKey="landing.intro.features.slides"/>
<Trans i18nKey='landing.intro.features.slides' />
</h6>
</Link>
</Col>

View file

@ -26,31 +26,33 @@ export const IntroPage: React.FC = () => {
return (
<Fragment>
<div className={ 'flex-fill mt-3' }>
<h1 dir="auto" className={ 'align-items-center d-flex justify-content-center flex-column' }>
<HedgeDocLogoWithText logoType={ HedgeDocLogoType.COLOR_VERTICAL } size={ HedgeDocLogoSize.BIG }/>
<div className={'flex-fill mt-3'}>
<h1 dir='auto' className={'align-items-center d-flex justify-content-center flex-column'}>
<HedgeDocLogoWithText logoType={HedgeDocLogoType.COLOR_VERTICAL} size={HedgeDocLogoSize.BIG} />
</h1>
<p className="lead">
<Trans i18nKey="app.slogan"/>
<p className='lead'>
<Trans i18nKey='app.slogan' />
</p>
<div className={ 'mb-5' }>
<Branding delimiter={ false }/>
<div className={'mb-5'}>
<Branding delimiter={false} />
</div>
<CoverButtons/>
<ShowIf condition={ !rendererReady && introPageContent !== undefined }>
<WaitSpinner/>
<CoverButtons />
<ShowIf condition={!rendererReady && introPageContent !== undefined}>
<WaitSpinner />
</ShowIf>
<ShowIf condition={ !!introPageContent }>
<ShowIf condition={!!introPageContent}>
<RenderIframe
frameClasses={ 'w-100 overflow-y-hidden' }
markdownContent={ introPageContent as string }
disableToc={ true }
onRendererReadyChange={ setRendererReady }
rendererType={ RendererType.INTRO }
forcedDarkMode={ true }/>
frameClasses={'w-100 overflow-y-hidden'}
markdownContent={introPageContent as string}
disableToc={true}
onRendererReadyChange={setRendererReady}
rendererType={RendererType.INTRO}
forcedDarkMode={true}
/>
</ShowIf>
<hr className={ 'mb-5' }/>
<hr className={'mb-5'} />
</div>
<FeatureLinks/>
</Fragment>)
<FeatureLinks />
</Fragment>
)
}