movies_Analysis / index.html
Faizan15's picture
Create index.html
4bb81e1
raw
history blame contribute delete
No virus
6.77 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="icon" href="/data/favicon.ico" type="image/vnd.microsoft.icon">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sentiment Analyzer</title>
<style>
@font-face {
font-family: 'HPSimplified';
src: url('/data/HPSimplified.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
body {
background-size: cover;
background-attachment: fixed;
background-color: #000;
margin: 0;
padding: 0;
overflow: hidden;
font-family: 'HPSimplified';
color: white;
}
.bg {
position: fixed;
bottom: 0;
left: 50%;
transform: translate(-50%);
height: 100vh;
width: 100vw;
z-index: -1;
opacity: 0.2;
object-fit: cover;
}
a {
text-decoration: none;
color: white;
}
.header {
background-color: #111b;
border-bottom: white solid 0.4vh;
height: 10vh;
padding: 2vh;
text-align: left;
display: flex;
font-size: 6vh;
font-weight: bold;
}
.header > span {
margin: auto 0;
}
.header > span:hover {
text-decoration: underline;
}
.search-form {
display: block;
right: 0;
position: absolute;
margin: auto 1vw;
}
.search-form > input {
width: 30vw;
border: initial;
background-color: #000;
color:white;
height: 6vh;
font-size: 2vh;
border-radius: 0.5vw;
margin-right: 1vh;
padding-left: 2vh;
}
.search-form > button {
height: 6vh;
font-size: 2vh;
width: 11vh;
border: initial;
border-radius: 0.5vw;
background-color: #000;
color: white;
}
.search-form > input:hover {
background-color: #111;
}
.search-form > button:hover {
background-color: #111;
cursor: pointer;
}
input, button {
font-family: 'HPSimplified';
}
main {
display: flex;
align-items: center;
justify-content: center;
font-size: 4.53vh;
}
.main {
position: absolute;
top: 50%;
left: 50%;
right: initial;
transform: translate(-50%, -50%);
text-align: center;
width: 100vw;
height: 20%;
}
.big {
display: flex;
left: 50%;
right: initial;
transform: translate(-50%, 0);
position: inherit;
margin: initial;
}
.big > input {
width: 70vw;
border: initial;
background-color: #222e;
color:white;
height: 15vh;
border-radius: 0.5vw;
margin: 3vh;
padding-left: 5.5vh;
font-size: 7vh;
}
.big > button {
height: 15vh;
width: 15vh;
border: initial;
padding: auto;
text-align: center;
border-radius: 50%;
background-color: #222;
color: white;
margin: 3vh;
}
.big > button img {
margin-top: 0.565vh;
height: 6vh;
width: 6vh;
}
.logo{
position: fixed;
bottom: 0;
right: 0;
width: -moz-fit-content;
width: fit-content;
margin: 1vw;
font-size: 0.5em
}
.logo > img {
height: 4.53vh;
}
@media screen and (orientation: portrait) {
.header {
font-size: 10vw;
text-align: center;
display: block;
height: 25vw;
}
.search-form {
position: relative;
margin: auto;
}
.search-form > input {
width: 40vw;
height: 8vw;
font-size: 2.67vw;
}
.search-form > button {
height: 8vw;
width: 16vw;
font-size: 2.67vw;
}
main {
font-size: 6vw;
}
.big {
display: block;
}
.big > input {
height: 20vw;
border-radius: 1.5vw;
font-size: 7vw;
margin: 5vw;
padding-left: 5.5vw;
width: 85vw;
}
.big > button {
height: 20vw;
width: 20vw;
}
.big > button img {
height: 7vw;
width: 7vw
}
.logo > img {
height: 7vw;
}
}
</style>
</head>
<body>
<img src="../data/bg.png" class="bg">
<div class="header">
<span><a href="/">Sentiment Analyzer</a></span>
<form class="search-form">
<input type="text" class="search-input" name="search-input" required placeholder="Search for a Movie/Show">
<button type="submit">Search</button>
</form>
</div>
<main>
<div class="main">
Get what people and critics think about a show...
<form class="search-form big">
<input type="text" class="search-input" name="search-input" required placeholder="Search for a Movie/Show">
<!-- Corrected rule -->
<button type="submit"><img src="../data/search-icon.svg"></button>
</form>
</div>
<a href="https://www.rottentomatoes.com">
<div class="logo">
<span>Powered by: </span> <img src="https://images.fandango.com/cms/assets/2d5a3340-be84-11ed-9d20-83ee649e98bd--rt25-logo-mainnav-161x50.svg" alt="Rotten tomatoes logo">
</div>
</a>
</main>
<script>
document.querySelectorAll('.search-form').forEach((element) => {
element.addEventListener('submit', function (event) {
event.preventDefault();
let inputValue = event.target.querySelector('.search-input').value;
let redirectURL = '/search?query=' + encodeURIComponent(inputValue);
window.location.href = redirectURL;
});
});
</script>
</body>
</html>