Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
7 changes: 0 additions & 7 deletions client/src/components/components/CodeEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ function CodeEditor({ hasStarted, averageVolume, startRecording, stopRecording,
return (
<div id="code-editor" className="w-full p-6 pl-7 h-screen flex flex-col bg-(--background) text-white">

{/* Header */}
<div className="flex justify-between items-center border-b border-(--code-stroke) pb-3">
<div className="flex items-center">
<h1 className="text-lg font-semibold">Code Editor</h1>
Expand All @@ -140,7 +139,6 @@ function CodeEditor({ hasStarted, averageVolume, startRecording, stopRecording,
</div>

<div className="flex items-center gap-2">
{/* Font Size Buttons */}
<div className="flex mr-1">
<button
onClick={() => setFontSize((prev) => Math.max(prev - 2, 12))}
Expand All @@ -158,7 +156,6 @@ function CodeEditor({ hasStarted, averageVolume, startRecording, stopRecording,
</button>
</div>

{/* Language Selector */}
<div className="border border-(--code-stroke) pr-2 pl-1 py-1 rounded-sm">
<select
className="bg-transparent text-sm outline-none cursor-pointer px-1 pr-2"
Expand All @@ -175,7 +172,6 @@ function CodeEditor({ hasStarted, averageVolume, startRecording, stopRecording,
</div>


{/* Code Editor */}
<div className="mt-3 relative flex-1 border border-(--code-stroke) rounded-sm overflow-hidden" style={{ "scrollbarColor": "var(--code-stroke) var(--background)" }}>
<CodeMirror
value={code}
Expand Down Expand Up @@ -218,7 +214,6 @@ function CodeEditor({ hasStarted, averageVolume, startRecording, stopRecording,
}}
/>

{/* Floating Run Button */}
<button
id="run-button"
onClick={compileCode}
Expand All @@ -228,13 +223,11 @@ function CodeEditor({ hasStarted, averageVolume, startRecording, stopRecording,
</button>
</div>

{/* Output Section */}
<div className="mt-4 bg-(--code-fill) p-3 rounded-sm border border-(--code-stroke) max-h-40 overflow-y-auto">
<h3 className="text-[14px] font-bold text-(--code-text)">Output:</h3>
<pre className="text-[14px] text-(--code-text) font-thin whitespace-pre-wrap">{output}</pre>
</div>

{/* Mute Button */}
<MuteButton status={status} hasStarted={hasStarted} averageVolume={averageVolume} startRecording={startRecording} stopRecording={stopRecording} />
</div>
);
Expand Down
360 changes: 360 additions & 0 deletions client/src/components/components/FeatureShowcase.jsx

Large diffs are not rendered by default.

186 changes: 128 additions & 58 deletions client/src/components/components/InteractiveTabs.jsx
Original file line number Diff line number Diff line change
@@ -1,69 +1,139 @@
import React, { useState } from 'react';
"use client"

import { useState, useEffect } from "react"
import { Code, MessageSquare, Play } from 'lucide-react'

const InteractiveTabs = () => {
const [activeTab, setActiveTab] = useState(0);

const [activeTab, setActiveTab] = useState(0)
const [isHovering, setIsHovering] = useState(false)

// auto rotates tabs every 8 seconds unless user is hovering
useEffect(() => {
if (isHovering) return

const interval = setInterval(() => {
setActiveTab((prev) => (prev === 2 ? 0 : prev + 1))
}, 8000)

return () => clearInterval(interval)
}, [isHovering])

const tabs = [
"Solve LeetCode Questions Directly",
"Compile Code",
"Discuss Highlighted Code"
];
{
id: 0,
title: "Select Interview",
description: "Solve LeetCode Questions Directly",
icon: <Code className="w-5 h-5" />,
color: "from-emerald-500 to-teal-500",
textColor: "text-emerald-400",
borderColor: "border-emerald-500",
videoSrc: "ScreenRecording1.mov",
},
{
id: 1,
title: "Discuss Highlighted Code",
description: "Get AI feedback on your code",
icon: <MessageSquare className="w-5 h-5" />,
color: "from-blue-500 to-cyan-500",
textColor: "text-blue-400",
borderColor: "border-blue-500",
videoSrc: "ScreenRecording2.mov",
},
{
id: 2,
title: "Compile Code",
description: "Test your solutions instantly",
icon: <Play className="w-5 h-5" />,
color: "from-purple-500 to-pink-500",
textColor: "text-purple-400",
borderColor: "border-purple-500",
videoSrc: "ScreenRecording3.mov",
},
]

return (
<div className="ml-20 border-1 border-white/10 h-95 w-2/3 flex-grow rounded-lg flex flex-row">
<div className="flex flex-2 flex-col justify-between w-full text-md">
<div onClick={() => setActiveTab(0)} className={`transition-all duration-300 cursor-pointer h-full w-full border-r-1 border-b-1 border-white/10 flex justify-center items-center text-center px-3 ${activeTab === 0 ? 'bg-white/5 text-white' : 'hover:bg-white/5 text-white/60'}`}>Select <br></br>Interview</div>
<div onClick={() => setActiveTab(1)} className={`transition-all duration-300 cursor-pointer h-full w-full border-r-1 border-b-1 border-white/10 flex justify-center items-center text-center px-3 ${activeTab === 1 ? 'bg-white/5 text-white' : 'hover:bg-white/5 text-white/60'}`}>Discuss <br></br>Highlighted Code</div>
<div onClick={() => setActiveTab(2)} className={`transition-all duration-300 cursor-pointer h-full w-full border-r-1 border-b-1 border-white/10 flex justify-center items-center text-center px-3 ${activeTab === 2 ? 'bg-white/5 text-white' : 'hover:bg-white/5 text-white/60'}`}>Compile <br></br>Code</div>
<div
className="relative w-full max-w-5xl mx-auto rounded-xl overflow-hidden"
onMouseEnter={() => setIsHovering(true)}
onMouseLeave={() => setIsHovering(false)}
>
<div className="flex justify-center mb-6">
<div className="flex gap-2 p-1 bg-white/5 rounded-full border border-white/10">
{tabs.map((tab) => (
<button
key={tab.id}
onClick={() => setActiveTab(tab.id)}
className={`flex items-center gap-2 px-5 py-2.5 rounded-full transition-all ${
activeTab === tab.id
? `bg-gradient-to-r ${tab.color} text-white`
: "text-white/70 hover:text-white hover:bg-white/5"
}`}
>
{tab.icon}
<span className="font-medium">{tab.title}</span>
</button>
))}
</div>
</div>
<div className="flex flex-6 justify-center items-center px-3.5 py-3">
<div className="rounded-md h-full w-full flex text-black text-center">
{activeTab === 0 && (
<div className="flex">
<video
className="w-full h-full object-cover rounded-lg"
src="ScreenRecording1.mov"
autoPlay
muted
controls={false}
onEnded={() => console.log("Video ended.")}
>
Your browser does not support the video tag.
</video>
</div>
)}
{activeTab === 1 && (
<div>
<video
className="w-full h-full object-cover rounded-lg"
src="ScreenRecording2.mov"
autoPlay
muted
controls={false}
onEnded={() => console.log("Video ended.")}
>
Your browser does not support the video tag.
</video>
</div>
)}
{activeTab === 2 && (
<div>
<video
className="w-full h-full object-cover rounded-lg"
src="ScreenRecording3.mov"
autoPlay
muted
controls={false}
onEnded={() => console.log("Video ended.")}
>
Your browser does not support the video tag.
</video>

<div className="relative h-[450px] rounded-xl overflow-hidden">
<div className={`absolute -inset-0.5 bg-gradient-to-r ${tabs[activeTab].color} rounded-xl opacity-50`}></div>

<div className="relative bg-black/40 backdrop-blur-sm rounded-xl overflow-hidden border border-white/10 h-full">
{tabs.map((tab) => (
<div
key={tab.id}
className={`absolute inset-0 transition-opacity duration-500 ${
activeTab === tab.id ? "opacity-100" : "opacity-0 pointer-events-none"
}`}
>
<div className="relative h-full w-full overflow-hidden">
<video
className="absolute inset-0 w-full h-full object-cover"
src={tab.videoSrc}
autoPlay
muted
loop
playsInline
>
Your browser does not support the video tag.
</video>

<div className="absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-black/40"></div>

<div className="absolute bottom-0 left-0 right-0 p-6 flex justify-between items-center">
<div className={`px-4 py-2 rounded-lg bg-black/60 backdrop-blur-sm ${tab.textColor} border ${tab.borderColor}/30`}>
<div className="flex items-center gap-2">
{tab.icon}
<span className="font-medium">{tab.title}</span>
</div>
</div>

<div className="text-white/80 text-sm bg-black/60 backdrop-blur-sm px-4 py-2 rounded-lg">
{tab.description}
</div>
</div>
</div>
</div>
)}
))}
</div>
</div>

<div className="flex justify-center mt-6">
<div className="flex gap-2">
{tabs.map((tab) => (
<button
key={tab.id}
onClick={() => setActiveTab(tab.id)}
className={`w-2 h-2 rounded-full transition-all ${
activeTab === tab.id ? `bg-gradient-to-r ${tab.color} w-8` : "bg-white/30 hover:bg-white/50"
}`}
/>
))}
</div>
</div>
</div>
);
};
)
}

export default InteractiveTabs;
export default InteractiveTabs;
5 changes: 0 additions & 5 deletions client/src/components/components/MuteButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ const MuteButton = ({ hasStarted, averageVolume, startRecording, stopRecording,
)}


{/* Mute Overlay */}
{showOverlay && (
<div className="fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2
bg-black/30 text-white px-6 py-3 rounded-xl text-xl font-semibold
Expand All @@ -139,7 +138,6 @@ const MuteButton = ({ hasStarted, averageVolume, startRecording, stopRecording,
</div>
)}

{/* Processing Overlay */}
{status === "Processing audio..." && (
<div className="fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2
bg-black/30 text-white px-6 py-3 rounded-xl text-xl font-semibold
Expand All @@ -148,9 +146,7 @@ const MuteButton = ({ hasStarted, averageVolume, startRecording, stopRecording,
</div>
)}

{/* Mute Button + Bars */}
<div className="fixed bottom-10 right-10 bg-(--mute-bg-light) rounded-full flex">
{/* Bars */}
<div className="flex items-center justify-end pr-3.5 pl-5">
<div className="flex space-x-[3px] items-center h-6">
{barMultipliers.map((multiplier, i) => (
Expand All @@ -167,7 +163,6 @@ const MuteButton = ({ hasStarted, averageVolume, startRecording, stopRecording,
</div>
</div>

{/* Mute/Unmute Button */}
<button
className={`cursor-pointer w-12 h-12 rounded-full bg-(--mute-bg) text-white flex items-center justify-center shadow-md transition-all z-50 ${
!isMuted
Expand Down
Loading