Skip to content

Commit 4af85a5

Browse files
committedFeb 12, 2025·
added real information in disk and fiixed some broken preventdefaults behaviour
1 parent 3ba070d commit 4af85a5

File tree

4 files changed

+56
-46
lines changed

4 files changed

+56
-46
lines changed
 

‎index.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
</head>
1010
<body>
1111
<div id="output">
12-
<div class="row"> <p class="command">Hello, world!, insert presentation text here!, use help command to list all commands. (if you are on mobile tap on the cursor to open the keyboard)</p> </div>
12+
<div class="row"> <p style="color: yellow;" class="command">FiShell Version 1.0</p> </div>
13+
<div class="row"> <p class="command">Hi, I'm Samuel Fischer, a passionate developer from Italy. I love solving problems, finding solutions, and integrating hardware and software.</p> </div>
14+
<div class="row"> <p style="color: yellow;" class="command">Use the help command to list all commands. (tap on the cursor to open the keyboard on mobile)</p> </div>
1315
</div>
1416
<div class="row">
1517
<p id="path" class="path">~/</p>
16-
<p style="color: #80D340;"> ></p>
18+
<p style="color: #80D340;"> &gt;</p>
1719
<p id="command" class="command cursor"></p>
1820
</div>
1921
<div id="autocomplete">

‎js/console.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ let history = [];
77
let historypos = 0;
88

99
document.addEventListener('keydown', function(event) {
10-
event.preventDefault();
1110
if (event.key === "Enter") {
1211
var command = document.getElementById("command").innerHTML;
1312
var path = document.getElementById("path").innerHTML;
@@ -18,6 +17,7 @@ document.addEventListener('keydown', function(event) {
1817
history.push(command);
1918
historypos = history.length;
2019
}
20+
event.preventDefault()
2121
parseCommand(command);
2222
window.scrollTo(0, document.body.scrollHeight - 100);
2323
} else if (event.key === "Backspace") {
@@ -27,6 +27,7 @@ document.addEventListener('keydown', function(event) {
2727
historypos -= 1;
2828
document.getElementById("command").innerHTML = history[historypos];
2929
}
30+
event.preventDefault()
3031
} else if (event.key === "ArrowDown") {
3132
if (history.length > 0 & historypos < history.length) {
3233
historypos += 1;
@@ -35,9 +36,11 @@ document.addEventListener('keydown', function(event) {
3536
if (historypos === history.length) {
3637
document.getElementById("command").innerHTML = "";
3738
}
39+
event.preventDefault()
3840
} else if (event.ctrlKey | event.metaKey) {
3941
return;
4042
} else if (event.key === "Tab") {
43+
event.preventDefault()
4144
var commands = ["help", "clear", "ls", "cd", "cat", "exit"];
4245
var command = document.getElementById("command").innerHTML;
4346
var path = document.getElementById("path").innerHTML;

‎js/disk.js

+35-43
Original file line numberDiff line numberDiff line change
@@ -7,59 +7,51 @@ const disk = {
77
"name": "personal",
88
"type": "folder",
99
"content": {
10-
"file1": {
11-
"name": "file1",
10+
"cw2usb": {
11+
"name": "cw2usb",
1212
"type": "file",
13-
"content": "Hello, world!"
14-
}
15-
}
16-
}
17-
}
18-
},
19-
"other": {
20-
"name": "other",
21-
"type": "folder",
22-
"content": {
23-
"file1": {
24-
"name": "file1",
25-
"type": "file",
26-
"content": "Hello, world!"
27-
},
28-
"inside": {
29-
"name": "inside",
30-
"type": "folder",
31-
"content": {
32-
"file1": {
33-
"name": "file1",
13+
"content": '<hr class="line"> <h1 style="color: white;">Cw2Usb</h1> <h3 style="color: white;">A small adaptor based on an RP2040-Zero microcontroller board, to connect a cw (morse) key to a computer. Supports both paddles and straight keys without any configuration!</h3> <a class="gitlink" href="https://github.com/samux6146/Cw2Usb" target="_blank">[ Go to GitHub --> ]</a> <hr class="line">'
14+
},
15+
"croxsplit44": {
16+
"name": "croxsplit44",
3417
"type": "file",
35-
"content": "Hello, world!"
18+
"content": '<hr class="line"> <h1 style="color: white;">Croxsplit44</h1> <h3 style="color: white;">A 3d printed 44 key handwierd split keyboard using Alps / matias switches</h3> <a class="gitlink" href="https://github.com/samux6146/croxsplit44" target="_blank">[ Go to GitHub --> ]</a> <hr class="line">'
19+
},
20+
"macconfig": {
21+
"name": "macconfig",
22+
"type": "file",
23+
"content": '<hr class="line"> <h1 style="color: white;">MacConfig</h1> <h3 style="color: white;">My macos Shell and Terminal config</h3> <a class="gitlink" href="https://github.com/samux6146/MacConfig" target="_blank">[ Go to GitHub --> ]</a> <hr class="line">'
24+
},
25+
"portfolio": {
26+
"name": "portfolio",
27+
"type": "file",
28+
"content": '<hr class="line"> <h1 style="color: white">Portfolio</h1> <h3 style="color: white;">My portfolio website emulating a unix shell (this website)</h3> <a class="gitlink" href="https://github.com/samux6146/portfolio" target="_blank">[ Go to GitHub --> ]</a> <hr class="line">'
3629
}
3730
}
3831
},
39-
"inside2": {
40-
"name": "inside2",
32+
"mittelab": {
33+
"name": "mittelab",
4134
"type": "folder",
4235
"content": {
43-
"file1": {
44-
"name": "file1",
36+
"whatismittelab": {
37+
"name": "whatismittelab",
38+
"type": "file",
39+
"content": '<hr class="line"> <h1 style="color: white;">What is mittelab?</h1> <h3 style="color: white;">Mittelab is my city&apos;s local Hackerspace</h3> <a class="gitlink" href="https://www.mittelab.org" target="_blank">[ Go to the Mittelab website --> ]</a> <hr class="line">'
40+
},
41+
"keypong": {
42+
"name": "keypong",
4543
"type": "file",
46-
"content": "Hello, world!"
44+
"content": '<hr class="line"> <h1 style="color: white;">KeyPong</h1> <h3 style="color: white;">A telegram bot for fast management of our sites opening personnel.</h3> <a class="gitlink" href="https://git.mittelab.org/samu/keypong" target="_blank">[ Go to GitLab --> ]</a> <hr class="line">'
4745
},
48-
"file2": {
49-
"name": "file2",
46+
"questboard": {
47+
"name": "questboard",
5048
"type": "file",
51-
"content": "Hello, world!"
49+
"content": '<hr class="line"> <h1 style="color: white;">MittelabQuestBoard</h1> <h3 style="color: white;">A leaderboard of the top quest slayers of mittelab!</h3> <a class="gitlink" href="https://git.mittelab.org/samu/mittelabquestboard" target="_blank">[ Go to GitLab --> ]</a> <hr class="line">'
5250
},
53-
"inside": {
54-
"name": "inside",
55-
"type": "folder",
56-
"content": {
57-
"file1": {
58-
"name": "file1",
59-
"type": "file",
60-
"content": "Hello, world!"
61-
}
62-
}
51+
"mittelauncher": {
52+
"name": "mittelauncher",
53+
"type": "file",
54+
"content": '<hr class="line"> <h1 style="color: white">Mittelauncher</h1> <h3 style="color: white;">A Minecraft launcher made for the Mitttelab&apos;s minecraft server!</h3> <a class="gitlink" href="https://git.mittelab.org/samu/mittelauncher" target="_blank">[ Go to GitLab --> ]</a> <hr class="line">'
6355
}
6456
}
6557
}
@@ -68,6 +60,6 @@ const disk = {
6860
"about_me": {
6961
"name": "about_me",
7062
"type": "file",
71-
"content": '<div class="row"> <p class="command"> Hello, world! </p> </div>'
63+
"content": '<hr class="line"> <div style="color: white;"> <h1>About me</h1> <p style="margin-bottom: 20px;">Hi, I&apos;m Samuel Fischer, a passionate developer from Italy who thrives on solving complex problems and creating innovative solutions. Ever since I started coding, I&apos;ve been fascinated by the intersection of hardware and software, always looking for ways to blend the two seamlessly.</p> <p style="margin-bottom: 20px;">I believe that "My life is an application, and I am the Developer." This mindset drives me to continuously improve, learn new technologies, and build projects that push the boundaries of what&apos;s possible. Whether it&apos;s designing embedded systems, experimenting with open-source software, or developing custom hardware solutions, I enjoy the challenge of turning ideas into reality.</p> <p>When I&apos;m not coding, you&apos;ll probably find me exploring new tech trends, tinkering with electronics, or diving into creative side projects. I&apos;m always open to collaborations and new opportunities, so feel free to reach out!</p> </div> <hr class="line">'
7264
}
7365
}

‎style.css

+13
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,19 @@ p {
5050
-webkit-animation: blink-animation 2s step-start 0s infinite;
5151
}
5252

53+
.line {
54+
width: 100%;
55+
color: white;
56+
}
57+
58+
.gitlink {
59+
color: gray;
60+
text-decoration: none;
61+
}
62+
.gitlink:hover {
63+
color: white;
64+
}
65+
5366
@keyframes blink-animation {
5467
50% {
5568
opacity: 0;

0 commit comments

Comments
 (0)
Please sign in to comment.