diff --git a/Dockerfile b/Dockerfile index 197970e5..b3ea037a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,4 +11,5 @@ FROM nginx:1.24.0 WORKDIR /usr/share/nginx/html RUN rm -rf ./* COPY --from=builder /app/dist . +COPY nginx.conf /etc/nginx/nginx.conf ENTRYPOINT ["nginx", "-g", "daemon off;"] diff --git a/docker-compose.yml b/docker-compose.yml index 0eebef31..a56784fd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,4 +7,7 @@ services: build: context: . ports: - - 8081:80 \ No newline at end of file + - 8081:80 + # volumes: + # - ./nginx.conf:/etc/nginx/conf.d/default.conf + \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 00000000..169a7c7f --- /dev/null +++ b/nginx.conf @@ -0,0 +1,39 @@ +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log notice; +pid /var/run/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + # include /etc/nginx/conf.d/*.conf; + server { + listen 80; + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html; + } +} +} \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx index 2fc4b0dd..ce4fdd3d 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -12,7 +12,6 @@ import "./assets/demo/demo.css"; import "./assets/css/nucleo-icons.css"; import "@fortawesome/fontawesome-free/css/all.min.css"; import ContextInfo from "./contexts/InfoContext.jsx"; -// import LandingPage from "./views/LandingPage.jsx"; import CoursesPanel from "./views/CoursesPanel/CoursesPanel.jsx"; import Shopping from "./views/Shopping/Shopping.jsx"; import Verification from "./views/Verification/Verification.jsx"; @@ -100,10 +99,6 @@ function App() { path="/aboutUs" element={} > - {/* } - > */} } diff --git a/src/assets/css/Profile.module.css b/src/assets/css/Profile.module.css index c2044d6e..2bf6c9cc 100644 --- a/src/assets/css/Profile.module.css +++ b/src/assets/css/Profile.module.css @@ -9,7 +9,7 @@ display: flex; flex-direction: row; /* align-items: center; */ - justify-content: space-between; + justify-content: center; width: 100%; /* background-color: #1e1e1e; */ /* background-color: var(--dark); */ @@ -22,9 +22,8 @@ justify-content: space-between; gap: 30px; border-radius: 10px; - - height: 93vh; - margin-top: 20px; + height: 90vh; + margin-top: 5vh; margin-left: 30px; margin-right: 30px; } @@ -60,8 +59,8 @@ .rightpart { width: 900px; - height: 100%; - margin-top: 20px; + height: 90vh; + margin-top: 5vh; margin-bottom: 10px; padding: 10px; border-radius: 15px; @@ -224,9 +223,12 @@ .leftpart { display: none; } + .rightpart { + margin-left: 5vh; + } } -@media only screen and (max-width: 541px) { +@media only screen and (max-width: 620px) { .main { flex-direction: column-reverse; } @@ -234,5 +236,6 @@ .rightpart { max-width: 90vw; max-height: 80vh; + /* margin: 2.5vw; */ } } \ No newline at end of file diff --git a/src/assets/css/Timeline/Timeline_Profile.module.css b/src/assets/css/Timeline/Timeline_Profile.module.css index fa918424..52beb858 100644 --- a/src/assets/css/Timeline/Timeline_Profile.module.css +++ b/src/assets/css/Timeline/Timeline_Profile.module.css @@ -6,7 +6,7 @@ /* justify-content: space-between; */ width: 100%; /* margin-right: 4vw; */ - height: 90vh; + height: 100%; border-radius: 15px; position: sticky; } diff --git a/src/components/Navbars/AdminNavbar.jsx b/src/components/Navbars/AdminNavbar.jsx index 59b5de8b..b0817456 100644 --- a/src/components/Navbars/AdminNavbar.jsx +++ b/src/components/Navbars/AdminNavbar.jsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import routes from "../../route.jsx"; import * as style from "../Navbars/AdminNavbar.module.css"; import { useNavigate, useLocation } from "react-router-dom"; - +import { userUserName } from "../../hooks/useUserName.jsx"; // reactstrap components import { Collapse, @@ -16,6 +16,11 @@ import { function AdminNavbar() { const [isOpen, setIsOpen] = useState(false); const toggle = () => setIsOpen(!isOpen); + const routes_FirstPart = routes.slice(0, 5); + const routes_SecondPart = routes.slice(6); + // console.log("First Part: ", routes_FirstPart); + // console.log("Second Part: ", routes_SecondPart); + const {profile, setProfile, loading} = userUserName(); return (