Skip to content

Commit 9d83d46

Browse files
committed
Small mobile style fixes
1 parent abe2f97 commit 9d83d46

5 files changed

Lines changed: 50 additions & 16 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Sandbox
1+
# Personal Website
22

33
A modern multi-page React application built with TypeScript, Vite, and styled-components. Configured for static deployment to GitHub Pages.
44

src/components/hero/HeroContent.tsx

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
*
77
* Layout:
88
* - Vertically centered within its container
9-
* - Left-aligned text with constrained max-width
9+
* - Mobile: full-width with comfortable padding, compact side-by-side buttons
10+
* - Desktop: left-aligned glassmorphism card with constrained max-width (45vw)
1011
* - Button group with primary and secondary actions
1112
*
1213
* Usage:
@@ -22,17 +23,22 @@ const Container = styled.div`
2223
display: flex;
2324
flex-direction: column;
2425
justify-content: center;
25-
padding: var(--spacing-lg);
26-
max-width: 45vw;
2726
background: rgba(10, 25, 47, 0.5);
2827
backdrop-filter: blur(10px);
29-
border-radius: var(--radius-lg);
3028
border: 1px solid rgba(255, 255, 255, 0.05);
31-
margin: auto var(--spacing-md);
3229
30+
/* Mobile: full-width with comfortable padding */
31+
padding: var(--spacing-lg) var(--spacing-md);
32+
margin: auto 0;
33+
border-radius: 0;
34+
max-width: 100%;
35+
36+
/* Desktop: constrained card with rounded corners */
3337
@media (min-width: 768px) {
3438
padding: var(--spacing-xl);
3539
margin: auto var(--spacing-2xl);
40+
max-width: 45vw;
41+
border-radius: var(--radius-lg);
3642
}
3743
`;
3844

@@ -83,9 +89,24 @@ const Description = styled.p`
8389

8490
const ButtonGroup = styled.div`
8591
display: flex;
86-
flex-wrap: wrap;
87-
gap: var(--spacing-md);
92+
gap: var(--spacing-sm);
8893
margin-top: var(--spacing-sm);
94+
95+
/* Mobile: compact side-by-side buttons */
96+
& > button {
97+
padding: var(--spacing-sm) var(--spacing-md);
98+
font-size: var(--font-size-xs);
99+
}
100+
101+
/* Desktop: restore default button sizing */
102+
@media (min-width: 768px) {
103+
gap: var(--spacing-md);
104+
105+
& > button {
106+
padding: var(--spacing-md) var(--spacing-xl);
107+
font-size: var(--font-size-sm);
108+
}
109+
}
89110
`;
90111

91112
export interface HeroContentProps {

src/components/hero/HeroViewport.tsx

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Designed for immersive hero sections with layered content.
66
*
77
* Structure:
8-
* - Outer container with viewport-inset margins on all sides
8+
* - Outer container: full-bleed on mobile, viewport-inset margins on desktop (768px+)
99
* - Optional media layer for background video/image/canvas
1010
* - Gradient overlay for text readability
1111
* - Content layer for children (above overlay)
@@ -26,15 +26,23 @@ const VIEWPORT_INSET = "var(--viewport-inset)";
2626

2727
const ViewportContainer = styled.section`
2828
position: relative;
29-
/* Calculate exact dimensions to center viewport with equal margins */
30-
width: calc(100vw - ${VIEWPORT_INSET} * 2);
31-
height: calc(100vh - ${VIEWPORT_INSET} * 2);
32-
margin: ${VIEWPORT_INSET};
33-
border-radius: var(--radius-2xl);
3429
overflow: hidden;
3530
background-color: var(--color-viewport);
36-
box-shadow: var(--shadow-viewport);
3731
z-index: var(--z-viewport);
32+
33+
/* Mobile: full-bleed, no inset or border-radius */
34+
width: 100%;
35+
height: 100vh;
36+
height: 100dvh; /* Dynamic viewport height accounts for mobile browser chrome */
37+
38+
/* Desktop: inset with rounded corners */
39+
@media (min-width: 768px) {
40+
width: calc(100vw - ${VIEWPORT_INSET} * 2);
41+
height: calc(100vh - ${VIEWPORT_INSET} * 2);
42+
margin: ${VIEWPORT_INSET};
43+
border-radius: var(--radius-2xl);
44+
box-shadow: var(--shadow-viewport);
45+
}
3846
`;
3947

4048
const MediaLayer = styled.div`

src/components/hero/ScrollIndicator.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ const Container = styled.div`
4545
gap: var(--spacing-sm);
4646
z-index: var(--z-content);
4747
animation: ${fade} 2s ease-in-out infinite;
48+
49+
/* Ensure scroll indicator stays within safe area on mobile */
50+
@supports (padding-bottom: env(safe-area-inset-bottom)) {
51+
bottom: calc(var(--spacing-xl) + env(safe-area-inset-bottom));
52+
}
4853
`;
4954

5055
const Arrow = styled.div`

src/constants/navigation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const NAV_LINKS = [
1919
{ label: "Contact", href: "/#contact", external: false },
2020
{
2121
label: "GitHub",
22-
href: "https://github.com/0xJeremy/0xJeremy.github.io",
22+
href: "https://github.com/0xJeremy",
2323
external: true,
2424
},
2525
{ label: "Resume", href: "/resume.pdf", external: true },

0 commit comments

Comments
 (0)