1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-02-23 19:13:19 +01:00

56 lines
1.5 KiB
TypeScript
Raw Normal View History

2021-09-05 18:40:02 +02:00
import { useEffect } from 'react';
2021-08-01 13:19:54 +02:00
import type { AppProps } from 'next/app';
import { ChakraProvider } from '@chakra-ui/react';
2021-09-22 20:42:51 +02:00
import { Global, css } from '@emotion/react';
2021-08-29 21:29:14 +02:00
import 'prism-themes/themes/prism-shades-of-purple.css';
2021-09-22 20:42:51 +02:00
import 'focus-visible/dist/focus-visible';
2021-09-05 18:45:32 +02:00
import { roadmapTheme } from '../styles/theme';
2021-09-05 18:40:02 +02:00
import { firePageView } from '../lib/gtag';
2021-09-05 18:45:32 +02:00
import '../styles/carbon.css';
2021-09-05 21:58:44 +02:00
import { StickyBanner } from '../components/sticky-banner';
2021-08-01 13:08:35 +02:00
2021-09-22 20:42:51 +02:00
const GlobalStyles = css`
/*
This will hide the focus indicator if the
element receives focus via the mouse,
but it will still show up on keyboard focus.
*/
.js-focus-visible :focus:not([data-focus-visible-added]) {
outline: none;
box-shadow: none;
}
2021-12-01 22:53:40 +01:00
svg text tspan {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeSpeed;
}
svg .clickable-group {
cursor: pointer;
&:hover > [fill="rgb(65,53,214)"] { fill: #232381; stroke: #232381; }
&:hover > [fill="rgb(255,255,0)"] { fill: #d6d700; }
&:hover > [fill="rgb(255,229,153)"] { fill: #f3c950; }
&:hover > [fill="rgb(153,153,153)"] { fill: #646464; }
&:hover > [fill="rgb(255,255,255)"] { fill: #d7d7d7; }
}
2021-09-22 20:42:51 +02:00
`;
2021-08-01 13:08:35 +02:00
function MyApp({ Component, pageProps }: AppProps) {
2021-09-05 18:40:02 +02:00
useEffect(() => {
firePageView(window.location.pathname);
}, []);
2021-08-01 13:19:54 +02:00
return (
2021-08-01 18:37:32 +02:00
<ChakraProvider theme={roadmapTheme}>
2021-09-22 20:42:51 +02:00
<Global styles={GlobalStyles} />
2021-09-05 21:58:44 +02:00
<StickyBanner />
2021-08-01 13:19:54 +02:00
<Component {...pageProps} />
</ChakraProvider>
);
2021-08-01 13:08:35 +02:00
}
2021-08-01 13:19:54 +02:00
export default MyApp;