Ian 3 gadi atpakaļ
vecāks
revīzija
c1db2e6364
8 mainītis faili ar 1513 papildinājumiem un 1425 dzēšanām
  1. 15 0
      .vscode/launch.json
  2. 4 0
      changes.md
  3. 2 2
      components/Layout.js
  4. 3 3
      components/Nav.js
  5. 2 0
      package.json
  6. 2 5
      pages/_app.js
  7. 15 0
      pages/callender.js
  8. 1470 1415
      yarn.lock

+ 15 - 0
.vscode/launch.json

@@ -0,0 +1,15 @@
+{
+    // Use IntelliSense to learn about possible attributes.
+    // Hover to view descriptions of existing attributes.
+    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "type": "pwa-chrome",
+            "request": "launch",
+            "name": "Launch Chrome against localhost",
+            "url": "http://localhost:8080",
+            "webRoot": "${workspaceFolder}"
+        }
+    ]
+}

+ 4 - 0
changes.md

@@ -0,0 +1,4 @@
+fix ui styling
+convert matirial ui to dark mode /light mode switch 
+add callender to callender 
+external menue with json file 

+ 2 - 2
components/Layout.js

@@ -1,12 +1,12 @@
 
 import styles from '../styles/Layout.module.css'
 import Header from './Header'
-
+import ResponsiveAppBar from '../components/Nav'
 
 const Layout = ({ children }) => {
   return (
       <>
-
+      <ResponsiveAppBar />
       <div className={styles.container}>
         <main className={styles.main}>
           <Header />

+ 3 - 3
components/Nav.js

@@ -12,7 +12,7 @@ import Button from '@mui/material/Button';
 import Tooltip from '@mui/material/Tooltip';
 import MenuItem from '@mui/material/MenuItem';
 import AdbIcon from '@mui/icons-material/Adb';
-import { Link } from 'react-router-dom';
+import  Link  from'next/link';
 
 const pages = ['Donation', 'callender','temp-page2','temp-page3','temp-page4'];
 const settings = ['Profile', 'Account', 'Dashboard', 'Logout'];
@@ -91,7 +91,7 @@ const ResponsiveAppBar = () => {
               {pages.map((page) => (
                 <MenuItem key={page} onClick={handleCloseNavMenu}>
                   <Typography textAlign="center">
-                  <Link to = {`/${page}`} 
+                  <Link href = {`/${page}`} 
                   style={{textDecoration:"none",color:"white"}}>
                     {page}
                     </Link>
@@ -126,7 +126,7 @@ const ResponsiveAppBar = () => {
                 onClick={handleCloseNavMenu}
                 sx={{ my: 2, color: 'white', display: 'block' }}
               >
-                <Link to = {`/${page}`} 
+                <Link href = {`/${page}`} 
                   style={{textDecoration:"none",color:"white"}}>
                     {page}
                 </Link>

+ 2 - 0
package.json

@@ -14,10 +14,12 @@
     "@emotion/react": "^11.9.3",
     "@emotion/server": "^11.4.0",
     "@emotion/styled": "^11.9.3",
+    "@mui/icons-material": "^5.8.4",
     "@mui/material": "^5.8.4",
     "next": "12.1.6",
     "react": "18.1.0",
     "react-dom": "18.1.0",
+    "react-router-dom": "^6.3.0",
     "swr": "^1.3.0"
   },
   "devDependencies": {

+ 2 - 5
pages/_app.js

@@ -8,8 +8,7 @@ import theme from '../src/theme';
 import createEmotionCache from '../src/createEmotionCache';
 import Layout from '../components/Layout'
 import * as React  from 'react';
-import ResponsiveAppBar from '../components/Nav'
-import {BrowserRouter} from 'react-router-dom';
+
 
 const DynamicComponentWithNoSSR = <>Some JSX</>
 // Client-side cache, shared for the whole session of the user in the browser.
@@ -41,9 +40,7 @@ export default function MyApp(props) {
          </ThemeProvider>
 
         </Layout> 
-        <BrowserRouter>
-      <ResponsiveAppBar />
-      </BrowserRouter>
+
     </CacheProvider>
     </>
   );

+ 15 - 0
pages/callender.js

@@ -0,0 +1,15 @@
+import Head from 'next/head'
+import styles from '../styles/Layout.module.css'
+
+const temp1 = () => {
+  return (
+    <div className={styles.container}>
+      <Head>
+          <title> Page 3</title>
+      </Head>
+      <h1>page temp 1</h1>
+    </div>
+  )
+}
+
+export default temp1

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1470 - 1415
yarn.lock


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels