Skip to content

Commit c24db89

Browse files
Update padding
1 parent 8ca36b7 commit c24db89

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

EssentialCSharp.Web/src/composables/useSiteShell.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ function readSidebarPreference() {
3535
return storedValue === "true";
3636
}
3737

38+
function isIdentityPath() {
39+
return window.location.pathname.toLowerCase().startsWith("/identity");
40+
}
41+
3842
function removeHashPath(path) {
3943
if (!path) {
4044
return null;
@@ -51,7 +55,8 @@ export function useSiteShell() {
5155
const nextPageUrl = ref(removeHashPath(window.NEXT_PAGE));
5256
const snackbarMessage = ref(null);
5357
const snackbarColor = ref(null);
54-
const sidebarShown = ref(readSidebarPreference());
58+
const identityPage = isIdentityPath();
59+
const sidebarShown = ref(identityPage ? false : readSidebarPreference());
5560
const enableTocFilter = ref("none");
5661
const searchQuery = ref("");
5762
const expandedTocs = reactive(new Set());
@@ -138,7 +143,9 @@ export function useSiteShell() {
138143

139144
function toggleSidebar() {
140145
sidebarShown.value = !sidebarShown.value;
141-
localStorage.setItem("sidebarShown", String(sidebarShown.value));
146+
if (!identityPage) {
147+
localStorage.setItem("sidebarShown", String(sidebarShown.value));
148+
}
142149
}
143150

144151
function normalizeString(value) {

EssentialCSharp.Web/wwwroot/css/chat-widget.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@
5151
}
5252
}
5353

54-
/* When sidebar is visible, adjust position */
55-
.layout.has-sidebar .chat-widget {
56-
right: calc(24px + 375px);
57-
}
58-
5954
/* Chat trigger button */
6055
.chat-button {
6156
background: linear-gradient(135deg, #1976d2 0%, #1565c0 50%, #0d47a1 100%);

0 commit comments

Comments
 (0)