Skip to content

Commit 0f145ac

Browse files
committed
refactor: polish portfolio UI semantics
1 parent 1015aef commit 0f145ac

13 files changed

Lines changed: 41 additions & 27 deletions

File tree

components/About/About.tsx

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const About = (): JSX.Element => {
1818
src="/assets/portfolio/skills/linux-original.svg"
1919
height={100}
2020
width={100}
21-
objectFit={'contain'}
21+
style={{ objectFit: 'contain' }}
2222
alt={'Kali Linux'}
2323
/>
2424
<Styled.Figcaption>
@@ -29,37 +29,51 @@ const About = (): JSX.Element => {
2929
</Styled.Figure>
3030
</Styled.Header>
3131
<Styled.InfoWrapper>
32-
<Paragraph margin={'1rem 0'}>Kali GNU/Linux Rolling | Xfce 4.18</Paragraph>
3332
<Paragraph margin={'1rem 0'}>
34-
Built by Radzi Zamri (zis3c)
33+
Kali GNU/Linux Rolling | Xfce 4.18
3534
</Paragraph>
35+
<Paragraph margin={'1rem 0'}>Built by Radzi Zamri (zis3c)</Paragraph>
3636
<Paragraph margin={'1rem 0'}>
3737
Cybersecurity Student | Purple Team
3838
</Paragraph>
39-
<Paragraph margin={'1rem 0'}>
40-
CTF Team: Dot Zero
41-
</Paragraph>
39+
<Paragraph margin={'1rem 0'}>CTF Team: Dot Zero</Paragraph>
4240
<Paragraph margin={'1rem 0'}>
4341
Universiti Sultan Azlan Shah (USAS)
4442
</Paragraph>
4543
<Paragraph margin={'2rem 0'}>
46-
This interactive portfolio simulates a Kali Linux Xfce desktop environment.
47-
All features are frontend-only and safe.
44+
This interactive portfolio simulates a Kali Linux Xfce desktop
45+
environment. All features are frontend-only and safe.
4846
</Paragraph>
4947
<Paragraph margin={'1rem 0'}>
50-
<Styled.A href={'https://github.com/zis3c'} target="_blank" rel="noopener">
48+
<Styled.A
49+
href={'https://github.com/zis3c'}
50+
target="_blank"
51+
rel="noopener"
52+
>
5153
GitHub
5254
</Styled.A>
5355
{' · '}
54-
<Styled.A href={'https://www.linkedin.com/in/radzizamri/'} target="_blank" rel="noopener">
56+
<Styled.A
57+
href={'https://www.linkedin.com/in/radzizamri/'}
58+
target="_blank"
59+
rel="noopener"
60+
>
5561
LinkedIn
5662
</Styled.A>
5763
{' · '}
58-
<Styled.A href={'https://www.instagram.com/radz.z_/'} target="_blank" rel="noopener">
64+
<Styled.A
65+
href={'https://www.instagram.com/radz.z_/'}
66+
target="_blank"
67+
rel="noopener"
68+
>
5969
Instagram
6070
</Styled.A>
6171
{' · '}
62-
<Styled.A href={'https://www.youtube.com/@zis3c'} target="_blank" rel="noopener">
72+
<Styled.A
73+
href={'https://www.youtube.com/@zis3c'}
74+
target="_blank"
75+
rel="noopener"
76+
>
6377
YouTube
6478
</Styled.A>
6579
</Paragraph>

components/ContextMenuItem/ContextMenuItem.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('ContextMenuItem', () => {
2222
});
2323

2424
it('should render correct text content', () => {
25-
const contextItemText = wrap.find('p');
25+
const contextItemText = wrap.find('span.label');
2626
expect(contextItemText.text()).toBe('TOMATO');
2727
});
2828
it('should not render chevron icon with no hoverMenuItems', () => {
@@ -49,7 +49,7 @@ describe('ContextMenuItem', () => {
4949
});
5050

5151
it('should render correct text content', () => {
52-
const contextItemText = wrap.find('p');
52+
const contextItemText = wrap.find('span.label');
5353
expect(contextItemText.text()).toBe('ASPARAGUS');
5454
});
5555
it('should not render chevron icon with no hoverMenuItems', () => {

components/ContextMenuItem/ContextMenuItem.styles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const Container = styled.li<ContainerProps>`
1818
background: #3e445e;
1919
}
2020
21-
p {
21+
.label {
2222
font-size: 11px;
2323
color: #d0d5dc;
2424
font-family: 'Inter', 'Noto Sans', sans-serif;

components/ContextMenuItem/ContextMenuItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const ContextMenuItem = ({
4848
>
4949
<Styled.TextIconWrapper>
5050
{withIcon}
51-
<p>{text}</p>
51+
<span className="label">{text}</span>
5252
</Styled.TextIconWrapper>
5353

5454
{hoverMenuItems !== undefined && <FiChevronRight className={'icon'} />}

components/DesktopButton/DesktopButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ const DesktopButton = ({
157157
alt={text}
158158
height={iconSize.height}
159159
width={iconSize.width}
160-
objectFit={'contain'}
160+
style={{ objectFit: 'contain' }}
161161
quality={100}
162162
/>
163163
)}

components/DesktopIconButton/DesktopIconButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ const DesktopIconButton = ({
167167
alt={text}
168168
height={iconSize.height}
169169
width={iconSize.width}
170-
objectFit={'contain'}
171170
quality={100}
172171
loading={variant === 'desktop' ? 'lazy' : 'eager'}
173172
onLoadingComplete={() => setIsImageLoaded(true)}
174173
style={{
174+
objectFit: 'contain',
175175
opacity: isImageLoaded ? 1 : 0,
176176
transition: 'opacity 160ms ease',
177177
}}

components/LoginScreen/LoginScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ const LoginScreen = ({ isVisible, onLoginComplete }: Props): JSX.Element => {
116116
alt="User avatar"
117117
width={62}
118118
height={62}
119-
objectFit="cover"
119+
style={{ objectFit: 'cover' }}
120120
/>
121121
</Avatar>
122122
<Username>zis3c</Username>

components/SystemTray/SystemTray.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const renderWindowIcon = (iconSrc: string) => {
3131
alt=""
3232
width={16}
3333
height={16}
34-
objectFit="contain"
34+
style={{ objectFit: 'contain' }}
3535
quality={100}
3636
/>
3737
);

components/TechWidget/TechWidget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const TechWidget = (): JSX.Element => {
1717
src={'/assets/portfolio/skills/react-original.svg'}
1818
height={60}
1919
width={60}
20-
objectFit={'contain'}
20+
style={{ objectFit: 'contain' }}
2121
alt={'Build with React'}
2222
/>
2323
</Styled.ReactFigure>

components/WeatherWidget/WeatherWidget.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('WeatherWidget', () => {
4343
expect(text.length).toBe(1);
4444
});
4545
it('should render specified temperature', () => {
46-
const temperature = wrap.find(Styled.Temperature).find('p');
46+
const temperature = wrap.find(Styled.Temperature).find('span').first();
4747
expect(temperature.text()).toBe('72F');
4848
});
4949
it('should render specified humidity', () => {

0 commit comments

Comments
 (0)