From 6d33ef88aaa07860f2b3a0e02ac56ac29c5b294e Mon Sep 17 00:00:00 2001 From: Aden Lindsay Date: Mon, 7 Sep 2026 10:39:10 +0930 Subject: [PATCH] chore: squash down to 3.7.3 --- package.json | 2 +- src/css/injected/sidebar-position.scss | 133 ++++++++++++++++++ .../components/SidebarAppearance.svelte | 21 +++ .../pages/settings/sections/appearance.svelte | 2 +- src/seqta/ui/sidebar/sidebarStyles.ts | 21 ++- src/seqta/utils/Openers/whatsNewChangelog.ts | 7 +- src/seqta/utils/defaultSettings.ts | 1 + src/types/storage.ts | 2 + 8 files changed, 180 insertions(+), 9 deletions(-) create mode 100644 src/css/injected/sidebar-position.scss diff --git a/package.json b/package.json index 7a7f4cae..ab671dd7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "betterseqtaplus", - "version": "3.7.4", + "version": "3.7.3", "type": "module", "description": "Enhance SEQTA Learn's usability and aesthetics! A fork of BetterSEQTA to continue development and add heaps more features!", "browserslist": "> 0.5%, last 2 versions, not dead", diff --git a/src/css/injected/sidebar-position.scss b/src/css/injected/sidebar-position.scss new file mode 100644 index 00000000..5b385ccd --- /dev/null +++ b/src/css/injected/sidebar-position.scss @@ -0,0 +1,133 @@ +/* Sidebar on the right edge — layout, drill direction, and mirrored accents. */ + +body.bsplus-sidebar-right { + #menu { + left: auto !important; + right: 0 !important; + width: var(--bsplus-sidebar-width, 270px) !important; + overflow: visible !important; + } + + #content { + left: 0 !important; + right: var(--bsplus-sidebar-width, 270px) !important; + transition: + right 0.4s cubic-bezier(0.4, 0, 0.2, 1), + left 0.4s cubic-bezier(0.4, 0, 0.2, 1), + transform 0.4s ease !important; + } + + /* Sub panels open to the left of the menu — anchor to menu edge, not viewport. */ + #menu .sub { + left: auto !important; + right: 100% !important; + width: var(--bsplus-sidebar-width, 270px) !important; + } + + /* Title bar spans the full viewport; only page content respects sidebar inset. */ + #container #content #title, + #title { + left: 0 !important; + right: 0 !important; + width: 100% !important; + max-width: none !important; + } + + &.icon-only-sidebar:not(:has(#menu li.hasChildren:is(.active, .bsplus-active))) { + #menu { + width: 70px !important; + } + + #content { + right: 70px !important; + } + + #menu .sub { + right: 100% !important; + width: var(--bsplus-sidebar-width, 270px) !important; + } + } + + &:has(#menu.bsplus-styled-sidebar) #container #content #title, + &.menuShown:has(#menu.bsplus-styled-sidebar) #container #content #title { + box-shadow: -6px 0 8px -4px rgb(0 0 0 / 0.25) !important; + } + + #menu.bsplus-styled-sidebar { + &.bsplus-sidebar-indicator-bar:not(.bsplus-sidebar-style-strip) { + > ul > li.item.active:not(.hasChildren)::after, + .sub li.item.active:not(.hasChildren)::after { + left: auto !important; + right: 0 !important; + } + } + + &.bsplus-sidebar-style-strip { + > ul > li.item.active:not(.hasChildren)::after, + .sub li.item.active:not(.hasChildren)::after { + left: auto !important; + right: 0 !important; + } + } + } + + #menu li:is(.active, .hasChildren.bsplus-active) > .sub > ul > .item:not(.hasChildren)::before { + left: auto !important; + right: 0 !important; + border-radius: 0 8px 8px 0 !important; + } +} + +@media (max-width: 900px) { + body.bsplus-sidebar-right { + #menu { + left: auto !important; + right: 0 !important; + transform: translateX(var(--bsplus-sidebar-width, 270px)) !important; + } + + &.menuShown #menu { + transform: translateX(0) !important; + } + + #content { + left: 0 !important; + right: 0 !important; + } + + &.menuShown #content { + transform: translateX(calc(-1 * var(--bsplus-sidebar-width, 270px))) !important; + } + + &.icon-only-sidebar:not(:has(#menu li.hasChildren:is(.active, .bsplus-active))) { + #menu { + transform: translateX(70px) !important; + } + + &.menuShown #content { + transform: translateX(-70px) !important; + } + } + + #menuToggle { + left: auto !important; + right: 8px !important; + } + + #container #content #title, + #title { + left: 0 !important; + right: 0 !important; + width: 100% !important; + } + + /* Counter `#content` slide so the fixed title stays viewport-wide. */ + &.menuShown #container #content #title { + transform: translateX(var(--bsplus-sidebar-width, 270px)) !important; + } + + &.icon-only-sidebar.menuShown #container #content #title { + transform: translateX(70px) !important; + } + } +} diff --git a/src/interface/components/SidebarAppearance.svelte b/src/interface/components/SidebarAppearance.svelte index 77f40f0f..7cc1d0e0 100644 --- a/src/interface/components/SidebarAppearance.svelte +++ b/src/interface/components/SidebarAppearance.svelte @@ -13,6 +13,7 @@ normalizeSidebarRadius, normalizeSidebarStyleId, normalizeSidebarWidth, + normalizeSidebarPosition, SIDEBAR_STYLES, type SidebarStyleId, } from "@/seqta/ui/sidebar/sidebarStyles"; @@ -36,6 +37,9 @@ normalizeSidebarIndicator($settingsState.sidebarActiveIndicator), ); const width = $derived(normalizeSidebarWidth($settingsState.sidebarWidth)); + const position = $derived( + normalizeSidebarPosition($settingsState.sidebarPosition), + ); const radius = $derived( normalizeSidebarRadius( $settingsState.sidebarCornerRadius ?? DEFAULT_SIDEBAR_RADIUS, @@ -170,6 +174,23 @@ +
+
+

Sidebar Position

+

Which edge of the screen the navigation sits on

+
+
+