Skip to content

Commit

Permalink
Hide tree logo (#467)
Browse files Browse the repository at this point in the history
* unrelated: fix close button position and other undefined style

* resolve #383 - main menu will be always open on bigger screen
  • Loading branch information
Matushl authored Nov 23, 2024
1 parent 2d8f928 commit 3e4b6a9
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 40 deletions.
8 changes: 7 additions & 1 deletion src/components/PageLayout/MenuMain/MenuMain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@ export const MenuMain: FC = () => {
<CloseButton
size={iconSize}
onClick={toggleMenu}
sx={{position: 'absolute', top: 24, left: {xs: undefined, md: 24}, right: {xs: 24, md: undefined}}}
sx={{
position: 'absolute',
top: 24,
left: {xs: 'auto', md: 24},
right: {xs: 24, md: 'auto'},
display: {xs: 'block', md: 'none'},
}}
/>
{menuItemsIsLoading && (
<Box sx={{position: 'absolute', top: '50%', left: 0, right: 0, color: 'white'}}>
Expand Down
16 changes: 0 additions & 16 deletions src/components/PageLayout/StromLogo/StromLogo.module.scss

This file was deleted.

10 changes: 0 additions & 10 deletions src/components/PageLayout/StromLogo/StromLogo.module.scss.d.ts

This file was deleted.

36 changes: 26 additions & 10 deletions src/components/PageLayout/StromLogo/StromLogo.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
import {FC, MouseEvent} from 'react'

import styles from './StromLogo.module.scss'

const handleClick = (e: MouseEvent<HTMLElement>) => {
console.log('Clicked')
}
import {Box} from '@mui/material'
import {FC} from 'react'

export const StromLogo: FC = () => {
return (
<div className={styles.container}>
<div className={styles.tree} onClick={handleClick} />
</div>
<Box
sx={{
position: 'fixed',
// tieto cisla su take dost ad-hoc, ale aj tak ten strom nebude vidno
top: {md: '204px', lg: '186px', xl: '222px'},
left: 0,
bottom: 0,
width: '25%',
paddingTop: 2,
zIndex: -1,
}}
>
<Box
sx={{
height: '100%',
width: '100%',
backgroundColor: 'black',
// toto je stary tomaskov stromcek
// clip-path: 'polygon(100% 0%, 100% 100%, 45% 100%, 96% 63%, 55% 63%, 96% 30%, 65% 30%)'
// toto je novy stromcek od Matusa Libaka
clipPath: 'polygon(100% 0, 100% 100%, 90% 100%, 90% 80%, 35% 80%, 90% 35%, 56% 35%)',
}}
/>
</Box>
)
}
6 changes: 3 additions & 3 deletions src/components/Results/Results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ export const Results: FC = () => {
}, [setBannerMessages, isBannerLoading, bannerMessages])

return (
<div>
<>
{resultsIsLoading && <Loading />}
<Box
sx={{
display: 'grid',
rowGap: {xs: '6px', sm: '10px'},
mx: {xs: 1, sm: 3, md: undefined},
mx: {xs: 1, sm: 3, md: 'auto'},
gridTemplateColumns: 'max-content 1fr repeat(3, max-content)',
}}
>
{results.map((result, index) => (
<ResultsRow result={result} key={index} />
))}
</Box>
</div>
</>
)
}

0 comments on commit 3e4b6a9

Please sign in to comment.