├── composer.json
├── index.php
├── images
└── terminal.png
├── LICENSE
├── index.html
├── README.md
├── scripts
├── cursor.js
├── data.js
└── main.js
└── style
└── style.css
/composer.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/images/terminal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lohitkolluri/Old-Portfolio-Website/HEAD/images/terminal.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Lohit Kolluri
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Lohit's Terminal
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
27 |
28 |
29 | █
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Portfolio Website V1
2 |
3 | This portfolio website acted as a platform for showcasing my projects providing information about myself and displaying my social media profiles. It featured a terminal-like interface for user interaction.
4 |
5 | 🚀 Demo
6 |
7 | [https://lohitkolluri.github.io/Old-Portfolio-Website/](https://lohitkolluri.github.io/Old-Portfolio-Website/)
8 |
9 |
10 |
11 | 🧐 Features
12 |
13 | Here're some of the project's best features:
14 |
15 | * Command Execution and Routing
16 | * Command History Navigation
17 | * Dynamic Content Printing
18 | * Command Line Interface (CLI) Simplicity
19 | * External Link Opening
20 |
21 | 🛠️ Installation Steps:
22 |
23 | 1. Clone the repository:
24 |
25 | ```
26 | git clone https://github.com/lohitkolluri/Old-Portfolio-Website
27 | ```
28 |
29 | 2. Go to the directory:
30 |
31 | ```
32 | cd Old-Portfolio-Website
33 | ```
34 |
35 | 3. Open the index.html file in a web browser
36 |
37 |
38 |
39 | 💻 Built with
40 |
41 | Technologies used in the project:
42 |
43 | * JavaScript
44 | * HTML
45 | * CSS
46 | * Browser DOM
47 |
48 | 🛡️ License:
49 |
50 | This project is licensed under the [MIT License](LICENSE)
51 |
--------------------------------------------------------------------------------
/scripts/cursor.js:
--------------------------------------------------------------------------------
1 | var cursor;
2 |
3 | window.onload = init()
4 |
5 |
6 | // Initializes the cursor to leftmost possible position
7 | function init(){
8 | cursor = document.getElementById('cursor')
9 | cursor.style.left = "0px";
10 | }
11 |
12 | // Replace all the newline chars with empty string
13 | function replaceNewline(str){
14 | return str.replace(/\n/g, '');
15 | }
16 |
17 | // Takes data from textarea and write to the liner
18 | function typeToLine(source , e){
19 | // Load event data using both methods
20 | e = e || window.event;
21 |
22 | // Store data from textarea and write to inputLine span
23 | var textBox = source.value;
24 | var inputLine = document.getElementById('input');
25 |
26 | inputLine.innerHTML = replaceNewline(textBox);
27 | }
28 |
29 | // Moves the cursor depending on key pressed
30 | function moveCursor(len, e){
31 | e = e || window.event;
32 | var keyCode = e.keyCode || e.which;
33 |
34 | // left or right arrow key -> shift the cursor by 10px left or right.
35 | if (keyCode == 37 && parseInt(cursor.style.left) >= (0 - ((len - 1) * 10))) {
36 | cursor.style.left = parseInt(cursor.style.left) - 10 + "px";
37 | }
38 | else if (keyCode == 39 && (parseInt(cursor.style.left) + 10) <= 0) {
39 | cursor.style.left = parseInt(cursor.style.left) + 10 + "px";
40 | }
41 | }
--------------------------------------------------------------------------------
/scripts/data.js:
--------------------------------------------------------------------------------
1 | const linkedin = "https://www.linkedin.com/in/kollurilohit/";
2 | const github = "https://github.com/lohitkolluri/";
3 | const email = "mailto:lohitkolluri@gmail.com";
4 | var today = new Date();
5 |
6 | about = [
7 | " ",
8 | "Hey, I'm Lohit Kolluri! 👋",
9 | " ",
10 | "I'm a student at SRM University, Kattankulathur,.",
11 | "I love to build things that are useful and can have a positive impact on other people's lives.",
12 | "Having said that, I'm always ready to work on quirky projects",
13 | "I am always ready to explore new things and collaborate with others.",
14 | "Gathering a lot of knowledge and insights.",
15 | "Outside of the professional space, I love playing games and casual streaming.",
16 | " ",
17 | "Hope you explore and enjoy this website! 🙏🏻",
18 | " ",
19 | ];
20 |
21 | banner = [
22 | " ",
23 | '' + String(today) + " ",
24 | 'Lohit Kolluri ',
25 | " ",
26 | "██╗ █████╗ ██╗ ██╗██╗████████╗",
27 | "██║ ██╔══██╗██║ ██║██║╚══██╔══╝",
28 | "██║ ██║ ██║███████║██║ ██║",
29 | "██║ ██║ ██║██╔══██║██║ ██║",
30 | "███████╗╚█████╔╝██║ ██║██║ ██║",
31 |
32 | " ",
33 | 'Welcome to my Portfolio Website.. ',
34 | 'For a list of available commands, type \'help\' . ',
35 | // ' ',
36 | " ",
37 | ];
38 |
39 | help = [
40 | " ",
41 | '👦🏻 About About Me',
42 | '🌏 Social Display social networks',
43 | '🏗 Projects View coding projects',
44 | '📧 Email Reach me through email',
45 | '🧹 Clear Clear the terminal',
46 | '❓ Help Open the help menu',
47 | '🕰 History View command history',
48 | '👋 Exit Close the tab and exit',
49 | " ",
50 | ];
51 |
52 | social = [
53 | " ",
54 | "Enter the name of any of the following or simply click the links...",
55 | " ",
56 | 'Linkedin linkedin/kollurilohit' +
59 | " ",
60 | 'Github github/lohitkolluri' +
63 | " ",
64 | " ",
65 | ];
66 |
67 | projects = [
68 | " ",
69 | '1. WeatherPedia ',
70 | " ",
71 | " ",
72 | '2. Mental Health Fitness Tracker',
73 | " ",
74 | " ",
75 | '3. Portfolio Website',
76 | " ",
77 | " ",
78 | '4. Old Portfolio Website (This Website) ',
79 | " ",
80 | 'Click the following links to access all my projects: (Github) ',
81 | " ",
82 | ];
83 |
--------------------------------------------------------------------------------
/style/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | Change colors for:
3 | 1. Background
4 | 2. Normal Text
5 | 3. Keywords (commands)
6 | 4. Hover
7 | 5. Banner
8 | */
9 |
10 | :root{
11 | --bg1 : #211D1B;
12 | --text1 : #519975;
13 | --command1 : #73ABAD;
14 | --cursor-color1: #73ABAD;
15 | --index1 : ;
16 |
17 | /* Vs */
18 | --bg2 : #1E1E1E;
19 | --bg-select2: #2B537A;
20 | --text2: #9DDCFE;
21 | /* --text2: #D4D4D4; */
22 | /* --command2: #D7BA7D; */
23 | --command2: #D4D4D4;
24 | --cursor-color2: #D7BA7D;
25 | --links : #B25FAE;
26 | }
27 |
28 | body {
29 | margin: 0;
30 | padding: 15px 20px;
31 | min-height: 99%;
32 | /* height: 100vh; */
33 | width: 100%;
34 | min-width: 550px;
35 | /* Text color */
36 | color: var(--text2);
37 | /* Background */
38 | background: var(--bg2);
39 | font-family: cursor, monospace;
40 | overflow-x: hidden;
41 | position: relative;
42 | }
43 | ::selection {
44 | /* color: #211830; */
45 | color: var(--bg-select2);
46 | /* background-color: #519975; */
47 | background-color: var(--text2);
48 | }
49 | ::-moz-selection {
50 | /* color: #211830; */
51 | color: var(--bg-select2);
52 | /* background-color: #519975; */
53 | background-color: var(--text2);
54 | }
55 | textarea {
56 | left: -1000px;
57 | position: absolute;
58 | }
59 | b {
60 | font-weight: bold;
61 | text-decoration: underline;
62 | }
63 |
64 | /* Cursor Start */
65 | .cursor {
66 | font-size: 12px;
67 | /* color: #73ABAD; */
68 | /* background-color: #73ABAD; */
69 | color: var(--cursor-color2);
70 | background-color: var(--cursor-color2);
71 | position: relative;
72 | opacity: 1;
73 | height: 1.5em;
74 | width: 10px;
75 | max-width: 10px;
76 | transform: translateY(4px);
77 | overflow: hidden;
78 | text-indent: -5px;
79 | display: inline-block;
80 | text-decoration: blink;
81 | animation: blinker 1s linear infinite;
82 | }
83 | @keyframes blinker {
84 | 50% {
85 | opacity: 0;
86 | }
87 | }
88 |
89 | #command-window {
90 | cursor: text;
91 | height: 50px;
92 | /* color: #73ABAD; */
93 | color: var(--cursor-color2);
94 | }
95 | #liner {
96 | line-height: 1.3em;
97 | margin-top: -2px;
98 | animation: show 0.5s ease forwards;
99 | animation-delay: 1.2s;
100 | opacity: 0;
101 | }
102 | #liner::before {
103 | /* color: #519975; */
104 | color: var(--text2);
105 | content: "visitor:~$";
106 | }
107 | @keyframes show {
108 | from {
109 | opacity: 0;
110 | }
111 | to {
112 | opacity: 1;
113 | }
114 | }
115 | /* Cursor End */
116 |
117 | p {
118 | display: block;
119 | line-height: 1.3em;
120 | margin: 0;
121 | overflow: hidden;
122 | white-space: nowrap;
123 | margin: 0;
124 | letter-spacing: 0.05em;
125 | animation: typing 0.5s steps(30, end);
126 | }
127 | .no-animation {
128 | animation: typing 0 steps(30, end);
129 | }
130 | .margin {
131 | margin-left: 20px;
132 | }
133 | @keyframes typing {
134 | from {
135 | width: 0;
136 | }
137 | to {
138 | width: 100%;
139 | }
140 | }
141 | .index {
142 | color: #DCDCCC;
143 | }
144 | .color2 {
145 | /* Normal descriptive text apart from */
146 | /* color: #B89076; */
147 | color: var(--command2);
148 | }
149 |
150 | /* Keywords */
151 | .command {
152 | /* Same as cursor just with shadows */
153 | /* color: #73ABAD; */
154 | color: var(--cursor-color2);
155 | /* text-shadow: 0 0 5px #73ABAD; */
156 | text-shadow: 0 0 5px var(--cursor-color2);
157 | }
158 |
159 | .white {
160 | color: #fff;
161 | }
162 | .inherit,
163 | a {
164 | /* Links */
165 | /* color: #9C8394; */
166 | color: var(--links);
167 | }
168 | a {
169 | text-decoration: inherit;
170 | }
171 | a:hover {
172 | /* Hover for links */
173 | /* Background same as cursor */
174 | background: #73ABAD;
175 | color: #211830;
176 | }
177 | a:focus {
178 | outline: 0;
179 | }
180 |
--------------------------------------------------------------------------------
/scripts/main.js:
--------------------------------------------------------------------------------
1 | var before = document.getElementById('before')
2 | var command = document.getElementById("input");
3 | var textarea = document.getElementById("textbox");
4 | var terminal = document.getElementById("terminal");
5 | var git = 0
6 | var commands = []
7 |
8 | setTimeout(() => {
9 | printLines(banner, "", 80);
10 | textarea.focus();
11 | }, 100);
12 |
13 | window.addEventListener("keyup", enterKey);
14 | textarea.value = "";
15 | command.innerHTML = textarea.value;
16 |
17 | function enterKey(e) {
18 | if (e.keyCode == 181) {
19 | document.location.reload(true);
20 | }
21 | if (e.keyCode == 13) {
22 | commands.push(command.innerHTML);
23 | git = commands.length;
24 | addLine("Lohit's Portfolio:~$ " + command.innerHTML, "no-animation", 0);
25 | router(command.innerHTML.toLowerCase());
26 | command.innerHTML = "";
27 | textarea.value = "";
28 | }
29 | if (e.keyCode == 38 && git != 0) {
30 | git -= 1;
31 | textarea.value = commands[git];
32 | command.innerHTML = textarea.value;
33 | }
34 | if (e.keyCode == 40 && git != commands.length) {
35 | git += 1;
36 | if (commands[git] === undefined) {
37 | textarea.value = "";
38 | } else {
39 | textarea.value = commands[git];
40 | }
41 | command.innerHTML = textarea.value;
42 | }
43 | }
44 |
45 | function router(cmd){
46 | switch (cmd.toLowerCase()) {
47 | case "help":
48 | printLines(help, "color2 margin", 80);
49 | break;
50 |
51 | case "about":
52 | printLines(about, "color2 margin", 80)
53 | break;
54 |
55 | case "social":
56 | printLines(social, "color2 margin", 80)
57 | break;
58 |
59 | case "projects":
60 | printLines(projects, "color2 margin", 80)
61 | break;
62 |
63 | case "banner":
64 | printLines(banner, "", 80)
65 | break;
66 |
67 | case "history":
68 | addLine(" ", "", 0);
69 | printLines(commands, "color2", 80);
70 | addLine(" ", "command", 80 * commands.length + 50);
71 | break;
72 |
73 | case "email":
74 | addLine('Opening mailto:lohitkolluri99@gmail.com ...', "color2", 80);
75 | openNewTab(email);
76 | break;
77 |
78 | case "clear":
79 | setTimeout(() => {
80 | terminal.innerHTML = ' ';
81 | before = document.getElementById("before");
82 | }, 1);
83 | printLines(banner, "", 80)
84 | break;
85 |
86 | case "linkedin":
87 | addLine("Opening LinkedIn...", "color2", 0);
88 | openNewTab(linkedin);
89 | break;
90 | case "github":
91 | addLine("Opening Github...", "color2", 0);
92 | openNewTab(github);
93 | break;
94 | // case "instagram":
95 | // addLine("Opening Instagram...", "color2", 0);
96 | // openNewTab(instagram);
97 | // break;
98 |
99 | case "ls":
100 | addLine("So you are a real programmer at heart ❤️. PS. It's just a website! ", "color2", 0);
101 | break;
102 |
103 | case "cd":
104 | addLine("So you are a real programmer at heart ❤️. PS. It's just a website! ", "color2", 0);
105 | break;
106 |
107 | case "sudo":
108 | addLine("Woah Woah Woah!! Relax!! ","color2",0);
109 | break;
110 |
111 | case "exit":
112 | window.close();
113 | addLine("If the window doesn't close, it might be because of a safety feature! Close the tab manually!","color2",0);
114 | break;
115 |
116 | default:
117 | addLine("Command not found. For a list of commands, type 'help' . ", "error", 100);
118 | break;
119 | }
120 | }
121 |
122 | function printLines(name, style, time){
123 | name.forEach((item, index) => {
124 | addLine(item, style, index*time);
125 | })
126 | }
127 |
128 | function addLine(text, style, time) {
129 |
130 | var t = "";
131 | for (let i = 0; i < text.length; i++) {
132 | if (text.charAt(i) == " " && text.charAt(i + 1) == " ") {
133 | t += " ";
134 | i++;
135 | } else {
136 | t += text.charAt(i);
137 | }
138 | }
139 |
140 | setTimeout(() => {
141 | var next = document.createElement("p");
142 | next.innerHTML = t;
143 | next.className = style;
144 |
145 | before.parentNode.insertBefore(next, before);
146 |
147 | window.scrollTo(0, document.body.offsetHeight);
148 | }, time);
149 | }
150 |
151 | function openNewTab(link) {
152 | setTimeout(() => {
153 | window.open(link, "_blank");
154 | }, 500);
155 | }
156 |
--------------------------------------------------------------------------------