Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
portfolio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QuanMB
portfolio
Commits
5e7c3a7e
Commit
5e7c3a7e
authored
Jun 30, 2026
by
QuanMB
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: default theme to light mode
parent
3da384e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
27 deletions
+27
-27
globals.css
src/app/globals.css
+19
-19
Navbar.tsx
src/components/Navbar/Navbar.tsx
+8
-8
No files found.
src/app/globals.css
View file @
5e7c3a7e
@import
"tailwindcss"
;
:root
{
/* Default Dark Mode Values */
--primary
:
#3b82f6
;
--primary-glow
:
rgba
(
59
,
130
,
246
,
0.1
);
--secondary
:
#8b5cf6
;
--bg
:
#0b0f19
;
--surface
:
#111827
;
--surface-border
:
rgba
(
255
,
255
,
255
,
0.05
);
--surface-hover-border
:
rgba
(
255
,
255
,
255
,
0.12
);
--text-primary
:
#f9fafb
;
--text-secondary
:
#94a3b8
;
--nav-bg
:
rgba
(
11
,
15
,
25
,
0.8
);
--nav-border
:
rgba
(
31
,
41
,
55
,
0.55
);
}
:root
.light
{
/* Light Mode Values */
/* Default Light Mode Values */
--primary
:
#2563eb
;
--primary-glow
:
rgba
(
37
,
99
,
235
,
0.08
);
--secondary
:
#7c3aed
;
...
...
@@ -30,6 +15,21 @@
--nav-border
:
rgba
(
0
,
0
,
0
,
0.06
);
}
:root
.dark
{
/* Dark Mode Values */
--primary
:
#3b82f6
;
--primary-glow
:
rgba
(
59
,
130
,
246
,
0.1
);
--secondary
:
#8b5cf6
;
--bg
:
#0b0f19
;
--surface
:
#111827
;
--surface-border
:
rgba
(
255
,
255
,
255
,
0.05
);
--surface-hover-border
:
rgba
(
255
,
255
,
255
,
0.12
);
--text-primary
:
#f9fafb
;
--text-secondary
:
#94a3b8
;
--nav-bg
:
rgba
(
11
,
15
,
25
,
0.8
);
--nav-border
:
rgba
(
31
,
41
,
55
,
0.55
);
}
@theme
{
--color-primary
:
var
(
--primary
);
--color-primary-glow
:
var
(
--primary-glow
);
...
...
@@ -92,11 +92,11 @@
@layer
base
{
html
{
scroll-behavior
:
smooth
;
color-scheme
:
dark
;
color-scheme
:
light
;
transition
:
color-scheme
0.3s
ease
;
}
html
.
light
{
color-scheme
:
light
;
html
.
dark
{
color-scheme
:
dark
;
}
body
{
...
...
src/components/Navbar/Navbar.tsx
View file @
5e7c3a7e
...
...
@@ -34,14 +34,14 @@ export default function Navbar() {
const
savedTheme
=
localStorage
.
getItem
(
"theme"
)
as
"dark"
|
"light"
|
null
;
if
(
savedTheme
)
{
setTheme
(
savedTheme
);
if
(
savedTheme
===
"
light
"
)
{
document
.
documentElement
.
classList
.
add
(
"
light
"
);
if
(
savedTheme
===
"
dark
"
)
{
document
.
documentElement
.
classList
.
add
(
"
dark
"
);
}
else
{
document
.
documentElement
.
classList
.
remove
(
"
light
"
);
document
.
documentElement
.
classList
.
remove
(
"
dark
"
);
}
}
else
{
setTheme
(
"
dark
"
);
document
.
documentElement
.
classList
.
remove
(
"
light
"
);
setTheme
(
"
light
"
);
document
.
documentElement
.
classList
.
remove
(
"
dark
"
);
}
},
[]);
...
...
@@ -77,10 +77,10 @@ export default function Navbar() {
const
nextTheme
=
theme
===
"dark"
?
"light"
:
"dark"
;
setTheme
(
nextTheme
);
localStorage
.
setItem
(
"theme"
,
nextTheme
);
if
(
nextTheme
===
"
light
"
)
{
document
.
documentElement
.
classList
.
add
(
"
light
"
);
if
(
nextTheme
===
"
dark
"
)
{
document
.
documentElement
.
classList
.
add
(
"
dark
"
);
}
else
{
document
.
documentElement
.
classList
.
remove
(
"
light
"
);
document
.
documentElement
.
classList
.
remove
(
"
dark
"
);
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment