-
Notifications
You must be signed in to change notification settings - Fork 2
Merging design with main branch #27
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
Open
LWS49
wants to merge
38
commits into
main
Choose a base branch
from
design
base: main
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
38 commits
Select commit
Hold shift + click to select a range
d0425f9
updated with new assets
LWS49 cf00edf
Add image carousel
andrechuakj 64d91fe
Add link to event page with stringToSlug function
wr1159 093f64b
Create dynamic event page with dummy data
wr1159 91cac09
Remove unused page.tsx
wr1159 6add315
Add styling for more responsiveness
wr1159 54e1ab0
Add photo link container
wr1159 10b5f67
Add background image for description
wr1159 05cfac1
Add stickers for the description container
wr1159 faf7aff
Add responsive heading based on device size
wr1159 5d65a9b
Style view photo link
wr1159 603d9d9
Use event as title, description, img source
wr1159 524cf5c
Add BryndanWrite font to event description and fix font-face style
wr1159 6f938b0
Fix placing of stickers
wr1159 5ceaa9b
Add remaining 2 stickers and fix positioning
wr1159 f92c32e
Add font bryndanwrite to title
wr1159 319b68e
Style event link on events page
wr1159 06a5bda
ran npm update + replace welcome picture
LWS49 0ce0f82
Merge pull request #24 from rhdevs/feature/event-page
LWS49 5f911d9
Merge branch 'design' of https://github.com/rhdevs/rh-superapp into d…
LWS49 e54fa09
Carousel: Add margin to arrows and coloured background for dots
andrechuakj 0008508
components/PageNavBar.tsx
LWS49 f5e4a48
updated design for events page
LWS49 ad6410d
modified size of welcomeText
LWS49 43b0bce
Merge pull request #23 from andrechuakj/design
LWS49 93d572d
Merge branch 'design' of https://github.com/rhdevs/rh-superapp into d…
LWS49 a8545e6
Add responsive design
Cikguseven 39897c4
Update index.tsx
Cikguseven 393b36a
Fix Navbar bug
Cikguseven f4e7f95
Import calendar package
Cikguseven 190fe78
WIP
Cikguseven 618383b
Add Calendar page
Cikguseven c9a9df5
Merge pull request #25 from Cikguseven/design
LWS49 f9cd7ee
merging design changes
LWS49 833b713
removed old designs
LWS49 c0eab0a
Add deployment URL to README
wr1159 225104b
Update dummy data and slugs to use dummy data
wr1159 487cb0e
Fix build error
wr1159 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
This file contains hidden or 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 hidden or 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 hidden or 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,80 @@ | ||
| import React, { useState, useEffect } from 'react' | ||
| import Slider from 'react-styled-carousel' | ||
| import PropTypes from 'prop-types' | ||
| import styled from 'styled-components' | ||
| import Image from 'next/image' | ||
|
|
||
| const responsive = [ | ||
| { breakPoint: 1580, cardsToShow: 5 }, // this will be applied if screen size is greater than 1280px. cardsToShow will become 4. | ||
| { breakPoint: 800, cardsToShow: 4 }, | ||
| { breakPoint: 640, cardsToShow: 3 }, | ||
| ] | ||
|
|
||
| const DotsWrapper = styled.ul` | ||
| display: block; | ||
| margin: 0 auto; | ||
| list-style: none; | ||
| text-align: center; | ||
| padding: 0px; | ||
| background-color: rgba(0, 0, 0, 0.3); | ||
| border-radius: 20px; | ||
| width: fit-content; | ||
| ` | ||
|
|
||
| const ImageContainer = styled.div<{ $height?: number }>` | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| margin: 0 10px; | ||
| height: ${(props) => props.$height?.toString() + 'px' || 'auto'}; | ||
| width: 300px; | ||
| position: relative; | ||
| ` | ||
|
|
||
| const Carousel = ({ imgArr }) => { | ||
| const [maxImageWidth, setMaxImageWidth] = useState(0) | ||
| const [imageHeight, setImageHeight] = useState(0) | ||
|
|
||
| const imageStyle = { | ||
| padding: '10px', | ||
| maxWidth: `${maxImageWidth}px`, | ||
| } | ||
|
|
||
| useEffect(() => { | ||
| const updateImageDimensions = () => { | ||
| setMaxImageWidth(window.innerWidth / 4) | ||
| setImageHeight(window.innerWidth / 6) | ||
| } | ||
|
|
||
| updateImageDimensions() | ||
|
|
||
| window.addEventListener('resize', updateImageDimensions) | ||
|
|
||
| return () => { | ||
| window.removeEventListener('resize', updateImageDimensions) | ||
| } | ||
| }, []) | ||
|
|
||
| return ( | ||
| <Slider | ||
| responsive={responsive} | ||
| showDots={true} | ||
| autoSlide={3000} | ||
| margin={'0px 15px'} | ||
| DotsWrapper={DotsWrapper} | ||
| > | ||
| {imgArr && | ||
| imgArr.map((item) => ( | ||
| <ImageContainer key={item.id} $height={imageHeight}> | ||
| <Image src={item.src} layout="fill" objectFit="contain" alt="" style={imageStyle} /> | ||
| </ImageContainer> | ||
| ))} | ||
| </Slider> | ||
| ) | ||
| } | ||
|
|
||
| Carousel.propTypes = { | ||
| imgArr: PropTypes.array.isRequired, | ||
| } | ||
|
|
||
| export default Carousel | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,54 @@ | ||
| import { Button } from 'antd' | ||
| import styled from 'styled-components' | ||
|
|
||
| export const NAV_BAR_HEIGHT = '4rem' | ||
|
|
||
| const MainContainer = styled.div` | ||
| width: 100vw; | ||
| height: ${NAV_BAR_HEIGHT}; | ||
| margin: 10px; | ||
| display: flex; | ||
| flex-direction: row; | ||
| bottom: 10; | ||
| justify-content: space-evenly; | ||
| ` | ||
|
|
||
| type Props = { | ||
| navigateToNext: () => void | ||
| navigateToPrev: () => void | ||
| isPrevVisible: boolean | ||
| isNextVisible: boolean | ||
| } | ||
|
|
||
| const PageNavBar = (props: Props) => ( | ||
| <MainContainer> | ||
| { | ||
| <Button | ||
| style={{ background: '#ab7865' }} | ||
| type="primary" | ||
| title="Previous" | ||
| onClick={() => { | ||
| props.navigateToPrev() | ||
| }} | ||
| disabled={!props.isPrevVisible} | ||
| > | ||
| Previous | ||
| </Button> | ||
| } | ||
| { | ||
| <Button | ||
| style={{ background: '#ab7865' }} | ||
| type="primary" | ||
| title="Next" | ||
| onClick={() => { | ||
| props.navigateToNext() | ||
| }} | ||
| disabled={!props.isNextVisible} | ||
| > | ||
| Next | ||
| </Button> | ||
| } | ||
| </MainContainer> | ||
| ) | ||
|
|
||
| export default PageNavBar |
This file contains hidden or 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
Oops, something went wrong.
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.
super ugly carousel... any random library also nicer