Skip to content

Commit

Permalink
fix: color
Browse files Browse the repository at this point in the history
  • Loading branch information
dewanakl committed Oct 7, 2024
1 parent ebae23d commit 37ffa48
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Dashboard Ulems">
<meta name="theme-color" content="#111111">
<meta name="color-scheme" content="light">
<meta name="color-scheme" content="dark light">
<link rel="canonical" href="https://ulems.my.id/">
<link rel="shortcut icon" type="image/x-icon" href="https://ulems.my.id/favicon.ico">
<link rel="apple-touch-icon" sizes="192x192" href="https://ulems.my.id/assets/images/icon-192x192.png">
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-title" content="Website Undangan Pernikahan Wahyu dan Riski Secara Online">
<meta name="theme-color" content="#111111">
<meta name="color-scheme" content="dark">
<meta name="color-scheme" content="dark light">
<link rel="canonical" href="https://ulems.my.id/">
<link rel="shortcut icon" type="image/x-icon" href="https://ulems.my.id/favicon.ico">
<link rel="apple-touch-icon" sizes="192x192" href="https://ulems.my.id/assets/images/icon-192x192.png">
Expand Down
4 changes: 0 additions & 4 deletions js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ export const theme = (() => {
const onLight = () => {
theme.set('active', THEME_LIGHT);
document.documentElement.setAttribute('data-bs-theme', THEME_LIGHT);

// --bs-gray-100
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#f8f9fa');
document.querySelector('meta[name="color-scheme"]').setAttribute('content', THEME_LIGHT);

const elements = document.querySelectorAll('.text-light, .btn-theme-light, .bg-dark, .bg-black, .bg-theme-dark, .color-theme-black, .btn-outline-light, .bg-cover-black');
elements.forEach((element) => {
Expand Down Expand Up @@ -62,10 +60,8 @@ export const theme = (() => {
const onDark = () => {
theme.set('active', THEME_DARK);
document.documentElement.setAttribute('data-bs-theme', THEME_DARK);

// --bs-gray-800
document.querySelector('meta[name="theme-color"]').setAttribute('content', '#343a40');
document.querySelector('meta[name="color-scheme"]').setAttribute('content', THEME_DARK);

const elements = document.querySelectorAll('.text-dark, .btn-theme-dark, .bg-light, .bg-white, .bg-theme-light, .color-theme-white, .btn-outline-dark, .bg-cover-white');
elements.forEach((element) => {
Expand Down

0 comments on commit 37ffa48

Please sign in to comment.