-
Notifications
You must be signed in to change notification settings - Fork 749
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Convert blurbs to use Modal components. * Add Avatar / Component option to 'element' prop for Modals. Circumvents weird behaviour of React on Rails. * Fix failing tests. * Add test case for new Modal functionality. Refactoring. * All content inside the modal. Still requires re-work of design to match Figma comps. i18n completed for avatar alts. * minor refactoring. * Add contributor avatar blurb to new German locale. * Update Modal component to match Figma comps. Add contributor blurb back into Modal with new formatting. * Address YML formatting. * Change responsive behaviour for modal. Replace SVG close icon with FAIcon. * Stylistic changes to more closely match comps + requested changes. * Add missing message for fr locale. * few minor syntax changes.
- Loading branch information
Showing
21 changed files
with
1,384 additions
and
1,660 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,9 +1,90 @@ | ||
.hideContent { | ||
display: none; | ||
} | ||
.contributorModalBody { | ||
display: flex; | ||
flex-direction: row; | ||
|
||
.contributorModalBodyPhoto { | ||
flex: 0 1 30%; | ||
|
||
&.showOnSmall { | ||
display: none; | ||
} | ||
|
||
.contributorAvatar { | ||
border-radius: 50%; | ||
overflow: hidden; | ||
object-fit: cover; | ||
background: $mulberry-key-lime; | ||
height: 150px; | ||
width: 150px; | ||
margin: 0 auto; | ||
} | ||
|
||
@media screen and (max-width: $small) { | ||
flex: 0 1 25%; | ||
.contributorAvatar { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
|
||
&.hideOnSmall{ | ||
display: none; | ||
} | ||
|
||
&.showOnSmall { | ||
display: block; | ||
} | ||
} | ||
} | ||
|
||
.contributorModalBodyCopy { | ||
margin-left: $size-18; | ||
|
||
.contributorModalHeader { | ||
display: flex; | ||
align-items: center; | ||
flex-flow: row nowrap; | ||
|
||
.readMoreShow, | ||
.readLessShow { | ||
@include staticContentFakeLink(); | ||
cursor: pointer; | ||
} | ||
@media screen and (max-width: $small) { | ||
flex-flow: column nowrap; | ||
text-align: center; | ||
} | ||
|
||
.contributorModalName { | ||
font-size: $size-36; | ||
color: $mulberry; | ||
line-height: $size-42; | ||
font-weight: 400; | ||
margin: $size-24 0 $size-10 0; | ||
|
||
@media screen and (max-width: $small) { | ||
margin-top: 0; | ||
} | ||
} | ||
|
||
.contributorModalBodySocialLinks { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
font-size: $size-14; | ||
text-transform: uppercase; | ||
letter-spacing: 2px; | ||
|
||
i:last-of-type { | ||
margin-left: $size-10; | ||
} | ||
|
||
@media screen and (max-width: $small) { | ||
flex-flow: column nowrap; | ||
text-align: center; | ||
|
||
i:last-of-type { | ||
margin-left: 0; | ||
} | ||
} | ||
} | ||
} | ||
|
||
p { | ||
font-size: $size-18; | ||
} | ||
} | ||
} |
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,43 @@ | ||
<div class="gridManyItem center"> | ||
<%= react_component('Modal', props: { | ||
element: { | ||
component: 'Avatar', | ||
props: { | ||
src: ProfilePicture.normalize_url(blurb["image"]), | ||
alt: t('pages.contribute.contributor_avatar_alt', { | ||
name: blurb['name'] | ||
}) | ||
} | ||
}, | ||
body: <<~HEREDOC | ||
<div class="contributorModalBody"> | ||
<div class="contributorModalBodyPhoto hideOnSmall"> | ||
<img class="contributorAvatar" src="#{ProfilePicture.normalize_url(blurb["image"])}"> | ||
</div> | ||
<div class="contributorModalBodyCopy"> | ||
<div class="contributorModalHeader"> | ||
<div class="contributorModalBodyPhoto showOnSmall"> | ||
<img class="contributorAvatar" src="#{ProfilePicture.normalize_url(blurb["image"])}"> | ||
</div> | ||
<div> | ||
<div role="heading" class="contributorModalName"> | ||
#{blurb["name"]} | ||
</div> | ||
<div class="contributorModalBodySocialLinks"> | ||
<div class="socialLink"> | ||
<i class="fa fa-location-arrow fa-inline"></i>#{blurb["location"]} | ||
</div> | ||
<div class="socialLink"> | ||
<i class="#{get_icon_class(blurb["social"])} fa-inline"></i> | ||
#{link_to(blurb["link_name"], blurb["link"], target: 'blank')} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<p>#{blurb["profile"]}</p> | ||
</div> | ||
HEREDOC | ||
}) %> | ||
</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
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
Oops, something went wrong.