Add carbon ads

pull/1331/head
Kamran Ahmed 3 years ago
parent e16947bd78
commit 8fbde17c22
  1. 6
      components/custom-ad.tsx
  2. 2
      components/footer.tsx
  3. 17
      styles/carbon.css

@ -1,6 +1,8 @@
import { Box } from '@chakra-ui/react';
export const CustomAd = () => { export const CustomAd = () => {
return ( return (
<div id='carbonads'> <Box className='custom-ad' d={['none !important', 'flex !important']}>
<span> <span>
<span className='carbon-wrap'> <span className='carbon-wrap'>
<a <a
@ -32,6 +34,6 @@ export const CustomAd = () => {
Sponsored by Sponsored by
</a> </a>
</span> </span>
</div> </Box>
); );
}; };

@ -66,7 +66,7 @@ export function Footer() {
</Container> </Container>
<CustomAd /> <CustomAd />
{process.env.GA_SECRET && false && ( {process.env.GA_SECRET && (
<script <script
async async
type='text/javascript' type='text/javascript'

@ -1,4 +1,4 @@
#carbonads { #carbonads, .custom-ad {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif; Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;
position: fixed; position: fixed;
@ -6,29 +6,34 @@
right: 20px; right: 20px;
} }
#carbonads { .custom-ad {
left: 20px !important;
right: auto !important;
}
#carbonads, .custom-ad {
display: flex; display: flex;
max-width: 330px; max-width: 330px;
background-color: hsl(0, 0%, 98%); background-color: hsl(0, 0%, 98%);
box-shadow: 0 1px 4px 1px hsla(0, 0%, 0%, .1); box-shadow: 0 1px 4px 1px hsla(0, 0%, 0%, .1);
} }
#carbonads a { #carbonads a, .custom-ad a {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
} }
#carbonads a:hover { #carbonads a:hover, .custom-ad a:hover {
color: inherit; color: inherit;
} }
#carbonads span { #carbonads span, .custom-ad span {
position: relative; position: relative;
display: block; display: block;
overflow: hidden; overflow: hidden;
} }
#carbonads .carbon-wrap { #carbonads .carbon-wrap, .custom-ad .carbon-wrap {
display: flex; display: flex;
} }

Loading…
Cancel
Save