text
stringlengths
0
106k
The HTML and JavaScript remain the same:
HTML:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simple Website</title>
<!--Bootstrap CSS-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container d-flex flex-column justify-content-center align-items-center vh-100">
<textarea class="form-control mb-3" rows="1" placeholder="Type here..."></textarea>
<button class="btn btn-primary">Submit</button>
</div>
<!--Bootstrap JS-->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<!--Custom JS-->
<script src="script.js"></script>
</body>
</html>
```
JavaScript
[USER]: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simple Website</title>
<!--Bootstrap CSS-->
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container d-flex flex-column justify-content-center align-items-center vh-100">
<textarea class="form-control mb-3" rows="1" placeholder="Type here..."></textarea>
<button class="btn btn-primary">Submit</button>
</div>
<!--Bootstrap JS-->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
<!--Custom JS-->
<script src="script.js"></script>
</body>
</html>
body {
background: #f8f9fa;
}
.container {
padding: 2rem;
}
.form-control {
height: auto;
font-size: 1.2rem;
overflow: hidden;
resize: none;
}
.btn {
height: 3rem;
font-size: 1.2rem;
width: 100%;
}
let textarea = document.querySelector('textarea');
textarea.addEventListener('input', autoResize, false);
function autoResize() {
this.style.height = 'auto';
this.style.height = this.scrollHeight + 'px';
}
I want to have a label at the top left of the text field "Prompt", it needs to be a tiny bit smaller
[AI]: Sure, you can add a label for your textarea and style it accordingly.
Here's the updated HTML:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Simple Website</title>
<!--Bootstrap CSS-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<!--Custom CSS-->
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container d-flex flex-column justify-content-center align-items-center vh-100">