init customizations

pull/56/head
Astradus 3 years ago
parent 1f2e543bdb
commit 2127431c58

3
.gitignore vendored

@ -32,4 +32,7 @@ yarn-error.log*
# typescript
*.tsbuildinfo
# vs
.vs
.gitattributes

@ -1,4 +0,0 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn lint

@ -1,131 +1,2 @@
# [💻 LiveTerm - build terminal styled websites in minutes!](https://liveterm.vercel.app)
Highly customizable, easy-to-use, and minimal terminal styled website template, powered by Next.js.
Building a simple website with LiveTerm only takes **minutes**, and you only need to work with **one** file: `config.json`. After you cloned this repository, simply run `yarn install && yarn dev` and start editing `config.json` to build your website!
LiveTerm can be used to build a variety of websites:
- [personal website](https://cveinnt.com)
- [browser startpage](https://livetermstart.vercel.app/)
- [project page](https://liveterm.vercel.app/)
- or maybe just a cool browser music player...be creative!
Feel free to play with the web demo above!
## 📸 Showcase
<p align="center">
<img src="./demo/demo.gif" width="600"><br>
<strong>LiveTerm with different themes</strong>
</p>
<p align="center">
<img src="./demo/cveinnt.png" width="600"><br>
<strong><a href="https://cveinnt.com" target=_blank>my personal website</a></strong>
</p>
## 🚀 Ship your LiveTerm site in less than 5 minutes
LiveTerm requires the `yarn` package manager. You can install `yarn` [here](https://classic.yarnpkg.com/lang/en/docs/install/).
Simply run the following commmand in your terminal:
```bash
sh -c "$(curl -fsSL https://raw.github.com/Cveinnt/LiveTerm/main/install/install.sh)"
```
This will install LiveTerm to the current directory. You can start building your website with:
```bash
cd LiveTerm && yarn dev
```
Start editing `config.json` and try saving and see the updated changes!
Alternatively, you can clone this repository to a location of your choosing
```bash
git clone https://github.com/Cveinnt/LiveTerm.git && cd LiveTerm
```
Then install dependencies and start developing there:
```bash
yarn install && yarn dev
```
### Docker Usage
First, clone the project and edit `config.json` to your liking. Then run the following to start the container in the background:
```shell
docker-compose up -d
```
If you **know** what you were doing, you can also try changing `Dockerfile` & `docker-compose.yml`!
Learn more about Docker [here](https://docs.docker.com/get-started/overview/ 'here').
## 📄 Configuration
### Basic Configuration
90% of LiveTerm's configurations are done through the `config.json` file.
```javascript
{
"readmeUrl": // create a Github README and link it here!
"title": // title of the website
"name": // your name, included in 'about' command
"ascii": // ascii art to display
"social": {
"github": // your handle
"linkedin": // your handle
},
"email": // your email
"ps1_hostname": "liveterm" // hostname in prompt
"ps1_username": "visitor", // username in prompt
"resume_url": "../resume.pdf", // path to your resume
"non_terminal_url": "W",
"colors": {
"light": {
...
},
"dark": {
... // you can use existing templates in themes.json or use your own!
}
}
}
```
Feel free to change it as you see fit!
### Themes
You can find several pre-configured themes in `themes.json`, and you can replace the colors in `config.json` with the theme color you like! The themes are based on the themes on [this website](https://glitchbone.github.io/vscode-base16-term/#/).
For a better preview of the themes, checkout the images in the `demo` folder.
### Favicons
Favicons are located in `public/`, along with the other files you may want to upload to your website. I used this [website](https://www.favicon-generator.org/) to generate favicons.
### Banner
You may also want to change the output of the `banner` command. To do that, simply paste your generated banner in `src/utils/bin/commands.ts`. I used this [website](https://manytools.org/hacker-tools/ascii-banner/) to generate my banner.
### Advanced Configuration
If you want to further customize your page, feel free to change the source code to your liking!
## 🌐 Deploy on Vercel
The easiest way to deploy a Next.js app is to use the [Vercel Platform](https://vercel.com/) from the creators of Next.js.
You can install `vercel` cli and follow the instruction [here](https://vercel.com/docs/concepts/deployments/overview).
You can also connect your github account to vercel and have vercel automatically deploy the github repository for you.
## Credit
Based on M4TT72's awesome [Terminal](https://github.com/m4tt72/terminal).
# [mattdangelo.co](https://mattdangelo.co)
Personal website forked from the [LiveTerm](https://github.com/Cveinnt/LiveTerm) repo

@ -1,20 +1,20 @@
{
"readmeUrl": "https://raw.githubusercontent.com/cveinnt/cveinnt/master/README.md",
"title": "LiveTerm",
"name": "John Doe",
"readmeUrl": "https://raw.githubusercontent.com/mattdangelo/mattdangelo/main/README.md",
"title": "Matt D'Angelo",
"name": "Matt D'Angelo",
"ascii": "liveterm",
"social": {
"github": "github",
"linkedin": "linkedin"
"github": "mattdangelo",
"linkedin": "md6"
},
"email": "contact@email.com",
"ps1_hostname": "liveterm",
"ps1_username": "visitor",
"repo": "https://github.com/Cveinnt/LiveTerm",
"email": "matthew.dangelo6@gmail.com",
"ps1_hostname": "mattdangelo.co",
"ps1_username": "guest",
"repo": "https://github.com/mattdangelo",
"resume_url": "https://upload.wikimedia.org/wikipedia/commons/c/cc/Resume.pdf",
"donate_urls": {
"paypal": "https://paypal.me/cveinnt",
"patreon": "https://patreon.com/cveinnt"
"paypal": "https://paypal.me/mattdangelo6",
"bitcoin": "14KvY3Pg2GKyaxGzkHAh2gNtapZeKd4jM2"
},
"colors": {
"light": {
@ -36,4 +36,4 @@
"red": "#BF616A"
}
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 330 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

@ -1,59 +0,0 @@
#!/bin/sh
# This script installs LiveTerm.
#
# Found a bug? Report it here: https://github.com/Cveinnt/LiveTerm/issues
set -e -u
eval "git clone 'https://github.com/Cveinnt/LiveTerm.git'"
cd LiveTerm
echo "LiveTerm cloned! Installing dependencies..."
if command -v yarn >/dev/null 2>&1 ; then
yarn install
else
cat 1>&2 << 'EOA'
/=====================================\\
| COMMAND NOT FOUND: 'yarn' |
\\=====================================/
Uh oh! We couldn't find 'yarn' installed on your system.
You should first install 'yarn' on your system.
For more information, visit yarn's installation page:
https://classic.yarnpkg.com/lang/en/docs/install/
EOA
exit 1
fi
cat <<-'EOM'
█████ ███ ███████████
░░███ ░░░ ░█░░░███░░░█
░███ ████ █████ █████ ██████ ░ ░███ ░ ██████ ████████ █████████████
░███ ░░███ ░░███ ░░███ ███░░███ ░███ ███░░███░░███░░███░░███░░███░░███
░███ ░███ ░███ ░███ ░███████ ░███ ░███████ ░███ ░░░ ░███ ░███ ░███
░███ █ ░███ ░░███ ███ ░███░░░ ░███ ░███░░░ ░███ ░███ ░███ ░███
███████████ █████ ░░█████ ░░██████ █████ ░░██████ █████ █████░███ █████
░░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░░ ░░░░░ ░░░░░ ░░░ ░░░░░
LiveTerm has been downloaded to the current directory.
You can start developing it with:
cd LiveTerm && yarn dev
This will open a local port at http://localhost:3000,
where you can preview your website. To apply changes, edit:
config.json
And the changes should be applied upon saves!
EOM

@ -1,11 +1,11 @@
{
"name": "liveterm",
"version": "0.1.0",
"name": "matt-dangelo",
"version": "1.0.0",
"license": "MIT",
"author": {
"name": "Vincent Wu",
"url": "https://cveinnt.com",
"email": "contact@wensenwu.com"
"name": "Matthew D'Angelo",
"url": "https://matt-dangelo.com",
"email": "matthew.dangelo6@gmail.com"
},
"scripts": {
"dev": "next dev",
@ -16,7 +16,7 @@
},
"dependencies": {
"axios": "^0.27.2",
"next": "12.1.6",
"next": "^12.1.6",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-icons": "^4.3.1"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 929 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 991 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
inkscape:export-filename="C:\Users\Matt\Desktop\matt-dangelo\public\favicon.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.1 (c68e22c387, 2021-05-23)"
id="svg"
version="1.1"
viewBox="0 0 100 100"
x="0px"
y="0px"
sodipodi:docname="favicon.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview14"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="8.73"
inkscape:cx="50.973654"
inkscape:cy="50.859107"
inkscape:window-width="1718"
inkscape:window-height="1376"
inkscape:window-x="1706"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg" />
<style
type="text/css"
id="style2">/* devanagari */
@font-face {
font-family: 'Cambay';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/cambay/v12/SLXJc1rY6H0_ZDs2aL6J_9I.woff2) format('woff2');
unicode-range: U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;
}
/* latin-ext */
@font-face {
font-family: 'Cambay';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/cambay/v12/SLXJc1rY6H0_ZDs2Z76J_9I.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Cambay';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/cambay/v12/SLXJc1rY6H0_ZDs2ab6J.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<defs
id="defs7">
<clipPath
id="circleClip">
<circle
cx="50"
cy="50"
r="50"
id="circle4" />
</clipPath>
</defs>
<text
fill="#2E3440"
font-family="Cambay"
font-size="50"
font-weight="600"
text-anchor="middle"
x="50"
y="68"
id="text11" />
<g
id="g10211"
transform="translate(2.5695214,-55.061858)">
<text
xml:space="preserve"
style="font-size:74.6667px;line-height:1.25;font-family:Now;-inkscape-font-specification:Now;fill:#2e3440;fill-opacity:1"
x="-3.3399074"
y="127.45921"
id="text1380"><tspan
id="tspan9742"
style="fill:#2e3440;fill-opacity:1">&gt;</tspan></text>
<text
xml:space="preserve"
style="font-size:74.6667px;line-height:1.25;font-family:Now;-inkscape-font-specification:Now;fill:#88c0d0;fill-opacity:1"
x="42.387505"
y="125.78452"
id="text9747"><tspan
id="tspan9745"
style="fill:#88c0d0;fill-opacity:1">_</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
sodipodi:docname="logo.svg"
y="0px"
x="0px"
viewBox="0 0 100 100"
version="1.1"
id="svg"
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview14"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="8.73"
inkscape:cx="53.150057"
inkscape:cy="41.867125"
inkscape:window-width="1718"
inkscape:window-height="1376"
inkscape:window-x="1706"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1" />
<style
type="text/css"
id="style2">/* devanagari */
@font-face {
font-family: 'Cambay';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/cambay/v12/SLXJc1rY6H0_ZDs2aL6J_9I.woff2) format('woff2');
unicode-range: U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;
}
/* latin-ext */
@font-face {
font-family: 'Cambay';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/cambay/v12/SLXJc1rY6H0_ZDs2Z76J_9I.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Cambay';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/cambay/v12/SLXJc1rY6H0_ZDs2ab6J.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
</style>
<defs
id="defs7">
<clipPath
id="circleClip">
<circle
cx="50"
cy="50"
r="50"
id="circle4" />
</clipPath>
</defs>
<rect
style="fill:#ececec;stroke-width:1.00223"
id="rect188"
width="95"
height="95"
x="2.5"
y="2.5"
ry="4.6964483" />
<text
fill="#2E3440"
font-family="Cambay"
font-size="50"
font-weight="600"
text-anchor="middle"
x="50"
y="68"
id="text11" />
<g
aria-label="D"
id="text9111"
style="font-weight:300;font-size:65.9683px;line-height:1.25;font-family:Aquire;-inkscape-font-specification:'Aquire Light';fill:#2e3440;fill-opacity:1"
transform="translate(-2)">
<path
d="M 91.944313,47.196341 C 91.218662,42.380655 88.843803,37.960779 85.215547,34.728333 81.521322,31.495886 76.771604,29.648774 71.823982,29.582805 H 70.900425 55.59578 v 3.364384 h 16.755948 v 0 c 3.49632,0.197904 6.794735,1.385334 9.565404,3.496319 3.364383,2.506796 5.673273,6.201021 6.464893,10.291055 0.263873,1.055493 0.39581,2.242922 0.39581,3.364384 0,1.187429 -0.131937,2.374858 -0.39581,3.496319 C 86.930722,60.653875 81.125512,66.063275 74.066904,67.0528 H 74.000936 55.59578 v 3.364383 h 18.60306 c 9.103626,-1.121461 16.360139,-8.246038 17.679505,-17.283695 0.131936,-0.989524 0.263873,-2.045017 0.263873,-3.034541 0,-0.989525 -0.06597,-1.913081 -0.197905,-2.902606 z"
id="path9195"
sodipodi:nodetypes="cccccccsccscccccccsc"
style="fill:#2e3440;fill-opacity:1" />
</g>
<path
id="path9770"
style="font-weight:300;font-size:65.9683px;line-height:1.25;font-family:Aquire;-inkscape-font-specification:'Aquire Light';fill:#88c0d0;fill-opacity:1"
d="M 9.6269531 43.634766 L 9.6269531 70.417969 L 13.189453 70.417969 L 13.189453 47.197266 L 9.6269531 43.634766 z " />
<path
id="path9996"
style="font-weight:300;font-size:65.9683px;line-height:1.25;font-family:Aquire;-inkscape-font-specification:'Aquire Light';fill:#2e3440"
d="M 9.6269531 29.582031 L 9.6269531 34.595703 L 13.189453 38.091797 L 15.828125 40.732422 L 28.757812 53.726562 L 30.144531 52.275391 L 30.605469 51.814453 L 32.320312 50.099609 L 41.357422 41.060547 L 43.996094 38.421875 L 43.996094 70.417969 L 47.558594 70.417969 L 47.558594 29.912109 L 41.160156 36.246094 L 28.757812 48.712891 L 9.6269531 29.582031 z " />
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -4,7 +4,7 @@ import config from '../../config.json';
import { Input } from '../components/input';
import { useHistory } from '../components/history/hook';
import { History } from '../components/history/History';
import { banner } from '../utils/bin';
import { banner } from '../utils/bin/commands';
interface IndexPageProps {
inputRef: React.MutableRefObject<HTMLInputElement>;

@ -13,15 +13,6 @@ export const getReadme = async () => {
return data;
};
export const getWeather = async (city: string) => {
try {
const { data } = await axios.get(`https://wttr.in/${city}?ATm`);
return data;
} catch (error) {
return error;
}
};
export const getQuote = async () => {
const { data } = await axios.get('https://api.quotable.io/random');
return {

@ -1,36 +0,0 @@
// // List of commands that require API calls
import { getProjects } from '../api';
import { getQuote } from '../api';
import { getReadme } from '../api';
import { getWeather } from '../api';
export const projects = async (args: string[]): Promise<string> => {
const projects = await getProjects();
return projects
.map(
(repo) =>
`${repo.name} - <a class="text-light-blue dark:text-dark-blue underline" href="${repo.html_url}" target="_blank">${repo.html_url}</a>`,
)
.join('\n');
};
export const quote = async (args: string[]): Promise<string> => {
const data = await getQuote();
return data.quote;
};
export const readme = async (args: string[]): Promise<string> => {
const readme = await getReadme();
return `Opening GitHub README...\n
${readme}`;
};
export const weather = async (args: string[]): Promise<string> => {
const city = args.join('+');
if (!city) {
return 'Usage: weather [city]. Example: weather casablanca';
}
const weather = await getWeather(city);
return weather;
};

@ -1,4 +1,6 @@
// List of commands that do not require API calls
import { getProjects } from '../api';
import { getQuote } from '../api';
import { getReadme } from '../api';
import * as bin from './index';
import config from '../../../config.json';
@ -14,7 +16,8 @@ export const help = async (args: string[]): Promise<string> => {
c += Object.keys(bin).sort()[i - 1] + ' ';
}
}
return `Welcome! Here are all the available commands:
return `
Welcome! Here are all the available commands:
\n${c}\n
[tab]: trigger completion.
[ctrl+l]/clear: clear terminal.\n
@ -25,91 +28,77 @@ Type 'sumfetch' to display summary.
// Redirection
export const repo = async (args: string[]): Promise<string> => {
window.open(`${config.repo}`);
return 'Opening Github repository...';
return `
Opening Github repository...`;
};
// About
export const about = async (args: string[]): Promise<string> => {
return `Hi, I am ${config.name}.
Welcome to my website!
return `
Hi! I'm ${config.name}. Welcome to my site
More about me:
'sumfetch' - short summary.
'resume' - my latest resume.
'readme' - my github readme.`;
};
export const resume = async (args: string[]): Promise<string> => {
window.open(`${config.resume_url}`);
return 'Opening resume...';
};
// Donate
export const donate = async (args: string[]): Promise<string> => {
return `thank you for your interest.
here are the ways you can support my work:
- <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.donate_urls.paypal}" target="_blank">paypal</a></u>
- <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.donate_urls.patreon}" target="_blank">patreon</a></u>
return `
Thank you for your interest. Here are the ways you can support me!
<u><a href="${config.donate_urls.paypal}" target="_blank">${config.donate_urls.paypal}</a></u>
<u><a class="text-light-blue dark:text-dark-blue underline" >${config.donate_urls.bitcoin}</a></u>
`;
};
// Contact
export const email = async (args: string[]): Promise<string> => {
window.open(`mailto:${config.email}`);
return `Opening mailto:${config.email}...`;
return `
Opening mailto:${config.email}...`;
};
export const github = async (args: string[]): Promise<string> => {
window.open(`https://github.com/${config.social.github}/`);
return 'Opening github...';
return `
Opening Github...`;
};
export const linkedin = async (args: string[]): Promise<string> => {
window.open(`https://www.linkedin.com/in/${config.social.linkedin}/`);
return 'Opening linkedin...';
};
// Search
export const google = async (args: string[]): Promise<string> => {
window.open(`https://google.com/search?q=${args.join(' ')}`);
return `Searching google for ${args.join(' ')}...`;
};
export const duckduckgo = async (args: string[]): Promise<string> => {
window.open(`https://duckduckgo.com/?q=${args.join(' ')}`);
return `Searching duckduckgo for ${args.join(' ')}...`;
};
export const bing = async (args: string[]): Promise<string> => {
window.open(`https://bing.com/search?q=${args.join(' ')}`);
return `Wow, really? You are using bing for ${args.join(' ')}?`;
};
export const reddit = async (args: string[]): Promise<string> => {
window.open(`https://www.reddit.com/search/?q=${args.join(' ')}`);
return `Searching reddit for ${args.join(' ')}...`;
return `
Opening LinkedIn...`;
};
// Typical linux commands
export const echo = async (args: string[]): Promise<string> => {
return args.join(' ');
};
export const whoami = async (args: string[]): Promise<string> => {
return `${config.ps1_username}`;
return `
${config.ps1_username}`;
};
export const ls = async (args: string[]): Promise<string> => {
return `a
bunch
of
fake
directories`;
return `
bin
dev
etc
home
lib
mnt
opt
root
usr
var`;
};
export const cd = async (args: string[]): Promise<string> => {
return `unfortunately, i cannot afford more directories.
return `
Unfortunately, disk space costs money.
if you want to help, you can type 'donate'.`;
};
@ -117,41 +106,58 @@ export const date = async (args: string[]): Promise<string> => {
return new Date().toString();
};
export const vi = async (args: string[]): Promise<string> => {
return `woah, you still use 'vi'? just try 'vim'.`;
};
export const vim = async (args: string[]): Promise<string> => {
return `'vim' is so outdated. how about 'nvim'?`;
};
export const nvim = async (args: string[]): Promise<string> => {
return `'nvim'? too fancy. why not 'emacs'?`;
};
export const emacs = async (args?: string[]): Promise<string> => {
return `you know what? just use vscode.`;
};
export const sudo = async (args?: string[]): Promise<string> => {
window.open('https://www.youtube.com/watch?v=dQw4w9WgXcQ', '_blank'); // ...I'm sorry
return `Permission denied: with little power comes... no responsibility? `;
};
// Banner
export const banner = (args?: string[]): string => {
return `
Type 'help' to see the list of available commands.
Type 'sumfetch' to display summary.
Type 'repo' or click <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.repo}" target="_blank">here</a></u> for the Github repository.
`;
return `
Permission denied: this incident might be reported?`;
};
export const projects = async (args: string[]): Promise<string> => {
const projects = await getProjects();
return projects
.map(
(repo: { name: any; html_url: any; }) =>
`${repo.name} - <a class="text-light-blue dark:text-dark-blue underline" href="${repo.html_url}" target="_blank">${repo.html_url}</a>`,
)
.join('\n');
};
export const quote = async (args: string[]): Promise<string> => {
const data = await getQuote();
return data.quote;
};
export const readme = async (args: string[]): Promise<string> => {
const readme = await getReadme();
return `
Opening GitHub README...\n
${readme}`;
};
export const sumfetch = (args?: string[]): string => {
return `
o8%8888, sumfetch
o88%8888888. -----------
8'- -:8888b ABOUT
8' 8888 ${config.name}
d8.-=. ,==-.:888b Adelaide Melbourne
>8 '~\' :'~' d8888 B.E. (Honours) (Software)
88 ,88888 <u><a href="${config.repo}" target="_blank">Github</a></u>
88b. '-~ ':88888 -----------
888b ~==~ .:88888 CONTACT
88888o--:':::8888 <u><a href="mailto:${config.email}" target="_blank">${config.email}</a></u>
88888| :::' 8888b <u><a href="https://github.com/${config.social.github}" target="_blank">github.com/${config.social.github}</a></u>
8888^^' 8888b <u><a href="https://linkedin.com/in/${config.social.linkedin}" target="_blank">linkedin.com/in/${config.social.linkedin}</a></u>
d888 ,%888b. -----------
d88% %%%8--'-. DONATE
/88:.__ , _%-' --- - <u><a href="${config.donate_urls.paypal}" target="_blank">${config.donate_urls.paypal}</a></u>
'''::===..-' = --. ' <u><a class="text-light-blue dark:text-dark-blue underline" >${config.donate_urls.bitcoin}</a></u>
`
};
export const banner = (args?: string[]) : string => {
return sumfetch() + `
Type 'help' to see the list of available commands.
Type 'repo' or click <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.repo}" target="_blank">here</a></u> for my Github account.
`
};

@ -1,3 +1 @@
export * from './commands';
export * from './api_commands';
export { default as sumfetch } from './sumfetch';
export * from './commands';

@ -1,46 +0,0 @@
import config from '../../../config.json';
const sumfetch = async (args: string[]): Promise<string> => {
if (config.ascii === 'cveinnt') {
return `
@@@@@@@@@@@@@ sumfetch: summary display
@@@@ @@@@ -----------
@@ @@ ABOUT
@@ @@ ${config.name}
@@ @@ ${config.ps1_hostname}
@@ @@@ @@ <u><a href="${config.resume_url}" target="_blank">resume</a></u>
@@ @@@ @@ <u><a href="${config.repo}" target="_blank">Github repo</a></u>
@@ @@ -----------
@@ .@@@@@@@@@@. @@ CONTACT
@@ @@ @@ @@ <u><a href="mailto:${config.email}" target="_blank">${config.email}</a></u>
@@ @@ @@ @@ <u><a href="https://github.com/${config.social.github}" target="_blank">github.com/${config.social.github}</a></u>
@@ @@@@@@ @@ <u><a href="https://linkedin.com/in/${config.social.linkedin}" target="_blank">linkedin.com/in/${config.social.linkedin}</a></u>
@@@ @@@ -----------
@@@ @@@ @@ DONATE
@| @@@@@@@@@@@@@@@@ @@ <u><a href="${config.donate_urls.paypal}" target="_blank">${config.donate_urls.paypal}</a></u>
@| @@ <u><a href="${config.donate_urls.patreon}" target="_blank">${config.donate_urls.patreon}</a></u>
`;
} else {
return `
  sumfetch
    -----------
      ABOUT
  ${config.name}
        <u><a href="${config.resume_url}" target="_blank">resume</a></u>
<u><a href="${config.repo}" target="_blank">Github repo</a></u>
  -----------
  > L I V E T E R M CONTACT
  <u><a href="mailto:${config.email}" target="_blank">${config.email}</a></u>
<u><a href="https://github.com/${config.social.github}" target="_blank">github.com/${config.social.github}</a></u>
        <u><a href="https://linkedin.com/in/${config.social.linkedin}" target="_blank">linkedin.com/in/${config.social.linkedin}</a></u>
  -----------
        DONATE
   <u><a href="${config.donate_urls.paypal}" target="_blank">${config.donate_urls.paypal}</a></u>
  <u><a href="${config.donate_urls.patreon}" target="_blank">${config.donate_urls.patreon}</a></u>
`;
}
};
export default sumfetch;

@ -16,7 +16,8 @@ export const shell = async (
setHistory('');
} else if (Object.keys(bin).indexOf(args[0]) === -1) {
setHistory(
`shell: command not found: ${args[0]}. Try 'help' to get started.`,
`
shell: command not found: ${args[0]}. Try 'help' to get started.`,
);
} else {
const output = await bin[args[0]](args.slice(1));

@ -1,162 +0,0 @@
{
"default": {
"light": {
"background": "#FBF1C9",
"foreground": "#3C3836",
"yellow": "#D79921",
"green": "#98971A",
"gray": "#7C6F64",
"blue": "#458588",
"red": "#CA2124"
},
"dark": {
"background": "#2E3440",
"foreground": "#E5E9F0",
"yellow": "#5E81AC",
"green": "#A3BE8C",
"gray": "#88C0D0",
"blue": "#EBCB8B",
"red": "#BF616A"
}
},
"gruvbox": {
"light": {
"background": "#FBF1C9",
"foreground": "#3C3836",
"yellow": "#D79921",
"green": "#98971A",
"gray": "#7C6F64",
"blue": "#458588",
"red": "#CA2124"
},
"dark": {
"background": "#1c1c1c",
"foreground": "#EBDBB2",
"yellow": "#D79921",
"green": "#98971A",
"gray": "#A89984",
"blue": "#458588",
"red": "#CA2124"
}
},
"dracula": {
"light": {
"background": "#FFFFDB",
"foreground": "#282a36",
"yellow": "#ffb86c",
"green": "#50fa7b",
"gray": "#8B6BB9",
"blue": "#67AFC0",
"red": "#ff5555"
},
"dark": {
"background": "#282a36",
"foreground": "#f8f8f2",
"yellow": "#ffb86c",
"green": "#50fa7b",
"gray": "#bd93f9",
"blue": "#8be9fd",
"red": "#ff5555"
}
},
"Nord": {
"light": {
"background": "#E5E9F0",
"foreground": "#2E3440",
"yellow": "#5E81AC",
"green": "#A3BE8C",
"gray": "#88C0D0",
"blue": "#EBCB8B",
"red": "#BF616A"
},
"dark": {
"background": "#2E3440",
"foreground": "#E5E9F0",
"yellow": "#5E81AC",
"green": "#A3BE8C",
"gray": "#88C0D0",
"blue": "#EBCB8B",
"red": "#BF616A"
}
},
"Monokai": {
"light": {
"background": "#F8F8F2",
"foreground": "#272822",
"yellow": "#F4BF75",
"green": "#A6E22E",
"gray": "#AE81FF",
"blue": "#66D9EF",
"red": "#F92672"
},
"dark": {
"background": "#272822",
"foreground": "#F8F8F2",
"yellow": "#F4BF75",
"green": "#A6E22E",
"gray": "#AE81FF",
"blue": "#66D9EF",
"red": "#F92672"
}
},
"Mocha": {
"light": {
"background": "#D0C8C6",
"foreground": "#3B3228",
"yellow": "#F4BC87",
"green": "#BEB55B",
"gray": "#A89BB9",
"blue": "#8AB3B5",
"red": "#CB6077"
},
"dark": {
"background": "#3B3228",
"foreground": "#D0C8C6",
"yellow": "#F4BC87",
"green": "#BEB55B",
"gray": "#A89BB9",
"blue": "#8AB3B5",
"red": "#CB6077"
}
},
"Solarized": {
"light": {
"background": "#FDF6E3",
"foreground": "#586E75",
"yellow": "#B58900",
"green": "#859900",
"gray": "#6C71C4",
"blue": "#268BD2",
"red": "#DC322F"
},
"dark": {
"background": "#002B36",
"foreground": "#93A1A1",
"yellow": "#B58900",
"green": "#859900",
"gray": "#6C71C4",
"blue": "#268BD2",
"red": "#DC322F"
}
},
"Paraiso": {
"light": {
"background": "#A39E9B",
"foreground": "#2F1E2E",
"yellow": "#FEC418",
"green": "#48B685",
"gray": "#815BA4",
"blue": "#06B6EF",
"red": "#EF6155"
},
"dark": {
"background": "#2F1E2E",
"foreground": "#A39E9B",
"yellow": "#FEC418",
"green": "#48B685",
"gray": "#815BA4",
"blue": "#06B6EF",
"red": "#EF6155"
}
}
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save