Fix sidebar alignment

This commit is contained in:
Eric Bailey
2024-12-02 18:11:20 -06:00
parent 0bd55e2562
commit d53b8e58ce
2 changed files with 28 additions and 4 deletions
+17 -1
View File
@@ -322,6 +322,7 @@ export function DesktopLeftNav() {
<View
role="navigation"
style={[
a.px_xl,
styles.leftNav,
isTablet && styles.leftNavTablet,
pal.view,
@@ -479,7 +480,19 @@ const styles = StyleSheet.create({
position: 'fixed',
top: 10,
// @ts-ignore web only
left: 'calc(50vw - 300px - 220px - 20px)',
left: '50%',
transform: [
{
translateX: -300,
},
{
translateX: '-100%',
},
{
// @ts-ignore web only -esb
translateX: 'var(--scrollbar-offset-negative, 0px)',
},
],
width: 220,
// @ts-ignore web only
maxHeight: 'calc(100vh - 10px)',
@@ -492,7 +505,10 @@ const styles = StyleSheet.create({
borderRightWidth: 1,
height: '100%',
width: 76,
paddingLeft: 0,
paddingRight: 0,
alignItems: 'center',
transform: [],
},
profileCard: {
+11 -3
View File
@@ -28,7 +28,7 @@ export function DesktopRightNav({routeName}: {routeName: string}) {
}
return (
<View style={[styles.rightNav, pal.view]}>
<View style={[a.px_xl, styles.rightNav, pal.view]}>
<View style={{paddingVertical: 20}}>
{routeName === 'Search' ? (
<View style={{marginBottom: 18}}>
@@ -122,8 +122,16 @@ const styles = StyleSheet.create({
// @ts-ignore web only
position: 'fixed',
// @ts-ignore web only
left: 'calc(50vw + 300px + 20px)',
width: 300,
left: '50%',
transform: [
{
translateX: 300,
},
{
// @ts-ignore web only -esb
translateX: 'var(--scrollbar-offset-negative, 0px)',
},
],
maxHeight: '100%',
overflowY: 'auto',
},