-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Extracted a group of social media links into a dedicated component - Use the SocialMediaLinks component in the footer on the Home page; on the About page; and in the ContactUs tab of the communications panel - Added a base CSS layer, so that the CSS rules that are declared as part of the components layer do not get overridden by the regular (non-layered) styles - Updated a label on the VEP page (Variant effect predictor -> Variant Effect Predictor)
- Loading branch information
Showing
15 changed files
with
305 additions
and
240 deletions.
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
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
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
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
29 changes: 29 additions & 0 deletions
29
src/shared/components/social-media-links/SocialMediaLinks.module.css
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,29 @@ | ||
/* | ||
To style individual icons, use the following selectors: | ||
- [data-part="blog-icon"] for the blog icon | ||
- [data-part="facebook-icon"] for Facebook icon | ||
- [data-part="twitter-icon"] for Twitter/X icon | ||
*/ | ||
|
||
@layer components { | ||
.container { | ||
display: inline-grid; | ||
grid-template-columns: repeat(3, auto); | ||
column-gap: 24px; | ||
} | ||
|
||
.blog { | ||
display: inline-flex; | ||
align-items: center; | ||
gap: 16px; | ||
white-space: nowrap; | ||
} | ||
|
||
.mediaIcon { | ||
height: 24px; | ||
} | ||
|
||
.mediaIcon[data-part="twitter-icon"] { | ||
height: 22px; | ||
} | ||
} |
71 changes: 71 additions & 0 deletions
71
src/shared/components/social-media-links/SocialMediaLinks.tsx
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,71 @@ | ||
/** | ||
* See the NOTICE file distributed with this work for additional information | ||
* regarding copyright ownership. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import classNames from 'classnames'; | ||
|
||
import facebookIconUrl from 'static/icons/icon_facebook.svg?url'; | ||
import twitterIconUrl from 'static/icons/icon_twitter.svg?url'; | ||
import blogIconUrl from 'static/icons/icon_blog.svg?url'; | ||
|
||
import styles from './SocialMediaLinks.module.css'; | ||
|
||
type Props = { | ||
className?: string; | ||
}; | ||
|
||
const SocialMediaLinks = (props: Props) => { | ||
const componentStyles = classNames(styles.container, props.className); | ||
|
||
return ( | ||
<div className={componentStyles}> | ||
<a | ||
className={styles.blog} | ||
href="https://www.ensembl.info" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<span>Ensembl blog</span> | ||
<img | ||
data-part="blog-icon" | ||
src={blogIconUrl} | ||
className={styles.mediaIcon} | ||
/> | ||
</a> | ||
<a | ||
href="https://www.facebook.com/Ensembl.org" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<img | ||
data-part="facebook-icon" | ||
src={facebookIconUrl} | ||
className={styles.mediaIcon} | ||
alt="Ensembl profile on Facebook" | ||
/> | ||
</a> | ||
<a href="https://x.com/ensembl" target="_blank" rel="noopener noreferrer"> | ||
<img | ||
data-part="twitter-icon" | ||
src={twitterIconUrl} | ||
className={styles.mediaIcon} | ||
alt="Ensembl profile on X" | ||
/> | ||
</a> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SocialMediaLinks; |
Oops, something went wrong.