8000 Hot Update · davinash97/davinash97.github.io@a863f6e · GitHub
[go: up one dir, main page]

< 8000 div class="position-relative header-wrapper js-header-wrapper "> Skip to content

Commit a863f6e

Browse files
committed
Hot Update
New Assets way didn't work, so going the Vite way
1 parent 892d244 commit a863f6e

37 files changed

+45
-83
lines changed

index.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
<!doctype html>
1+
<!DOCTYPE html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<link rel="shortcut icon" href="assets/favicon.ico" type="image/x-icon" />
7-
<link rel="apple-touch-icon" sizes="180x180" href="./assets/manifest/apple-touch-icon.png" />
6+
<link rel="shortcut icon" href="/assets/favicon.ico" type="image/x-icon" />
7+
<link
8+
rel="apple-touch-icon"
9+
sizes="180x180"
10+
href="./public/assets/manifest/apple-touch-icon.png"
11+
/>
812
<title>Avinash's PortFolio</title>
913
</head>
1014
<body>

src/Pages/Contacts.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import "../Styles/Contacts.css";
2-
import { Contacts } from "./ImgIndex.jsx";
2+
import { getImageUrl } from "./ImgIndex.jsx";
33

44
import { contactsCard as Card } from "../Components/card.jsx";
55

@@ -67,18 +67,18 @@ export default () => {
6767
<Card
6868
title="Gmail"
6969
link="mailto:davinash97.work@gmail.com"
70-
imgSrc={Contacts.mail}
70+
imgSrc={getImageUrl("gmail")}
7171
/>
7272
<Card
7373
title="Telegram"
7474
link="https://t.me/davinash1997"
75-
imgSrc={Contacts.telegram}
75+
imgSrc={getImageUrl("telegram")}
7676
/>
7777

7878
<Card
7979
title="Telegram"
8080
link="https://linkedin.com/in/davinash97"
81-
imgSrc={Contacts.linkedin}
81+
imgSrc={getImageUrl("linkedin")}
8282
/>
8383
</div>
8484
</section>

src/Pages/ImgIndex.jsx

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,4 @@
1-
// Skills: Languages
2-
const Languages = {
3-
html: "../../assets/svg/html.svg",
4-
css: "../../assets/svg/css.svg",
5-
javascript: "../../assets/svg/javascript.svg",
6-
php: "../../assets/svg/php.svg",
7-
java: "../../assets/svg/java.svg",
8-
};
1+
const getImageUrl = (name, type = "svg") =>
2+
new URL(`../assets/${type}/${name}.${type}`, import.meta.url).href;
93

10-
// Skills: Tools
11-
const Tools = {
12-
git: "../../assets/svg/git.svg",
13-
figma: "../../assets/svg/figma.svg",
14-
github: "../../assets/svg/github.svg",
15-
msoffice: "../../assets/svg/msoffice.svg",
16-
code: "../../assets/svg/code.svg",
17-
reactSVG: "../../assets/svg/react.svg",
18-
tailwindSVG: "../../assets/svg/tailwindcss.svg",
19-
};
20-
21-
// Skills: Operating Systems
22-
const OperatingSystems = {
23-
win11: "../../assets/svg/win11.svg",
24-
arch: "../../assets/svg/arch.svg",
25-
};
26-
27-
// Projects
28-
const Projects = {
29-
globalBuzz: "../../assets/webp/globalBuzz.webp",
30-
passGen: "../../assets/webp/passGen.webp",
31-
};
32-
33-
// Other
34-
const Other = {
35-
samsung: "../../assets/svg/samsung.svg",
36-
android: "../../assets/svg/android.svg",
37-
robot: "../../assets/svg/robot.svg",
38-
};
39-
40-
// Contacts
41-
const Contacts = {
42-
mail: "../../assets/svg/gmail.svg",
43-
telegram: "../../assets/svg/telegram.svg",
44-
linkedin: "../../assets/svg/linkedin.svg",
45-
};
46-
47-
export { Languages, Tools, Projects, Contacts, Other, OperatingSystems };
4+
export { getImageUrl };

src/Pages/Others.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import "../Styles/Others.css";
2-
import { Other } from "./ImgIndex.jsx";
2+
import { getImageUrl } from "./ImgIndex.jsx";
33

44
import { othersCard as Card } from "../Components/card.jsx";
55

@@ -18,17 +18,17 @@ export default () => {
1818
<Card
1919
title="Android Kernel:"
2020
paragraph={" " + AndroidKernel}
21-
imgSrc={Other.samsung}
21+
imgSrc={getImageUrl("samsung")}
2222
/>
2323
<Card
2424
title="Android ROMs:"
2525
paragraph={" " + AndroidROMs}
26-
imgSrc={Other.android}
26+
imgSrc={getImageUrl("android")}
2727
/>
2828
<Card
2929
title="Telegram Bots:"
3030
paragraph={" " + AndroidKernel}
31-
imgSrc={Other.robot}
31+
imgSrc={getImageUrl("robot")}
3232
/>
3333
</section>
3434
);

src/Pages/Project.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import "../Styles/Project.css";
22
import { projectFrame as ProjectFrame } from "../Components/frame.jsx";
3-
import { Projects } from "./ImgIndex.jsx";
3+
import { getImageUrl } from "./ImgIndex.jsx";
44

55
export default () => {
66
const GlobalBuzz =
@@ -15,13 +15,13 @@ export default () => {
1515
<ProjectFrame
1616
title="Global Buzz"
1717
link="https://davinash97.github.io/globalbuzz"
18-
imgSrc={Projects.globalBuzz}
18+
imgSrc={getImageUrl("globalBuzz", "webp")}
1919
paragraph={GlobalBuzz}
2020
/>
2121

2222
<ProjectFrame
2323
title="Password Generator"
24-
imgSrc={Projects.passGen}
24+
imgSrc={getImageUrl("passGen", "webp")}
2525
link="https://davinash97.github.io/pass-gen"
2626
paragraph={PasswordGenerator}
2727
/>

src/Pages/Skills.jsx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { Languages, Tools, OperatingSystems } from "./ImgIndex.jsx";
21
import { frame as Frame, osFrame as OS } from "../Components/frame.jsx";
32

3+
import { getImageUrl } from "./ImgIndex.jsx";
4+
45
export default () => {
56
return (
67
<section className="flex flex-col gap-5">
@@ -10,33 +11,33 @@ export default () => {
1011
<h3 className="text-center">Languages</h3>
1112
<div className="text-center py-10">(I am comfortable with)</div>
1213
<div className="w-screen px-10 flex flex-col justify-between gap-10">
13-
<Frame imgSrc={Languages.html} title="HTML" />
14-
<Frame imgSrc={Languages.css} title="CSS" />
15-
<Frame imgSrc={Languages.javascript} title="JavaScript" />
16-
<Frame imgSrc={Languages.php} title="PHP" />
17-
<Frame imgSrc={Languages.java} title="Java" />
14+
<Frame imgSrc={getImageUrl("html")} title="HTML" />
15+
<Frame imgSrc={getImageUrl("css")} title="CSS" />
16+
<Frame imgSrc={getImageUrl("javascript")} title="JavaScript" />
17+
<Frame imgSrc={getImageUrl("php")} title="PHP" />
18+
<Frame imgSrc={getImageUrl("java")} title="Java" />
1819
</div>
1920
</div>
2021
<div>
2122
<h3 className="text-center py-20">Tools:</h3>
2223
<div className="w-screen px-10 flex flex-col justify-between gap-10">
23-
<Frame imgSrc={Tools.git} title="Git" />
24-
<Frame imgSrc={Tools.figma} title="figma" />
25-
<Frame imgSrc={Tools.github} title="github" />
24+
<Frame imgSrc={getImageUrl("git")} title="Git" />
25+
<Frame imgSrc={getImageUrl("figma")} title="figma" />
26+
<Frame imgSrc={getImageUrl("github")} title="github" />
2627
<Frame
27-
imgSrc={Tools.msoffice}
28+
imgSrc={getImageUrl("msoffice")}
2829
title="MS-Office"
2930
childStyle={{ padding: "20px" }}
3031
/>
31-
<Frame imgSrc={Tools.code} title="Visual Studio Code" />
32+
<Frame imgSrc={getImageUrl("code")} title="Visual Studio Code" />
3233
<Frame
33-
imgSrc={Tools.reactSVG}
34+
imgSrc={getImageUrl("react")}
3435
title="React JS"
3536
parentStyle={{ padding: "35px", gap: "10px" }}
3637
class="logo"
3738
/>
3839
<Frame
39-
imgSrc={Tools.tailwindSVG}
40+
imgSrc={getImageUrl("tailwindcss")}
4041
title="Tailwind CSS"
4142
childStyle={{ width: "250px" }}
4243
parentStyle={{ gap: "10px", padding: "30px" }}
@@ -46,8 +47,8 @@ export default () => {
4647
<div className="flex flex-col justify-between gap-10 py-20">
4748
<h3 className="text-center">Operating System:</h3>
4849
<div className="w-screen px-10 flex flex-col justify-between gap-10">
49-
<OS title="Windows" link={OperatingSystems.win11} />
50-
<OS title="Linux" link={OperatingSystems.arch} />
50+
<OS title="Windows" link={getImageUrl("win11")} />
51+
<OS title="Linux" link={getImageUrl("arch")} />
5152
</div>
5253
</div>
5354
</div>
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)
0