forked from Code-4-Community/scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GI-19 Create Volunteer Page #1
Open
bobbyslug
wants to merge
4
commits into
GI-transfer-from-old-repo
Choose a base branch
from
ch-ja-gib-70-volunteer-page
base: GI-transfer-from-old-repo
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7638458
volunteer page and components
bobbyslug 57e755d
adjust route in map preview link
bobbyslug 443960e
substitute flippable tile + add volunteer page route
bobbyslug a586272
Merge branch 'GI-transfer-from-old-repo' into ch-ja-gib-70-volunteer-…
bobbyslug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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,28 @@ | ||
export default function Header() { | ||
return ( | ||
<div | ||
style={{ | ||
padding: '0px 50px 50px', | ||
display: 'flex', | ||
alignItems: 'center', | ||
background: 'var(--Foreground, #F2F2F2)', | ||
}} | ||
> | ||
<p | ||
style={{ | ||
fontSize: '40px', | ||
fontWeight: 'bold', | ||
margin: 15, | ||
fontFamily: 'Montserrat', | ||
lineHeight: '49px', | ||
textAlign: 'left', | ||
color: 'black', | ||
width: '100%', | ||
borderBottom: '4px solid rgba(0, 0, 0, 1)', | ||
}} | ||
> | ||
Welcome back, Volunteer! | ||
</p> | ||
</div> | ||
); | ||
} |
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,125 @@ | ||
import { Box, Grid, ThemeProvider } from '@mui/material'; | ||
import { VolunteerResource, VOLUNTEER_RESOURCES } from './volunteerResources'; | ||
import CircleIcon from '@mui/icons-material/Circle'; | ||
|
||
export default function Resources() { | ||
const title = { | ||
color: 'var(--Text-Primary, #091F2F)', | ||
fontFamily: 'Helvetica', | ||
fontSize: '27px', | ||
fontStyle: 'bold', | ||
fontWeight: 'bold', | ||
lineHeight: 'normal', | ||
textDecorationLine: 'underline', | ||
margin: '0', | ||
}; | ||
|
||
const headings = { | ||
color: 'var(--Text-Second, #288BE4)', | ||
fontFamily: 'Lora', | ||
fontSize: '25px', | ||
fontStyle: 'italic', | ||
fontWeight: '400', | ||
lineHeight: 'normal', | ||
margin: '0', | ||
}; | ||
|
||
const content = { | ||
color: 'var(--text-primary-2, #58585B)', | ||
fontFamily: 'Lora', | ||
fontSize: '20px', | ||
fontStyle: 'normal', | ||
fontWeight: '400', | ||
lineHeight: 'normal', | ||
}; | ||
|
||
return ( | ||
<div | ||
style={{ | ||
display: 'flex', | ||
padding: '34px 45px 49px 45px', | ||
flexDirection: 'column', | ||
alignItems: 'flex-start', | ||
gap: '15px', | ||
flexShrink: '0', | ||
background: 'white', | ||
}} | ||
> | ||
<p style={title}> | ||
<u>FEATURED RESOURCES →</u> | ||
</p> | ||
<Grid | ||
container | ||
sx={{ | ||
display: 'flex', | ||
justifyContent: 'space-evenly', | ||
alignItems: 'center', | ||
}} | ||
> | ||
{VOLUNTEER_RESOURCES.map((resource: VolunteerResource) => { | ||
return ( | ||
<Grid xs={4} item> | ||
<FlippableTile textContent={resource.resourceName} /> | ||
</Grid> | ||
); | ||
})} | ||
</Grid> | ||
</div> | ||
); | ||
} | ||
|
||
interface PanelProps { | ||
textContent: string; | ||
} | ||
function FlippableTile(props: PanelProps) { | ||
return ( | ||
<ThemeProvider | ||
theme={{ | ||
palette: { | ||
primary: { | ||
main: '#F2F2F2', | ||
dark: '#B1F1F1', | ||
}, | ||
}, | ||
}} | ||
> | ||
<Box | ||
sx={{ | ||
width: '330px', | ||
height: '253px', | ||
marginTop: '28px', | ||
marginBottom: '49px', | ||
borderRadius: 1, | ||
bgcolor: 'primary.main', | ||
'&:hover': { | ||
bgcolor: 'primary.dark', | ||
}, | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}} | ||
> | ||
<CircleIcon | ||
sx={{ | ||
width: '100px', | ||
height: '100px', | ||
marginTop: '48px', | ||
marginBottom: '24px', | ||
color: '#FFFDFD', | ||
}} | ||
/> | ||
<span | ||
style={{ | ||
color: '#288BE4', | ||
fontSize: '20px', | ||
fontStyle: 'italic', | ||
marginBottom: '50px', | ||
}} | ||
> | ||
{props.textContent} | ||
</span> | ||
</Box> | ||
</ThemeProvider> | ||
); | ||
} |
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,52 @@ | ||
import Map from '../../components/map/Map'; | ||
import React, { useState } from 'react'; | ||
import Divider from '../Divider'; | ||
import Resources from './Resources'; | ||
import Header from './Header'; | ||
import MapPreview from '../../assets/images/siteIcons/mapPreview.png'; | ||
import Navbar from '../Navbar'; | ||
import { SITE_STATUS_ROADMAP } from '../../constants'; | ||
|
||
const icons: string[] = SITE_STATUS_ROADMAP.map((option) => option.image); | ||
|
||
export default function VolunteerPage() { | ||
return ( | ||
<div style={{ background: 'var(--Foreground, #F2F2F2)' }}> | ||
<Navbar /> | ||
<div style={{ marginTop: '50px' }} /> | ||
<Header /> | ||
<div | ||
style={{ | ||
position: 'relative', | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'space-evenly', | ||
background: 'white', | ||
padding: '50px 40px', | ||
gap: '20px', | ||
flexWrap: 'wrap', | ||
}} | ||
> | ||
<img src={MapPreview} /> | ||
<a | ||
href="/" | ||
style={{ | ||
top: '50%', | ||
left: '50%', | ||
fontSize: '27px', | ||
fontWeight: 'bold', | ||
fontFamily: 'Helvetica', | ||
lineHeight: '49px', | ||
color: '#091F2F', | ||
}} | ||
> | ||
VIEW THE INTERACTIVE MAP → | ||
</a> | ||
</div> | ||
<Divider /> | ||
<Resources /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think Resources can be replaced with Tiles.tsx and the volunteerResources.ts file could be removed. |
||
<Divider /> | ||
<div style={{ paddingTop: '15px' }} /> | ||
</div> | ||
); | ||
} |
25 changes: 25 additions & 0 deletions
25
apps/frontend/src/pages/volunteerPage/volunteerResources.ts
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,25 @@ | ||
export interface VolunteerResource { | ||
resourceName: string | ||
} | ||
|
||
export const VOLUNTEER_RESOURCES: VolunteerResource[] = [ | ||
{ | ||
resourceName: 'Submit a Maintenance Report' | ||
}, | ||
{ | ||
resourceName: 'Adopt a GI Feature' | ||
}, | ||
{ | ||
resourceName: "Submit a Condition Assessment" | ||
}, | ||
{ | ||
resourceName: "*resource4*" | ||
}, | ||
{ | ||
resourceName: "*resource5*" | ||
}, | ||
{ | ||
resourceName: "*resource6*" | ||
}, | ||
|
||
] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you try adding this as a route:
<Route path="/volunteer_page" element={<VolunteerPage />} />
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed changes for both comments; for Resources, I assumed you meant substituting BoxPanel with FlippableTile, since Resources represents a grid of tiles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's right! Sorry