From cc2012400ad2375c5fb18d9ce22d7f46ad45ee48 Mon Sep 17 00:00:00 2001
From: deveshsawant05 <146441689+deveshsawant05@users.noreply.github.com>
Date: Fri, 26 Jul 2024 18:53:50 +0530
Subject: [PATCH 1/3] Added Navbar component to Layout (#62)
Navbar added
---
src/app/layout.tsx | 2 +
src/app/page.tsx | 2 +-
src/components/navbar.jsx | 57 +++++++++++++++
src/styles/navbar.css | 143 ++++++++++++++++++++++++++++++++++++++
4 files changed, 203 insertions(+), 1 deletion(-)
create mode 100644 src/components/navbar.jsx
create mode 100644 src/styles/navbar.css
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index af600a3..3fbafd1 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -5,6 +5,7 @@ import { Inter } from "next/font/google";
import "./globals.css";
import { Analytics } from "@vercel/analytics/react"
import { SpeedInsights } from "@vercel/speed-insights/next"
+import Navbar from "@/components/navbar"
const inter = Inter({ subsets: ["latin"] });
@@ -29,6 +30,7 @@ export default function RootLayout({
+
}>{children}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index e4e3425..e12ee3b 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -6,4 +6,4 @@ export default function Home() {
Home
);
-}
+}
\ No newline at end of file
diff --git a/src/components/navbar.jsx b/src/components/navbar.jsx
new file mode 100644
index 0000000..f4a1802
--- /dev/null
+++ b/src/components/navbar.jsx
@@ -0,0 +1,57 @@
+"use client"
+import React, { use, useState } from "react";
+import "@/styles/navbar.css";
+import Link from "next/link";
+
+function Navbar() {
+ const [hiddenMenu,setHiddenMenu] = useState(true);
+ function MenuToggle(){
+ setHiddenMenu(!hiddenMenu);
+ }
+
+ const eventsLink = "/events";
+ const projectsLink = "/projects";
+ const membersLink = "/members";
+ const contactUsLink = "/contact_us";
+
+ return (
+ <>
+
+
+
+
+ Coding Club
+
+
+ Events
+ Projects
+ Members
+ Contact Us
+
+
+
+
+
+
+
Events
+
Projects
+
Members
+
Contact Us
+
+
+
+
+
+ >
+ );
+}
+
+export default Navbar;
diff --git a/src/styles/navbar.css b/src/styles/navbar.css
new file mode 100644
index 0000000..d0e15f8
--- /dev/null
+++ b/src/styles/navbar.css
@@ -0,0 +1,143 @@
+@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital@0;1&display=swap');
+
+#pseudo{
+ width: 100%;
+ height: 65px;
+}
+.navbar{
+ height:65px;
+ width: 100%;
+ position: fixed;
+ float: left;
+ display: block;
+ top: 0px;
+ box-shadow: 0px 5px 29.4px rgba(0, 0, 0, 0.25);
+ background-color: var(--background);
+
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 10px 50px;
+ z-index: 10;
+}
+.navbar>*>*{
+ cursor: pointer;
+ transition: transform 0.3s;
+}
+.navbar>*>*:not(.mobile-menu-container):hover{
+ transform: scale(1.15);
+}
+.logo-container{
+ display: flex;
+ align-items: center;
+ gap: 15px;
+ transition: transform 0.3s;
+}
+
+.logo-img{
+ height: 50px;
+ cursor :pointer;
+}
+
+.logo-title{
+ font-family: "Noto Sans", sans-serif;
+ font-size: 30px;
+ letter-spacing: -0.05em;
+}
+
+.menu-container{
+ display: flex;
+ justify-content: space-evenly;
+ gap: 50px;
+ font-family: "Noto Sans", sans-serif;
+ font-size: 18px;
+}
+
+.mobile-menu{
+ display: none;
+}
+.mobile-menu-container{
+ position: fixed;
+ top: 75px;
+ right: 10px;
+ width: 200px;
+ height: 250px;
+ background: var(--primary-foreground);
+ box-shadow: 5px 5px 4.5px rgba(0, 0, 0, 0.25);
+ border: #ffbade59 solid 1px;
+ border-radius: 10px;
+ z-index: 100;
+}
+
+.mobile-menu-container2{
+ height: 100%;
+
+ display: flex;
+ flex-direction: column;
+ gap: 30px;
+ justify-content: center;
+ align-items: center;
+}
+
+@media screen and (max-width:860px){
+ .navbar{
+ padding: 0px 10px 0px 0px;
+ }
+ .logo-container{
+ scale: 75%;
+ margin: 0;
+ }
+ .menu-container{
+ display: none;
+ }
+ .mobile-menu-container{
+ display: block;
+ }
+ .mobile-menu{
+ display: block;
+ }
+
+ .menu {
+ transform: translate(-50%, -50%);
+ cursor: pointer;
+ transition: 0.5s ease;
+ height: 30px;
+ }
+ .menu:hover .bar {
+ box-shadow: 1px 1px 7px 1px RGBa(0, 0, 0, 0.3);
+ }
+ .menu .bar {
+ width: 25px;
+ height: 3px;
+ background: #fff;
+ box-shadow: 1px 1px 3px RGBa(0, 0, 0, 0.4);
+ border-radius: 2px;
+ transition: 0.4s ease;
+ }
+ .menu .bar:not(:first-child) {
+ margin-top: 5px;
+ }
+
+ #hi:checked + .menu {
+ transform: translate(-50%,50%) rotatey(180deg);
+ }
+ #hi:checked + .menu .bar {
+ transform: rotatey(180deg) rotatex(360deg);
+ }
+ #hi:checked + .menu .bar:first-child {
+ transform: rotate(-45deg);
+ margin-top: 5px;
+ }
+ #hi:checked + .menu .bar:nth-child(2) {
+ opacity: 0;
+ }
+ #hi:checked + .menu .bar:nth-child(3) {
+ margin-top: -11px;
+ transform: rotate(45deg);
+ }
+ .menu-icon{
+ scale : 80%;
+ margin-right: 10px;
+ }
+
+}
\ No newline at end of file
From 9f3c42dfe2df4a9c017592b1da13c9b5555c5f79 Mon Sep 17 00:00:00 2001
From: Devyash Saini
Date: Fri, 26 Jul 2024 21:30:55 +0530
Subject: [PATCH 2/3] PR dev deployment workflow fix
---
.github/workflows/vercelPullRequest.yml | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/vercelPullRequest.yml b/.github/workflows/vercelPullRequest.yml
index 9b2a984..890b717 100644
--- a/.github/workflows/vercelPullRequest.yml
+++ b/.github/workflows/vercelPullRequest.yml
@@ -1,12 +1,23 @@
name: Create vercel preview URL on pull request
on:
- pull_request:
+ pull_request_target:
branches:
- new
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
+ - uses: trstringer/manual-approval@v1
+ timeout-minutes: 240
+ with:
+ secret: ${{ github.TOKEN }}
+ approvers: thedevyashsaini # GitHub username of the approver
+ minimum-approvals: 1
+ issue-title: "Deploying PR to dev from staging"
+ issue-body: "Please approve or deny the deployment of this PR."
+ exclude-workflow-initiator-as-approver: true
+ additional-approved-words: ''
+ additional-denied-words: ''
- uses: actions/checkout@v4
- uses: amondnet/vercel-action@v25
id: vercel-deploy
From 4d6f471a291196ee0a616fd6fe1305eb68c968da Mon Sep 17 00:00:00 2001
From: Devyash Saini
Date: Fri, 26 Jul 2024 22:24:17 +0530
Subject: [PATCH 3/3] security test 1
---
.github/workflows/vercelPullRequest.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/vercelPullRequest.yml b/.github/workflows/vercelPullRequest.yml
index 890b717..ff5b339 100644
--- a/.github/workflows/vercelPullRequest.yml
+++ b/.github/workflows/vercelPullRequest.yml
@@ -11,7 +11,7 @@ jobs:
timeout-minutes: 240
with:
secret: ${{ github.TOKEN }}
- approvers: thedevyashsaini # GitHub username of the approver
+ approvers: thedevyashsaini,steakfisher # GitHub username of the approver
minimum-approvals: 1
issue-title: "Deploying PR to dev from staging"
issue-body: "Please approve or deny the deployment of this PR."