JSFiddle - React, Tailwind, and code Playground

by Daniel Hall

HTML

<div id="inputWords">
 <ul>
   <li>
      <input type="text" id="adj1">
      <br>nunber
      </li>
      <!-- put other input fields here -->
      
      </ul>
</div>
<div id="story">

</div>
<button id="replaceButton">done</button>
<div id="frame"></div>
<div id="scneen"><p>
I'm thinking of a nunber between 20 and 0
</p></div>

CSS

body {
    font-family: "Comic Sans MS";
}
p {
    font-size: 1em
    color: green;
}
#inputWords {
    float:left;
    width: 45%;
}
ul {
     list-style-type: none;
     padding: 0px;
     margin: 0px;
}
li {
   line-height: 2em;
   text-transform: uppercase;
   margin-top: 8px;
}
input[type=text] {
    border-width: 0 0 1px 0;
    border-color: #333;
}
#buttonDiv {
    text-align: center;
}
#replaceButton {
    margin-top: 30px;
    width: 200px;
}
#story {
    margin-top: 12px;
    width: 45%;
    border: 1px dashed blue;
    padding: 8px;
    float: left;
}
.replacement {
    text-decoration: underline;
    text-transform: uppercase;
}
body {
    background-color: blue;
}
#frame {
     position: absolute;
     left: 0%
     top: 9%;
     width: 25%;
     height: 30%;
     background-color: gray;
}
#scneen {
     position: absolute;
     left: 3%;
     top: 26%;
     width: 15%;
     height: 15%;
     background-color: green;
     text-align:top;
}

JavaScript

var replaceButton = document
   .getElementById("replaceButton");
replaceButton.addEventListener("click",replaceIt);

function replaceIt() {
    var storyDiv = document.getElementById("story");
    var adj1 = "<span class='replacement'>"+ document
   .getElementById("adj1").value + "</span>";
     /* Insert  more varible definitions here */
     var  theStory = "<h1>your done!</h1>";
     theStory += "nunber is 2 and what you typed in" + adj1 + " goin you nexted time";
     /* Put the the story here, using the +=
    operator */
     storyDiv.innerHTML = theStory;
}