Skip to content

Commit 8a71672

Browse files
committed
Fix code block and padding issues
1 parent 822af72 commit 8a71672

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

frontend/src/app/home/components/code-snippet/CodeSnippetHighlight.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
22
import { darcula } from 'react-syntax-highlighter/dist/esm/styles/prism';
33

44
const CodeSnippetHighlight = () => {
5-
const code = `def twoSum(nums, target):
6-
idxDict = {}
7-
for i, num in enumerate(nums):
8-
if target - num in idxDict:
9-
return [idxDict[target - num], i]
10-
idxDict[num] = i
11-
return []`;
12-
5+
const code = `class Solution:
6+
def twoSum(self, nums: List[int], target: int) -> List[int]:
7+
idxDict = {}
8+
for i, num in enumerate(nums):
9+
idxDict[num] = i
10+
11+
for i, num in enumerate(nums):
12+
diff = target - num
13+
if diff in idxDict and i != idxDict[diff]:
14+
return [i, idxDict[diff]]`;
1315
return (
1416
<SyntaxHighlighter language="python" style={darcula}>
1517
{code}

frontend/src/app/home/components/landing-page/LandingPage.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,25 @@ const LandingPage = () => {
3232

3333
return (
3434
<div className="flex items-center justify-center min-h-[90vh]">
35-
<div className="flex items-center justify-between max-w-7xl w-full">
36-
<div className="flex-col basis-3/4 pr-8">
37-
<h1 className="text-6xl font-extrabold text-white pb-5">
35+
{/* <div className="flex items-center justify-between max-w-7xl w-full"></div> */}
36+
<div className="flex justify-between max-w-[90vw]">
37+
<div className="flex-1 pr-10 h-full">
38+
<h1 className="text-6xl font-extrabold text-white pb-8">
3839
Collaborative Coding, Competitive Results.
3940
</h1>
40-
<p className="font-normal text-white pb-5">
41+
<p className="font-normal text-white pb-8">
4142
Join PeerPrep to sharpen your skills through real-time problem-solving, and prepare to outshine in every interview.
4243
Created for CS3219 Software Engineering Principles AY24/25 by Group 15.
4344
</p>
44-
<Button className="mt-6 font-semibold w-full" onClick={() => handleLogin()}>
45-
<GoogleIcon/>
46-
<span className="pl-2">Get Started with Google</span>
47-
</Button>
45+
<div className="pt-8">
46+
<Button className="font-semibold w-full" onClick={() => handleLogin()}>
47+
<GoogleIcon/>
48+
<span className="pl-2">Get Started with Google</span>
49+
</Button>
50+
</div>
4851
</div>
49-
<div className="flex-col basis-1/4 h-full">
50-
<Card className="bg-primary-1000 border-none pt-6 pb-6 w-full h-full drop-shadow">
52+
<div className="flex-1 h-full">
53+
<Card className="bg-primary-1000 border-none pt-2 pb-2 max-w-[90vh] h-full drop-shadow">
5154
<CardContent className="h-full">
5255
<CodeSnippet />
5356
</CardContent>

0 commit comments

Comments
 (0)