mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 10:45:20 -04:00
Add prettier for codestyle and re-format everything (#1294)
This commit is contained in:
parent
8b78154075
commit
0aae1f70d2
319 changed files with 4809 additions and 3936 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue