-
Notifications
You must be signed in to change notification settings - Fork 2
Create about us page #18
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
b3d6ab3
e760bb5
78ef26f
7c493c5
d154a31
1416627
baa172d
e5fa077
6123220
51b21ba
22ed718
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| import React from 'react' | ||
| import styled, { useTheme, keyframes, FontType, css } from 'styled-components' | ||
| import { fontTypeCss } from '@/styles/sample-rhdevs-website/index.styled' | ||
|
|
||
| const fadeIn = keyframes` | ||
| 0% { | ||
| opacity: 0; | ||
| } | ||
| 100% { | ||
| opacity: 1; | ||
| } | ||
| ` | ||
|
|
||
| const PreviewText = styled.div<{ hasAnimation?: boolean; fontType: FontType }>` | ||
| ${fontTypeCss} | ||
| margin-top: 20px; | ||
| color: ${(props) => props.theme.palette.common.gray}; | ||
|
Contributor
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. text hard to see tho... follow the figma |
||
| ${(props) => | ||
| props.hasAnimation && | ||
| css` | ||
| animation-name: ${fadeIn}; | ||
| animation-delay: 1s; | ||
| animation-duration: 1.5s; | ||
| animation-fill-mode: both; | ||
| `} | ||
| ` | ||
|
|
||
| const PreviewTitle = styled.label<{ fontType: FontType }>` | ||
| ${fontTypeCss} | ||
| color: ${(props) => props.theme.palette.common.black}; | ||
| background-color: ${(props) => props.theme.palette.common.white}; | ||
| transition: background-image 0.4s ease-in-out; | ||
| width: fit-content; | ||
| &:hover { | ||
| text-decoration: underline; | ||
| } | ||
| ` | ||
|
|
||
| const PreviewWrapper = styled.div` | ||
| display: flex; | ||
| flex-direction: column; | ||
| background-color: ${(props) => props.theme.palette.common.white}; | ||
| cursor: default; | ||
| flex: 1 1 100%; | ||
| margin: 0 0 3% 0; | ||
| ` | ||
|
|
||
| type Props = { | ||
| title: string | ||
| text: string | ||
| hasAnimation?: boolean | ||
| onClick?: React.MouseEventHandler<HTMLDivElement> | ||
| } | ||
|
|
||
| const defaultProps = { | ||
| hasAnimation: false, | ||
| onClick: undefined, | ||
| } | ||
|
|
||
| export default function Preview(props: Props) { | ||
|
Contributor
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. Rename the component to something useful e.g. |
||
| const theme = useTheme() | ||
| const { h4, previewTitle } = { ...theme.typography.fontSize } | ||
| return ( | ||
| <PreviewWrapper onClick={props.onClick}> | ||
| <PreviewTitle fontType={previewTitle}>{props.title}</PreviewTitle> | ||
| <PreviewText fontType={h4} hasAnimation={props.hasAnimation}> | ||
| {props.text} | ||
| </PreviewText> | ||
| </PreviewWrapper> | ||
| ) | ||
| } | ||
|
|
||
| Preview.defaultProps = defaultProps | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,30 @@ | ||||||
| import styled from 'styled-components' | ||||||
|
|
||||||
| const FollowUsContainer = styled.div` | ||||||
| display: flex; | ||||||
| justify-content: flex-end; | ||||||
| align-items: center; | ||||||
| margin: 5px 100px 20px 100px; | ||||||
| ` | ||||||
| const Icon = styled.div` | ||||||
| background-color: ${(props) => props.theme.palette.common.gray}; | ||||||
| border-radius: 50%; | ||||||
| margin-left: 20px; | ||||||
| width: 50px; | ||||||
| height: 50px; | ||||||
| ` | ||||||
|
|
||||||
| const StyledText = styled.text` | ||||||
| color: ${(props) => props.theme.palette.common.black}; | ||||||
| ` | ||||||
|
|
||||||
| export default function FollowUs() { | ||||||
|
Contributor
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. rename to like SocialMediaLinks or smthg
Contributor
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. use arrow notation for functions!
Suggested change
|
||||||
| return ( | ||||||
| <FollowUsContainer> | ||||||
| <StyledText>Follow Us</StyledText> | ||||||
| <Icon></Icon> | ||||||
| <Icon></Icon> | ||||||
| <Icon></Icon> | ||||||
|
Contributor
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. good for now |
||||||
| </FollowUsContainer> | ||||||
| ) | ||||||
| } | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ | |
| "build": "next build", | ||
| "start": " next build && npm run open-browser && next start", | ||
| "lint": "next lint", | ||
| "open-browser": "start http://localhost:3000" | ||
| "open-browser": "open http://localhost:3000" | ||
|
Contributor
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. remove, and update your branch from main! |
||
| }, | ||
| "dependencies": { | ||
| "@next/font": "13.1.6", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| /** | ||
| * # Create About Us Page | ||
| * | ||
| * Path: `/aboutus` | ||
| * | ||
| * ## Page Description | ||
| * This page is accessed after the user has clicked on the About Us button on the navigation bar. | ||
| * | ||
|
Contributor
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. Ok for now, but when the page is filled do describe more on what the page shows (e.g. shows a brief intro to hall etc.) |
||
| */ | ||
|
Contributor
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. Good job! However docs should be placed just above the main export function, not at the top of the file |
||
|
|
||
| import Image from 'next/image' | ||
| import styled from 'styled-components' | ||
|
|
||
| import Preview from '@/components/AboutUsPreview' | ||
| import FollowUs from '@/components/FollowUs' | ||
| import { | ||
| facilityBooking, | ||
| supperCollation, | ||
| announcementBot, | ||
| } from '@/texts/sample-rhdevs-website/descriptions/projects' | ||
| import { MainContainer } from '@/styles/sample-rhdevs-website/GlobalStyledComponents' | ||
|
|
||
| import logoBackground from '@/assets/sample-rhdevs-website/logo_background.png' | ||
| import logo from '@/assets/sample-rhdevs-website/RHDevs_Logo2.png' | ||
|
|
||
| const AboutUsMainContainer = styled(MainContainer)` | ||
| display: grid; | ||
| grid-template-rows: 1fr max-content; | ||
| grid-template-columns: 1fr; | ||
| ` | ||
|
|
||
| const ImageContainer = styled.div` | ||
| background-color: ${(props) => props.theme.palette.common.gray}; | ||
| background-repeat: no-repeat; | ||
| background-size: cover; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| position: relative; | ||
| ` | ||
|
|
||
| const ImageMask = styled.div` | ||
| mask-image: linear-gradient(black 40%, transparent); | ||
| text-align: center; | ||
| ` | ||
|
|
||
| const StyledImage = styled(Image)` | ||
| height: 20%; | ||
| width: 15%; | ||
| ` | ||
| const Arrow = styled.div<{ isRight: boolean }>` | ||
| border: solid ${(props) => props.theme.palette.common.white}; | ||
| border-width: 0 3px 3px 0; | ||
| display: inline-block; | ||
| padding: 3px; | ||
| transform: rotate(${(props) => (props.isRight ? -45 : 135)}deg); | ||
| -webkit-transform: rotate(${(props) => (props.isRight ? -45 : 135)}deg); | ||
| position: absolute; | ||
| left: ${(props) => (props.isRight ? 'auto' : 16)}px; | ||
| right: ${(props) => (props.isRight ? 16 : 'auto')}px; | ||
| ` | ||
|
|
||
| const PageDotsContainer = styled.div` | ||
| position: absolute; | ||
| bottom: 16px; | ||
| display: flex; | ||
| ` | ||
| const PageDots = styled.div` | ||
| background-color: ${(props) => props.theme.palette.common.white}; | ||
| border-radius: 50%; | ||
| width: 10px; | ||
| height: 10px; | ||
| margin-left: 5px; | ||
| ` | ||
| const DividerContainer = styled.div` | ||
| display: flex; | ||
| justify-content: center; | ||
| margin-left: 40px; | ||
| margin-right: 40px; | ||
| ` | ||
|
|
||
| const Divider = styled.hr` | ||
| width: 60%; | ||
| border: 1.4px solid ${(props) => props.theme.palette.common.gray}; | ||
| ` | ||
|
|
||
| const PreviewContainer = styled.div` | ||
| display: flex; | ||
| flex-direction: row; | ||
| justify-content: space-evenly; | ||
| gap: 50px; | ||
| margin: 120px 100px 100px 120px; | ||
| ` | ||
|
|
||
| function Projects() { | ||
| return ( | ||
| <AboutUsMainContainer> | ||
| <ImageContainer> | ||
| <Arrow isRight={false}></Arrow> | ||
| <Arrow isRight={true}></Arrow> | ||
|
|
||
| <PageDotsContainer> | ||
| <PageDots></PageDots> | ||
| <PageDots></PageDots> | ||
| </PageDotsContainer> | ||
| </ImageContainer> | ||
|
|
||
| <PreviewContainer> | ||
| <Preview | ||
| title={facilityBooking.projectTitle} | ||
| text={facilityBooking.projectDescription} | ||
| hasAnimation | ||
| /> | ||
| <DividerContainer> | ||
| <Divider /> | ||
| </DividerContainer> | ||
| <Preview | ||
| title={supperCollation.projectTitle} | ||
| text={supperCollation.projectDescription} | ||
| hasAnimation | ||
| /> | ||
| <DividerContainer> | ||
| <Divider /> | ||
| </DividerContainer> | ||
| <Preview | ||
| title={announcementBot.projectTitle} | ||
| text={announcementBot.projectDescription} | ||
| hasAnimation | ||
| /> | ||
| </PreviewContainer> | ||
| <FollowUs></FollowUs> | ||
| </AboutUsMainContainer> | ||
| ) | ||
| } | ||
|
|
||
| export default Projects | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export const navTitles = ['Home', 'Events', 'Yearbook'] | ||
| export const navTitles = ['Home', 'About Us', 'Events', 'Yearbook'] |
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.
cool!