Gitlab@Informatics
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
project-melon
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
65160388
project-melon
Merge requests
!5
Master
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Master
master
into
main
Overview
0
Commits
2
Pipelines
0
Changes
4
Merged
Master
65160388
requested to merge
master
into
main
4 months ago
Overview
0
Commits
2
Pipelines
0
Changes
4
0
0
Merge request reports
Viewing commit
37c6046c
Prev
Next
Show latest version
4 files
+
75
−
93
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
37c6046c
.2
· 37c6046c
65160388
authored
4 months ago
views/partials/header.ejs
+
20
−
28
View file @ 37c6046c
Edit in single-file editor
Open in Web IDE
Show full file
@@ -4,23 +4,12 @@
<meta
charset=
"UTF-8"
>
<title>
PURIPAT
</title>
<link
rel=
"stylesheet"
href=
"https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
>
<!-- เพิ่ม Favicon -->
<link
rel=
"icon"
href=
"path/to/your/favicon.ico"
type=
"image/x-icon"
>
<link
rel=
"icon"
href=
"/favicon.ico"
type=
"image/x-icon"
>
<style>
/* ปรับ Navbar ให้เป็นสีส้ม Shopee */
.navbar
{
background-color
:
#EE4D2D
!important
;
/* สีส้ม Shopee */
}
/* ตัวหนังสือบน Navbar ให้เป็นสีขาว */
.navbar-brand
,
.nav-link
{
color
:
#fff
!important
;
}
.navbar-brand
:hover
,
.nav-link
:hover
{
color
:
#FFD2C3
!important
;
/* สีส้มอ่อนลงเมื่อ hover */
}
/* ปรับฟอร์มค้นหาให้สวยงาม */
.navbar
{
background-color
:
#EE4D2D
!important
;
}
.navbar-brand
,
.nav-link
{
color
:
#fff
!important
;
}
.navbar-brand
:hover
,
.nav-link
:hover
{
color
:
#FFD2C3
!important
;
}
.search-form
{
width
:
500px
;
margin-left
:
auto
;
@@ -34,7 +23,6 @@
.search-form
.input-group-append
.btn
{
background-color
:
#FF7043
;
color
:
white
;
/* border-radius: 50px; */
border
:
none
;
padding-left
:
20px
;
padding-right
:
20px
;
@@ -45,23 +33,28 @@
</style>
</head>
<body>
<
%
//
ถ้าไม่มีการส่ง
username
เข้ามา
ให้เป็น
'
Guest
'
var
localUsername =
(typeof
username
!==
'
undefined
'
&&
username
)
?
username
:
'
Guest
';
//
ถ้าไม่มี
query
ส่งเข้ามา
ให้เป็นค่าว่าง
var
localQuery =
(typeof
query
!==
'
undefined
')
?
query
:
'';
//
ถ้าไม่มี
currentPage
ส่งเข้ามา
ให้กำหนดเป็น
''
var
currentPageVal =
(typeof
currentPage
!==
'
undefined
')
?
currentPage
:
'';
%
>
<nav
class=
"navbar navbar-expand-lg navbar-dark"
>
<!-- ชื่อโปรเจกต์ -->
<a
class=
"navbar-brand"
href=
"/dashboard"
>
TONGBARN
</a>
<!-- ปุ่ม toggle สำหรับ mobile -->
<button
class=
"navbar-toggler"
type=
"button"
data-toggle=
"collapse"
data-target=
"#navbarContent"
aria-controls=
"navbarContent"
aria-expanded=
"false"
aria-label=
"Toggle navigation"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<!-- ฟอร์ม Search จะปรากฏเฉพาะเมื่อผู้ใช้เข้าสู่ระบบ -->
<div
class=
"collapse navbar-collapse"
id=
"navbarContent"
>
<
%
if
(
typeof
usernam
e
!
==
'
undefined
')
{
%
>
<!-- แสดงฟอร์มค้นหาสำหรับผู้ใช้ที่ล็อกอินแล้ว --
>
<
!-- แสดงฟอร์มค้นหาเฉพาะเมื่อ currentPag
e ==
=
'
dashboard' --
>
<
%
if
(currentPageVal =
==
'
dashboard
')
{
%
>
<form
action=
"/dashboard"
method=
"GET"
class=
"search-form d-flex"
>
<div
class=
"input-group"
>
<input
type=
"text"
name=
"q"
class=
"form-control"
placeholder=
"Search for threads now..."
value=
"<%=
typeof query !== 'undefined' ? query : ''
%>"
>
value=
"<%=
localQuery
%>"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-outline-secondary"
type=
"submit"
>
Search
</button>
</div>
@@ -69,12 +62,11 @@
</form>
<
%
}
%
>
<!-- เมนู Navbar -->
<ul
class=
"navbar-nav ml-auto"
>
<
%
if
(
typeof
username
!==
'
undefined
')
{
%
>
<
li
class=
"nav-
item"
>
<a
class=
"nav-link"
href=
"#"
>
Welcome,
<
%=
username
%
></a
>
</li
>
<
li
class=
"nav-item"
>
<
a
class=
"nav-
link"
href=
"#"
>
Welcome,
<
%=
localUsername
%
></a
>
</li
>
<
%
if
(
localUsername
!==
'
Guest
')
{
%
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"/logout"
>
Logout
</a>
</li>
Loading