2021-09-05 21:58:44 +02:00
|
|
|
import { Flex, Link, Text } from '@chakra-ui/react';
|
|
|
|
import YouTubeLogo from '../components/icons/youtube.svg';
|
|
|
|
import siteConfig from '../content/site.json';
|
2021-09-14 20:34:24 +02:00
|
|
|
import { event } from '../lib/gtag';
|
2021-09-05 21:58:44 +02:00
|
|
|
|
|
|
|
export function StickyBanner() {
|
|
|
|
return (
|
|
|
|
<Flex as={Link}
|
|
|
|
href={siteConfig.url.youtube}
|
2021-09-09 22:09:20 +02:00
|
|
|
bg={'yellow.300'}
|
|
|
|
color='gray.900'
|
2021-09-05 21:58:44 +02:00
|
|
|
alignItems='center'
|
2021-09-22 20:39:54 +02:00
|
|
|
position='sticky'
|
|
|
|
top={0}
|
2021-09-09 22:32:12 +02:00
|
|
|
zIndex={999}
|
2021-09-05 21:58:44 +02:00
|
|
|
justifyContent='center'
|
2021-09-09 22:32:12 +02:00
|
|
|
py='8px'
|
|
|
|
_hover={{ textDecoration: 'none', bg: 'yellow.400' }}
|
2021-09-05 21:58:44 +02:00
|
|
|
target='_blank'
|
2021-09-14 20:34:24 +02:00
|
|
|
onClick={() => event({
|
|
|
|
category: 'Subscription',
|
|
|
|
action: 'Clicked the YouTube banner',
|
|
|
|
label: 'Sticky YouTube banner on Top'
|
|
|
|
})}
|
2021-09-05 21:58:44 +02:00
|
|
|
>
|
|
|
|
<YouTubeLogo style={{ height: '20px', display: 'inline-block', marginRight: '7px' }} />
|
|
|
|
<Text as='span' fontWeight={500} fontSize='14px'>
|
2021-09-09 22:09:20 +02:00
|
|
|
<Text as='span'>We now have a YouTube Channel. <Text as='span' d={['none', 'inline']}>Subscribe for the video
|
|
|
|
content.</Text></Text>
|
2021-09-05 21:58:44 +02:00
|
|
|
</Text>
|
|
|
|
</Flex>
|
|
|
|
);
|
|
|
|
}
|