Skip to content

Commit

Permalink
Social Links: add Bluesky logo
Browse files Browse the repository at this point in the history
  • Loading branch information
jeherve committed Dec 20, 2023
1 parent 4173b30 commit d3cc1d7
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/block-library/src/social-link/icons/bluesky.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* WordPress dependencies
*/
import { Path, SVG } from '@wordpress/primitives';

export const BlueskyIcon = () => (
<SVG width="24" height="24" viewBox="0 0 24 24" version="1.1">
<Path d="M21.2 3.3C20.7 3.1 19.8 2.8 17.6 4.3C15.4 6 12.9 9.2 12 11C11.1 9.2 8.6 6 6.3 4.3C4.1 2.7 3.3 3 2.7 3.3C2.1 3.6 2 4.6 2 5.1C2 5.6 2.3 9.8 2.5 10.5C3.2 12.8 5.6 13.6 7.8 13.3C4.5 13.8 1.6 15 5.4 19.2C9.6 23.5 11.1 18.3 11.9 15.6C12.7 18.3 13.6 23.3 18.3 19.2C21.9 15.6 19.3 13.8 16 13.3C18.2 13.5 20.6 12.8 21.3 10.5C21.7 9.8 22 5.7 22 5.1C22 4.6 21.9 3.6 21.2 3.3Z" />
</SVG>
);
1 change: 1 addition & 0 deletions packages/block-library/src/social-link/icons/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export * from './amazon';
export * from './bandcamp';
export * from './behance';
export * from './bluesky';
export * from './chain';
export * from './codepen';
export * from './deviantart';
Expand Down
4 changes: 4 additions & 0 deletions packages/block-library/src/social-link/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ function block_core_social_link_services( $service = '', $field = '' ) {
'name' => 'Behance',
'icon' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M7.799,5.698c0.589,0,1.12,0.051,1.606,0.156c0.482,0.102,0.894,0.273,1.241,0.507c0.344,0.235,0.612,0.546,0.804,0.938 c0.188,0.387,0.281,0.871,0.281,1.443c0,0.619-0.141,1.137-0.421,1.551c-0.284,0.413-0.7,0.751-1.255,1.014 c0.756,0.218,1.317,0.601,1.689,1.146c0.374,0.549,0.557,1.205,0.557,1.975c0,0.623-0.12,1.161-0.359,1.612 c-0.241,0.457-0.569,0.828-0.973,1.114c-0.408,0.288-0.876,0.5-1.399,0.637C9.052,17.931,8.514,18,7.963,18H2V5.698H7.799 M7.449,10.668c0.481,0,0.878-0.114,1.192-0.345c0.311-0.228,0.463-0.603,0.463-1.119c0-0.286-0.051-0.523-0.152-0.707 C8.848,8.315,8.711,8.171,8.536,8.07C8.362,7.966,8.166,7.894,7.94,7.854c-0.224-0.044-0.457-0.06-0.697-0.06H4.709v2.874H7.449z M7.6,15.905c0.267,0,0.521-0.024,0.759-0.077c0.243-0.053,0.457-0.137,0.637-0.261c0.182-0.12,0.332-0.283,0.441-0.491 C9.547,14.87,9.6,14.602,9.6,14.278c0-0.633-0.18-1.084-0.533-1.357c-0.356-0.27-0.83-0.404-1.413-0.404H4.709v3.388L7.6,15.905z M16.162,15.864c0.367,0.358,0.897,0.538,1.583,0.538c0.493,0,0.92-0.125,1.277-0.374c0.354-0.248,0.571-0.514,0.654-0.79h2.155 c-0.347,1.072-0.872,1.838-1.589,2.299C19.534,18,18.67,18.23,17.662,18.23c-0.701,0-1.332-0.113-1.899-0.337 c-0.567-0.227-1.041-0.544-1.439-0.958c-0.389-0.415-0.689-0.907-0.904-1.484c-0.213-0.574-0.32-1.21-0.32-1.899 c0-0.666,0.11-1.288,0.329-1.863c0.222-0.577,0.529-1.075,0.933-1.492c0.406-0.42,0.885-0.751,1.444-0.994 c0.558-0.241,1.175-0.363,1.857-0.363c0.754,0,1.414,0.145,1.98,0.44c0.563,0.291,1.026,0.686,1.389,1.181 c0.363,0.493,0.622,1.057,0.783,1.69c0.16,0.632,0.217,1.292,0.171,1.983h-6.428C15.557,14.84,15.795,15.506,16.162,15.864 M18.973,11.184c-0.291-0.321-0.783-0.496-1.384-0.496c-0.39,0-0.714,0.066-0.973,0.2c-0.254,0.132-0.461,0.297-0.621,0.491 c-0.157,0.197-0.265,0.405-0.328,0.628c-0.063,0.217-0.101,0.413-0.111,0.587h3.98C19.478,11.969,19.265,11.509,18.973,11.184z M15.057,7.738h4.985V6.524h-4.985L15.057,7.738z"></path></svg>',
),
'bluesky' => array(
'name' => 'Bluesky',
'icon' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M21.2 3.3C20.7 3.1 19.8 2.8 17.6 4.3C15.4 6 12.9 9.2 12 11C11.1 9.2 8.6 6 6.3 4.3C4.1 2.7 3.3 3 2.7 3.3C2.1 3.6 2 4.6 2 5.1C2 5.6 2.3 9.8 2.5 10.5C3.2 12.8 5.6 13.6 7.8 13.3C4.5 13.8 1.6 15 5.4 19.2C9.6 23.5 11.1 18.3 11.9 15.6C12.7 18.3 13.6 23.3 18.3 19.2C21.9 15.6 19.3 13.8 16 13.3C18.2 13.5 20.6 12.8 21.3 10.5C21.7 9.8 22 5.7 22 5.1C22 4.6 21.9 3.6 21.2 3.3Z" /></svg>',
),
'chain' => array(
'name' => 'Link',
'icon' => '<svg width="24" height="24" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><path d="M15.6,7.2H14v1.5h1.6c2,0,3.7,1.7,3.7,3.7s-1.7,3.7-3.7,3.7H14v1.5h1.6c2.8,0,5.2-2.3,5.2-5.2,0-2.9-2.3-5.2-5.2-5.2zM4.7,12.4c0-2,1.7-3.7,3.7-3.7H10V7.2H8.4c-2.9,0-5.2,2.3-5.2,5.2,0,2.9,2.3,5.2,5.2,5.2H10v-1.5H8.4c-2,0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z"></path></svg>',
Expand Down
5 changes: 5 additions & 0 deletions packages/block-library/src/social-link/socials-with-bg.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
color: #fff;
}

.wp-social-link-bluesky {
background-color: #0085ff;
color: #fff;
}

.wp-social-link-codepen {
background-color: #1e1f26;
color: #fff;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
color: #0757fe;
}

.wp-social-link-bluesky {
color: #0085ff;
}

.wp-social-link-codepen {
color: #1e1f26;
}
Expand Down
7 changes: 7 additions & 0 deletions packages/block-library/src/social-link/variations.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
AmazonIcon,
BandcampIcon,
BehanceIcon,
BlueskyIcon,
ChainIcon,
CodepenIcon,
DeviantArtIcon,
Expand Down Expand Up @@ -83,6 +84,12 @@ const variations = [
title: 'Behance',
icon: BehanceIcon,
},
{
name: 'bluesky',
attributes: { service: 'bluesky' },
title: 'Bluesky',
icon: BlueskyIcon,
},
{
name: 'chain',
attributes: { service: 'chain' },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:social-link-threads {"url":"https://example.com/"} /-->
11 changes: 11 additions & 0 deletions test/integration/fixtures/blocks/core__social-link-bluesky.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"name": "core/social-link",
"isValid": true,
"attributes": {
"url": "https://example.com/",
"service": "threads"
},
"innerBlocks": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"blockName": "core/social-link-threads",
"attrs": {
"url": "https://example.com/"
},
"innerBlocks": [],
"innerHTML": "",
"innerContent": []
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!-- wp:social-link {"url":"https://example.com/","service":"threads"} /-->

0 comments on commit d3cc1d7

Please sign in to comment.