Skip to content

Commit

Permalink
Merge pull request #38 from destyk/fix/add-__next-styles
Browse files Browse the repository at this point in the history
fix: add styles to __next
  • Loading branch information
destyk authored May 14, 2024
2 parents 6a8b7c1 + 9e681b2 commit ffb565f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
5 changes: 5 additions & 0 deletions src/assets/globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ $secondary: #8f9ba8;
@import '../../node_modules/bootstrap/scss/bootstrap';
@import './mixins';

#__next {
height: 100% !important;
width: 100% !important;
}

body {
overflow-y: scroll;
@include scrollbars(5px, 5px, #555, independent);
Expand Down
15 changes: 5 additions & 10 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Wrapper from '@feature/wrapper/wrapper';
import { useEffect, type ReactNode } from 'react';
import { type ReactNode } from 'react';
import type { NextPage } from 'next';
import type { AppProps } from 'next/app';

Expand All @@ -13,17 +13,12 @@ type AppPropsWithLayout = AppProps & {
Component: NextPageWithLayout;
};

export default function App({ Component, pageProps }: AppPropsWithLayout) {
useEffect(() => {
const __next = document.getElementById('__next');
if (__next !== null) {
__next.className = 'w-100 h-100';
}
}, []);

const App = ({ Component, pageProps }: AppPropsWithLayout) => {
return (
<Wrapper>
<Component {...pageProps} />
</Wrapper>
);
}
};

export default App;
11 changes: 4 additions & 7 deletions src/pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import { Html, Head, Main, NextScript } from 'next/document';

export default function Document() {
const Document = () => {
return (
<Html lang="en" className="h-100" data-bs-theme="dark">
<Head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#08070b" />
<meta
name="description"
content="DestyK i.e. Nikita Arefev - A software engineer working on high-load web applications and web infrastructure"
/>
<meta name="keywords" content="Ключевые слова" />
<meta name="author" content="destyk." />

<link rel="icon" href="/favicon.ico" />
Expand All @@ -23,4 +18,6 @@ export default function Document() {
</body>
</Html>
);
}
};

export default Document;
4 changes: 4 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ const HomePage = () => {
<>
<Head>
<title>Home</title>
<meta
name="description"
content="DestyK i.e. Nikita Arefev - A software engineer working on high-load web applications and web infrastructure"
/>
</Head>
<motion.main
className={clsx(styles['home'], 'mt-auto', 'text-center')}
Expand Down

0 comments on commit ffb565f

Please sign in to comment.