diff --git a/EssentialCSharp.Web/Areas/Identity/Pages/Account/Manage/TwoFactorAuthentication.cshtml b/EssentialCSharp.Web/Areas/Identity/Pages/Account/Manage/TwoFactorAuthentication.cshtml index 7bf35e76..0fbc38d8 100644 --- a/EssentialCSharp.Web/Areas/Identity/Pages/Account/Manage/TwoFactorAuthentication.cshtml +++ b/EssentialCSharp.Web/Areas/Identity/Pages/Account/Manage/TwoFactorAuthentication.cshtml @@ -38,7 +38,7 @@ ViewData["ActivePage"] = ManageNavPages.TwoFactorAuthentication; if (Model.IsMachineRemembered) { -
+
} diff --git a/EssentialCSharp.Web/Areas/Identity/Pages/_PasswordStrengthMeter.cshtml b/EssentialCSharp.Web/Areas/Identity/Pages/_PasswordStrengthMeter.cshtml index 36e3095a..1b3e8ff5 100644 --- a/EssentialCSharp.Web/Areas/Identity/Pages/_PasswordStrengthMeter.cshtml +++ b/EssentialCSharp.Web/Areas/Identity/Pages/_PasswordStrengthMeter.cshtml @@ -17,10 +17,10 @@ data-user-input-fields="@Model.UserInputFieldIds" data-min-length="@EssentialCSharp.Web.Services.PasswordRequirementOptions.PasswordMinimumLength">
-
-
+
@@ -38,7 +38,7 @@
- Essential C Sharp Book + Essential C Sharp Book
@@ -70,4 +70,4 @@ - \ No newline at end of file + diff --git a/EssentialCSharp.Web/Views/Home/Guidelines.cshtml b/EssentialCSharp.Web/Views/Home/Guidelines.cshtml index cb2a4842..cd2e9aee 100644 --- a/EssentialCSharp.Web/Views/Home/Guidelines.cshtml +++ b/EssentialCSharp.Web/Views/Home/Guidelines.cshtml @@ -53,7 +53,7 @@ foreach (var guideline in group) {
- + @guideline.Guideline
} @@ -75,14 +75,14 @@ }; } - private string GetColorForType(GuidelineType type) + private string GetColorClassForType(GuidelineType type) { return type switch { - GuidelineType.DoNot => "#ff0000", - GuidelineType.Avoid => "#ff0000", - GuidelineType.Consider => "#7a7a7a", - GuidelineType.Do => "#63E6BE", + GuidelineType.DoNot => "guideline-color-do-not", + GuidelineType.Avoid => "guideline-color-avoid", + GuidelineType.Consider => "guideline-color-consider", + GuidelineType.Do => "guideline-color-do", _ => string.Empty, }; } diff --git a/EssentialCSharp.Web/Views/Home/Home.cshtml b/EssentialCSharp.Web/Views/Home/Home.cshtml index 5c96fb51..64539cb1 100644 --- a/EssentialCSharp.Web/Views/Home/Home.cshtml +++ b/EssentialCSharp.Web/Views/Home/Home.cshtml @@ -36,7 +36,7 @@
- Essential C Sharp Book + Essential C Sharp Book
diff --git a/EssentialCSharp.Web/Views/McpSetup/Index.cshtml b/EssentialCSharp.Web/Views/McpSetup/Index.cshtml index 8f027d09..460362df 100644 --- a/EssentialCSharp.Web/Views/McpSetup/Index.cshtml +++ b/EssentialCSharp.Web/Views/McpSetup/Index.cshtml @@ -9,7 +9,7 @@ bool isSignedIn = SignInManager.IsSignedIn(User); } -
+
@@ -267,7 +267,7 @@ @foreach (var tool in Model) {
- + @tool.Name @tool.Title @@ -380,17 +380,6 @@
@section Scripts { - diff --git a/EssentialCSharp.Web/wwwroot/css/styles.css b/EssentialCSharp.Web/wwwroot/css/styles.css index 302ef70a..8832d6c1 100644 --- a/EssentialCSharp.Web/wwwroot/css/styles.css +++ b/EssentialCSharp.Web/wwwroot/css/styles.css @@ -786,6 +786,80 @@ details > summary::-webkit-details-marker { padding-left: 1em; } +/* CSP inline-style replacements */ +.mcp-setup-container { + max-width: 900px; +} + +.mcp-tool-summary { + cursor: pointer; + list-style: none; +} + +.details-chevron { + display: inline-block; + transition: transform 0.2s ease; + color: var(--bs-secondary-color, #6c757d); + font-size: .75rem; +} + +details[open] > summary .details-chevron { + transform: rotate(90deg); +} + +.password-strength-progress { + height: 6px; +} + +.password-strength-bar-initial { + width: 0; +} + +.password-strength-width-20 { + width: 20%; +} + +.password-strength-width-40 { + width: 40%; +} + +.password-strength-width-60 { + width: 60%; +} + +.password-strength-width-80 { + width: 80%; +} + +.password-strength-width-100 { + width: 100%; +} + +.guideline-icon { + padding-right: 10px; +} + +.guideline-color-do-not, +.guideline-color-avoid { + color: #ff0000; +} + +.guideline-color-consider { + color: #7a7a7a; +} + +.guideline-color-do { + color: #63E6BE; +} + +.intellitect-logo-img { + height: 75px; +} + +.ecs-book-cover-img { + height: 450px; +} + /* Home Page Styles */ .quote { @@ -1079,6 +1153,7 @@ button.accept-policy { } /* Reduced motion support */ + @media (prefers-reduced-motion: reduce) { .captcha-modal-overlay, .captcha-modal-card { @@ -1093,3 +1168,105 @@ button.accept-policy { transform: none; } } + +/* Cookie consent banner */ +.consent-banner { + position: fixed; + bottom: 0; + left: 0; + right: 0; + background: #ffffff; + border-top: 3px solid #007bff; + box-shadow: 0 -4px 12px rgba(0,0,0,0.15); + z-index: 10000; + font-family: inherit; +} + +.consent-banner-content { + max-width: 1200px; + margin: 0 auto; + padding: 20px; + display: flex; + align-items: center; + justify-content: space-between; + gap: 20px; +} + +.consent-banner-text h3 { + margin: 0 0 8px 0; + font-size: 1.2rem; + color: #333; +} + +.consent-banner-text p { + margin: 0; + color: #666; + font-size: 0.95rem; +} + +.consent-banner-actions { + display: flex; + gap: 10px; + flex-wrap: wrap; +} + +.consent-details { + border-top: 1px solid #eee; + padding: 20px; + max-width: 1200px; + margin: 0 auto; +} + +.consent-details-hidden { + display: none; +} + +.consent-category { + margin-bottom: 20px; +} + +.consent-switch { + display: flex; + align-items: center; + gap: 15px; + cursor: pointer; + padding: 15px; + border: 1px solid #ddd; + border-radius: 8px; + background: #f8f9fa; +} + +.consent-switch input[type="checkbox"] { + width: 20px; + height: 20px; + margin: 0; +} + +.consent-info strong { + display: block; + margin-bottom: 5px; + color: #333; +} + +.consent-info p { + margin: 0; + color: #666; + font-size: 0.9rem; +} + +.consent-actions { + text-align: center; + margin-top: 20px; +} + +@media (max-width: 768px) { + .consent-banner-content { + flex-direction: column; + text-align: center; + } + + .consent-banner-actions { + justify-content: center; + width: 100%; + } +} diff --git a/EssentialCSharp.Web/wwwroot/js/consent-manager.js b/EssentialCSharp.Web/wwwroot/js/consent-manager.js index 0b755c80..f234c8e8 100644 --- a/EssentialCSharp.Web/wwwroot/js/consent-manager.js +++ b/EssentialCSharp.Web/wwwroot/js/consent-manager.js @@ -97,9 +97,6 @@ class ConsentManager { const banner = this.createConsentBanner(); document.body.appendChild(banner); - - // Add banner styles if not already added - this.addConsentStyles(); } createConsentBanner() { @@ -118,7 +115,7 @@ class ConsentManager {
-