Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit ed936fff authored by 65160394's avatar 65160394
Browse files

Project Round 7

parent 1fc9f413
No related branches found
No related tags found
No related merge requests found
......@@ -42,17 +42,9 @@ nav a:hover {
background: rgba(255, 255, 255, 0.5);
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
background-color: #4c4cd9;
color: white;
}
.login-btn {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
background-color: transparent;
......
......@@ -12,25 +12,19 @@
<header>
<h1>Welcome to JourneyHub</h1>
<nav>
<div class="header">
<% if (session.userId) { %>
<a href="/create" class="btn-create">Create Tour</a>
<% } %>
<form action="/search" method="GET" class="search-container">
<input type="text" name="query" placeholder="Search for tours..." required>
<button type="submit">Search</button>
</form>
<div class="navbar">
<% if (session && session.userId) { %>
<a><%= session.userName %></a>
<% if (session && session.userId) { %> <!-- ตรวจสอบว่า userId อยู่ใน session หรือไม่ -->
<a><%= session.userName %></a> <!-- แสดงชื่อผู้ใช้ -->
<a href="/logout">Logout</a>
<% } else { %>
<a href="/login" class="login-btn">Login</a>
<a href="/login" class="login-btn">Login</a> <!-- ถ้ายังไม่ได้ login -->
<% } %>
</div>
</div>
</nav>
</header>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment