-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Create a new section highlighting contributor and user badges #6119
Open
souvikinator
wants to merge
4
commits into
layer5io:master
Choose a base branch
from
souvikinator:souvikinator/recognition-program-section-community-page
base: master
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 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
80a0c57
add: to community page, layer5 recognition program section
souvikinator 972e198
Merge branch 'layer5io:master' into souvikinator/recognition-program-…
souvikinator 90dff06
refactor: removed redundant style definitions
souvikinator b8c6e8a
Merge remote-tracking branch 'origin' into souvikinator/recognition-p…
souvikinator 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 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 |
---|---|---|
|
@@ -260,6 +260,115 @@ const CommunitySectionWrapper = styled.div` | |
} | ||
} | ||
|
||
.recognition-program { | ||
margin-top: 5rem; | ||
|
||
.recognition-content { | ||
display: grid; | ||
grid-template-columns: minmax(300px, 40%) 1fr; | ||
min-height: 500px; | ||
position: relative; | ||
gap: 2rem; | ||
|
||
.badges-section { | ||
position: relative; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
|
||
.badge-stack { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
max-width: 400px; | ||
|
||
.badge-item { | ||
position: absolute; | ||
width: 180px; | ||
height: 180px; | ||
transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); | ||
|
||
img { | ||
width: 140%; | ||
height: 140%; | ||
object-fit: contain; | ||
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2)); | ||
} | ||
|
||
&:nth-child(1) { | ||
top: 0; | ||
left: 0; | ||
z-index: 3; | ||
} | ||
&:nth-child(2) { | ||
top: 90px; | ||
left: 90px; | ||
z-index: 2; | ||
} | ||
&:nth-child(3) { | ||
top: 180px; | ||
left: 180px; | ||
z-index: 1; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.content { | ||
h1.subtitle { | ||
margin: 0.5rem auto 0.5rem auto; | ||
font-size: 1.75rem; | ||
font-weight: 500; | ||
color: ${(props) => props.theme.primaryColor}; | ||
} | ||
} | ||
|
||
@media (max-width: 62rem) { | ||
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. be consistent in using either rem or px 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. Got it. I'm on it. |
||
grid-template-columns: 1fr; | ||
text-align: center; | ||
|
||
.content { | ||
padding: 1.875rem 1.25rem; | ||
} | ||
} | ||
|
||
@media (max-width: 1000px) { | ||
.badges-section { | ||
min-height: 300px; | ||
padding: 1.25rem; | ||
|
||
.badge-stack { | ||
height: 260px; | ||
|
||
.badge-item { | ||
width: 150px; | ||
height: 150px; | ||
|
||
img { | ||
width: 120%; | ||
height: 120%; | ||
object-fit: contain; | ||
filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2)); | ||
} | ||
|
||
&:nth-child(1) { | ||
top: 0; | ||
left: calc(50% - 60px); | ||
} | ||
&:nth-child(2) { | ||
top: 140px; | ||
left: calc(50% - 120px); | ||
} | ||
&:nth-child(3) { | ||
top: 140px; | ||
left: calc(50% + 0px); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
`; | ||
|
||
export default CommunitySectionWrapper; |
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
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.
why defining styles again ? is there no styles to reuse from this page?
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.
Updated the styles. Removed redundant style definitions and used similar style definitions from other sections. Only styles related to badge alignment and responsiveness is there as it is specific to this section.
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.
@souvikinator i was mentioning to use reuse the styles which means the classnames if the other section have the same structure so in that way you don't have to write styles again. I am sure in this page only there might be jumbotrons so see if you can use there classes instead writing again.
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.
@sudhanshutech in the current implementation, I'm already reusing styles from the
meshmate
section (hence the.meshmate
class addition) for the section layout, margins, text content and responsive behavior.The styles you see in the code are specifically for the badge stack visualization and its responsive behavior since this is a unique visual element that is not present in any section.
Are you suggesting we come up with section design/UI that sticks more closely to the existing classes so that we don't need to define the badge related or in fact any extra style? That would mean changing the section UI.