|
34 | 34 | })(); |
35 | 35 | </script> |
36 | 36 |
|
| 37 | + <!-- Critical CSS for immediate theme application --> |
| 38 | + <style> |
| 39 | + :root { |
| 40 | + /* Light theme colors */ |
| 41 | + --bg-primary: #ffffff; |
| 42 | + --bg-secondary: #f8f9fa; |
| 43 | + --text-primary: #212529; |
| 44 | + --text-secondary: #6c757d; |
| 45 | + --navbar-bg: #ffffff; |
| 46 | + --navbar-text: #212529; |
| 47 | + } |
| 48 | + |
| 49 | + /* Dark theme colors */ |
| 50 | + html[data-theme="dark"], |
| 51 | + html[data-theme-resolved="dark"] { |
| 52 | + --bg-primary: #1a1a1a; |
| 53 | + --bg-secondary: #2d3748; |
| 54 | + --text-primary: #f7fafc; |
| 55 | + --text-secondary: #cbd5e0; |
| 56 | + --navbar-bg: #1a1a1a; |
| 57 | + --navbar-text: #f7fafc; |
| 58 | + } |
| 59 | + |
| 60 | + /* Immediate body styling */ |
| 61 | + body { |
| 62 | + background-color: var(--bg-primary); |
| 63 | + color: var(--text-primary); |
| 64 | + margin: 0; |
| 65 | + transition: background-color 0.3s ease, color 0.3s ease; |
| 66 | + } |
| 67 | + |
| 68 | + /* Immediate navbar styling */ |
| 69 | + .navbar { |
| 70 | + background-color: var(--navbar-bg) !important; |
| 71 | + color: var(--navbar-text) !important; |
| 72 | + } |
| 73 | + .navbar.navbar-light { |
| 74 | + background-color: var(--navbar-bg) !important; |
| 75 | + } |
| 76 | + .navbar.bg-white { |
| 77 | + background-color: var(--navbar-bg) !important; |
| 78 | + } |
| 79 | + .navbar .navbar-brand, |
| 80 | + .navbar .nav-link { |
| 81 | + color: var(--navbar-text) !important; |
| 82 | + } |
| 83 | + </style> |
| 84 | + |
37 | 85 | <!-- Feeds and Sitemap --> |
38 | 86 | <link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.xml" /> |
39 | 87 | <link rel="alternate" type="application/rss+xml" title="Latest Tips" href="/feed.rss" /> |
|
0 commit comments