Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mentor-medier/author-bio-block

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mentor-medier/author-bio-block - npm Package Compare versions

Comparing version 0.0.0-beta.078772c to 0.0.0-beta.13c0a0f

32

CHANGELOG.md

@@ -6,2 +6,34 @@ # Change Log

## [5.10.3](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.10.1...v5.10.3) (2021-03-12)
# [5.10.0](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.9.15...v5.10.0) (2021-02-17)
**Note:** Version bump only for package @mentor-medier/author-bio-block
## [5.10.2](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.10.1...v5.10.2) (2021-03-12)
# [5.10.0](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.9.15...v5.10.0) (2021-02-17)
**Note:** Version bump only for package @mentor-medier/author-bio-block
# [5.10.0](https://github.com/mentor-medier/fusion-news-theme-blocks/compare/v5.9.15...v5.10.0) (2021-02-17)
**Note:** Version bump only for package @mentor-medier/author-bio-block
## [5.9.2](https://github.com/WPMedia/fusion-news-theme-blocks/compare/v5.9.1...v5.9.2) (2021-01-14)

@@ -8,0 +40,0 @@

130

features/author-bio/default.jsx

@@ -48,2 +48,12 @@ import React, { Fragment } from 'react';

export const getSocialLinkAriaLabel = (authorName = 'author', webService) => {
if (!webService) return null;
return (
(webService.toLowerCase() === 'soundcloud' && `Listen to ${authorName} on SoundCloud`)
|| (webService.toLowerCase() === 'rss' && `Subscribe to ${authorName} RSS feed`)
|| (webService.toLowerCase() === 'email' && `Send an email to ${authorName}`)
|| `Connect with ${authorName} on ${webService}`
);
};
const renderAuthorInfo = (author, arcSite) => {

@@ -84,3 +94,3 @@ const {

const authors = by.reduce((authorList, author) => {
const { additional_properties: additionalProperties } = author;
const { additional_properties: additionalProperties, name } = author;
const { original } = additionalProperties;

@@ -103,163 +113,185 @@

let socialButton;
let linkTitle;
const constructedURL = constructSocialURL(socialLink.site, socialLink.url);
const MediaLink = ({ children, webService, ...otherProps }) => (
<MediaLinksStyled
href={constructedURL}
target="_blank"
rel="noreferrer noopener"
aria-label={getSocialLinkAriaLabel(name, webService)}
primaryColor={getThemeStyle(arcSite)['primary-color']}
{...otherProps}
>
{ children }
</MediaLinksStyled>
);
switch (socialLink.site) {
case 'linkedin':
linkTitle = 'LinkedIn';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<LinkedInIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="LinkedIn"
title={linkTitle}
description="Connect on LinkedIn"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'twitter':
linkTitle = 'Twitter';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<TwitterIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="Twitter"
title={linkTitle}
description="Connect on Twitter"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'instagram':
linkTitle = 'Instagram';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<InstagramIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="Instagram"
title={linkTitle}
description="Connect on Instagram"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'facebook':
linkTitle = 'Facebook';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<FacebookIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="Facebook"
title={linkTitle}
description="Connect on Facebook"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'reddit':
linkTitle = 'Reddit';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<RedditIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="Reddit"
title={linkTitle}
description="Connect on Reddit"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'youtube':
linkTitle = 'YouTube';
socialButton = (
<MediaLinksStyled
href={constructedURL}
target="_blank"
rel="noreferrer noopener"
id="link-social-youtube"
primaryColor={getThemeStyle(arcSite)['primary-color']}
>
<MediaLink webService={linkTitle} id="link-social-youtube">
<YoutubeIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="YouTube"
title={linkTitle}
description="Connect on YouTube"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'medium':
linkTitle = 'Medium';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<MediumIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="Medium"
title={linkTitle}
description="Connect on Medium"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'tumblr':
linkTitle = 'Tumblr';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<TumblrIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="Tumblr"
title={linkTitle}
description="Connect on Tumblr"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'pinterest':
linkTitle = 'Pinterest';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<PinterestIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="Pinterest"
title={linkTitle}
description="Connect on Pinterest"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'snapchat':
linkTitle = 'Snapchat';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<SnapchatIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="Snapchat"
title={linkTitle}
description="Connect on Snapchat"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'whatsapp':
linkTitle = 'WhatsApp';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<WhatsAppIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="WhatsApp"
title={linkTitle}
description="Connect on WhatsApp"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'soundcloud':
linkTitle = 'SoundCloud';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<SoundCloudIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="SoundCloud"
title={linkTitle}
description="Listen on SoundCloud"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
case 'rss':
linkTitle = 'RSS';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<RssIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="RSS"
title={linkTitle}
description="Subscribe to RSS feed"
/>
</MediaLinksStyled>
</MediaLink>
);
break;
default:
linkTitle = 'Email';
socialButton = (
<MediaLinksStyled href={constructedURL} target="_blank" rel="noreferrer noopener" primaryColor={getThemeStyle(arcSite)['primary-color']}>
<MediaLink webService={linkTitle}>
<EnvelopeIcon
fill={getThemeStyle(arcSite)['primary-color']}
title="Email"
title={linkTitle}
description="Send an email"
/>
</MediaLinksStyled>
</MediaLink>
);

@@ -266,0 +298,0 @@ break;

{
"name": "@mentor-medier/author-bio-block",
"version": "0.0.0-beta.078772c",
"version": "0.0.0-beta.13c0a0f",
"description": "Fusion News Theme byline block",

@@ -32,3 +32,3 @@ "author": "SangHee Kim <sanghee.kim@washpost.com>",

},
"gitHead": "078772c6573a91ba7c8d93d55b3b9cc56d8f1d47"
"gitHead": "13c0a0ff04be3038d0b37d195de2f3037a5c0f66"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc