mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-01 18:00:26 +00:00
Update app structure
This commit is contained in:
+8
-19
@@ -1,25 +1,13 @@
|
|||||||
import type { AppProps } from 'next/app';
|
import type { AppProps } from 'next/app';
|
||||||
import styled, { createGlobalStyle } from 'styled-components';
|
|
||||||
import Head from 'next/head';
|
import Head from 'next/head';
|
||||||
|
import Nav from '../components/Nav';
|
||||||
const GlobalStyle = createGlobalStyle`
|
import DarkMode from '../components/DarkMode';
|
||||||
body {
|
import Container from '../components/Container';
|
||||||
margin: 0;
|
import GlobalStyles from '../components/GlobalStyles';
|
||||||
padding: 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
font-family: 'Source Code Pro', monospace;
|
|
||||||
font-size: '17px';
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
const Container = styled.div`
|
|
||||||
width: 85%;
|
|
||||||
margin: auto;
|
|
||||||
`;
|
|
||||||
|
|
||||||
const App = ({ Component, pageProps }: AppProps) => {
|
const App = ({ Component, pageProps }: AppProps) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<DarkMode>
|
||||||
<Head>
|
<Head>
|
||||||
<link rel='preconnect' href='https://fonts.gstatic.com' />
|
<link rel='preconnect' href='https://fonts.gstatic.com' />
|
||||||
<link
|
<link
|
||||||
@@ -28,11 +16,12 @@ const App = ({ Component, pageProps }: AppProps) => {
|
|||||||
/>
|
/>
|
||||||
<title>Hazem Krimi</title>
|
<title>Hazem Krimi</title>
|
||||||
</Head>
|
</Head>
|
||||||
<GlobalStyle />
|
<GlobalStyles />
|
||||||
<Container>
|
<Container>
|
||||||
|
<Nav />
|
||||||
<Component {...pageProps} />
|
<Component {...pageProps} />
|
||||||
</Container>
|
</Container>
|
||||||
</>
|
</DarkMode>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user