@@ -25,27 +25,46 @@ import {
2525 EventInformation ,
2626 EventsReducerState ,
2727} from '../upcoming-events/ducks/types' ;
28+ import { PRIMARY_BREAKPOINT } from '../../utils/breakpoints' ;
2829const { Text, Paragraph } = Typography ;
2930
3031const LandingContainer = styled . div `
32+ width: 100%;
33+ display: flex;
34+ flex-direction: column;
35+ ` ;
36+
37+ const LandingImage = styled . div `
3138 width: 100%;
3239 height: calc(95vh - 110px);
3340 object-fit: cover;
3441 background-image: url('${ HOME_IMAGE } ');
3542 background-position: center; /* Center the image */
3643 background-repeat: no-repeat; /* Do not repeat the image */
3744 background-size: cover; /* Resize the background image to cover the entire container */
45+
46+ @media screen and (max-width: ${ PRIMARY_BREAKPOINT } ) {
47+ height: 35vh;
48+ }
3849` ;
3950
4051const LandingText = styled ( Text ) `
4152 font-weight: 800;
4253 color: ${ ORANGE } ;
4354 font-size: 36px;
4455 line-height: 48px;
56+
57+ @media screen and (max-width: ${ PRIMARY_BREAKPOINT } ) {
58+ font-size: 24px;
59+ }
4560` ;
4661
4762const LandingBodyText = styled ( Paragraph ) `
4863 font-size: 16px;
64+
65+ @media screen and (max-width: ${ PRIMARY_BREAKPOINT } ) {
66+ font-size: 14px;
67+ }
4968` ;
5069
5170const LandingTextContainer = styled . div `
@@ -79,6 +98,7 @@ const ViewMoreButton = styled(LinkButton)`
7998
8099const AdminCol = styled ( Col ) `
81100 margin-right: 10px;
101+ margin-bottom: 16px;
82102` ;
83103
84104const CARD_ROW_LIMIT = 3 ;
@@ -104,13 +124,23 @@ const Home: React.FC<HomeContainerProps> = ({ events, announcements }) => {
104124 } , [ ] ) ;
105125
106126 const LandingCard = styled ( Card ) `
107- position: relative ;
108- top: 30 %;
127+ position: absolute ;
128+ top: 40 %;
109129 left: 15%;
110130 width: ${ privilegeLevel === PrivilegeLevel . ADMIN ? '600px' : '500px' } ;
111131 height: ${ privilegeLevel === PrivilegeLevel . ADMIN ? '220px' : '280px' } ;
112132 box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
113133 border-radius: 5px;
134+
135+ @media screen and (max-width: ${ PRIMARY_BREAKPOINT } ) {
136+ height: max-content;
137+ position: relative;
138+ width: 100%;
139+ left: 0%;
140+ justify-content: center;
141+ border-radius: 0px;
142+ box-shadow: none;
143+ }
114144 ` ;
115145 return (
116146 < >
@@ -124,6 +154,7 @@ const Home: React.FC<HomeContainerProps> = ({ events, announcements }) => {
124154
125155 { privilegeLevel === PrivilegeLevel . ADMIN ? (
126156 < LandingContainer >
157+ < LandingImage />
127158 < LandingCard bordered = { false } >
128159 < LandingTextContainer >
129160 < LandingText > Welcome Administrator!</ LandingText >
@@ -153,6 +184,7 @@ const Home: React.FC<HomeContainerProps> = ({ events, announcements }) => {
153184 </ LandingContainer >
154185 ) : (
155186 < LandingContainer >
187+ < LandingImage />
156188 < LandingCard bordered = { false } >
157189 < LandingTextContainer >
158190 < LandingText >
@@ -185,15 +217,13 @@ const Home: React.FC<HomeContainerProps> = ({ events, announcements }) => {
185217 ? events . result . slice ( 0 , CARD_ROW_LIMIT )
186218 : events . result
187219 ) . map ( ( event : EventInformation , i ) => (
188- < Col key = { i } >
189- < EventCard
190- imageSrc = { event . thumbnail }
191- title = { event . title }
192- date = { event . details . start }
193- description = { event . details . description }
194- to = { `/events/${ event . id } ` }
195- />
196- </ Col >
220+ < EventCard
221+ imageSrc = { event . thumbnail }
222+ title = { event . title }
223+ date = { event . details . start }
224+ description = { event . details . description }
225+ to = { `/events/${ event . id } ` }
226+ />
197227 ) ) }
198228 { asyncRequestIsComplete ( events ) && events . result . length === 0 && (
199229 < CenterEventsContainer >
0 commit comments