-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
187 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,65 @@ | ||
body { | ||
background-image: url('../image/gender.jpg'); | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
background-position: center; | ||
background-image: url('../image/gender.jpg'); /* sets the background image for the entire body */ | ||
background-repeat: no-repeat; /* prevents the background image from repeating */ | ||
background-size: cover; /* ensures that the background image covers the entire background */ | ||
background-position: center; /* positions the background image at the center */ | ||
} | ||
|
||
.box{ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
.box { | ||
display: flex; /* sets the box to use the flexbox layout */ | ||
justify-content: center; /* aligns the content of the box horizontally to the center */ | ||
align-items: center; /* aligns the content of the box vertically to the center */ | ||
height: 100vh; /* sets the height of the box to be 100% of the viewport height */ | ||
} | ||
|
||
.container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 50vh; | ||
border: 2px solid black; | ||
box-sizing: border-box; | ||
background-color: rgba(255, 255, 255, 0.85); | ||
display: flex; /* sets the container to use the flexbox layout */ | ||
justify-content: center; /* aligns the content of the container horizontally to the center */ | ||
align-items: center; /* aligns the content of the container vertically to the center */ | ||
height: 50vh; /* sets the height of the container to be 50% of the viewport height */ | ||
border: 2px solid black; /* adds a 2px solid black border around the container */ | ||
box-sizing: border-box; /* includes the border and padding in the container's total width and height */ | ||
background-color: rgba(255, 255, 255, 0.85); /* sets the background color of the container with 85% opacity */ | ||
} | ||
|
||
.left-column { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: flex-start; | ||
padding: 20px; | ||
display: flex; /* Specifies the element as a flex container */ | ||
flex-direction: column; /* Sets the direction of the flex container's main axis to be vertical */ | ||
justify-content: center; /* Aligns the flex items along the vertical axis at the center */ | ||
align-items: flex-start; /* Aligns the flex items along the horizontal axis at the start */ | ||
padding: 20px; /* Adds 20 pixels of padding to all sides of the element */ | ||
} | ||
|
||
.right-column { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: flex-start; | ||
padding: 20px; | ||
/*width:200px;*/ | ||
display: flex; /* Specifies the element as a flex container */ | ||
flex-direction: column; /* Sets the direction of the flex container's main axis to be vertical */ | ||
justify-content: center; /* Aligns the flex items along the vertical axis at the center */ | ||
align-items: flex-start; /* Aligns the flex items along the horizontal axis at the start */ | ||
padding: 20px; /* Adds 20 pixels of padding to all sides of the element */ | ||
/*width:200px;*/ /* Optionally sets the width of the element to 200 pixels */ | ||
} | ||
|
||
.radio-group { | ||
display: flex; | ||
align-items: center; | ||
display: flex; /* Specifies the element as a flex container */ | ||
align-items: center; /* Aligns the flex items along the horizontal axis at the center */ | ||
} | ||
|
||
.radio-group label { | ||
margin-right: 10px; | ||
margin-right: 10px; /* Adds 10 pixels of margin to the right side of the label elements within the radio-group */ | ||
} | ||
|
||
input { | ||
margin: 10px; | ||
margin: 10px; /* Adds 10 pixels of margin to all sides of the input elements */ | ||
} | ||
|
||
button{ | ||
margin: 10px; | ||
button { | ||
margin: 10px; /* Adds 10 pixels of margin to all sides of the button elements */ | ||
} | ||
|
||
h2 { | ||
margin: 10px; | ||
margin: 10px; /* Adds 10 pixels of margin to all sides of the h2 elements */ | ||
} | ||
|
||
label{ | ||
margin: 10px; | ||
} | ||
label { | ||
margin: 10px; /* Adds 10 pixels of margin to all sides of the label elements */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,92 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Gender Prediction WebPage</title> | ||
<link rel="stylesheet" type="text/css" href="css/styles.css"> | ||
|
||
<!DOCTYPE html> <!-- This line declares the document type and version of HTML --> | ||
|
||
<html lang="en"> <!-- This tag defines the beginning of the HTML document and sets the language to English --> | ||
|
||
<head> <!-- This tag contains meta-information about the HTML document and links to external resources --> | ||
|
||
<meta charset="UTF-8"> <!-- This meta tag specifies the character encoding for the document --> | ||
|
||
<title>Gender Prediction WebPage</title> <!-- This tag sets the title of the HTML document --> | ||
|
||
<link rel="stylesheet" type="text/css" href="css/styles.css"> <!-- This tag links the HTML document to an external stylesheet --> | ||
|
||
</head> | ||
<body> | ||
<div class="box"> | ||
<div class="container"> | ||
<div class="left-column"> | ||
<h2>Mr. or Ms. ?</h2> | ||
<form id="myForm" onsubmit="handleSubmit(event)"> | ||
<label for="name">Name:</label> | ||
<input type="text" onchange="savedStorage(event)" id="textInput" name="textInput" maxlength = "255" pattern="[A-Za-z\s]*" required> | ||
<div class="radio-group"> | ||
<label> | ||
<input type="radio" value="male" id="male radio" name="apiOption" > | ||
Male | ||
|
||
<body> <!-- This tag contains the content of the HTML document --> | ||
|
||
<div class="box"> <!-- This tag creates a container with the class "box" --> | ||
|
||
<div class="container"> <!-- This tag creates a container with the class "container" --> | ||
|
||
<div class="left-column"> <!-- This tag creates a container with the class "left-column" --> | ||
|
||
<h2>Mr. or Ms. ?</h2> <!-- This tag creates a heading with the text "Mr. or Ms. ?" --> | ||
|
||
<form id="myForm" onsubmit="handleSubmit(event)"> <!-- This tag creates a form with the id "myForm" and specifies the submission event handler --> | ||
|
||
<label for="name">Name:</label> <!-- This tag creates a label for an input field with the id "name" --> | ||
|
||
<input type="text" onchange="savedStorage(event)" id="textInput" name="textInput" maxlength = "255" pattern="[A-Za-z\s]*" required> <!-- This tag creates a text input field with the id "textInput" and specifies event handlers, attributes, and restrictions --> | ||
|
||
<div class="radio-group"> <!-- This tag creates a container with the class "radio-group" for radio buttons --> | ||
|
||
<label> <!-- This tag creates a label for a radio button --> | ||
|
||
<input type="radio" value="male" id="male radio" name="apiOption" > <!-- This tag creates a radio button with the value "male" and the id "male radio" within the group "apiOption" --> | ||
|
||
Male <!-- This text is displayed as the label for the radio button --> | ||
|
||
</label> | ||
|
||
</div> | ||
|
||
<div class="radio-group"> | ||
<label> | ||
<input type="radio" value="female" id="female radio" name="apiOption" > | ||
Female | ||
<div class="radio-group"> <!-- This tag creates another container with the class "radio-group" for radio buttons --> | ||
|
||
<label> <!-- This tag creates a label for a radio button --> | ||
|
||
<input type="radio" value="female" id="female radio" name="apiOption" > <!-- This tag creates a radio button with the value "female" and the id "female radio" within the group "apiOption" --> | ||
|
||
Female <!-- This text is displayed as the label for the radio button --> | ||
|
||
</label> | ||
|
||
</div> | ||
<button type="submit" id="prediction">Submit</button> | ||
|
||
|
||
<button type="submit" id="prediction">Submit</button> <!-- This tag creates a submit button with the id "prediction" --> | ||
|
||
</form> | ||
<button onclick="handleSave(event)" id="save">Save</button> | ||
|
||
<button onclick="handleSave(event)" id="save">Save</button> <!-- This tag creates a button with an onclick event handler and the id "save" --> | ||
|
||
</div> | ||
|
||
<div class="right-column" > | ||
<h2>Prediction</h2> | ||
<p id="response gender"></p> | ||
<p id="response probability"></p> | ||
<h2>Saved Answer</h2> | ||
<p id="saved"></p> | ||
<button id="clear" onclick="handleClear(event)">Clear</button> | ||
<div class="right-column" > <!-- This tag creates a container with the class "right-column" --> | ||
|
||
<h2>Prediction</h2> <!-- This tag creates a heading with the text "Prediction" --> | ||
|
||
<p id="response gender"></p> <!-- This tag creates an empty paragraph element with the id "response gender" --> | ||
|
||
<p id="response probability"></p> <!-- This tag creates an empty paragraph element with the id "response probability" --> | ||
|
||
<h2>Saved Answer</h2> <!-- This tag creates a heading with the text "Saved Answer" --> | ||
|
||
<p id="saved"></p> <!-- This tag creates an empty paragraph element with the id "saved" --> | ||
|
||
<button id="clear" onclick="handleClear(event)">Clear</button> <!-- This tag creates a button with the id "clear" and an onclick event handler --> | ||
|
||
</div> | ||
<script type="text/javascript" src="js/script.js"></script> | ||
|
||
<script type="text/javascript" src="js/script.js"></script> <!-- This tag links the HTML document to an external JavaScript file --> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</body> | ||
</html> | ||
|
||
</html> | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters