Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Johanna Eriksson Portfolio #393

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d5411c4
Add new folder for components
joheri1 Oct 29, 2024
9d1c46f
Initialize using Vire and install my-portfolio template. Add instruct…
joheri1 Oct 29, 2024
84ebd9f
Add global styles in index.css
joheri1 Oct 29, 2024
681332d
Start adding the structure. Create folders for components, create com…
joheri1 Oct 29, 2024
77589c1
Add components for section, image, card, button, typography, tag, and…
joheri1 Oct 31, 2024
a01f9de
Start writing the README file
joheri1 Oct 31, 2024
2c97cfc
Add icons to the icons folder
joheri1 Oct 31, 2024
f4e4ed5
”To the Section folder, add TextSection.jsx, CardSection.jsx, and Foo…
joheri1 Oct 31, 2024
f55838f
Add unsaved changes, if any
joheri1 Oct 31, 2024
d81fc7a
Mount components to App.jsx. Add some first lines of code to the comp…
joheri1 Nov 1, 2024
3a34966
Rename component TextSection CSS, that mistakingly was given the wron…
joheri1 Nov 1, 2024
e41cbf2
Update paths, etc to make the code work. Import the Footer component …
joheri1 Nov 1, 2024
327cbc3
Fix code for the section since it is using a mix of children and expl…
joheri1 Nov 1, 2024
3e6d557
Change px to rem on the font sizes
joheri1 Nov 1, 2024
89e25cd
Changed px to rem on each components css file
joheri1 Nov 1, 2024
70384dc
Correct variable names for the h1 and h2 fonts in the sections.
joheri1 Nov 1, 2024
9b619c9
Add image to Assets.
joheri1 Nov 2, 2024
26e7511
Add styling to Hero. Add social icons to hero incl css
joheri1 Nov 2, 2024
c98ce11
Add more styling to Hero
joheri1 Nov 2, 2024
427b246
Add styling to Tech text section. Update section comments in the fini…
joheri1 Nov 2, 2024
8bc2301
Complete the Footer component and add styling to it. Create a new com…
joheri1 Nov 2, 2024
d982320
Save any unsaved changes
joheri1 Nov 2, 2024
dc08902
Add more default data in the project.json and move the json file to w…
joheri1 Nov 3, 2024
2037740
Update Button components. Import the Button components to the CardSec…
joheri1 Nov 3, 2024
3f64d37
Add descriptions to the components
joheri1 Nov 3, 2024
b89ea56
Delete second, unused README file. Update the correct README
joheri1 Nov 3, 2024
f7e6adc
Fix file path to Typography.css
joheri1 Nov 3, 2024
6727ae0
Correct paths to Icon components
joheri1 Nov 3, 2024
3509fba
Correct the paths to Icons in the Hero and Footer components
joheri1 Nov 3, 2024
12f1279
Add more styling to CardSection
joheri1 Nov 3, 2024
69649c6
Force Netlify redeploy
joheri1 Nov 3, 2024
065c881
Rename Icons to SocialIcons to trigger a change
joheri1 Nov 3, 2024
aa9a8b2
Correct path to Button.css
joheri1 Nov 3, 2024
eb44194
Change how props are being passed in the ProjectCard to a heading pro…
joheri1 Nov 4, 2024
961b8b9
Added more info to the readme file.
joheri1 Nov 4, 2024
52861e9
Save any unsaved changes
joheri1 Nov 4, 2024
020816c
Add global responsive styling for fonts and font-sizes for Tablet, De…
joheri1 Nov 4, 2024
79be27b
Change margin for body text in skills columns
joheri1 Nov 5, 2024
54884e1
Add styling to media queries for Mobile. Fix syntax error in Global s…
joheri1 Nov 5, 2024
6212b49
Add styling to Hero
joheri1 Nov 5, 2024
9528dc5
Add styling for media query Tablet
joheri1 Nov 5, 2024
aa8ccc5
Add more styling to Media queries css
joheri1 Nov 5, 2024
788b246
Update README file
joheri1 Nov 5, 2024
190224c
Delete CSS file for responsiveness since it is not used. Update comme…
joheri1 Nov 5, 2024
df67203
Add gap to icons in Hero for mobile
joheri1 Nov 5, 2024
c6844b5
Add font weight to the fonts in the global styling
joheri1 Nov 5, 2024
246b065
Update README.md
joheri1 Nov 5, 2024
eaf0ce4
Update CardSection.css by giving the cards-container a max-width of 1…
joheri1 Nov 7, 2024
2607592
Updated local README to match GitHub version
joheri1 Nov 7, 2024
6e20615
Update Footer.css by giving the footer-container a max-width of 1200p…
joheri1 Nov 7, 2024
7bbbc80
Add scrolling to card-container in the CardSection.css
joheri1 Dec 9, 2024
b7b8c05
Add more styling to CardSection.css to make the scrolling look ok. Ad…
joheri1 Dec 9, 2024
a9ea511
Make the article-card h3 to have a height of two rows. Add ellipsis i…
joheri1 Dec 9, 2024
c8fc81f
Restore tablet responsiveness for Footer component
joheri1 Dec 9, 2024
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.
50 changes: 0 additions & 50 deletions README.md

This file was deleted.

24 changes: 24 additions & 0 deletions my-portfolio/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
59 changes: 59 additions & 0 deletions my-portfolio/README.md

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good comments in the readme file! I really feel the struggle and I can relate to most of the problems regarding this project week. It is also good to have when looking back on what you have created and learned. 🌟

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

# React Portfolio

I'm using React to build my very own portfolio website.

## Dependency Installation & Startup Development Server

This project uses npm (Node Package Manager) to handle its dependencies and run the development server.

```bash
npm i && code . && npm run dev
```

Comment on lines +6 to +13
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Improve setup instructions for better clarity and reliability.

The current setup command combines multiple operations which might fail silently. Consider:

  1. Listing prerequisites (Node.js version, etc.)
  2. Separating commands and explaining each step
  3. Adding troubleshooting tips

Example structure:

## Prerequisites
- Node.js (v16 or higher)
- npm (v8 or higher)
- VS Code (optional)

## Setup
1. Install dependencies:
   ```bash
   npm install
  1. Start development server:
    npm run dev

<!-- This is an auto-generated comment by CodeRabbit -->

### Project workflow
I began by sketching the layout on paper, mapping out each element (like h2, body, sections, etc.) to visualize the structure. This approach helped me identify reusable components, such as the cards for articles and projects, which share elements like an image, h3, body, and buttons. It also made me notice that the design were missing an h1, and a paragraph tag styled to look like an h3.

After completing the sketch, I focused on typography and global styling by setting up all the CSS variables. Once the foundation was in place, I began adding folders and empty components, and establishing the structure of the app. Finally, I added the code and styling for each component.

### Problems
**- Finding a good structure**
I didn't want to start coding before that was set, as I find it hard to reorganize components and code later, especially when there are a lot of changes to make. Hopefully spending time on the structure will make the rest of the project run smoothly.

**- Creating the components and structure first**
Since I started by setting up the entire structure of folders and components before adding any code, I found that I needed to create a lot of code at once just to be able to see any content in the app. Most components and CSS files were empty which made other components render without styles or not appear as intended. Some components couldn’t find the files they were trying to import (e.g., Typography, Footer, etc.) due to incorrect file paths. I needed to add some basic styling for each component, some basic code for each component etc. The paths were tricky to set right, and I mixed up some names like using FooterSection when the component was actually named Footer.

**- The design**
I made some adjustments to the structure. The original design was missing an h1 but included two different font sizes for h2, so I used h1 for the largest text. In the Skills section, the design used two text/paragraph tags with different font sizes, and the larger one matched the h3 style, so I used h3 for consistency.

**- Passing content**
I used a mix of children and explicit props for passing content, so I couldn't see some sections in my app. Went for explicit props since I couldn't really grasp how children actually work.

**- Overriding the Global styling**
In a couple of places the different heading tags had different styling. One example is the Date in the ArticleSection, which had heading h3 but font size 1.125rem, and I solved that issue by changing the h3 to a paragraph.

**- Time**
I would have needed another week to complete this project. Time was really an issue this week, yet I spent over 20 hours on the course, made a plan, and kept a good pace, and had a lot of help from the components templates we did on the lab, and used ChatGPT to solve issues when I got stuck.

**- Deploying to Netlify**
During deployment to Netlify, I encountered several build errors caused by the file paths, even though the paths appeared to be correct and they worked locally. Even Git reported that everything was up to date when I tried to rewrite the imports. In some cases, I had to rename the components to make it work.

### If I had more time
1. For the card effect, I found this [CodePen](https://codepen.io/william-goldsworthy/pen/JzVajj) and modified it in [My Code Pen](https://codepen.io/joheri1/pen/GRVxByV). If I had more time, I would apply this.

2. I would create a component for the image in the Hero and Footer component.

3. I would used a component for the cards in the CardSection component.

4. I would create a component for Bio containing the profile image, header, body text, and the social icons/links. This component could then be used in both the Hero and Footer sections. I noticed this while working with the Footer, because I more or less were copying and pasting from the Hero section.

5. I would use styled components!

### A handful of useful sources in this project:
- CodePen was used to test smaller design components, like the borders between the columns in the Skills text section I found this [Code Pen](https://codepen.io/brendanfalkowski/pen/Mwrywj) and modified it in [My Code Pen](https://codepen.io/joheri1/pen/qBeKLVL).

### View it live
[Visit My Portfolio](https://johanna-eriksson-portfolio.netlify.app/)



38 changes: 38 additions & 0 deletions my-portfolio/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]
15 changes: 15 additions & 0 deletions my-portfolio/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Johannas Portfolio</title>
<!-- Link to Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;700&family=Poppins:wght@400;500;700&display=swap" rel="stylesheet">
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading