From 0746b6691f35a6ffff44b84ffc6d20d213767306 Mon Sep 17 00:00:00 2001
From: Atiwit Pattanapukdee <65160394@go.buu.ac.th>
Date: Wed, 19 Mar 2025 15:23:10 +0700
Subject: [PATCH] Project Round 7

---
 public/css/styles.css | 7 +++----
 views/index.ejs       | 4 +---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/public/css/styles.css b/public/css/styles.css
index e23cb11..e6c2fae 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 4fb1c50..4c00214 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>
-- 
GitLab