Skip to content

Commit 952d97a

Browse files
authored
Merge pull request #19 from sagerg/development
Enhancements
2 parents eb9b85c + f09b2d4 commit 952d97a

File tree

13 files changed

+218
-232
lines changed

13 files changed

+218
-232
lines changed

README.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
# [Portfolio](https://sagerg.github.io/portfolio/) · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/sagerg/portfolio/blob/main/LICENSE) [![pages-build-deployment](https://github.com/sagerg/portfolio/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/sagerg/portfolio/actions/workflows/pages/pages-build-deployment) ![Webpack CI](https://github.com/sagerg/portfolio/actions/workflows/webpack.yml/badge.svg)
22

3-
43
![cover photo](https://github.com/sagerg/portfolio/blob/main/cover.png)
54

6-
7-
A [React](https://reactjs.org/) web application that:
8-
9-
* **Serves** as a digital portfolio, providing a comprehensive overview of my capabilities and projects
10-
* **Showcases** some of my work, skills, achievements, and experiences
5+
A digital portfolio made with [React](https://reactjs.org/)
116

127
## Quick Start
138

14-
Download and run this application in development mode on your local server:
9+
Download and run this application in development mode:
1510

1611
```
1712
$ git clone https://github.com/sagerg/portfolio.git
@@ -26,17 +21,13 @@ Run unit tests:
2621
$ npm test
2722
```
2823

29-
Create build directories `/dist` and `/docs` with a production build:
24+
Create build directories `/dist` and `/docs`:
3025

3126
```
3227
$ npm run build
33-
```
34-
35-
Q: Why do we have **two** build directories?
36-
37-
A: Well, `/dist` is built from running `webpack --mode production` but GitHub pages require the `/index.html` to be in the root of the project directory or in `/docs`, so we copy the contents of `/dist` to `/docs` for this purpose.
28+
```
3829

39-
### npm and Node.js
30+
### npm and Node.js Versions
4031

4132
```
4233
$ npm --version

dist/bundle.js

Lines changed: 40 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/bundle.js

Lines changed: 40 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.scss

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/assets/windows.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,16 @@
4141
}
4242

4343
.icons {
44-
font-size: 30px;
44+
font-size: 30px;
45+
padding-left: 10px;
46+
padding-right: 10px;
4547
}
4648

49+
.icons:hover {
50+
border-radius: 5px;
51+
background:rgba(128, 223, 237, 0.5);
52+
}
53+
4754
.close-icon {
4855
display: inline-block;
4956
width: 16px;

src/components/ui/CommandOutputs.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ export const ProjectsText = () => {
290290
</div>
291291
<br/>
292292
<div>
293-
{"Here are some of my personal favorites: "}
294293
<div>
295294
{"This "}
296295
<Link url={"https://github.com/sagerg/portfolio"}>
@@ -314,10 +313,10 @@ export const ProjectsText = () => {
314313
</div>
315314
<div>
316315
{"A "}
317-
<Link url="https://github.com/sagerg/cmd-line-tools#password-manager">
318-
{"Password Manager"}
316+
<Link url="https://github.com/sagerg/path-finding">
317+
{"Path Finding Script"}
319318
</Link>
320-
{" made with C++ and Vigenère cipher for encryption"}
319+
{" that uses Depth-first search to find a path in a maze"}
321320
</div>
322321
</div>
323322
</Delayed>

src/components/ui/Loader.js

Lines changed: 53 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import "../../assets/terminal.css";
1010

1111
import data from "../../data/data.json";
1212

13-
const Loader = ({ user, isLoading, setLoading }) => {
13+
const Loader = ({ user, setLoading }) => {
1414
const multiplier = 500;
1515
const dateIdentifier = "date";
1616
const userIdentifier = "user";
@@ -40,60 +40,58 @@ const Loader = ({ user, isLoading, setLoading }) => {
4040

4141
return (
4242
<div data-testid="loader-test">
43-
{isLoading &&
44-
<div className="loader">
45-
<PacmanLoader
46-
color={"yellow"}
47-
size={10}
48-
aria-label="Loading Spinner"
49-
/>
50-
{bootSequence.map((text, i) => {
51-
if (text === "") {
52-
return (
53-
<Delayed key={i} waitBeforeShow={multiplier * i}>
54-
<br/>
55-
</Delayed>
56-
);
57-
} else if (text.includes(dateIdentifier)) {
58-
return (
59-
<Delayed key={i} waitBeforeShow={multiplier * i}>
60-
<p>
61-
<span>{text}</span>
62-
<span style={{ color : "cyan" }}>{(new Date()).toUTCString()}</span>
63-
</p>
64-
</Delayed>
65-
);
66-
} else if (text.includes(userIdentifier)) {
67-
return (
68-
<Delayed key={i} waitBeforeShow={multiplier * i}>
69-
<p>
70-
<span>{text}</span>
71-
<span className="highlighted-text">{user}</span>
72-
</p>
73-
</Delayed>
74-
);
75-
} else {
76-
return (
77-
<Delayed key={i} waitBeforeShow={multiplier * i}>
78-
<p>{text}</p>
79-
</Delayed>
80-
);
81-
}
82-
})}
83-
<Delayed waitBeforeShow={loadDuration}>
84-
<span>{"PRESS "}</span>
85-
<Link url="#" opensOnNewTab={false} onClick={() => setLoading(false)}>{"ENTER"}</Link>
86-
<span>{" TO CONTINUE"}</span>
87-
<Cursor />
88-
<br /><br />
89-
</Delayed>
90-
<PulseLoader
91-
color={"yellow"}
92-
size={10}
93-
aria-label="Loading Spinner"
94-
/>
95-
</div>
96-
}
43+
<div className="loader">
44+
<PacmanLoader
45+
color={"yellow"}
46+
size={10}
47+
aria-label="Loading Spinner"
48+
/>
49+
{bootSequence.map((text, i) => {
50+
if (text === "") {
51+
return (
52+
<Delayed key={i} waitBeforeShow={multiplier * i}>
53+
<br/>
54+
</Delayed>
55+
);
56+
} else if (text.includes(dateIdentifier)) {
57+
return (
58+
<Delayed key={i} waitBeforeShow={multiplier * i}>
59+
<p>
60+
<span>{text}</span>
61+
<span style={{ color : "cyan" }}>{(new Date()).toUTCString()}</span>
62+
</p>
63+
</Delayed>
64+
);
65+
} else if (text.includes(userIdentifier)) {
66+
return (
67+
<Delayed key={i} waitBeforeShow={multiplier * i}>
68+
<p>
69+
<span>{text}</span>
70+
<span className="highlighted-text">{user}</span>
71+
</p>
72+
</Delayed>
73+
);
74+
} else {
75+
return (
76+
<Delayed key={i} waitBeforeShow={multiplier * i}>
77+
<p>{text}</p>
78+
</Delayed>
79+
);
80+
}
81+
})}
82+
<Delayed waitBeforeShow={loadDuration}>
83+
<span>{"PRESS "}</span>
84+
<Link url="#" opensOnNewTab={false} onClick={() => setLoading(false)}>{"ENTER"}</Link>
85+
<span>{" TO CONTINUE"}</span>
86+
<Cursor />
87+
<br /><br />
88+
</Delayed>
89+
<PulseLoader
90+
color={"yellow"}
91+
size={10}
92+
aria-label="Loading Spinner"
93+
/>
94+
</div>
9795
</div>
9896
);
9997
};

src/pages/Home/Terminal.js renamed to src/components/ui/Terminal.js

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React , { useEffect, useState, useRef } from "react";
2-
import Cursor from "../../components/ui/Cursor"
2+
import Cursor from "./Cursor"
33
import {
44
Prompt,
55
IntroText,
@@ -9,13 +9,13 @@ import {
99
AboutText,
1010
ProjectsText,
1111
SocialMediaText
12-
} from "../../components/ui/CommandOutputs";
12+
} from "./CommandOutputs";
1313

1414
import "../../assets/terminal.css"
1515

1616
import data from "../../data/data.json";
1717

18-
const Terminal = ({ user, isLoading, setLoading }) => {
18+
const Terminal = ({ user, isLoading }) => {
1919
const [terminalHistory, setTerminalHistory] = useState([]);
2020
const [input, setInput] = useState("");
2121
const inputRef = useRef();
@@ -140,7 +140,7 @@ const Terminal = ({ user, isLoading, setLoading }) => {
140140
};
141141

142142
const handleScrollToInput = () => {
143-
if (!isLoading && inputRef.current !== undefined) {
143+
if (inputRef.current !== undefined) {
144144
setTimeout(() => inputRef.current.scrollIntoView(), 0);
145145
}
146146
};
@@ -160,45 +160,41 @@ const Terminal = ({ user, isLoading, setLoading }) => {
160160
};
161161

162162
useEffect(() => {
163-
if (!isLoading) {
164-
inputRef.current.focus();
165-
}
166-
}, [isLoading]);
163+
inputRef.current.focus();
164+
}, []);
167165

168166
useEffect(() => {
169167
setTerminalHistory([<LoginText/>, <IntroText user={user}/>]);
170168
}, []);
171169

172170
return (
173171
<div data-testid="terminal-test">
174-
{!isLoading &&
175-
<div
176-
className="terminal-wrapper"
177-
onClick={() => inputRef.current.focus()}
178-
>
179-
<div className="terminal">
180-
{terminalHistory.map((text, index) => (
181-
<div key={index}>
182-
{text}
183-
</div>
184-
))}
185-
</div>
186-
<div>
187-
<Prompt user={user}/>
188-
<input
189-
autoFocus
190-
ref={inputRef}
191-
className="terminal-input"
192-
type="text"
193-
style={{"width" : getTextWidth(input)}}
194-
value={input}
195-
onChange={handleInputOnChange}
196-
onKeyDown={handleOnKeyDown}
197-
/>
198-
<Cursor />
199-
</div>
172+
<div
173+
className="terminal-wrapper"
174+
onClick={() => inputRef.current.focus()}
175+
>
176+
<div className="terminal">
177+
{terminalHistory.map((text, index) => (
178+
<div key={index}>
179+
{text}
180+
</div>
181+
))}
200182
</div>
201-
}
183+
<div>
184+
<Prompt user={user}/>
185+
<input
186+
autoFocus
187+
ref={inputRef}
188+
className="terminal-input"
189+
type="text"
190+
style={{"width" : getTextWidth(input)}}
191+
value={input}
192+
onChange={handleInputOnChange}
193+
onKeyDown={handleOnKeyDown}
194+
/>
195+
<Cursor />
196+
</div>
197+
</div>
202198
</div>
203199
);
204200
};
File renamed without changes.

0 commit comments

Comments
 (0)