added key enter function

master
bernadette 8 months ago
parent 37753782a1
commit 811d4948b7

@ -11,7 +11,7 @@ body {
}
.header-img {
height: 5.5rem;
height: 5.7rem;
}
.columns {
@ -38,13 +38,13 @@ body {
font-family: LibreBaskerville;
font-style: italic;
line-height: 130%;
font-size: 20px;
font-size: 22px;
}
.command-bar {
height: 40px;
width: 70%;
font-size: 16px;
font-size: 20px;
padding-left: 20px;
border-radius: 30px;
border: 1.7px solid black;
@ -92,6 +92,8 @@ body {
#output {
width: 80%;
margin-top: 30px;
font-size: 20px;
line-height: 150%;
}
.quotationmark-up-container {
@ -126,8 +128,8 @@ body {
width: 30%;
align-items: center;
text-align: center;
margin-top: 50px;
margin-left: 30px;
margin-top: 40px;
height: 50vh;
}
@ -152,7 +154,7 @@ body {
.flip-card-front {
display: flex;
flex-direction: column;
background-color: #d4d1d0;
background-color: #e6e6e6;
color: black;
border-radius: 30px;
align-items: center;
@ -163,12 +165,13 @@ body {
padding-left: 10px;
padding-right: 10px;
padding-top: 15px;
width: 90%;
width: 95%;
}
h1 {
position: absolute;
top: 40%;
font-size: 3rem;
top: 42%;
}
.tendril-top {
@ -198,12 +201,16 @@ h1 {
.flip-card-back {
display: flex;
align-items: center;
background-color: #d4d1d0;
background-color: #e6e6e6;
color: black;
border-radius: 30px;
transform: rotateY(180deg);
}
.info_layer {
padding: 25px;
display: flex;
flex-direction: column;
padding: 30px;
line-height: 150%;
font-size: 20px;
}

@ -122,6 +122,16 @@ function handleInput() {
console.log("info_layer: " + response.info_layer); // Log info_layer content
}
// Function to handle keypress event
function handleKeyPress(event) {
if (event.keyCode === 13) { // Check if Enter key is pressed
handleInput(); // Call handleInput function
}
}
// Event listener for keypress event on the input field
document.getElementById("user_input").addEventListener("keypress", handleKeyPress);
function printing(input){
fetch("https://hub.xpub.nl/chopchop/cgi-bin/table.cgi?input=" + input);

Loading…
Cancel
Save