├── Resumev4.pdf
├── vite.config.js
├── .gitignore
├── src
├── main.jsx
├── components
│ ├── Footer.jsx
│ └── Navbar.jsx
├── App.jsx
├── App.css
├── index.css
├── pages
│ ├── Weather.jsx
│ ├── Main.jsx
│ └── Projects.jsx
└── assets
│ └── react.svg
├── index.html
├── .eslintrc.cjs
├── README.md
├── package.json
└── public
└── vite.svg
/Resumev4.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/riyad-i/portfolio/HEAD/Resumev4.pdf
--------------------------------------------------------------------------------
/vite.config.js:
--------------------------------------------------------------------------------
1 | import { defineConfig } from 'vite'
2 | import react from '@vitejs/plugin-react'
3 |
4 | // https://vitejs.dev/config/
5 | export default defineConfig({
6 | plugins: [react()],
7 | })
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
--------------------------------------------------------------------------------
/src/main.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom/client'
3 | import App from './App.jsx'
4 | import './index.css'
5 | import { BrowserRouter } from 'react-router-dom'
6 |
7 |
8 |
9 | ReactDOM.createRoot(document.getElementById('root')).render(
10 |
11 |
12 |
13 |
14 | ,
15 | )
16 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Vite + React
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/components/Footer.jsx:
--------------------------------------------------------------------------------
1 |
2 |
3 | export default function Footer(){
4 |
5 |
6 | return (
7 |
14 | )
15 | }
--------------------------------------------------------------------------------
/src/components/Navbar.jsx:
--------------------------------------------------------------------------------
1 | import {Link} from 'react-router-dom'
2 |
3 |
4 | export default function Navbar() {
5 |
6 | return (
7 |
8 | <>
9 |
10 |
11 |
12 | Main
13 | Projects
14 | Weather
15 |
16 |
17 |
18 | >
19 |
20 |
21 | )
22 |
23 | }
--------------------------------------------------------------------------------
/.eslintrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | env: { browser: true, es2020: true },
4 | extends: [
5 | 'eslint:recommended',
6 | 'plugin:react/recommended',
7 | 'plugin:react/jsx-runtime',
8 | 'plugin:react-hooks/recommended',
9 | ],
10 | ignorePatterns: ['dist', '.eslintrc.cjs'],
11 | parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
12 | settings: { react: { version: '18.2' } },
13 | plugins: ['react-refresh'],
14 | rules: {
15 | 'react-refresh/only-export-components': [
16 | 'warn',
17 | { allowConstantExport: true },
18 | ],
19 | },
20 | }
21 |
--------------------------------------------------------------------------------
/src/App.jsx:
--------------------------------------------------------------------------------
1 | // import { useState } from 'react'
2 | import './App.css'
3 | import Navbar from './components/Navbar.jsx'
4 | import { Route, Routes, Navigate } from 'react-router-dom'
5 | import Projects from './pages/Projects'
6 | import Weather from './pages/Weather'
7 | import Main from './pages/Main'
8 | import Footer from './components/Footer.jsx'
9 |
10 |
11 | function App() {
12 |
13 | return (
14 | <>
15 |
16 |
17 | }/>
18 | }/>
19 | }/>
20 | }/>
21 |
22 |
23 | >
24 | )
25 | }
26 |
27 | export default App
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # React + Vite
2 |
3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4 |
5 | Currently, two official plugins are available:
6 |
7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9 |
10 | # Api
11 |
12 | Api documentation : https://weatherstack.com/
13 |
14 |
15 |
16 | # Icons
17 |
18 | https://fontawesome.com/
19 |
20 |
21 | # Pdf viewer
22 |
23 | https://react-pdf.org/
24 |
25 |
26 | # Photos
27 |
28 | https://unsplash.com/
29 |
30 |
31 | # Stack Used
32 |
33 | HTML5, CSS, JavaScript, React
34 |
35 | # Live Site
36 |
37 | Netlify Link : https://gilded-melba-88c607.netlify.app/
38 |
39 |
40 | # Planned Updates
41 |
42 | Add carousel to projects page displaying projects.
43 |
44 | Add viewable resume pdf on main page.
45 |
46 | Get user's location automatically on weather page.
47 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "portfolioreact",
3 | "private": true,
4 | "version": "0.0.0",
5 | "type": "module",
6 | "scripts": {
7 | "dev": "vite",
8 | "build": "vite build",
9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
10 | "preview": "vite preview"
11 | },
12 | "dependencies": {
13 | "@fortawesome/fontawesome-svg-core": "^6.4.2",
14 | "@fortawesome/free-regular-svg-icons": "^6.4.2",
15 | "@fortawesome/free-solid-svg-icons": "^6.4.2",
16 | "@fortawesome/react-fontawesome": "^0.2.0",
17 | "@react-pdf/renderer": "^3.1.12",
18 | "react": "^18.2.0",
19 | "react-dom": "^18.2.0",
20 | "react-pdf": "^7.3.3",
21 | "react-router-dom": "^6.15.0"
22 | },
23 | "devDependencies": {
24 | "@types/react": "^18.2.15",
25 | "@types/react-dom": "^18.2.7",
26 | "@vitejs/plugin-react": "^4.0.3",
27 | "eslint": "^8.45.0",
28 | "eslint-plugin-react": "^7.32.2",
29 | "eslint-plugin-react-hooks": "^4.6.0",
30 | "eslint-plugin-react-refresh": "^0.4.3",
31 | "vite": "^4.4.5"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | .Navbar {
2 | display: flex;
3 | background-color: lightsteelblue;
4 | justify-content: space-around;
5 | width: 100%;
6 | }
7 |
8 | .Footer {
9 | display: flex;
10 | justify-content: space-around;
11 | color: white;
12 | width: 100%;
13 | max-width: 1280px;
14 | background-color: #23094e;
15 | position: fixed;
16 | bottom: 0;
17 | /* width: 100%; */
18 | height: 2.5rem;
19 | }
20 |
21 | .Footer a{
22 | color: white;
23 | margin-top: 4px;
24 | }
25 |
26 | .Icons {
27 | display: flex;
28 | justify-content: center;
29 | gap: 10px
30 | }
31 |
32 | #root {
33 | max-width: 1280px;
34 | margin: 0 auto;
35 | padding: 0rem;
36 | text-align: center;
37 | height: 100vh;
38 | }
39 |
40 |
41 |
42 |
43 | .logo {
44 | height: 6em;
45 | padding: 1.5em;
46 | will-change: filter;
47 | transition: filter 300ms;
48 | }
49 | .logo:hover {
50 | filter: drop-shadow(0 0 2em #646cffaa);
51 | }
52 | .logo.react:hover {
53 | filter: drop-shadow(0 0 2em #61dafbaa);
54 | }
55 |
56 | @keyframes logo-spin {
57 | from {
58 | transform: rotate(0deg);
59 | }
60 | to {
61 | transform: rotate(360deg);
62 | }
63 | }
64 |
65 | @media (prefers-reduced-motion: no-preference) {
66 | a:nth-of-type(2) .logo {
67 | animation: logo-spin infinite 20s linear;
68 | }
69 | }
70 |
71 | .card {
72 | padding: 2em;
73 | }
74 |
75 | .read-the-docs {
76 | color: #888;
77 | }
78 |
--------------------------------------------------------------------------------
/public/vite.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | :root {
2 | font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
3 | line-height: 1.5;
4 | font-weight: 400;
5 |
6 | color-scheme: light dark;
7 | color: rgba(255, 255, 255, 0.87);
8 | background-color: #242424;
9 |
10 | font-synthesis: none;
11 | text-rendering: optimizeLegibility;
12 | -webkit-font-smoothing: antialiased;
13 | -moz-osx-font-smoothing: grayscale;
14 | -webkit-text-size-adjust: 100%;
15 | }
16 |
17 | a {
18 | font-weight: 500;
19 | color: #646cff;
20 | text-decoration: inherit;
21 | }
22 | a:hover {
23 | color: #9476e9;
24 | }
25 |
26 |
27 |
28 | /* body {
29 | margin: 0;
30 | display: flex;
31 | place-items: center;
32 | min-width: 320px;
33 | min-height: 100vh;
34 | } */
35 |
36 | h1 {
37 | font-size: 3.2em;
38 | line-height: 1.1;
39 | }
40 |
41 |
42 |
43 | button {
44 | border-radius: 8px;
45 | border: 1px solid transparent;
46 | /* padding: 0.6em 1.2em; */
47 | /* background-color: green; */
48 | font-size: 1em;
49 | font-weight: 500;
50 | font-family: inherit;
51 | background-color: #1a1a1a;
52 | cursor: pointer;
53 | transition: border-color 0.25s;
54 | }
55 | button:hover {
56 | border-color: #646cff;
57 | }
58 | button:focus,
59 | button:focus-visible {
60 | outline: 4px auto -webkit-focus-ring-color;
61 | }
62 |
63 | @media (prefers-color-scheme: light) {
64 | :root {
65 | color: #213547;
66 | background-color: #7dacf3;
67 | }
68 | a:hover {
69 | color: #747bff;
70 | }
71 | button {
72 | background-color: #f9f9f9;
73 | }
74 | }
75 |
76 | @media (prefers-color-scheme: dark) {
77 | :root {
78 | color: #213547;
79 | background-color: #7dacf3;
80 | }
81 | a:hover {
82 | color: #747bff;
83 | }
84 | button {
85 | background-color: #f9f9f9;
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/src/pages/Weather.jsx:
--------------------------------------------------------------------------------
1 | const key = import.meta.env.VITE_WEATHER_STACK_KEY
2 | import { useEffect, useState } from "react"
3 |
4 |
5 | export default function Weather(){
6 |
7 | const [weather , setWeather] = useState({})
8 |
9 | //https://api.openweathermap.org/data/3.0/onecall?lat=${40}&lon=${74}&appid=${key}
10 |
11 |
12 | const conversion = (celsius) => {
13 | return (celsius * 9/5) + 32
14 | }
15 |
16 | const getWeather= async(formData) =>{
17 | // const res = await fetch(`http://api.weatherstack.com/current?access_key=${key}&query=New%20York`)
18 | try {
19 | const res = await fetch(`http://api.weatherstack.com/current?access_key=${key}&query=${formData}`)
20 | const data = await res.json()
21 | console.log(data);
22 | setWeather(data)
23 | } catch (error) {
24 | console.log(error);
25 | }
26 | }
27 |
28 | useEffect(()=> {getWeather()},[])
29 |
30 | const [formData, setFormData] = useState('')
31 |
32 | const handleChange = (e) =>{
33 | e.preventDefault()
34 | setFormData(e.target.value)
35 | }
36 |
37 | const handleSubmit = (e) => {
38 | e.preventDefault()
39 | getWeather(formData)
40 | setFormData('')
41 | }
42 |
43 | return (
44 | <>
45 | Weather App
46 |
47 |
51 |
52 |
53 | {weather.current ? Currently {weather.current.weather_descriptions[0]} and {conversion(weather.current.temperature)} Degrees Fahrenheit in {weather.location.name} : Search for a city's weather }
54 |
55 |
56 |
57 | {weather.current ? : null }
58 |
59 |
60 |
61 |
62 |
63 | { weather.current && weather.current.weather_descriptions[0] == 'Partly cloudy' ? : null }
64 | { weather.current && weather.current.weather_descriptions[0] == 'Clear' ? : null }
65 | { weather.current && weather.current.weather_descriptions[0] == 'Sunny' ? : null }
66 | { weather.current && weather.current.weather_descriptions[0] == 'Overcast' ? : null }
67 | >
68 | )
69 |
70 | }
--------------------------------------------------------------------------------
/src/assets/react.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/Main.jsx:
--------------------------------------------------------------------------------
1 | // import React from 'react'
2 | // import { Page, Text, View, Document, StyleSheet } from '@react-pdf/renderer';
3 | // import ReactPDF from '@react-pdf/renderer';
4 |
5 | // import resume from '../../Resumev4.pdf'
6 |
7 | // import { Document, Page, pdfjs } from 'react-pdf'
8 | // pdfjs.GlobalWorkerOptions.workerSrc = `//cdn.js.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js`
9 |
10 |
11 | // const styles = StyleSheet.create({
12 | // page: {
13 | // flexDirection: 'row',
14 | // backgroundColor: '#E4E4E4'
15 | // },
16 | // section: {
17 | // margin: 10,
18 | // padding: 10,
19 | // flexGrow: 1
20 | // }
21 | // });
22 |
23 | // // Create Document Component
24 | // const MyDocument = () => (
25 | //
26 | //
27 | //
28 | // Section #1
29 | //
30 | //
31 | // Section #2
32 | //
33 | //
34 | //
35 | // );
36 |
37 | export default function Main(){
38 |
39 |
40 |
41 |
42 | return (
43 | <>
44 | Portfolio
45 | {/*
46 |
47 |
48 | */}
49 | {/* ReactPDF.render( , `../../Resumev4.pdf`); */}
50 | {/* */}
51 |
52 | About Me
53 |
54 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Minus necessitatibus nisi, maxime culpa impedit similique nostrum quam blanditiis facere? Dolore exercitationem ex natus maiores magni doloribus tempora architecto provident vero.
55 |
56 |
57 |
58 |
59 |
60 | Lorem ipsum dolor, sit amet consectetur adipisicing elit. Dolores porro autem repudiandae quia eaque incidunt recusandae, quis fuga eum ab omnis distinctio doloribus iste nobis ipsa debitis. Autem, alias illo.
61 | Exercitationem suscipit blanditiis optio modi enim totam magnam cupiditate earum quos fuga delectus voluptatum quisquam similique in provident veniam harum, reiciendis dicta adipisci aperiam? Tempora saepe est minima quis aperiam!
62 | Vel dolorem iusto consectetur velit iste aliquid qui dolore deserunt facilis veniam dignissimos rerum molestias blanditiis, quo obcaecati quae illo sed? Rem quas illum modi tenetur nobis illo saepe quae!
63 | Doloremque atque magni totam voluptate nulla et cum vero ullam animi, asperiores, placeat aspernatur iste assumenda labore accusamus sit eum veritatis, laboriosam amet nam repellendus! Ullam officia illo quos nobis!
64 |
65 |
66 |
67 |
68 |
69 |
70 | Lorem ipsum dolor sit amet consectetur adipisicing elit. Itaque, fugiat praesentium quia laborum ab corrupti dolores harum iure? Quaerat reprehenderit voluptatum recusandae. Numquam commodi veniam eaque adipisci autem a ipsum.
71 | Culpa, atque nostrum. Eum, fugit distinctio facere sapiente molestias aspernatur earum cumque soluta. Tempora quaerat saepe aut pariatur. Autem eligendi ad nemo eveniet. Commodi iusto obcaecati quaerat recusandae veniam culpa.
72 | Nemo quis debitis, recusandae expedita provident doloremque sapiente unde quam? Odit voluptatum earum dolorem iure! Nostrum, unde impedit dolores atque a iste ad quo voluptatum porro, nulla alias aliquid consequatur.
73 | Reprehenderit impedit laborum voluptatibus aspernatur iure facilis maxime fugit vel. Ex aliquid eos harum cumque quod corporis, perferendis omnis enim molestiae. Maxime magnam consequuntur modi perferendis alias assumenda pariatur nisi?
74 | Omnis nostrum aliquid voluptates excepturi quas consectetur quos dolorem inventore, ipsa iusto odio debitis quaerat officia!
75 |
76 |
77 |
78 |
79 |
80 | >
81 | )
82 |
83 | }
--------------------------------------------------------------------------------
/src/pages/Projects.jsx:
--------------------------------------------------------------------------------
1 | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
2 |
3 |
4 |
5 |
6 | export default function Projects(){
7 |
8 |
9 |
10 |
11 | return (
12 | <>
13 | Projects Display
14 |
15 |
16 | Technologies/Skills
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | {/*
*/}
28 |
29 |
30 |
31 |
32 |
33 |
34 | >
35 | )
36 |
37 | }
--------------------------------------------------------------------------------