From f40eeb79be62e1c4c5f671617e136e53ff3a9ae2 Mon Sep 17 00:00:00 2001 From: NhatQuyenIT Date: Sat, 2 Dec 2023 23:15:13 +0700 Subject: [PATCH] New code available! --- .vscode/settings.json | 2 +- css/Mystyles.css | 411 ++++++++++++++++++++++++++++++++++++++++++ index.html | 78 +++++++- js/MyJS.js | 212 ++++++++++++++++++++++ 4 files changed, 695 insertions(+), 8 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index f673a71..155422b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "liveServer.settings.port": 5502 + "liveServer.settings.port": 5503 } \ No newline at end of file diff --git a/css/Mystyles.css b/css/Mystyles.css index cc8fd92..195993a 100644 --- a/css/Mystyles.css +++ b/css/Mystyles.css @@ -99,4 +99,415 @@ body,.jumbotron { .card { cursor: pointer; box-shadow: 0 0 5px 5px rgb(144, 112, 112); +} + +/* CSS Document */ +body,html,*{ + margin: 0; + padding: 0; + border: none; + box-sizing: border-box; +} +.container{ + width: 1200px; + margin: 0 auto; +} +/*Navigation*/ +#nav .topnav{ + display: flex; + align-items: flex-start; + flex-wrap: wrap; + padding-top: 10px; + height: 60px; +} +#nav .topnav .right{ + list-style-type: none; + display: flex; + margin-left: auto; +} +#nav .topnav .right button{ + display: block; + background: none; + outline: none; + height: 25px; + text-align: center; + margin: 0 10px; + cursor: pointer; + color: #fff; + font-size: 12pt; +} +#nav .topnav .right #btnlogout{ + background-color: #fff; + color: #000; + list-style-type: none; + text-align: center; + height: 25px; + width: 100px; + line-height: 25px; + font-weight: bold; + border-radius: 8px; + display: none; + cursor: pointer; + margin: 0 auto; + animation: bottomup 0.5s; + z-index: 100; + +} +#nav .topnav .right li:hover > #btnlogout{ + display: block; +} +#nav .topnav .right li > #btnlogout:hover{ + background-color: #ff4700; + color: #fff; +} +/*User*/ +.modal{ + height: 100%; + width: 100%; + background-color: rgba(0,0,0,0.6); + position: fixed; + top:0; + left: 0; + display: none; + z-index: 10; + overflow-y: auto; +} +#login{ + width: 500px; + background-color: #fff; + margin: 100px auto 0 auto; + padding-bottom: 20px; + animation: topdown 0.7s; + position: relative; +} +#login .close{ + position: absolute; + right: 15px; + top: 0px; + font-size: 35pt; + transform: rotate(45deg); + background-color: transparent; + cursor: pointer; + outline: none; +} +#login .close:hover{ + color: #ff4700; +} +#login h2{ + font-family: "Times New Roman"; + display: inline-block; + margin: 20px 0 10px 40px; + padding-bottom: 10px; + border-bottom: 5px solid #000; + font-weight: 900; +} +#login .logininfo{ + display: flex; + justify-content: center; + align-items: center; + text-align: center; +} +#login label{ + display: block; + font-weight: bold; + font-size: 13pt; + margin-top: 5px; + cursor: pointer; +} +#login input{ + display: inline-block; + width: 250px; + border: 1px solid #ccc; + padding-left: 5px; + height: 40px; + line-height: 40px; + font-size: 13pt; + outline: none; +} + +#login input:focus{ + border: 1px solid #ff4700; +} +#login div[id*="error"]{ + width: 100%; + background-color: #f2dede; + border: 1px solid #ebccd1; + color: #a94442; + font-weight: bold; + margin: 5px auto 0; + padding: 5px; + display: none; + cursor: default; +} +#login #btnlogin{ + display: block; + background-color: #ff4700; + width: 200px; + height: 40px; + border: 3px solid #ff4700; + margin: 50px auto 0; + font-size: 20pt; + line-height: 30px; + color: white; + border-radius: 999px; + cursor: pointer; + outline: none; + box-shadow: 2px 2px 10px 0 rgba(0,0,0,.7); +} +#login p{ + margin-top: 50px; + text-align: center; +} +#login p a{ + text-decoration: none; + color: #ff4700 !important; + font-weight: bold; +} +#login #btnlogin:hover{ + background-color: #fff; + color: #ff4700; +} +#login #btnlogin:active{ + box-shadow: none; +} +#signup{ + width: 700px; + background-color: #fff; + margin: 100px auto 0 auto; + padding-bottom: 20px; + animation: topdown 0.7s; + position: relative; + display: none; +} +#signup .close{ + position: absolute; + right: 15px; + top: 0px; + font-size: 35pt; + transform: rotate(45deg); + background-color: transparent; + cursor: pointer; + outline: none; +} +#signup .close:hover{ + color: #ff4700; +} +#signup .signupinfo{ + display: flex; + flex-wrap: wrap; + text-align: center; +} +#signup .col{ + width: 50%; + padding: 0 50px; +} +#signup h2{ + font-family: "Times New Roman"; + display: inline-block; + margin: 20px 0 10px 40px; + padding-bottom: 10px; + border-bottom: 5px solid #000; + font-weight: 900; +} +#signup label{ + display: block; + font-weight: bold; + font-size: 13pt; + margin-top: 5px; + cursor: pointer; +} +#signup input{ + display: inline-block; + width: 250px; + border: 1px solid #ccc; + padding-left: 5px; + height: 40px; + line-height: 40px; + font-size: 13pt; + outline: none; +} +#signup input:focus{ + border: 1px solid #ff4700; +} +#signup div[id*="error"]{ + width: 100%; + background-color: #f2dede; + border: 1px solid #ebccd1; + color: #a94442; + font-weight: bold; + margin: 5px auto 0; + padding: 5px; + display: none; + cursor: default; +} +#signup #btnsignup{ + display: block; + background-color: #ff4700; + width: 200px; + height: 40px; + border: 3px solid #ff4700; + margin: 50px auto 0; + font-size: 20pt; + line-height: 30px; + color: white; + border-radius: 999px; + cursor: pointer; + outline: none; + box-shadow: 2px 2px 10px 0 rgba(0,0,0,.7); +} +#signup p{ + margin-top: 50px; + text-align: center; +} +#signup p a{ + text-decoration: none; + color: #ff4700 !important; + font-weight: bold; +} +#signup #btnsignup:hover{ + background-color: #fff; + color: #ff4700; +} +#signup #btnsignup:active{ + box-shadow: none; +} +/*customalert*/ +#customalert { + visibility: hidden; + min-width: 250px; + color: #fff; + font-size: 14pt; + text-align: center; + border-radius: 2px; + padding: 20px; + position: fixed; + z-index: 100; + left: 50%; + top: 30px; + transform: translateX(-50%); +} +#customalert.show { + visibility: visible; + animation: fadein 0.5s, fadeout 0.5s 3s; +} +/*animation*/ +@keyframes fadein { + from {top: 0; opacity: 0;} + to {top: 30px; opacity: 1;} +} +@keyframes fadeout { + from {top: 30px; opacity: 1;} + to {top: 0; opacity: 0;} +} +@keyframes topdown{ + 0% {transform: translateY(-800px)} + 100% {transform: translateY(0)} +} +@keyframes bottomup{ + 0% {transform: translateY(25px)} + 100% {transform: translateY(0)} +} +@keyframes righttop{ + 0% { + transform: scale(0); + transform-origin: 100% 0%; + } + 100% { + transform: scale(1); + transform-origin: 100% 0%; + } +} +@keyframes rightleft{ + 0% { + right: -500px; + } + 100% { + right: 0; + } +} +@media screen and (max-width: 600px) { + .container{ + width: 100%; + margin: 0 auto; + } + /*Navigation*/ + #nav .topnav{ + display: flex; + justify-content: center; + } + #nav .topnav .right{ + margin-left: 0; + } + /*User*/ + #login{ + width: 100%; + height: 100%; + margin: 0; + } + #signup{ + width: 100%; + height: 100%; + margin: 0; + overflow-y: auto; + } + #signup .signupinfo{ + flex-direction: column; + align-items: center; + } + #signup .col{ + width: auto; + padding: 0; + } +} + +@media screen and (min-width: 601px) and (max-width: 900px){ + .container{ + width: 95%; + margin: 0 auto; + } + /*Navigation*/ + #nav .topnav{ + justify-content: center; + height: 40px; + } + #nav .topnav .right{ + margin-left: 0; + } + /*User*/ + .modal{ + height: 100%; + width: 100%; + background-color: rgba(0,0,0,0.6); + position: fixed; + top:0; + left: 0; + display: none; + z-index: 10; + } + #signup{ + width: 450px; + background-color: #fff; + margin: 30px auto 0; + } + #signup .signupinfo{ + flex-direction: column; + } + #signup .col{ + align-self: center; + width: auto; + padding: 0; + } +} +@media screen and (min-width: 901px) and (max-width: 1200px){ + .container{ + width: 90%; + } + /*Navigation*/ + #nav .botnav{ + display: flex; + height: 60px; + } + #nav .botnav .logo img{ + height: 60px; + } } \ No newline at end of file diff --git a/index.html b/index.html index 7a056c4..b025fc9 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,6 @@ - @@ -70,13 +69,14 @@

Shop Hoàn Hảo PC

-