Skip to content

Commit ec3b93a

Browse files
authored
Merge pull request #16 from csharpfritz/copilot/fix-15
2 parents 136de37 + 9bb5bb5 commit ec3b93a

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

Web/Pages/Shared/_Layout.cshtml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,54 @@
3434
})();
3535
</script>
3636

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+
3785
<!-- Feeds and Sitemap -->
3886
<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.xml" />
3987
<link rel="alternate" type="application/rss+xml" title="Latest Tips" href="/feed.rss" />

Web/appsettings.Development.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
"Default": "Information",
66
"Microsoft.AspNetCore": "Warning"
77
}
8+
},
9+
"ConnectionStrings": {
10+
"tables": "UseDevelopmentStorage=true"
811
}
912
}

0 commit comments

Comments
 (0)