forked from Cveinnt/LiveTerm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 92b3541
Showing
69 changed files
with
3,510 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
tsconfigRootDir: __dirname, | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'no-multiple-empty-lines': ['error', { max: 3, maxEOF: 1, maxBOF: 0 }], | ||
'prettier/prettier': [ | ||
'warn', | ||
{ | ||
endOfLine: 'auto', | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
|
||
.gitattributes | ||
config.json* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"tabWidth": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM node:18-alpine as base | ||
|
||
WORKDIR /home/node/app | ||
COPY package.json ./ | ||
RUN npm install -g npm-check-updates | ||
RUN ncu -u | ||
RUN npm install | ||
COPY . ./ | ||
|
||
FROM base as production | ||
|
||
ENV NODE_PATH=./build | ||
RUN npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Vincent Wu | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
# [💻 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 | ||
"cv_url": "../cv", // path to your cv | ||
"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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: "3.7" | ||
services: | ||
liveterm: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
target: base | ||
expose: | ||
- '3000' | ||
ports: | ||
- '3000:3000' | ||
volumes: | ||
- ./src/:/home/node/app/src | ||
command: npm run dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"readmeUrl": "https://raw.githubusercontent.com/cveinnt/cveinnt/master/README.md", | ||
"title": "LiveTerm", | ||
"name": "John Doe", | ||
"ascii": "liveterm", | ||
"social": { | ||
"github": "github", | ||
"linkedin": "linkedin" | ||
}, | ||
"email": "[email protected]", | ||
"ps1_hostname": "liveterm", | ||
"ps1_username": "visitor", | ||
"repo": "https://github.com/Cveinnt/LiveTerm", | ||
"resume_url": "https://upload.wikimedia.org/wikipedia/commons/c/cc/Resume.pdf", | ||
"donate_urls": { | ||
"paypal": "https://paypal.me/cveinnt", | ||
"patreon": "https://patreon.com/cveinnt" | ||
}, | ||
"colors": { | ||
"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" | ||
} | ||
} | ||
} |
Oops, something went wrong.