Skip to content

Commit

Permalink
feat(web): add "What is this?" link on main page
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-aksamentov committed Nov 17, 2023
1 parent 78fd3cd commit bcfbafe
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions packages_rs/nextclade-web/src/components/Main/Title.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react'
import { LinkSmart } from 'src/components/Link/LinkSmart'
import { useTranslationSafe } from 'src/helpers/useTranslationSafe'

import styled from 'styled-components'

Expand Down Expand Up @@ -48,8 +50,9 @@ const LetterSpan = styled.span<{ pos: number }>`
`

export function Title() {
const { t } = useTranslationSafe()
return (
<span>
<span className="d-inline-flex">
<TitleH1>
{'Nextclade'.split('').map((letter, i) => (
// eslint-disable-next-line react/no-array-index-key
Expand All @@ -58,14 +61,26 @@ export function Title() {
</LetterSpan>
))}
</TitleH1>
{PACKAGE_VERSION && <VersionNumberBadge color="secondary">{`v${PACKAGE_VERSION}`}</VersionNumberBadge>}

<div className="d-flex h-auto flex-row">
<span className="flex-1 d-flex h-auto flex-column mb-2 mt-2">
<span className="mb-auto">{<AboutLink href="/about">{t('What is this?')}</AboutLink>}</span>
<span className="mt-auto">
{PACKAGE_VERSION && <VersionNumberBadge color="secondary">{`v${PACKAGE_VERSION}`}</VersionNumberBadge>}
</span>
</span>
</div>
</span>
)
}

const AboutLink = styled(LinkSmart)`
margin-bottom: auto;
`

export const Subtitle = styled.h2`
text-align: center;
font-size: 2rem;
font-size: 1.5rem;
font-weight: 300;
@media (max-width: 991.98px) {
Expand Down

0 comments on commit bcfbafe

Please sign in to comment.