diff --git a/controllers/tourController.js b/controllers/tourController.js index 3e742dfdc1cc53e6a7cb2b2afff8f1fd3a1db059..cc5b92b41e3dc4c8b322bac064785648f8ea8c63 100644 --- a/controllers/tourController.js +++ b/controllers/tourController.js @@ -80,7 +80,7 @@ exports.postLogin = async (req, res) => { exports.Logout = (req, res) => { req.session.destroy(() => { - res.redirect('/login'); + res.redirect('/'); }); }; diff --git a/public/css/login.css b/public/css/login.css new file mode 100644 index 0000000000000000000000000000000000000000..45a9227bcb50d74b8371df9438acdbf6fd487db6 --- /dev/null +++ b/public/css/login.css @@ -0,0 +1,96 @@ +/* Global Styles */ +body { + font-family: 'Arial', sans-serif; + background-color: #f0f2f5; + margin: 0; + padding: 0; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; +} + +.login-container { + background-color: #fff; + border-radius: 8px; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); + padding: 30px; + width: 100%; + max-width: 400px; + text-align: center; +} + +h2 { + font-size: 24px; + margin-bottom: 20px; + color: #333; +} + +/* Error Message Styling */ +.error-message { + background-color: #f8d7da; + color: #721c24; + padding: 10px; + border-radius: 5px; + margin-bottom: 15px; + font-size: 14px; +} + +/* Input Group */ +.input-group { + margin-bottom: 20px; + text-align: left; +} + +.input-group label { + font-size: 14px; + color: #666; + margin-bottom: 5px; + display: block; +} + +.input-group input { + width: 100%; + padding: 10px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 16px; + outline: none; + transition: border-color 0.3s ease; +} + +.input-group input:focus { + border-color: #007bff; +} + +/* Submit Button */ +button { + width: 100%; + padding: 12px; + background-color: #007bff; + color: white; + border: none; + border-radius: 5px; + font-size: 16px; + cursor: pointer; + transition: background-color 0.3s ease; +} + +button:hover { + background-color: #0056b3; +} + +/* Register Link */ +p { + font-size: 14px; + color: #666; +} + +a { + color: #007bff; + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} diff --git a/public/css/regis.css b/public/css/regis.css new file mode 100644 index 0000000000000000000000000000000000000000..b3d02376b80374420f3fcc2a283e7e950fc6cd3c --- /dev/null +++ b/public/css/regis.css @@ -0,0 +1,114 @@ +/* Global Styles */ +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background-color: #f7f9fc; + margin: 0; + padding: 0; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; +} + +.register-container { + background-color: #ffffff; + border-radius: 10px; + box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1); + padding: 40px; + width: 100%; + max-width: 420px; + text-align: center; + transition: transform 0.3s ease-in-out; +} + +.register-container:hover { + transform: translateY(-5px); +} + +h2 { + font-size: 28px; + color: #333; + margin-bottom: 20px; + font-weight: 600; +} + +/* Error Message Styling */ +.error-message { + background-color: #f8d7da; + color: #721c24; + padding: 12px; + border-radius: 5px; + margin-bottom: 20px; + font-size: 14px; + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); +} + +/* Input Group */ +.input-group { + margin-bottom: 25px; + text-align: left; + display: flex; + flex-direction: column; + align-items: flex-start; +} + +.input-group label { + font-size: 16px; + color: #666; + margin-bottom: 8px; +} + +.input-group input { + width: 100%; + padding: 14px; + border: 1px solid #ccc; + border-radius: 8px; + font-size: 16px; + outline: none; + transition: border-color 0.3s ease, box-shadow 0.3s ease; + background-color: #f7f9fc; +} + +.input-group input:focus { + border-color: #5c6bc0; + box-shadow: 0 0 10px rgba(92, 107, 192, 0.3); +} + +/* Submit Button */ +button { + width: 100%; + padding: 15px; + background-color: #5c6bc0; + color: white; + border: none; + border-radius: 8px; + font-size: 18px; + font-weight: 600; + cursor: pointer; + transition: background-color 0.3s ease, transform 0.2s ease; +} + +button:hover { + background-color: #3f4f8c; + transform: translateY(-2px); +} + +button:active { + transform: translateY(1px); +} + +/* Register Link */ +p { + font-size: 16px; + color: #777; +} + +a { + color: #5c6bc0; + text-decoration: none; + font-weight: 600; +} + +a:hover { + text-decoration: underline; +} diff --git a/public/css/style.css b/public/css/styles.css similarity index 100% rename from public/css/style.css rename to public/css/styles.css diff --git a/views/index.ejs b/views/index.ejs index 2076198accd80d8986f628cc047aa1965de679f9..2962118c65f4010fee28707eaaca04775a310c83 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Tour Website</title> - <link rel="stylesheet" href="/css/style.css"> + <link rel="stylesheet" href="/css/styles.css"> </head> <body> <header> diff --git a/views/login.ejs b/views/login.ejs index 96e215e0d81c5828969d992d933497701eeb045b..245b4851a4eb9a4e0a4f8bedeffc001040f94b60 100644 --- a/views/login.ejs +++ b/views/login.ejs @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Login</title> - <link rel="stylesheet" href="/styles.css"> + <link rel="stylesheet" href="/login.css"> </head> <body> <div class="login-container"> diff --git a/views/register.ejs b/views/register.ejs index b12cfe4acf0c1750fbbbf8d18906356aa8480178..93bdcb0f4dbcefa8d4c34fc6ec0a78df1817993c 100644 --- a/views/register.ejs +++ b/views/register.ejs @@ -4,7 +4,7 @@ <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Register</title> - <link rel="stylesheet" href="/styles.css"> + <link rel="stylesheet" href="/regis.css"> </head> <body> <div class="register-container">