diff --git a/public/css/styles.css b/public/css/styles.css index e23cb11a32cd2ef870546947fd4fb6d63e9783c5..e6c2fae06f10666f229cc621bb12b03524acff06 100644 --- a/public/css/styles.css +++ b/public/css/styles.css @@ -23,7 +23,7 @@ header { nav { display: flex; justify-content: center; - gap: 15px; + gap: 20px; margin-top: 10px; } @@ -43,11 +43,10 @@ nav a:hover { .header { display: flex; - flex-direction: column; + justify-content: space-between; align-items: center; - text-align: center; padding: 20px; - background-color: #4c4cd9; /* สีพื้นหลัง */ + background-color: #4c4cd9; color: white; } diff --git a/views/index.ejs b/views/index.ejs index 4fb1c50f701ffd63bef64835fbbe43c85c078b61..4c00214f9efb2fe99935e338c468dc5c7241daba 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -19,15 +19,13 @@ <input type="text" name="query" placeholder="Search for tours..." required> <button type="submit">Search</button> </form> - </nav> - <div class="header"> <% if (session && session.userId) { %> <!-- ตรวจสอบว่า userId อยู่ใน session หรือไม่ --> <a><%= session.userName %></a> <!-- แสดงชื่อผู้ใช้ --> <a href="/logout">Logout</a> <% } else { %> <a href="/login" class="login-btn">Login</a> <!-- ถ้ายังไม่ได้ login --> <% } %> - </div> + </nav> </header> <section>