generated from Technigo/react-vite-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 55
portfolio frida #41
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
Open
fridascript
wants to merge
8
commits into
Technigo:main
Choose a base branch
from
fridascript:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
portfolio frida #41
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9560d3e
portfolio foundation
bf254d9
responsiveness + css
7afc9bd
styled components
84d5c37
breaking points and theme.js
6e59065
changin img size on the blog
7184a18
adding project + blog data and functionalities to buttons
49309c8
added SectionTitles
d79bbd0
smooth scrolling
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| # Portfolio | ||
| Link netlify: https://portfoliofrida.netlify.app/ | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,41 @@ | ||
| <!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>Portfolio</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.jsx"></script> | ||
| </body> | ||
| </html> | ||
|
|
||
| <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" | ||
| /> | ||
|
|
||
| <!--font poppins--> | ||
| <link | ||
| rel="preconnect" | ||
| href="https://fonts.googleapis.com" | ||
| > | ||
| <link | ||
| rel="preconnect" | ||
| href="https://fonts.gstatic.com" | ||
| crossorigin | ||
| > | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" | ||
| rel="stylesheet" | ||
| > | ||
| <title>Portfolio</title> | ||
| </head> | ||
|
|
||
| <body> | ||
| <div id="root"></div> | ||
| <script | ||
| type="module" | ||
| src="/src/main.jsx" | ||
| ></script> | ||
| </body> | ||
|
|
||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Det här är mitt senaste blogginlägg. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Det här är mitt andra blogginlägg. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Det här är mitt första blogginlägg. |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,22 @@ | ||
| import React from "react"; | ||
| import "./index.css"; | ||
| import { Header } from "./components/sections/Header"; | ||
| import { Tech } from "./components/sections/Tech"; | ||
| import { Projects } from "./components/sections/Projects"; | ||
| import { Skills } from "./components/sections/Skills"; | ||
| import { Blog } from "./components/sections/Blog"; | ||
| import { Contacts } from "./components/sections/Contacts"; | ||
|
|
||
|
|
||
| export const App = () => { | ||
| return ( | ||
| <> | ||
| <h1>Portfolio</h1> | ||
| <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem, laborum! Maxime animi nostrum facilis distinctio neque labore consectetur beatae eum ipsum excepturi voluptatum, dicta repellendus incidunt fugiat, consequatur rem aperiam.</p> | ||
| <Header /> | ||
| <Tech /> | ||
| <Projects /> | ||
| <Skills /> | ||
| <Blog /> | ||
| <Contacts /> | ||
| </> | ||
| ) | ||
| } | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import placeHolderImg from "../img/placeholderimg.png" | ||
|
|
||
| export const blogData = [ | ||
| { | ||
| name: "Blog post", | ||
| framework: ["July 14th"], | ||
| description: "/blogposts/post-1.md", | ||
| image: placeHolderImg, | ||
| }, | ||
|
|
||
| { | ||
| name: "Blog post", | ||
| framework: ["July 8th"], | ||
| description: "/blogposts/post-2.md", | ||
| image: placeHolderImg, | ||
| }, | ||
| { | ||
| name: "Blog post", | ||
| framework: ["July 1st"], | ||
| description: "/blogposts/post-3.md", | ||
| image: placeHolderImg, | ||
| }, | ||
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import styled from "styled-components"; | ||
|
|
||
| // Section title h1 | ||
| export const SectionTitle = styled.h1` | ||
| margin-bottom: 24px; | ||
| font-size: 60px; | ||
| font-weight: bold; | ||
| text-align: center; | ||
| color: ${({ theme, dark }) => | ||
| dark ? theme.surface.dark.text : theme.surface.light.text}; | ||
| `; | ||
|
|
||
| export const SubTitle = styled.h2` | ||
| font-size: ${({ theme }) => theme.typography.h2.fontSize}; | ||
| font-weight: ${({ theme }) => theme.typography.h2.fontWeight}; | ||
| color: ${({ theme, dark }) => | ||
| dark ? theme.surface.dark.text : theme.surface.light.text}; | ||
| `; | ||
|
|
||
| export const Text = styled.p` | ||
| font-size: ${({ theme }) => theme.typography.p.fontSize}; | ||
| font-weight: ${({ theme }) => theme.typography.p.fontWeight}; | ||
| color: ${({ theme, dark }) => | ||
| dark ? theme.surface.dark.text : theme.surface.light.text}; | ||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| import React, { useState, useEffect } from "react"; | ||
| import styled from "styled-components"; | ||
| import { SectionTitle, SubTitle, Text } from "../UI/SectionTitle"; | ||
| import { theme } from "../../theme"; | ||
| import { FrameWork } from "./frameworkbtn"; | ||
| import { DemoIcon } from "../../img/icons"; | ||
| import { ActionButton } from "../items/Buttons"; | ||
| import ReactMarkdown from "react-markdown"; | ||
|
|
||
| // for styling component items | ||
| const WrapperBlog = styled.article` | ||
| display: grid; | ||
| gap: 1rem; | ||
| grid-template-columns: 1fr; | ||
| border-radius: 12px; | ||
| box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); | ||
| padding: 1rem; | ||
| text-align: left; | ||
|
|
||
| @media(min-width: ${theme.breakpoints.tablet}) { | ||
| grid-template-columns: 1fr 1fr; | ||
| padding: 3rem; | ||
|
|
||
| } | ||
| `; | ||
| const BlogImage = styled.img` | ||
| width: 100%; | ||
| border-radius: 12px; | ||
| @media(min-width: ${theme.breakpoints.tablet}){ | ||
| width: 80%; | ||
| } | ||
|
|
||
|
|
||
| `; | ||
| const BlogInfo = styled.div` | ||
| display: flex; | ||
| flex-direction: column; | ||
| `; | ||
|
|
||
| const ButtonIcon = styled.span` | ||
| display: flex; | ||
| align-items: center; | ||
| margin-left: 6px; | ||
|
|
||
| svg { | ||
| width: 20px; | ||
| height: 20px; | ||
| } | ||
| `; | ||
|
|
||
| export const BlogPost = ({ blog }) => { | ||
| const [content, setContent] = useState(""); | ||
| const [isOpen, setIsOpen] = useState(false); | ||
|
|
||
| useEffect(() => { | ||
| if (blog.description) { | ||
| fetch(blog.description) | ||
| .then((res) => res.text()) | ||
| .then((text) => setContent(text)); | ||
| } | ||
| }, [blog.description]); | ||
|
|
||
| // to open and close blog posts | ||
| const toggleOpen = () => setIsOpen(prev => !prev); | ||
|
|
||
| return ( | ||
| <WrapperBlog> | ||
| <BlogImage src={blog.image} alt={`picture of blog post ${name}`} /> | ||
| <BlogInfo> | ||
| <FrameWork frameworks={blog.framework} /> | ||
| <SubTitle>{blog.name}</SubTitle> | ||
|
|
||
|
|
||
| {isOpen && ( //get blog post from public/blogposts path | ||
| <Text> | ||
| <ReactMarkdown>{content}</ReactMarkdown> | ||
| </Text> | ||
| )} | ||
|
|
||
| <ActionButton onClick={toggleOpen}> | ||
| <ButtonIcon><DemoIcon /></ButtonIcon> {isOpen ? "Hide Article" : "Read Article"} | ||
| </ActionButton> | ||
| </BlogInfo> | ||
| </WrapperBlog> | ||
| ); | ||
| }; | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| import styled from "styled-components"; | ||
|
|
||
|
|
||
| const ButtonBase = styled.div` | ||
| background: black; | ||
| color: white; | ||
| display: flex; | ||
| align-items: center; | ||
| width: 60%; | ||
| max-width: 303px; | ||
| border-radius: 12px; | ||
| font-size: 16px; | ||
| font-family: inherit; | ||
| padding: 4px 12px; | ||
| gap: 16px; | ||
| margin-bottom: 13px; | ||
| text-decoration: none; | ||
| cursor: pointer; | ||
|
|
||
| svg { | ||
| width: 20px; | ||
| height: 20px; | ||
| } | ||
|
|
||
| &:hover { | ||
| transform: scale(1.1); | ||
| } | ||
| `; | ||
|
|
||
| // for demo + github links | ||
| export const LinkButton = styled(ButtonBase).attrs({ as: "a" })` | ||
| text-decoration: underline; | ||
| `; | ||
|
|
||
| // for read article | ||
| export const ActionButton = styled(ButtonBase).attrs({ as: "button" })` | ||
| `; | ||
|
|
||
|
|
||
|
|
||
| //show more/less buttons: | ||
| export const ToggleButton = styled(ButtonBase).attrs({ as: "button" })` | ||
| background-color: ${({ $active }) => ($active ? "black" : "white")}; | ||
| color: ${({ $active }) => ($active ? "white" : "black")}; | ||
| border: 1px solid black; | ||
| border-radius: 12px; | ||
| padding: 4px 12px; | ||
| font-size: 16px; | ||
| width: auto; | ||
| display: flex; | ||
| margin: 30px auto 0; | ||
| cursor: pointer; | ||
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| import React from "react"; | ||
| import styled from "styled-components"; | ||
| import { SectionTitle, SubTitle, Text } from "../UI/SectionTitle"; | ||
| import { theme } from "../../theme"; | ||
| import { FrameWork } from "./frameworkbtn"; | ||
| import { LinkButton } from "../items/Buttons"; | ||
| import { DemoIcon, GithubIcon } from "../../img/icons"; | ||
|
|
||
| // for styling component items | ||
| const Card = styled.div` | ||
| display: grid; | ||
| grid-template-columns: 1fr; | ||
| gap: 40px; | ||
| box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); | ||
| border-radius: 12px; | ||
| padding: 1rem; | ||
| text-align: left; | ||
| margin-bottom: 20px; | ||
|
|
||
| @media (min-width: ${theme.breakpoints.tablet}){ | ||
| padding: 5rem; | ||
| } | ||
|
|
||
| @media (min-width: ${theme.breakpoints.desktop}) { | ||
| grid-template-columns: 1fr 1fr; | ||
| gap: 10px; | ||
| margin-bottom: 40px; | ||
| padding: 5rem; | ||
|
|
||
| &:nth-child(even) { | ||
| direction: rtl; | ||
|
|
||
| img, | ||
| div { | ||
| direction: ltr; | ||
| } | ||
| } | ||
| } | ||
| `; | ||
|
|
||
| //project image | ||
| const ProjectImage = styled.img` | ||
| width: 100%; | ||
| border-radius: 12px; | ||
| box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); | ||
|
|
||
| @media (min-width: ${theme.breakpoints.desktop}) { | ||
| width: 80%; | ||
| } | ||
| `; | ||
|
|
||
| //project content | ||
| const ProjectInfo = styled.div``; | ||
|
|
||
| //button icon | ||
| const ButtonIcon = styled.div` | ||
| display: flex; | ||
| align-items: center; | ||
| margin-left: 6px; | ||
|
|
||
| svg { | ||
| width: 20px; | ||
| height: 20px; | ||
| } | ||
| `; | ||
|
|
||
|
|
||
| export const ProjectCard = ({ project }) => ( | ||
| <Card> | ||
| <ProjectImage src={project.image} alt={`picture of project ${name}`} /> | ||
| <ProjectInfo> | ||
| <FrameWork frameworks={project.framework} /> | ||
| <SubTitle>{project.name}</SubTitle> | ||
| <Text>{project.description}</Text> | ||
| <div> | ||
| <LinkButton href={project.demoLink}> | ||
| <ButtonIcon><DemoIcon aria-hidden="true" /></ButtonIcon> Live Demo | ||
| </LinkButton> | ||
| <LinkButton href={project.githubLink}> | ||
| <ButtonIcon><GithubIcon aria-hidden="true" /></ButtonIcon> Github | ||
| </LinkButton> | ||
| </div> | ||
| </ProjectInfo> | ||
| </Card> | ||
| ); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole fetching of local markdown files feels a bit funky. You could have just imported them :)