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

70 lines
1.9 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 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;
}
2021-12-08 19:27:26 +01:00
code {
background: #1e1e3f;
color: #9efeff;
padding: 3px 5px;
font-size: 14px;
border-radius: 3px;
}
2021-12-01 22:53:40 +01:00
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; }
2022-09-01 19:56:50 +04:00
&:hover > [fill="rgb(255,255,221)"] { fill: #e5e5be; }
&:hover > [fill="rgb(255,217,102)"] { fill: #d9b443; }
2021-12-01 22:53:40 +01:00
}
2021-12-09 16:39:09 +01:00
svg .done {
2021-12-09 18:05:01 +01:00
& rect { fill: #cbcbcb !important; }
2021-12-09 16:39:09 +01:00
& text { text-decoration: line-through; }
}
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;