steake commited on
Commit
145f4ca
·
verified ·
1 Parent(s): 8d56b04

Color scheme in dark is not good. make it more classsy and classic. Where is light mode add this and a toggle in menu bar.

Browse files
Files changed (5) hide show
  1. components/footer.js +3 -4
  2. components/navbar.js +3 -4
  3. index.html +24 -24
  4. script.js +14 -0
  5. style.css +21 -7
components/footer.js CHANGED
@@ -28,12 +28,11 @@ class CustomFooter extends HTMLElement {
28
  margin-bottom: 1.5rem;
29
  display: block;
30
  }
31
-
32
  .footer-logo span {
33
- color: #10b981;
 
34
  }
35
-
36
- .footer-description {
37
  font-size: 0.9rem;
38
  line-height: 1.6;
39
  margin-bottom: 1.5rem;
 
28
  margin-bottom: 1.5rem;
29
  display: block;
30
  }
 
31
  .footer-logo span {
32
+ color: var(--gold-dark);
33
+ transition: color 0.3s ease;
34
  }
35
+ .footer-description {
 
36
  font-size: 0.9rem;
37
  line-height: 1.6;
38
  margin-bottom: 1.5rem;
components/navbar.js CHANGED
@@ -33,12 +33,11 @@ class CustomNavbar extends HTMLElement {
33
  color: white;
34
  text-decoration: none;
35
  }
36
-
37
  .logo span {
38
- color: #10b981;
 
39
  }
40
-
41
- .nav-links {
42
  display: flex;
43
  gap: 2rem;
44
  }
 
33
  color: white;
34
  text-decoration: none;
35
  }
 
36
  .logo span {
37
+ color: var(--gold-dark);
38
+ transition: color 0.3s ease;
39
  }
40
+ .nav-links {
 
41
  display: flex;
42
  gap: 2rem;
43
  }
index.html CHANGED
@@ -9,40 +9,40 @@
9
  <script src="https://cdn.tailwindcss.com"></script>
10
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
  <script src="https://unpkg.com/feather-icons"></script>
12
- <script>
13
  tailwind.config = {
14
  darkMode: 'class',
15
  theme: {
16
  extend: {
17
  colors: {
18
  primary: {
19
- 50: '#f8fafc',
20
- 100: '#f1f5f9',
21
- 200: '#e2e8f0',
22
- 300: '#cbd5e1',
23
- 400: '#94a3b8',
24
- 500: '#64748b',
25
- 600: '#475569',
26
- 700: '#334155',
27
- 800: '#1e293b',
28
- 900: '#0f172a',
29
  },
30
  secondary: {
31
- 50: '#ecfdf5',
32
- 100: '#d1fae5',
33
- 200: '#a7f3d0',
34
- 300: '#6ee7b7',
35
- 400: '#34d399',
36
- 500: '#10b981',
37
- 600: '#059669',
38
- 700: '#047857',
39
- 800: '#065f46',
40
- 900: '#064e3b',
41
  },
42
  accent: {
43
- 500: '#10b981',
44
- 600: '#059669',
45
- 700: '#047857',
46
  }
47
  }
48
  }
 
9
  <script src="https://cdn.tailwindcss.com"></script>
10
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
  <script src="https://unpkg.com/feather-icons"></script>
12
+ <script>
13
  tailwind.config = {
14
  darkMode: 'class',
15
  theme: {
16
  extend: {
17
  colors: {
18
  primary: {
19
+ 50: '#f9f5f0',
20
+ 100: '#f0e6d8',
21
+ 200: '#e8d8c0',
22
+ 300: '#d8c8a8',
23
+ 400: '#c0b090',
24
+ 500: '#a89878',
25
+ 600: '#908060',
26
+ 700: '#786848',
27
+ 800: '#605030',
28
+ 900: '#483820',
29
  },
30
  secondary: {
31
+ 50: '#f5f0e6',
32
+ 100: '#e6d8c0',
33
+ 200: '#d8c8a8',
34
+ 300: '#c0b090',
35
+ 400: '#a89878',
36
+ 500: '#c19a6b',
37
+ 600: '#a08050',
38
+ 700: '#806040',
39
+ 800: '#604830',
40
+ 900: '#403020',
41
  },
42
  accent: {
43
+ 500: '#c19a6b',
44
+ 600: '#a08050',
45
+ 700: '#806040',
46
  }
47
  }
48
  }
script.js CHANGED
@@ -18,6 +18,7 @@ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
18
  // Dark/Light mode toggle
19
  function toggleDarkMode() {
20
  const isDark = document.documentElement.classList.toggle('dark');
 
21
  localStorage.setItem('darkMode', isDark);
22
  updateModeIcon(isDark);
23
  }
@@ -36,13 +37,26 @@ const storedMode = localStorage.getItem('darkMode');
36
 
37
  if (storedMode === null) {
38
  document.documentElement.classList.toggle('dark', prefersDark);
 
39
  localStorage.setItem('darkMode', prefersDark);
40
  } else if (storedMode === 'false') {
41
  document.documentElement.classList.remove('dark');
 
 
 
 
42
  }
43
 
44
  // Update icon on load
45
  updateModeIcon(document.documentElement.classList.contains('dark'));
 
 
 
 
 
 
 
 
46
  // Intersection Observer for animations
47
  const observer = new IntersectionObserver((entries) => {
48
  entries.forEach(entry => {
 
18
  // Dark/Light mode toggle
19
  function toggleDarkMode() {
20
  const isDark = document.documentElement.classList.toggle('dark');
21
+ document.documentElement.classList.toggle('light', !isDark);
22
  localStorage.setItem('darkMode', isDark);
23
  updateModeIcon(isDark);
24
  }
 
37
 
38
  if (storedMode === null) {
39
  document.documentElement.classList.toggle('dark', prefersDark);
40
+ document.documentElement.classList.toggle('light', !prefersDark);
41
  localStorage.setItem('darkMode', prefersDark);
42
  } else if (storedMode === 'false') {
43
  document.documentElement.classList.remove('dark');
44
+ document.documentElement.classList.add('light');
45
+ } else {
46
+ document.documentElement.classList.add('dark');
47
+ document.documentElement.classList.remove('light');
48
  }
49
 
50
  // Update icon on load
51
  updateModeIcon(document.documentElement.classList.contains('dark'));
52
+
53
+ // Add event listener to mode toggle
54
+ document.addEventListener('DOMContentLoaded', () => {
55
+ const toggle = document.querySelector('#darkModeToggle');
56
+ if (toggle) {
57
+ toggle.addEventListener('click', toggleDarkMode);
58
+ }
59
+ });
60
  // Intersection Observer for animations
61
  const observer = new IntersectionObserver((entries) => {
62
  entries.forEach(entry => {
style.css CHANGED
@@ -4,13 +4,15 @@ html {
4
  scroll-behavior: smooth;
5
  }
6
  :root {
7
- --primary-light: #f8fafc;
8
- --secondary-light: #e2e8f0;
9
- --text-light: #1e293b;
10
- --primary-dark: #0f172a;
11
- --secondary-dark: #1e293b;
12
- --text-dark: #f8fafc;
13
- --accent-color: #10b981;
 
 
14
  }
15
 
16
  body {
@@ -23,6 +25,18 @@ body {
23
  background-color: var(--primary-dark);
24
  color: var(--text-dark);
25
  }
 
 
 
 
 
 
 
 
 
 
 
 
26
  h1, h2, h3, h4, .font-serif {
27
  font-family: 'Playfair Display', serif;
28
  }
 
4
  scroll-behavior: smooth;
5
  }
6
  :root {
7
+ --primary-light: #f9f5f0;
8
+ --secondary-light: #e8e0d7;
9
+ --text-light: #2a2118;
10
+ --primary-dark: #1a1a1a;
11
+ --secondary-dark: #2a2a2a;
12
+ --text-dark: #e8e0d7;
13
+ --accent-color: #c19a6b;
14
+ --gold-light: #d4af37;
15
+ --gold-dark: #c19a6b;
16
  }
17
 
18
  body {
 
25
  background-color: var(--primary-dark);
26
  color: var(--text-dark);
27
  }
28
+
29
+ .light .logo span,
30
+ .light .footer-logo span,
31
+ .light .text-secondary-500 {
32
+ color: var(--gold-light);
33
+ }
34
+
35
+ .dark .logo span,
36
+ .dark .footer-logo span,
37
+ .dark .text-secondary-500 {
38
+ color: var(--gold-dark);
39
+ }
40
  h1, h2, h3, h4, .font-serif {
41
  font-family: 'Playfair Display', serif;
42
  }