Gitlab@Informatics
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
65160394
Project
Commits
fa295ca4
Commit
fa295ca4
authored
4 months ago
by
65160394
Browse files
Options
Downloads
Patches
Plain Diff
Project Round 3
parent
f43cc5df
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
public/css/styles.css
+137
-129
137 additions, 129 deletions
public/css/styles.css
views/index.ejs
+10
-1
10 additions, 1 deletion
views/index.ejs
with
147 additions
and
130 deletions
public/css/styles.css
+
137
−
129
View file @
fa295ca4
/* General Body */
/* Reset styles */
*
{
margin
:
0
;
padding
:
0
;
box-sizing
:
border-box
;
}
body
{
font-family
:
'Arial'
,
sans-serif
;
background-color
:
#f4f
4f4
;
background-color
:
#f4f
7f6
;
color
:
#333
;
margin
:
0
;
padding
:
0
;
line-height
:
1.6
;
}
/* Header */
header
{
background-color
:
#
004d7a
;
background-color
:
#
4CAF50
;
color
:
white
;
padding
:
20px
;
padding
:
20px
0
;
text-align
:
center
;
box-shadow
:
0
2px
5px
rgba
(
0
,
0
,
0
,
0.1
);
}
header
h1
{
font-size
:
3rem
;
margin
:
0
;
font-size
:
2.5rem
;
margin-bottom
:
10px
;
}
nav
{
display
:
flex
;
justify-content
:
center
;
gap
:
20px
;
margin-top
:
15px
;
}
nav
a
{
color
:
white
;
margin
:
0
15px
;
text-decoration
:
none
;
font-size
:
1.1rem
;
padding
:
8px
16px
;
transition
:
background-color
0.3s
ease
;
}
nav
a
:hover
{
text-decoration
:
underline
;
background-color
:
#45a049
;
border-radius
:
5px
;
}
/* Tour Cards */
.tour-list
{
section
{
max-width
:
1200px
;
margin
:
30px
auto
;
padding
:
20px
;
background-color
:
#fff
;
border-radius
:
8px
;
box-shadow
:
0
4px
8px
rgba
(
0
,
0
,
0
,
0.1
);
}
.tour-card
{
background-color
:
white
;
border-radius
:
10px
;
box-shadow
:
0
4px
8px
rgba
(
0
,
0
,
0
,
0.1
);
margin
:
20px
;
overflow
:
hidden
;
section
h2
{
font-size
:
2rem
;
color
:
#333
;
margin-bottom
:
20px
;
text-align
:
center
;
}
.tour-card
img
{
width
:
100%
;
height
:
200px
;
object-fit
:
cover
;
ul
{
display
:
grid
;
grid-template-columns
:
repeat
(
auto-fill
,
minmax
(
250px
,
1fr
));
gap
:
20px
;
list-style
:
none
;
}
.tour-card-info
{
padding
:
15px
;
ul
li
{
background-color
:
#f9f9f9
;
padding
:
20px
;
border-radius
:
8px
;
box-shadow
:
0
4px
6px
rgba
(
0
,
0
,
0
,
0.1
);
transition
:
transform
0.3s
ease
,
box-shadow
0.3s
ease
;
}
.tour-card-info
h3
{
font-size
:
1.5rem
;
ul
li
:hover
{
transform
:
translateY
(
-10px
);
box-shadow
:
0
6px
12px
rgba
(
0
,
0
,
0
,
0.2
);
}
ul
li
a
{
font-size
:
1.2rem
;
color
:
#333
;
text-decoration
:
none
;
font-weight
:
bold
;
display
:
block
;
margin-bottom
:
10px
;
}
.tour-card-info
p
{
ul
li
span
{
font-size
:
1rem
;
color
:
#
666
;
color
:
#
4CAF50
;
}
.price
{
font-size
:
1.2rem
;
font-weight
:
bold
;
color
:
#004d7a
;
margin-top
:
10px
;
.btn-create
,
.btn-edit
{
display
:
inline-block
;
padding
:
10px
20px
;
background-color
:
#008CBA
;
color
:
white
;
text-decoration
:
none
;
border-radius
:
5px
;
margin-top
:
20px
;
font-size
:
1rem
;
transition
:
background-color
0.3s
ease
;
}
.btn-create
:hover
,
.btn-edit
:hover
{
background-color
:
#007bb5
;
}
/* Footer */
footer
{
background-color
:
#333
;
color
:
white
;
text-align
:
center
;
padding
:
15px
;
position
:
fixed
;
bottom
:
0
;
width
:
100%
;
}
/* login */
/* Login Form */
.login-form-container
{
width
:
100%
;
max-width
:
400px
;
margin
:
50px
auto
;
padding
:
20px
;
background-color
:
#fff
;
border-radius
:
10px
;
box-shadow
:
0
4px
10px
rgba
(
0
,
0
,
0
,
0.1
);
padding
:
20px
0
;
margin-top
:
40px
;
}
.login-form
{
display
:
flex
;
flex-direction
:
column
;
footer
p
{
font-size
:
1rem
;
}
.form-group
{
margin-bottom
:
15px
;
/* Mobile Responsive */
@media
(
max-width
:
768px
)
{
header
h1
{
font-size
:
2rem
;
}
label
{
font-size
:
1rem
;
color
:
#333
;
nav
{
flex-direction
:
column
;
}
input
[
type
=
"text"
],
input
[
type
=
"password"
]
{
padding
:
10px
;
margin-top
:
5px
;
nav
a
{
font-size
:
1rem
;
border
:
1px
solid
#ccc
;
border-radius
:
5px
;
padding
:
10px
;
}
button
{
background-color
:
#004d7a
;
color
:
white
;
padding
:
12px
;
border
:
none
;
border-radius
:
5px
;
font-size
:
1rem
;
cursor
:
pointer
;
section
{
margin
:
20px
;
}
button
:hover
{
background-color
:
#f0a500
;
ul
{
grid-template-columns
:
1fr
;
}
.error-message
{
color
:
red
;
font-size
:
0.9rem
;
margin-top
:
10px
;
text-align
:
center
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
views/index.ejs
+
10
−
1
View file @
fa295ca4
...
...
@@ -24,11 +24,20 @@
</header>
<section>
<h2>
Available Tours
</h2>
<!-- แสดงปุ่ม "Create Tour" สำหรับผู้ใช้ที่เข้าสู่ระบบแล้ว -->
<
%
if
(
session.userId
)
{
%
>
<a
href=
"/tour/create"
class=
"btn-create"
>
Create Tour
</a>
<
%
}
%
>
<ul>
<
%
tours.forEach(tour =
>
{
%
>
<li>
<a
href=
"/tour/<%= tour.id %>"
><
%=
tour.name
%
></a>
-
<
%=
tour.price
%
>
THB
<
%
if
(
session.userId
)
{
%
>
<!-- ตรวจสอบว่าเป็นผู้ใช้ที่ล็อกอินแล้วหรือไม่ -->
<a
href=
"/tour/edit/<%= tour.id %>"
class=
"btn-edit"
>
Edit
</a>
<!-- ปุ่มสำหรับแก้ไขทัวร์ -->
<
%
}
%
>
</li>
<
%
})
%
>
</ul>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment