
How to Initialize the Terminal
April 29, 2024About 1 min
How to Initialize the Terminal 관련
How to Create an Interactive Terminal Portfolio Website
In this article, you will learn how to create an interactive terminal-based portfolio and a résumé in JavaScript. We'll use the jQuery Terminal library (and a few other tools) to create a website that looks like a real terminal. This article will sho...
How to Create an Interactive Terminal Portfolio Website
In this article, you will learn how to create an interactive terminal-based portfolio and a résumé in JavaScript. We'll use the jQuery Terminal library (and a few other tools) to create a website that looks like a real terminal. This article will sho...
To create a basic terminal, you need to put in this code:
const commands = {};
const term = $('body').terminal(commands);
The string 'body'
indicates the CSS selector where terminal should be created. Here we use 'body'
so the terminal will be the only thing on the page. But it doesn't have to be full screen. You can create a website where the terminal is only part of the page, like in a window that looks like part of the Operating System.
The first argument to the terminal method is called an interpreter. It's a way to add your commands. An object is the simplest way to create them. See creating the interpreter (jcubic/jquery.terminal
) to learn more.
If the terminal font is too small, you can make it a little bit bigger with CSS custom properties (also known as CSS variables):
:root {
--size: 1.2;
}