Revert "fix footer placement"

This reverts commit 34e3c65861.
This commit is contained in:
tom
2023-04-26 14:31:11 -03:00
parent 5777dc2127
commit 35262bb245
11 changed files with 17 additions and 14 deletions
+2 -7
View File
@@ -60,14 +60,9 @@ const Page = ({
) : children;
return (
<Flex w="100%" minH="100vh" alignItems="flex-start">
<Flex w="100%" minH="100vh" alignItems="stretch">
<NavigationDesktop/>
<Flex
flexDir="column"
flexGrow={ 1 } w={{ base: '100%', lg: 'auto' }}
borderLeft="1px solid"
borderColor="divider"
>
<Flex flexDir="column" flexGrow={ 1 } w={{ base: '100%', lg: 'auto' }}>
{ renderHeader ?
renderHeader() :
<Header isHomePage={ isHomePage }/>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

+10 -2
View File
@@ -20,10 +20,18 @@ const VERSION_URL = `https://github.com/blockscout/blockscout/tree/${ appConfig.
interface Props {
isCollapsed?: boolean;
hasAccount?: boolean;
}
const NavFooter = ({ isCollapsed }: Props) => {
const NavFooter = ({ isCollapsed, hasAccount }: Props) => {
const isExpanded = isCollapsed === false;
const marginTop = (() => {
if (!hasAccount) {
return 'auto';
}
return { base: 6, lg: 20 };
})();
return (
<VStack
@@ -31,7 +39,7 @@ const NavFooter = ({ isCollapsed }: Props) => {
borderTop="1px solid"
borderColor="divider"
width={{ base: '100%', lg: isExpanded ? '180px' : '20px', xl: isCollapsed ? '20px' : '180px' }}
marginTop="auto"
marginTop={ marginTop }
alignItems="flex-start"
alignSelf="center"
color="gray.500"
+4 -3
View File
@@ -54,9 +54,10 @@ const NavigationDesktop = () => {
position="relative"
flexDirection="column"
alignItems="stretch"
borderRight="1px solid"
borderColor="divider"
px={{ lg: isExpanded ? 6 : 4, xl: isCollapsed ? 4 : 6 }}
py={ 12 }
minH="100vh"
width={{ lg: isExpanded ? '229px' : '92px', xl: isCollapsed ? '92px' : '229px' }}
{ ...getDefaultTransitionProps({ transitionProperty: 'width, padding' }) }
>
@@ -90,13 +91,13 @@ const NavigationDesktop = () => {
</VStack>
</Box>
{ hasAccount && (
<Box as="nav" borderTopWidth="1px" borderColor="divider" w="100%" mt={ 6 } pt={ 6 } mb={ 20 }>
<Box as="nav" borderTopWidth="1px" borderColor="divider" w="100%" mt={ 6 } pt={ 6 }>
<VStack as="ul" spacing="1" alignItems="flex-start">
{ accountNavItems.map((item) => <NavLink key={ item.text } item={ item } isCollapsed={ isCollapsed }/>) }
</VStack>
</Box>
) }
<NavFooter isCollapsed={ isCollapsed }/>
<NavFooter isCollapsed={ isCollapsed } hasAccount={ hasAccount }/>
<Icon
as={ chevronIcon }
width={ 6 }
+1 -2
View File
@@ -71,7 +71,6 @@ const NavigationMobile = () => {
<Box
as="nav"
mt={ 6 }
mb={ 6 }
pt={ 6 }
borderTopWidth="1px"
borderColor="divider"
@@ -81,7 +80,7 @@ const NavigationMobile = () => {
</VStack>
</Box>
) }
<NavFooter/>
<NavFooter hasAccount={ hasAccount }/>
</Box>
{ openedGroupIndex >= 0 && (
<Box
Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB