Skip to content

Commit

Permalink
Merge pull request #19 from baaahs/alejo_polishing
Browse files Browse the repository at this point in the history
Alejo polishing
  • Loading branch information
alejot127 authored Feb 7, 2024
2 parents a6ca0f4 + e89ec6a commit 2d6314e
Show file tree
Hide file tree
Showing 8 changed files with 301 additions and 385 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const mock = {

const HorizontallyAlignedBlogCardWithShapedImage = ({ data }) => {
const theme = useTheme();
const { image, description, title, date, author } = data || mock;
const { image, description, title, date, author, flip, maxHeight, maxWidth } = data || mock;
return (
<Container>
<Box
Expand All @@ -45,7 +45,7 @@ const HorizontallyAlignedBlogCardWithShapedImage = ({ data }) => {
height={1}
boxShadow={4}
display={'flex'}
flexDirection={{ xs: 'column', md: 'row-reverse' }}
flexDirection={{ xs: flip ? 'column' : 'column-reverse', md: flip ? 'row-reverse' : 'row' }}
sx={{ backgroundImage: 'none' }}
>
<Box
Expand All @@ -62,8 +62,9 @@ const HorizontallyAlignedBlogCardWithShapedImage = ({ data }) => {
src={image}
alt="..."
sx={{
width: maxWidth ?? '100%',
height: maxHeight ?? '100%',
objectFit: 'cover',
maxHeight: 360,
filter:
theme.palette.mode === 'dark' ? 'brightness(0.7)' : 'none',
}}
Expand All @@ -86,12 +87,7 @@ const HorizontallyAlignedBlogCardWithShapedImage = ({ data }) => {
transformOrigin: 'top center',
display: { xs: 'none', md: 'block' },
}}
>
<path
d="M0 0h62.759v172C38.62 384 112 517 112 517v173H0V0z"
fill="currentColor"
/>
</Box>
/>
</Box>
<CardContent
sx={{
Expand Down
124 changes: 124 additions & 0 deletions src/components/FullScreenHeader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
import React, { useEffect } from 'react';
import { alpha } from '@mui/material/styles';
import Box from '@mui/material/Box';
import Grid from '@mui/material/Grid';
import Typography from '@mui/material/Typography';

import Container from 'components/Container';

const FullScreenHeader = ({ image, title, text, logo }) => {
const backgroundImage = image || 'https://assets.maccarianagency.com/backgrounds/img52.jpg';
const titleText = title || 'About Us';
const bodyText = text || 'We are founded by a leading academic and researcher in the field of Industrial Systems Engineering.';
const displayLogo = logo || false;

useEffect(() => {
const jarallaxInit = async () => {
const jarallaxElems = document.querySelectorAll('.jarallax');
if (!jarallaxElems || (jarallaxElems && jarallaxElems.length === 0)) {
return;
}

const { jarallax } = await import('jarallax');
jarallax(jarallaxElems, { speed: 0.2 });
};

jarallaxInit();
});

return (
<Box
className={'jarallax'}
data-jarallax
data-speed="0.2"
position={'relative'}
minHeight={{ xs: 400, sm: 500, md: 600 }}
display={'flex'}
alignItems={'center'}
marginTop={-13}
paddingTop={13}
id="agency__portfolio-item--js-scroll"
>
<Box
className={'jarallax-img'}
sx={{
position: 'absolute',
objectFit: 'cover',
/* support for plugin https://github.com/bfred-it/object-fit-images */
fontFamily: 'object-fit: cover;',
top: 0,
left: 0,
width: '100%',
height: '100%',
zIndex: -1,
backgroundRepeat: 'no-repeat',
backgroundSize: 'cover',
backgroundPosition: 'center center',
backgroundImage:
`url(${backgroundImage})`,
}}
/>
<Box
sx={{
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
width: 1,
height: 1,
background: alpha('#161c2d', 0.4),
zIndex: 1,
}}
/>
{displayLogo && (
<Container position={'relative'} zIndex={2}>
<Grid container xs={12} columnGap={12} sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Grid item xs={4} >
<img
src={logo}
alt="Logo"
width={450}
/>
</Grid>
<Grid item xs={6} sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<Typography
variant="h2"
color='common.white'
fontWeight={900}
>
{titleText}
</Typography>
</Grid>
</Grid>
</Container>)}
{!displayLogo && (<Container position={'relative'} zIndex={2}>
<Box>
<Typography
variant="h2"
gutterBottom
sx={{
fontWeight: 900,
color: 'common.white',
textTransform: 'uppercase',
}}
>
{titleText}
</Typography>
<Typography
variant="h6"
component="p"
color="text.primary"
sx={{
color: 'common.white',
}}
>
{bodyText}
</Typography>
</Box>
</Container>)}
</Box>
);
};

export default FullScreenHeader;
15 changes: 11 additions & 4 deletions src/layouts/Main/components/Topbar/Topbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import IconEmail from 'svg/illustrations/IconEmail';
import IconInstagram from 'svg/illustrations/IconInstagram';
import IconFacebook from 'svg/illustrations/IconFacebook';
import BAAAHSLogo from '../../BAAAHSLogo';

import pages from '../../../navigation';

const Topbar = ({ onSidebarOpen, colorInvert = false, data }) => {
Expand Down Expand Up @@ -63,7 +64,9 @@ const Topbar = ({ onSidebarOpen, colorInvert = false, data }) => {
color={colorInvert ? 'common.white' : 'text.primary'}
sx={{ display: 'flex', alignItems: 'center' }}
>
<IconSoundcloud />
<IconSoundcloud
color={colorInvert ? 'common.white' : 'text.primary'}
/>
</Link>
</Box>
<Box marginLeft={4}>
Expand All @@ -74,7 +77,7 @@ const Topbar = ({ onSidebarOpen, colorInvert = false, data }) => {
color={colorInvert ? 'common.white' : 'text.primary'}
sx={{ display: 'flex', alignItems: 'center' }}
>
<IconEmail />
<IconEmail color={colorInvert ? 'common.white' : 'text.primary'} />
</Link>
</Box>
<Box marginLeft={4}>
Expand All @@ -85,7 +88,9 @@ const Topbar = ({ onSidebarOpen, colorInvert = false, data }) => {
color={colorInvert ? 'common.white' : 'text.primary'}
sx={{ display: 'flex', alignItems: 'center' }}
>
<IconInstagram />
<IconInstagram
color={colorInvert ? 'common.white' : 'text.primary'}
/>
</Link>
</Box>
<Box marginLeft={4}>
Expand All @@ -96,7 +101,9 @@ const Topbar = ({ onSidebarOpen, colorInvert = false, data }) => {
color={colorInvert ? 'common.white' : 'text.primary'}
sx={{ display: 'flex', alignItems: 'center' }}
>
<IconFacebook />
<IconFacebook
color={colorInvert ? 'common.white' : 'text.primary'}
/>
</Link>
</Box>
</Box>
Expand Down
56 changes: 14 additions & 42 deletions src/views/Campout/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Grid from '@mui/material/Grid';
import Typography from '@mui/material/Grid';

import CampoutMain from 'layouts/CampoutMain.js';
import BAAAHSLogo from 'layouts/Main/BAAAHSLogo';
import FullScreenHeader from 'components/FullScreenHeader';

const content = [
{
Expand Down Expand Up @@ -54,48 +54,20 @@ const CampoutHome = () => {

return (
<CampoutMain>
<Box>
<Box gap={3}>
<FullScreenHeader
image={
'https://storage.googleapis.com/static.baaahs.org/PXL_20230416_022706111.jpeg'
}
logo={
'https://storage.googleapis.com/static.baaahs.org/campout_logo_no_border.png'
}
title={'BAAAHS Campout'}
text={
'Our Campout has been going on for years. Here are some of the highlights from previous years.'
}
/>
<Grid container spacing={2} justifyContent={'center'}>
<Grid
item
container
justifyContent={'center'}
alignItems={'center'}
xs={12}
xl={8}
>
<Box position="relative" width={1}>
<Box
component={'img'}
loading="lazy"
height={721}
width={1}
src={
'https://s3-alpha-sig.figma.com/img/c89d/4e12/eefe946ff30cbb1cb7a179dbdea276cb?Expires=1707091200&Key-Pair-Id=APKAQ4GOSFWCVNEHN3O4&Signature=Laf-0O8AHbiQ3adR48PYDVWA6Bz~~hAmuaJ2Cb7nisp2ZbAs2~1DTjLei-HnHJ2hlfdZ-UtrhU1DeovvyLd4gEEf3dCstgWjEuFz-Y~o1KKZ~P6tLV7rc7kkQk86dUWXLwBvAQrsvsquvEhup5tKgTb2XkhiVfQZnOM0i-CLhfOKjLoTSIFDlS9oVdUIx9xbVrtRVeMuce4jGUysvqwElDDf60PvOzSNBVvQjRTiCx~28mfzlpUNL2OxB75zNfD77Xk805XOTHiGv~XrbTxETueqWp0gM48GF~IFLyX3SuEGEXDV9vg5JIrhjfT7zZxfD2lXBZK22K~Z7MvPfNM~Fg__'
}
alt="BAAAHS Campout 2024 background image"
sx={{
objectFit: 'cover',
filter:
theme.palette.mode === 'dark' ? 'brightness(0.6)' : 'none',
}}
/>
<Box
position="absolute"
top={0}
left={0}
width={1}
height={1}
display="flex"
alignItems="center"
justifyContent="center"
>
<Box width={500} bgcolor={theme.palette.primary.main}>
<BAAAHSLogo />
</Box>
</Box>
</Box>
</Grid>
<Grid item container xs={10} xl={8}>
<Box marginBottom={4}>
<Typography
Expand Down
Loading

0 comments on commit 2d6314e

Please sign in to comment.