diff --git a/JS/main.js b/JS/main.js index 8b0d00f..b7b9844 100644 --- a/JS/main.js +++ b/JS/main.js @@ -127,8 +127,6 @@ async function ApiCall(requestTitle, serchinput = "", movieID = "") { .then((response) => response.json()) .then((response) => response) .then((data) => { - console.log(movieID); - console.log(data); CreateMovieDetails(data); }); break; @@ -261,7 +259,7 @@ function loadData(data) { for (let i = 0; i < data.results.length; i++) { let movieItem = document.createElement("div"); movieItem.className = - "card col-12 col-md-3 text-center shadow bg-body-tertiary rounded object-fit-cover p-0"; + "card col-8 col-md-3 text-center shadow bg-body-tertiary rounded object-fit-cover p-0"; movieItem.onclick = () => ApiCall(ApiQuery[8], "", data.results[i].id); let movieImgContainer = document.createElement("div"); movieImgContainer.className = "card-img-container"; diff --git a/css/style.css b/css/style.css index f857d6b..cb02cba 100644 --- a/css/style.css +++ b/css/style.css @@ -1,267 +1,410 @@ -:root{ - --second-color:#01B4E4; - --alert-color:#F8D7DA; - --alert-text-color:#9D3D29; +:root { + --second-color: #01b4e4; + --alert-color: #f8d7da; + --alert-text-color: #9d3d29; } -body{ - background-color: var(--second-color); + +.h-md-25{ + height: 25vh; } -*{ - cursor: default; - margin: 0; - padding: 0; + + +body { + background-color: var(--second-color); } -.bg-second-color{ - background-color: var(--second-color); +* { + cursor: default; + margin: 0; + padding: 0; } -.title{ - transition: 0.3s ease; +.bg-second-color { + background-color: var(--second-color); } -.title:hover{ - color: var(--second-color); +.title { + transition: 0.3s ease; } -.card-img-container{ - overflow: hidden; +.title:hover { + color: var(--second-color); } -.card-img-container img{ - cursor: pointer; - transition: 0.3s ease-in-out; +.card-img-container { + overflow: hidden; } -.card-img-container:hover img{ - transform: scale(1.1); +.card-img-container img { + cursor: pointer; + transition: 0.3s ease-in-out; } -.card{ - position: relative; - +.card-img-container:hover img { + transform: scale(1.1); +} +.card { + position: relative; } .description { - position: absolute; - width: 100%; - height: 100%; - top: -10%; - opacity: 0; - left: 0; - /* transition: opacity 2s ease-in-out; + position: absolute; + width: 100%; + height: 100%; + top: -10%; + opacity: 0; + left: 0; + /* transition: opacity 2s ease-in-out; transition: top 0.1s ease-in-out; */ - transition: 0.5s ease; -} -.description-bg{ - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 0; - object-fit: cover; -} -.dark-layer{ - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; - background-color: rgba(0, 0, 0, 0.5); - z-index: 1; -} -.description-content{ - padding-top: 20px; - position: absolute; - z-index: 1000; - color: lavender; - display: flex; - justify-content: center; - flex-direction: column; -} -.title{ - color: var(--second-color); - font-weight: bold; - font-size: larger; -} -.date-container{ - display: flex; - justify-content: start; - gap: 20px; - padding-left: 10px; -} - -.card:hover .description{ - top: 0; - /* animation: mymove 0.5s ; */ - opacity: 1; + transition: 0.5s ease; +} +.description-bg { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + z-index: 0; + object-fit: cover; +} +.dark-layer { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + background-color: rgba(0, 0, 0, 0.5); + z-index: 1; +} +.description-content { + padding-top: 20px; + position: absolute; + z-index: 1000; + color: lavender; + display: flex; + justify-content: center; + flex-direction: column; +} +.title { + color: var(--second-color); + font-weight: bold; + font-size: larger; +} +.date-container { + display: flex; + justify-content: start; + gap: 20px; + padding-left: 10px; +} + +.card:hover .description { + top: 0; + /* animation: mymove 0.5s ; */ + opacity: 1; } @keyframes mymove { - 0% { - display: none; - opacity: 0; - } + 0% { + display: none; + opacity: 0; + } - 1% { - display: block; - opacity: 0; - } + 1% { + display: block; + opacity: 0; + } - 100% { - display: block; - opacity: 1; - } + 100% { + display: block; + opacity: 1; + } } -#M{ - color: rgb(255, 0, 55); +#M { + color: rgb(255, 0, 55); } -#N{ - color: var(--second-color); +#N { + color: var(--second-color); } -.searchcontainer{ - gap: 10px; - display: flex; - justify-content: center; +.searchcontainer { + gap: 10px; + display: flex; + justify-content: center; } -#search-button{ - border-color: var(--second-color); - color: var(--second-color); +#search-button { + border-color: var(--second-color); + color: var(--second-color); } -#search-button:hover{ - background-color: var(--second-color) ; - color: white; +#search-button:hover { + background-color: var(--second-color); + color: white; } -.setting{ - position: fixed; - top: 100px; - right: -200px; - transition: all 0.4s ease-in-out; - z-index: 999; -} -.icon{ - padding: 10px; - display: flex; - align-items: center; - flex-direction: row; - justify-content: center; - background-color: #555555; - border-top-left-radius : 10px; - border-bottom-left-radius : 10px; - height: 30px; +.setting { + position: fixed; + top: 100px; + right: -200px; + transition: all 0.4s ease-in-out; + z-index: 999; } -.content{ - display: flex; - flex-direction: row-reverse; - justify-content: space-around; - width:fit-content; +.icon { + padding: 10px; + display: flex; + align-items: center; + flex-direction: row; + justify-content: center; + background-color: #555555; + border-top-left-radius: 10px; + border-bottom-left-radius: 10px; + height: 30px; +} +.content { + display: flex; + flex-direction: row-reverse; + justify-content: space-around; + width: fit-content; } - .color { - cursor: pointer; - /* width: 50px; */ - height: 50px; + cursor: pointer; + /* width: 50px; */ + height: 50px; } .bg-light { - background-color: #f0f0f0; + background-color: #f0f0f0; } .bg-red { - background-color: #FF30A9; + background-color: #ff30a9; } .bg-blue { - background-color: #3078FF; + background-color: #3078ff; } .bg-green { - background-color: #30FFA9; + background-color: #30ffa9; } .bg-yellow { - background-color: #FCFF30; + background-color: #fcff30; } .bg-orange { - background-color: #FF9E30; + background-color: #ff9e30; } .bg-purple { - background-color: #BD30FF; + background-color: #bd30ff; } .bg-pink { - background-color: #FF9E30; + background-color: #ff9e30; } -.visible{ - right: 0; +.visible { + right: 0; } -.setting i{ - animation: rotate 3s infinite ; - color: white; +.setting i { + animation: rotate 3s infinite; + color: white; } -.setting i:checked .colors-container{ - display: flex; +.setting i:checked .colors-container { + display: flex; } @keyframes rotate { - 100% {transform: rotate(360deg);} - /* 100% {transform: rotate(0deg);} */ - + 100% { + transform: rotate(360deg); + } + /* 100% {transform: rotate(0deg);} */ } @keyframes colors-appear { - 100%{ - translate: 100 0; - } + 100% { + translate: 100 0; + } +} + +.contactUs { + display: flex; + flex-direction: column; + text-align: center; + justify-content: space-between; +} +#input-title { + font-size: 2rem; + color: white; + font-weight: bold; + text-align: center; +} +.inputs { + display: flex; + flex-direction: column; + gap: 15px; + padding: 30px; + width: 60%; + margin: 0 auto; + padding-bottom: 80px; +} + +.input { + display: flex; + flex-direction: column; + gap: 0; + padding: 0; + margin: 0; +} +.input-alert { + font-weight: bold; + font-size: 1em; + padding: 10px; + text-align: center; + justify-content: center !important; + background-color: var(--alert-color); + width: 100%; + height: 100%; + box-sizing: border-box; + border-radius: 5px; + color: var(--alert-text-color); + transition: display 0.5s ease; + /* display: none; */ } -.contactUs{ - display: flex; - flex-direction: column; - text-align: center; - justify-content: space-between; +/* navbar part */ +.navbar { + height: 7vh; + top: 0px !important; + display: flex; + left: -200px; + background-color: #3c3c3c; + /* height: 100vh; */ + align-items: start !important; + position: fixed !important; + display: flex; + left: 0; + z-index: 9999; + padding: 0 !important; + left: -200px; + transition: 0.3s ease-in-out; + margin: 0 !important; +} +.nav-icon { + box-sizing: border-box; + height: 100%; + width: 50px; + display: flex; + justify-content: center; + align-items: center; + color: #7a7673; + transition: 0.5s ease; + /* width: 100%; */ +} +.nav-visible { + left: 0px; +} +.nav-icon:hover { + color: #3c3c3c; + background-color: #7a7673; +} +.menu { + background-color: #3c3c3c; + height: 100vh; + box-sizing: border-box; + width: 200px; + padding: 30px; + display: flex; + flex-direction: column; + gap: 10px; + font-size: larger; + font-weight: bold; + list-style-type: none; +} +.menu-item { + color: #7a7673; + text-decoration: none; +} +.menu-item:hover { + color: var(--second-color); +} + +.title { + text-align: center; } -#input-title{ - font-size: 2rem; - color: white; - font-weight: bold; - text-align: center; + +/* move up part */ + +.move-up { + position: fixed; + bottom: 20px; + right: 20px; + background-color: var(--second-color); + border-radius: 20%; + width: 40px; + height: 40px; + padding: 10px; + display: none; + overflow: hidden; +} +.move-up-show { + display: flex; + justify-content: center; + transition: 0.5s; +} +.move-up i { + color: white; +} +.move-up:hover i { + animation: moveUp-anim infinite 1.5s; } -.inputs{ - display: flex; - flex-direction: column; - gap: 15px; - padding: 30px; - width: 60%; - margin: 0 auto; - padding-bottom: 80px; +@keyframes moveUp-anim { + 100% { + transform: translateY(-30px); + } + /* 50%{ + + transform: translateY(-50px); + } + 100%{ + transform: translateY(100px); + } */ } +.nav-tabs .nav-link.active { + background-color: #e50914; + color: white; +} -.input{ - display: flex; - flex-direction: column; - gap: 0; - padding: 0; - margin: 0; +.nav-tabs .nav-link { + color: white; } -.input-alert{ - font-weight: bold; - font-size: 1em; - padding: 10px; - text-align: center; - justify-content: center !important; - background-color: var(--alert-color); - width: 100%; - height: 100%; - box-sizing: border-box; - border-radius: 5px; - color: var(--alert-text-color); - transition: display 0.5s ease; - /* display: none; */ + +.img-thumbnail { + width: 100px; + height: auto; + border: none; +} +.fixed-center { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 90%; + max-width: 1200px; } -/* navbar part */ -.navbar{ +#movie-details { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 100%; /* Increased width */ + background-color: #212529; + padding: 20px; + border-radius: 10px; + z-index: 1000; +} +#close-icon { + font-size: 30px; +} + +@media (min-width: 576px) { + .navbar { background-color: #3c3c3c; + height: 100vh; + align-items: center !important; position: fixed !important; display: flex; left: 0; @@ -269,27 +412,29 @@ body{ padding: 0 !important; left: -200px; transition: 0.3s ease-in-out; -} -.nav-visible{ - left: 0px; -} -.nav-icon{ - height: 100vh; - width: 50px; + margin: 0 !important; + } + .nav-icon { + box-sizing: border-box; height: 100%; + width: 50px; display: flex; justify-content: center; align-items: center; - color: #7A7673; + color: #7a7673; transition: 0.5s ease; /* width: 100%; */ -} -.nav-icon:hover{ + } + .nav-visible { + left: 0px; + } + .nav-icon:hover { color: #3c3c3c; - background-color: #7A7673; -} -.menu{ - height: 100vh; + background-color: #7a7673; + } + .menu { + background-color: #3c3c3c; + height: 100%; box-sizing: border-box; width: 200px; padding: 30px; @@ -299,93 +444,12 @@ body{ font-size: larger; font-weight: bold; list-style-type: none; -} -.menu-item{ - color: #7A7673; + } + .menu-item { + color: #7a7673; text-decoration: none; -} -.menu-item:hover{ + } + .menu-item:hover { color: var(--second-color); -} - -.title{ - text-align: center; -} - - -/* move up part */ - -.move-up{ - position: fixed; - bottom: 20px; - right: 20px; - background-color: var(--second-color); - border-radius: 20%; - width: 40px; - height: 40px; - padding: 10px; - display: none; - overflow: hidden; -} -.move-up-show{ - display: flex; - justify-content: center; - transition: 0.5s; -} -.move-up i{ - color: white; -} -.move-up:hover i{ - animation: moveUp-anim infinite 1.5s; -} -@keyframes moveUp-anim { - 100%{ - transform: translateY(-30px); - } - /* 50%{ - - transform: translateY(-50px); - } - 100%{ - transform: translateY(100px); - } */ -} - -.nav-tabs .nav-link.active { - background-color: #e50914; - color: white; -} - -.nav-tabs .nav-link { - color: white; -} - -.img-thumbnail { - width: 100px; - height: auto; - border: none; -} -.fixed-center { - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 90%; - max-width: 1200px; -} - - -#movie-details { - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 100%; /* Increased width */ - background-color: #212529; - padding: 20px; - border-radius: 10px; - z-index: 1000; -} -#close-icon{ - font-size: 30px; + } } diff --git a/index.html b/index.html index 6e49544..4b1f067 100644 --- a/index.html +++ b/index.html @@ -56,7 +56,7 @@
  • Conatct Us
  • - @@ -69,8 +69,8 @@ -
    -
    +
    +

    MoviesNews