From 26704e40e4291ba915a62d4c3eef73aa99b4eb6b Mon Sep 17 00:00:00 2001 From: Andcool-Systems Date: Fri, 13 Dec 2024 23:18:05 +0300 Subject: [PATCH] header and footer now in root layout --- src/app/admin/page.tsx | 15 +- src/app/contacts/page.tsx | 92 +++++---- src/app/layout.tsx | 10 +- src/app/me/notifications/page.tsx | 6 +- src/app/me/page.tsx | 7 +- src/app/me/settings/page.tsx | 6 +- src/app/me/stars/page.tsx | 6 +- src/app/modules/components/Footer.tsx | 6 +- src/app/modules/components/Header.tsx | 58 ++++-- src/app/modules/components/Tooltip.tsx | 1 - src/app/not-found.tsx | 6 - src/app/root_client.tsx | 6 +- src/app/styles/footer.module.css | 2 + src/app/styles/layout.css | 15 ++ src/app/tos/page.tsx | 222 +++++++++++---------- src/app/tutorials/bandage/page.tsx | 254 ++++++++++++------------- src/app/tutorials/colorable/page.tsx | 74 ++++--- src/app/tutorials/page.tsx | 218 +++++++++++---------- src/app/users/[name]/client_code.tsx | 16 +- src/app/workshop/[id]/client.tsx | 8 +- src/app/workshop/create/page.tsx | 88 ++++----- src/app/workshop/page.tsx | 64 +++---- 22 files changed, 585 insertions(+), 595 deletions(-) diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx index fcff86d..d2ad2ce 100644 --- a/src/app/admin/page.tsx +++ b/src/app/admin/page.tsx @@ -5,7 +5,7 @@ import useCookie from "@/app/modules/utils/useCookie"; import { useEffect, useRef, useState } from "react"; import style_root from '@/app/styles/admin/page.module.css'; import { redirect, useRouter } from "next/navigation"; -import Header, { Query } from "@/app/modules/components/Header"; +import { Query } from "@/app/modules/components/Header"; import AdaptiveGrid from "../modules/components/AdaptiveGrid"; import { Fira_Code } from "next/font/google"; import Link from "next/link"; @@ -155,14 +155,11 @@ const Admin = () => { const updateUsers = user && (user.permissions.includes('updateusers') || user.permissions.includes('superadmin')); return ( - -
-
-
- {updateUsers && } -
-
- +
+
+ {updateUsers && } +
+
); } diff --git a/src/app/contacts/page.tsx b/src/app/contacts/page.tsx index f6b2e4e..6fbc73f 100644 --- a/src/app/contacts/page.tsx +++ b/src/app/contacts/page.tsx @@ -1,5 +1,4 @@ import Link from "next/link"; -import Header from "@/app/modules/components/Header"; import style from './styles/page.module.css'; import style_card from './styles/card.module.css'; import Image from "next/image"; @@ -62,55 +61,52 @@ const Card = (props: CardProps) => { const Home = () => { return ( - -
-
-
-

Контакты

-
- +
+
+

Контакты

+
+ - -
+
-
- +
+
); } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index dc19ca3..ff98959 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -5,6 +5,8 @@ import { CookiesProvider } from 'next-client-cookies/server'; import { headers } from 'next/headers'; import meta from '@/app/meta.json'; import { merge } from 'lodash'; +import Footer from "./modules/components/Footer"; +import Header from "./modules/components/Header"; export const generateMetadata = async (): Promise => { const headersList = headers(); @@ -20,7 +22,13 @@ export default function RootLayout({ children }: Readonly<{ children: React.Reac return ( - {children} + +
+
+ {children} +
+