Skip to content

Commit 819ac18

Browse files
Cleaning the repo
1 parent b3a7656 commit 819ac18

35 files changed

+70
-290
lines changed

.DS_Store

0 Bytes
Binary file not shown.

app/routes/components/AboutMe.jsx

-4
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ export default function AboutMe(){
1616
I'm <strong>Siddharth Mohite</strong>, a full-stack developer with a sharp eye for detail crafting UI components that don’t just function, but captivate.
1717
Currently, Bringing long buried ideas to life straight from the depths of my mind.
1818
Hope you have a great time exploring my site welcome back and enjoy!
19-
2019
</span>
21-
{/* <span className="introduction-1">
22-
Hope you have a great time exploring my site welcome back and enjoy!
23-
</span> */}
2420
<span className="introduction-ending">
2521
-Siddharth J Mohite
2622
</span>
+22-33
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,26 @@
11
import "../styles/AppleLogoMenu.scss";
2-
2+
import React from "react";
33
export default function AppleLogoMenu(){
44

5-
return (
6-
7-
<div className="menu-container">
8-
<span className="text">
9-
About Me
10-
</span>
11-
<div className="divider"></div>
12-
<span className="text">
13-
View Projects
14-
</span>
15-
<span className="text">
16-
View Work Experience
17-
</span>
18-
<span className="text">
19-
Certificates
20-
</span>
21-
<div className="divider"></div>
22-
<span className="text">
23-
Read Blogs Here
24-
</span>
25-
<div className="divider"></div>
26-
<span className="text">
27-
Sleep
28-
</span>
29-
<span className="text">
30-
Lock Screen
31-
</span>
32-
<span className="text">
33-
Shutdown
34-
</span>
35-
</div>
36-
)
5+
const menuGroups = [
6+
["About Me"],
7+
["View Projects", "View Work Experience", "Certificates"],
8+
["Read Blogs Here"],
9+
["Sleep", "Lock Screen", "Shutdown"],
10+
];
11+
12+
return (
13+
<div className="menu-container">
14+
{menuGroups.map((group, groupIdx) => (
15+
<React.Fragment key={groupIdx}>
16+
{group.map((text, idx) => (
17+
<span key={idx} className="text">
18+
{text}
19+
</span>
20+
))}
21+
{groupIdx < menuGroups.length - 1 && <div className="divider" />}
22+
</React.Fragment>
23+
))}
24+
</div>
25+
);
3726
}

app/routes/components/AudioPlayerContext.jsx

-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
// AudioPlayerContext.js
21
import React, { createContext, useState, useRef, useEffect } from 'react';
32

43
const AudioPlayerContext = createContext();
54

65
export const AudioPlayerProvider = ({ children }) => {
7-
// Define your list of audio tracks.
86
const audioList = [
97
{
108
src: "audio1.webm",
@@ -22,13 +20,11 @@ export const AudioPlayerProvider = ({ children }) => {
2220
const [currentTrackIndex, setCurrentTrackIndex] = useState(0);
2321
const audioRef = useRef(null);
2422

25-
// Whenever the track index changes, update the audio source.
2623
useEffect(() => {
2724
if (audioRef.current) {
2825
audioRef.current.pause();
2926
}
3027
audioRef.current = new Audio(audioList[currentTrackIndex].src);
31-
// Optionally, resume playing if the previous track was playing.
3228
if (isPlaying) {
3329
audioRef.current.play();
3430
}
@@ -40,18 +36,15 @@ export const AudioPlayerProvider = ({ children }) => {
4036
audioRef.current.pause();
4137
setIsPlaying(false);
4238
} else {
43-
// Optionally reset to start if needed:
4439
audioRef.current.currentTime = 0;
4540
audioRef.current.play();
4641
setIsPlaying(true);
4742
}
4843
};
4944

5045
const handleNext = () => {
51-
// Calculate the next track index and update the state.
5246
const nextIndex = (currentTrackIndex + 1) % audioList.length;
5347
setCurrentTrackIndex(nextIndex);
54-
// The useEffect hook will handle updating the audio source.
5548
};
5649

5750
return (

app/routes/components/BatteryMenu.jsx

-4
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@ export default function BatteryMenu(){
66
const [batteryPercentage, setBatteryPercentage] = useState(null);
77

88
useEffect(() => {
9-
// Ensure this code runs only in the browser
109
if (typeof window !== 'undefined' && 'getBattery' in navigator) {
1110
navigator.getBattery().then((battery) => {
12-
// Convert battery level (0 to 1) to percentage (0 to 100)
1311
const updateBatteryPercentage = () => {
1412
setBatteryPercentage(Math.round(battery.level * 100));
1513
};
1614
console.log("battery Percentage", batteryPercentage);
1715

18-
// Set initial battery percentage
1916
updateBatteryPercentage();
2017

21-
// Update battery percentage when it changes
2218
battery.addEventListener('levelchange', updateBatteryPercentage);
2319
});
2420
} else {

app/routes/components/Calculator.jsx

+1-97
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,7 @@
11
import { useState, useRef } from "react";
22
import '../styles/Calculator.scss';
33
export default function Calculator(){
4-
const [display, setDisplay] = useState('');
5-
6-
const clearTotal = () => {
7-
setDisplay('');
8-
};
9-
10-
const changePositivity = () => {
11-
// Example implementation: Toggle the sign of the current value
12-
if (display) {
13-
setDisplay((parseFloat(display) * -1).toString());
14-
}
15-
};
16-
17-
const getPercentage = () => {
18-
// Example implementation: Convert current value to a percentage
19-
if (display) {
20-
setDisplay((parseFloat(display) / 100).toString());
21-
}
22-
};
23-
24-
const divide = () => {
25-
// You might want to save the current value and operator to handle calculations
26-
setDisplay(display + ' ÷ ');
27-
};
28-
29-
const multiply = () => {
30-
setDisplay(display + ' × ');
31-
};
32-
33-
const subtract = () => {
34-
setDisplay(display + ' − ');
35-
};
36-
37-
const add = () => {
38-
setDisplay(display + ' + ');
39-
};
40-
41-
const print = (value) => {
42-
setDisplay(display + value);
43-
};
44-
45-
const equal = () => {
46-
// A very basic evaluation (note: using eval is not recommended in production)
47-
try {
48-
// Replace the operator symbols with JavaScript operators
49-
const sanitized = display
50-
.replace(/×/g, '*')
51-
.replace(/÷/g, '/')
52-
.replace(//g, '-');
53-
// eslint-disable-next-line no-eval
54-
const result = eval(sanitized);
55-
setDisplay(result.toString());
56-
} catch (error) {
57-
setDisplay('Error');
58-
}
59-
}
604
return(
61-
<div className="calculator">
62-
<input
63-
className="readout"
64-
type="text"
65-
value={display}
66-
readOnly
67-
/>
68-
<div className="keys">
69-
<div className="row">
70-
<button className="key misc" onClick={clearTotal}>C</button>
71-
<button className="key misc" onClick={changePositivity}>
72-
<sup>+</sup>/<sub></sub>
73-
</button>
74-
<button className="key misc" onClick={getPercentage}>%</button>
75-
<button className="key function" onClick={divide}>÷</button>
76-
</div>
77-
<div className="row">
78-
<button className="key numeric" onClick={() => print(7)}>7</button>
79-
<button className="key numeric" onClick={() => print(8)}>8</button>
80-
<button className="key numeric" onClick={() => print(9)}>9</button>
81-
<button className="key function" onClick={multiply}>×</button>
82-
</div>
83-
<div className="row">
84-
<button className="key numeric" onClick={() => print(4)}>4</button>
85-
<button className="key numeric" onClick={() => print(5)}>5</button>
86-
<button className="key numeric" onClick={() => print(6)}>6</button>
87-
<button className="key function" onClick={subtract}></button>
88-
</div>
89-
<div className="row">
90-
<button className="key numeric" onClick={() => print(1)}>1</button>
91-
<button className="key numeric" onClick={() => print(2)}>2</button>
92-
<button className="key numeric" onClick={() => print(3)}>3</button>
93-
<button className="key function" onClick={add}>+</button>
94-
</div>
95-
<div className="row">
96-
<button className="key numeric double" onClick={() => print(0)}>0</button>
97-
<button className="key numeric" onClick={() => print('.')}>.</button>
98-
<button className="key function last" onClick={equal}>=</button>
99-
</div>
100-
</div>
101-
</div>
5+
<></>
1026
);
1037
};

app/routes/components/ControlCenter.jsx

+1-39
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import AudioNextIcon from "../icons/AudioNextIcon"
1212
import AudioPauseIcon from "../icons/AudioPauseIcon"
1313
import { FullScreenContext } from "./FullScreenContext";
1414
import AudioPlayerContext from './AudioPlayerContext';
15-
import audioManager from '../components/audioManager'
1615
import "../styles/ControlCenter.scss"
1716
import { useState, useRef, useContext, useEffect} from "react"
1817

@@ -24,20 +23,6 @@ const connectivity =[
2423
{id:3, Icon1: <AirDropIcon />, textbig: "Airdrop",textsmall: "Contacts Only" },
2524
]
2625

27-
// const audioList = [
28-
// {
29-
// src: "audio1.webm",
30-
// title: "This is helpful while coding pt.1",
31-
// description: "Lo-Fi लो-फाई (siddharth's playlist)"
32-
// },
33-
// {
34-
// src: "audio2.webm",
35-
// title: "This is helpful while coding pt.2",
36-
// description: "Lo-Fi लो-फाई (siddharth's playlist)"
37-
// }
38-
// ];
39-
// const [currentTrackIndex, setCurrentTrackIndex] = useState(0);
40-
// const [isPlaying, setIsPlaying] = useState(false);
4126
const [volume, setVolume] = useState(70);
4227
const audioRef = useRef(null);
4328
const [selectedItems, setSelectedItems] = useState({});
@@ -50,31 +35,10 @@ const handleVolumeChange = (e) => {
5035
const newVolume = e.target.value;
5136
setVolume(newVolume);
5237
if (audioRef.current) {
53-
audioRef.current.volume = newVolume / 100; // Convert to range 0-1
38+
audioRef.current.volume = newVolume / 100;
5439
}
5540
};
5641

57-
// const handlePlayPause = () => {
58-
// if (audioRef.current) {
59-
// if (isPlaying) {
60-
// audioManager.pause();
61-
// } else {
62-
// // audioRef.current.currentTime = 0;
63-
// // audioRef.current.play();
64-
// audioManager.play(audioList[currentTrackIndex].src);
65-
// }
66-
// setIsPlaying(!isPlaying);
67-
// }
68-
// };
69-
70-
// const handleNext = () => {
71-
// // setCurrentTrackIndex((prevIndex) => (prevIndex + 1) % audioList.length);
72-
// // setIsPlaying(false);
73-
// const nextIndex = (currentTrackIndex + 1) % audioList.length;
74-
// setCurrentTrackIndex(nextIndex);
75-
// audioManager.play(audioList[nextIndex].src);
76-
// setIsPlaying(true);
77-
// };
7842

7943
const handleLofiWebsite = () =>{
8044
window.open("https://lofigirl.com/releases/sleeping-soul/", "");
@@ -236,8 +200,6 @@ useEffect(() => {
236200
</div>
237201
</div>
238202
</div>
239-
240-
241203
</div>
242204
)
243205
}

app/routes/components/Finder.jsx

+19-25
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import Projects from '../components/Projects'
77
import Certifications from '../components/Certifications'
88
import Achievements from '../components/Achievements'
99
import "../styles/Finder.scss";
10-
1110
import { useEffect, useState } from 'react';
1211

1312
export default function Finder({onClose , folderId}){
13+
1414
const [selectedFolderId, setSelectedFolderId] = useState(folderId || 1);
1515
const [isExpanded, setIsExpanded] = useState(false);
1616
const [selectedTagId, setSelectedTagId] = useState(null);
@@ -23,7 +23,6 @@ useEffect(() => {
2323
else
2424
{
2525
setSelectedFolderId(1);
26-
2726
}
2827
}, [folderId]);
2928

@@ -60,16 +59,11 @@ const tags = [
6059
<button
6160
onClick={handleButtonClose}
6261
className="sidebar__buttons-close">
63-
64-
</button>
65-
<button className={`sidebar__buttons-min ${isExpanded ? 'active' : ''}`}>
66-
6762
</button>
63+
<button className={`sidebar__buttons-min ${isExpanded ? 'active' : ''}`}/>
6864
<button
6965
onClick={() => setIsExpanded(!isExpanded)}
70-
className="sidebar__buttons-max">
71-
72-
</button>
66+
className="sidebar__buttons-max"/>
7367
</div>
7468
<div className='overflowy-wrapper'>
7569
<span className="sidebar__favorites-text">
@@ -81,14 +75,14 @@ const tags = [
8175
title={folder.text}
8276
key={folder.id}
8377
className="sidebar__folder-holder">
84-
<div
85-
onClick={() => {setSelectedFolderId(folder.id); setSelectedTagId(null);}}
86-
className={`sidebar__folder-item ${selectedFolderId === folder.id ? 'selected' : ''}`}>
87-
<FolderIcon/>
88-
<span className="sidebar__folder-item-text">
89-
{folder.text}
90-
</span>
91-
</div>
78+
<div
79+
onClick={() => {setSelectedFolderId(folder.id); setSelectedTagId(null);}}
80+
className={`sidebar__folder-item ${selectedFolderId === folder.id ? 'selected' : ''}`}>
81+
<FolderIcon/>
82+
<span className="sidebar__folder-item-text">
83+
{folder.text}
84+
</span>
85+
</div>
9286
</div>
9387
))}
9488
</div>
@@ -101,14 +95,14 @@ const tags = [
10195
title={tag.text}
10296
key={tag.id}
10397
className="sidebar__tag-holder">
104-
<div
105-
onClick={() => {setSelectedTagId(tag.id); setSelectedFolderId(null);}}
106-
className={`sidebar__tag-item ${selectedTagId === tag.id ? 'selected' : ''}`}>
107-
<ColoredCircle color= {tag.color}/>
108-
<span className="sidebar__tag-item-text">
109-
{tag.text}
110-
</span>
111-
</div>
98+
<div
99+
onClick={() => {setSelectedTagId(tag.id); setSelectedFolderId(null);}}
100+
className={`sidebar__tag-item ${selectedTagId === tag.id ? 'selected' : ''}`}>
101+
<ColoredCircle color= {tag.color}/>
102+
<span className="sidebar__tag-item-text">
103+
{tag.text}
104+
</span>
105+
</div>
112106
</div>
113107
))}
114108
</div>

0 commit comments

Comments
 (0)