I want the input and output of the jQuery Terminal to be entirely within the top-left of a screen that's been split with Bootstrap, though I'm not sure how to do that. Ideally, it'd be something similar to Codecademy page (something like this except the terminal is on the top left).
I thought adding the following terminal code inside the div left-side block would work. But, by doing so, the terminal box is instead outside and below the leftside class.
Any advice or suggestions? Generally, I just have no idea how I can use Bootstrap/CSS to manipulate jQuery terminals.
var body = $('body').terminal(
function(command) {
this.echo(command);
}, {
greetings: 'Test',
name: 'Test',
}
);
terminal_print = function(str) {
body.echo(str);
};
.leftside,
.rightside {
height: 50vh;
width: 100%;
}
@media screen and (min-width:768px) {
.leftside,
.rightside {
height: 100vh;
}
}
.leftside {
background: black;
}
.rightside {
background: white;
}
<head>
<meta content="utf-8" http-equiv="encoding">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://unpkg.com/jquery.terminal/js/jquery.terminal.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="index.css" />
</head>
<body>
<div class="row g-0">
<div class="col-md-6 g-0">
<div class="leftside"></div>
</div>
<div class="col-md-6 g-0">
<div class="rightside d-flex justify-content-center align-items-center">
This page is intentionally blank
</div>
</div>
</div>
</body>