generated from UoaWDCC/react-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from UoaWDCC/josef/sponsor-board
Josef/sponsor board
- Loading branch information
Showing
19 changed files
with
424 additions
and
27 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
web/src/app/components/SponsorBoard/SponsorBoard.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.text { | ||
position: relative; | ||
color: var(--mantine-color-customWhite-1); | ||
} | ||
|
||
.paginationContainer { | ||
display: flex; | ||
width: 100%; | ||
flex-direction: column; | ||
align-items: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
import { Text, Button, Paper, Flex, Container, AspectRatio } from '@mantine/core'; | ||
import styles from './SponsorBoard.module.css'; | ||
import { Image } from '@mantine/core'; | ||
|
||
// dummy data -- change later when we have real data | ||
export interface SponsorBoardCardProps { | ||
sponsorTitle: string; | ||
imageLink: string; | ||
sponsorIndsutry: string; | ||
sponsorLink: string; | ||
} | ||
|
||
export function SponsorBoardCard({ | ||
data, | ||
isOneColumn, | ||
}: { | ||
data: SponsorBoardCardProps; | ||
isOneColumn?: boolean; | ||
}) { | ||
const handleSponsorLink = () => { | ||
console.log('Sponsor Link: ', data.sponsorLink); | ||
}; | ||
|
||
return ( | ||
<Paper p="md" radius="md" w={'95%'} h={'100%'}> | ||
<Flex | ||
direction={isOneColumn ? 'row' : 'column'} | ||
w={'100%'} | ||
h={'100%'} | ||
justify={'space-between'} | ||
> | ||
{/* Sponsor Title */} | ||
<Container | ||
w={{ base: '100%', sm: '80%', md: '80%', lg: '100%', xl: '100%' }} | ||
h="auto" | ||
style={{ overflow: 'hidden', flex: isOneColumn ? 1 : 'auto' }} | ||
pl={isOneColumn ? '0' : 'auto'} | ||
> | ||
<AspectRatio ratio={4 / 3}> | ||
<Image | ||
src={data.imageLink} | ||
alt="sponsor image" | ||
fallbackSrc="/sponsor_placeholder.png" | ||
radius="md" | ||
width="100%" | ||
height="100%" | ||
fit="contain" | ||
/> | ||
</AspectRatio> | ||
</Container> | ||
{/* Right Container (on one column layout) */} | ||
<Flex | ||
direction={'column'} | ||
justify={isOneColumn ? 'space-evenly' : 'space-between'} | ||
style={{ flex: isOneColumn ? 2 : 'auto' }} | ||
> | ||
<Flex justify={'space-between'}> | ||
{/* Sponsor Title */} | ||
<Text fw={500} size="xl" className={styles.text} ml={isOneColumn ? 'auto': 'xs'}> | ||
{data.sponsorTitle} | ||
</Text> | ||
</Flex> | ||
|
||
{/* Button */} | ||
<Button | ||
color="blue" | ||
mt="xs" | ||
mr="md" | ||
radius="lg" | ||
size="compact-md" | ||
onClick={handleSponsorLink} | ||
w="100%" | ||
> | ||
{data.sponsorIndsutry} | ||
</Button> | ||
</Flex> | ||
</Flex> | ||
</Paper> | ||
); | ||
} | ||
|
||
export default SponsorBoardCard; |
Oops, something went wrong.