-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
420 changed files
with
9,735 additions
and
11,453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
import styled from 'styled-components' | ||
import { Box } from 'ooni-components' | ||
const BlockText = ({ className, ...props }) => ( | ||
<div | ||
className={`bg-gray-50 border-s-[10px] text-base border-blue-500 p-3 font-base ${className}`} | ||
{...props} | ||
/> | ||
) | ||
|
||
const BlockText = styled(Box)` | ||
background-color: ${props => props.theme.colors.gray0}; | ||
border-left: 10px solid ${props => props.theme.colors.blue5}; | ||
` | ||
|
||
BlockText.defaultProps = { | ||
p: 3, | ||
fontSize: 1, | ||
} | ||
|
||
export default BlockText | ||
export default BlockText |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
import { ImSpinner8 } from 'react-icons/im' | ||
import { keyframes, styled } from 'styled-components' | ||
|
||
const spin = keyframes` | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
` | ||
|
||
const StyledSpinner = styled(ImSpinner8)` | ||
animation: ${spin} 1s linear infinite; | ||
` | ||
|
||
const ButtonSpinner = () => <StyledSpinner /> | ||
const ButtonSpinner = () => <ImSpinner8 className="animate-spin" /> | ||
|
||
export default ButtonSpinner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
import NLink from 'next/link' | ||
import { Box, Button, Flex, Heading, Text } from 'ooni-components' | ||
import Link from 'next/link' | ||
import { FormattedMessage } from 'react-intl' | ||
|
||
const CallToActionBox = ({title, text}) => { | ||
const CallToActionBox = ({ title, text }) => { | ||
return ( | ||
<Flex p={3} bg='gray3' flexWrap='wrap' minHeight='180px'> | ||
<Box mb={2}> | ||
<Heading h={4} m={0}> | ||
{title} | ||
</Heading> | ||
<Text fontSize={1}> | ||
{text} | ||
</Text> | ||
</Box> | ||
<NLink href='https://ooni.org/install'> | ||
<Button> | ||
<FormattedMessage id='Country.Overview.NoData.Button.InstallProbe' /> | ||
</Button> | ||
</NLink> | ||
</Flex> | ||
<div className="flex p-4 bg-gray-300 flex-wrap min-h-[180px]"> | ||
<div className="mb-2"> | ||
<h4>{title}</h4> | ||
<div className="text-xl">{text}</div> | ||
</div> | ||
<Link href="https://ooni.org/install"> | ||
<button type="button" className="btn btn-primary"> | ||
<FormattedMessage id="Country.Overview.NoData.Button.InstallProbe" /> | ||
</button> | ||
</Link> | ||
</div> | ||
) | ||
} | ||
|
||
export default CallToActionBox | ||
export default CallToActionBox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
import Flag from 'components/Flag' | ||
import { GridBox } from 'components/VirtualizedGrid' | ||
import { Box, Flex, Text } from 'ooni-components' | ||
|
||
const CountryList = ({ countries, itemsPerRow = 6, gridGap = 3 }) => { | ||
const gridTemplateColumns = ['1fr 1fr', '1fr 1fr', '1fr 1fr 1fr 1fr', [...Array(itemsPerRow)].map((i) => ('1fr')).join(' ')] | ||
|
||
const CountryList = ({ countries, itemsPerRow = 6 }) => { | ||
return ( | ||
<Box sx={{ | ||
display: 'grid', | ||
gridGap, | ||
gridTemplateColumns | ||
}}> | ||
// lg:grid-cols-${itemsPerRow} is added to the safelist in tailwindConfig.config.js | ||
<div | ||
className={`grid gap-2 grid-cols-2 md:grid-cols-4 lg:grid-cols-${itemsPerRow}`} | ||
> | ||
{countries.map((c) => ( | ||
<GridBox | ||
key={c.alpha_2} | ||
href={`/country/${c.alpha_2}`} | ||
title={ | ||
<Flex mb={2} alignItems='center'> | ||
<Box alignSelf='start'><Flag countryCode={c.alpha_2} size={22} border /></Box> | ||
<Text fontSize={1} fontWeight='bold' ml={2} lineHeight='24px'>{c.localisedName}</Text> | ||
</Flex> | ||
<div className="flex mb-2 items-center"> | ||
<div className="self-start"> | ||
<Flag countryCode={c.alpha_2} size={22} border /> | ||
</div> | ||
<div className="font-bold ml-2">{c.localisedName}</div> | ||
</div> | ||
} | ||
count={c.count} | ||
/> | ||
)) | ||
} | ||
</Box> | ||
))} | ||
</div> | ||
) | ||
} | ||
|
||
export default CountryList | ||
export default CountryList |
Oops, something went wrong.