New blocks: Add blocks for the pledge contributors & pledge teams lists

This commit is contained in:
Kelly Dwan 2024-08-28 19:45:27 -04:00
parent cbabdbb33e
commit b22bde9415
No known key found for this signature in database
GPG key ID: 8BA5575F3D11575D
13 changed files with 1030 additions and 9 deletions

View file

@ -279,3 +279,262 @@ function reset_contribution_data( $user_id ): void {
'bp_xprofile_data'
);
}
/**
* Determines the CSS classes for a given team badge.
*
* Based on the `wporg_profiles_get_association_classes` function in the profiles.wordpress.org theme.
*
* @param string $team
*
* @return array
*/
function get_association_classes( $team ) {
switch ( sanitize_title( $team ) ) {
case 'plugin-developer':
$classes = array( 'badge-plugins', 'dashicons-admin-plugins' );
break;
case 'theme-review-team':
case 'themes-team':
$classes = array( 'badge-themes-reviewer', 'dashicons-admin-appearance' );
break;
case 'theme-developer':
$classes = array( 'badge-themes', 'dashicons-admin-appearance' );
break;
case 'documentation-team':
$classes = array( 'badge-documentation', 'dashicons-admin-page' );
break;
case 'documentation-contributor':
$classes = array( 'badge-documentation-contributor', 'dashicons-admin-page' );
break;
case 'core-team':
case 'playground-team':
$classes = array( 'badge-code-committer', 'dashicons-editor-code' );
break;
case 'core-contributor':
$classes = array( 'badge-code', 'dashicons-editor-code' );
break;
case 'mobile-team':
$classes = array( 'badge-mobile', 'dashicons-smartphone' );
break;
case 'accessibility-team':
$classes = array( 'badge-accessibility', 'dashicons-universal-access' );
break;
case 'accessibility-contributor':
$classes = array( 'badge-accessibility-contributor', 'dashicons-universal-access' );
break;
case 'plugin-review-team':
$classes = array( 'badge-plugins-reviewer ', 'dashicons-admin-plugins' );
break;
case 'community-team':
$classes = array( 'badge-community', 'dashicons-groups' );
break;
case 'community-contributor':
$classes = array( 'badge-community-contributor', 'dashicons-groups' );
break;
case 'support-team':
$classes = array( 'badge-support', 'dashicons-format-chat' );
break;
case 'support-contributor':
$classes = array( 'badge-support-contributor', 'dashicons-format-chat' );
break;
case 'meta-team':
$classes = array( 'badge-meta', 'dashicons-networking' );
break;
case 'meta-contributor':
$classes = array( 'badge-meta-contributor', 'dashicons-networking' );
break;
case 'training-team':
$classes = array( 'badge-training', 'dashicons-welcome-learn-more' );
break;
case 'training-contributor':
$classes = array( 'badge-training-contributor', 'dashicons-welcome-learn-more' );
break;
case 'translation-contributor':
$classes = array( 'badge-translation-contributor', 'dashicons-translation' );
break;
case 'polyglots-team':
case 'translation-editor':
$classes = array( 'badge-translation-editor', 'dashicons-translation' );
break;
case 'wordcamp-speaker':
$classes = array( 'badge-speaker', 'dashicons-megaphone' );
break;
case 'wordcamp-organizer':
$classes = array( 'badge-organizer', 'dashicons-tickets' );
break;
case 'meetup-organizer':
$classes = array( 'badge-organizer', 'dashicons-nametag' );
break;
case 'tv-team':
case 'wordpress-tv-team':
$classes = array( 'badge-wordpress-tv', 'dashicons-video-alt2' );
break;
case 'wordpress-tv-contributor':
$classes = array( 'badge-wordpress-tv-contributor', 'dashicons-video-alt2' );
break;
case 'design':
case 'design-team':
$classes = array( 'badge-design', 'dashicons-art' );
break;
case 'design-contributor':
$classes = array( 'badge-design-contributor', 'dashicons-art' );
break;
case 'marketing-team':
$classes = array( 'badge-marketing', 'dashicons-format-status' );
break;
case 'marketing-contributor':
$classes = array( 'badge-marketing-contributor', 'dashicons-format-status' );
break;
case 'media-corps-team':
$classes = array( 'badge-media-corps-team', 'dashicons-format-status' );
break;
case 'media-corps-contributor':
$classes = array( 'badge-media-corps-contributor', 'dashicons-format-status' );
break;
case 'wp-cli-team':
case 'cli-team':
$classes = array( 'badge-wp-cli', 'dashicons-arrow-right-alt2' );
break;
case 'cli-contributor':
$classes = array( 'badge-wp-cli-contributor', 'dashicons-arrow-right-alt2' );
break;
case 'hosting-team':
$classes = array( 'badge-hosting', 'dashicons-cloud' );
break;
case 'hosting-contributor':
$classes = array( 'badge-hosting-contributor', 'dashicons-cloud' );
break;
case 'tide-team':
$classes = array( 'badge-tide', 'dashicons-tide' );
break;
case 'tide-contributor':
$classes = array( 'badge-tide-contributor', 'dashicons-tide' );
break;
case 'security-team':
$classes = array( 'badge-security-team', 'dashicons-lock' );
break;
case 'security-contributor':
$classes = array( 'badge-security-contributor', 'dashicons-lock' );
break;
case 'buddypress-team':
// Logo defined as SVG in CSS.
$classes = array( 'badge-buddypress' );
break;
case 'buddypress-contributor':
// Logo defined as SVG in CSS.
$classes = array( 'badge-buddypress-contributor' );
break;
case 'bbpress-team':
$classes = array( 'badge-bbpress', 'dashicons-buddicons-replies' );
break;
case 'bbpress-contributor':
$classes = array( 'badge-bbpress-contributor', 'dashicons-buddicons-replies' );
break;
case 'test-team':
$classes = array( 'badge-test', 'dashicons-welcome-view-site' );
break;
case 'test-contributor':
$classes = array( 'badge-test-contributor', 'dashicons-welcome-view-site' );
break;
case 'openverse-team':
// Logo defined as SVG in CSS.
$classes = array( 'badge-openverse' );
break;
case 'openverse-contributor':
// Logo defined as SVG in CSS.
$classes = array( 'badge-openverse-contributor' );
break;
case 'patterns-team':
$classes = array( 'badge-patterns-team', 'dashicons-layout' );
break;
case 'pattern-author':
$classes = array( 'badge-pattern-author', 'dashicons-layout' );
break;
case 'photos-team':
$classes = array( 'badge-photos-team', 'dashicons-camera' );
break;
case 'photo-contributor':
$classes = array( 'badge-photo-contributor', 'dashicons-camera' );
break;
case 'performance-team':
// Logo defined as SVG in CSS.
$classes = array( 'badge-performance-team' );
break;
case 'performance-contributor':
// Logo defined as SVG in CSS.
$classes = array( 'badge-performance-contributor' );
break;
case 'sustainability-team':
$classes = array( 'badge-sustainability-team', 'dashicons-admin-site-alt3' );
break;
case 'sustainability-contributor':
$classes = array( 'badge-sustainability-contributor', 'dashicons-admin-site-alt3' );
break;
case 'wordcamp-volunteer':
$classes = array( 'badge-wordcamp-volunteer', 'dashicons-hammer' );
break;
default:
$classes = array( 'badge-unknown', 'dashicons-editor-help' );
break;
}
return $classes;
}

View file

@ -9,7 +9,9 @@ require_once __DIR__ . '/inc/block-config.php';
require_once __DIR__ . '/inc/block-bindings.php';
// Block files.
require_once __DIR__ . '/src/pledge-contributors/index.php';
require_once __DIR__ . '/src/pledge-edit-button/index.php';
require_once __DIR__ . '/src/pledge-teams/index.php';
/**
* Actions and filters.

View file

@ -18,7 +18,7 @@
<div class="wp-block-group">
<!-- wp:post-title {"level":1,"style":{"spacing":{"margin":{"top":"0"}}}} /-->
<!-- wp:group {"layout":{"type":"flex","flexWrap":"nowrap"}} -->
<!-- wp:group {"style":{"spacing":{"blockGap":"var:preset|spacing|10"}},"layout":{"type":"flex","flexWrap":"wrap"}} -->
<div class="wp-block-group">
<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"wporg-5ftf/pledge-meta","args":{"key":"org-url-link"}}}}} -->
<p>https://url.com</p>
@ -72,9 +72,7 @@
<p></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p>{Team list}</p>
<!-- /wp:paragraph -->
<!-- wp:wporg/pledge-teams /-->
</div>
<!-- /wp:column -->
</div>
@ -82,12 +80,10 @@
<!-- wp:group {"align":"wide","layout":{"type":"default"}} -->
<div class="wp-block-group alignwide">
<!-- wp:heading -->
<h2 class="wp-block-heading">Contributors</h2>
<!-- wp:heading {"style":{"spacing":{"margin":{"bottom":"var:preset|spacing|40"}}} -->
<h2 class="wp-block-heading" style="margin-bottom:var(--wp--preset--spacing--40);">Contributors</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>{Avatar list}</p>
<!-- /wp:paragraph -->
<!-- wp:wporg/pledge-contributors /-->
</div>
<!-- /wp:group -->

View file

@ -0,0 +1,18 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "wporg/pledge-contributors",
"version": "0.1.0",
"title": "Pledge contributors",
"category": "design",
"icon": "",
"description": "List out the contributors for this organization's pledge.",
"textdomain": "wporg",
"supports": {
"html": false
},
"usesContext": [ "postId", "postType" ],
"editorScript": "file:./index.js",
"style": "file:./style-index.css",
"render": "file:./render.php"
}

View file

@ -0,0 +1,25 @@
/**
* WordPress dependencies
*/
import { registerBlockType } from '@wordpress/blocks';
import { useBlockProps } from '@wordpress/block-editor';
/**
* Internal dependencies
*/
import metadata from './block.json';
import './style.scss';
const Edit = ( { attributes, name } ) => {
const blockProps = useBlockProps();
return (
<div { ...blockProps }>
<ServerSideRender block={ name } attributes={ attributes } skipBlockSupportAttributes />
</div>
);
};
registerBlockType( metadata.name, {
edit: Edit,
save: () => null,
} );

View file

@ -0,0 +1,20 @@
<?php
/**
* Block Name: Pledge contributors
* Description: List out the contributors for this organization's pledge.
*
* @package wporg
*/
namespace WordPressdotorg\Theme\FiveForTheFuture_2024\Pledge_Contributors;
defined( 'WPINC' ) || die();
add_action( 'init', __NAMESPACE__ . '\init' );
/**
* Register the block.
*/
function init() {
register_block_type( dirname( __DIR__, 2 ) . '/build/pledge-contributors' );
}

View file

@ -0,0 +1,32 @@
<?php
use WordPressDotOrg\FiveForTheFuture\Contributor;
if ( ! $block->context['postId'] ) {
return '';
}
$contributors = Contributor\get_contributor_user_objects(
Contributor\get_pledge_contributors( $block->context['postId'], 'publish' )
);
?>
<div
<?php echo get_block_wrapper_attributes(); // phpcs:ignore ?>
>
<?php if ( ! empty( $contributors ) ) : ?>
<ul class="pledge-contributors">
<?php foreach ( $contributors as $contributor ) : ?>
<li class="pledge-contributor">
<span class="pledge-contributor__avatar">
<a href="<?php echo esc_url( 'https://profiles.wordpress.org/' . $contributor->user_nicename . '/' ); ?>">
<?php echo get_avatar( $contributor->user_email, 280, 'mystery', $contributor->display_name ); ?>
</a>
</span>
</li>
<?php endforeach; ?>
</ul>
<?php else : ?>
<p><?php esc_html_e( 'No confirmed contributors yet.', 'wporg-5ftf' ); ?></p>
<?php endif; ?>
</div>

View file

@ -0,0 +1,30 @@
.wp-block-wporg-pledge-contributors ul {
display: flex;
flex-wrap: wrap;
gap: var(--wp--preset--spacing--10);
list-style: none;
padding-left: 0;
li {
width: 70px;
height: 70px;
}
.pledge-contributor__avatar a {
display: inline-block;
background: var(--wp--preset--color--light-grey-2);
border-radius: 50%;
&:focus {
outline: 1.5px solid var(--wp--preset--color--white);
box-shadow: 0 0 0 3px var(--wp--preset--color--blueberry-1);
}
img {
vertical-align: middle;
border-radius: 50%;
max-width: 100%;
height: auto;
}
}
}

View file

@ -0,0 +1,18 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "wporg/pledge-teams",
"version": "0.1.0",
"title": "Pledge teams",
"category": "design",
"icon": "",
"description": "List out the teams supported by this organization's pledge.",
"textdomain": "wporg",
"supports": {
"html": false
},
"usesContext": [ "postId", "postType" ],
"editorScript": "file:./index.js",
"style": "file:./style-index.css",
"render": "file:./render.php"
}

View file

@ -0,0 +1,25 @@
/**
* WordPress dependencies
*/
import { registerBlockType } from '@wordpress/blocks';
import { useBlockProps } from '@wordpress/block-editor';
/**
* Internal dependencies
*/
import metadata from './block.json';
import './style.scss';
const Edit = ( { attributes, name } ) => {
const blockProps = useBlockProps();
return (
<div { ...blockProps }>
<ServerSideRender block={ name } attributes={ attributes } skipBlockSupportAttributes />
</div>
);
};
registerBlockType( metadata.name, {
edit: Edit,
save: () => null,
} );

View file

@ -0,0 +1,20 @@
<?php
/**
* Block Name: Pledge teams
* Description: List out the teams supported by this organization's pledge.
*
* @package wporg
*/
namespace WordPressdotorg\Theme\FiveForTheFuture_2024\Pledge_Teams;
defined( 'WPINC' ) || die();
add_action( 'init', __NAMESPACE__ . '\init' );
/**
* Register the block.
*/
function init() {
register_block_type( dirname( __DIR__, 2 ) . '/build/pledge-teams' );
}

View file

@ -0,0 +1,25 @@
<?php
use WordPressDotOrg\FiveForTheFuture\XProfile;
if ( ! $block->context['postId'] ) {
return '';
}
$contribution_data = XProfile\get_aggregate_contributor_data_for_pledge( $block->context['postId'] );
?>
<div
<?php echo get_block_wrapper_attributes(); // phpcs:ignore ?>
>
<ul class="team-grid">
<?php foreach ( $contribution_data['teams'] as $team ) :
$badge_classes = XProfile\get_association_classes( $team );
?>
<li>
<div class="badge item dashicons <?php echo esc_attr( implode( ' ', $badge_classes ) ); ?>"></div>
<span class="badge-label"><?php echo esc_html( $team ); ?></span>
</li>
<?php endforeach; ?>
</ul>
</div>

View file

@ -0,0 +1,551 @@
.team-grid {
display: grid;
grid-template-columns: 1fr;
gap: var(--wp--preset--spacing--10);
margin: 0;
padding-left: 0;
list-style: none;
@media (min-width: 420px) {
grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px) {
grid-template-columns: repeat(3, 1fr);
}
@media (min-width: 782px) {
grid-template-columns: 1fr;
}
@media (min-width: 1000px) {
grid-template-columns: repeat(2, 1fr);
}
li {
display: flex;
align-items: center;
gap: var(--wp--preset--spacing--10);
}
.badge-label {
font-size: var(--wp--preset--font-size--extra-small);
line-height: var(--wp--custom--body--extra-small--typography--line-height);
}
}
/* Copied from the profiles.wordpress.org theme stylesheet, minor formatting edits. */
.badge {
margin: 4px;
width: 32px;
height: 32px;
border: 2px solid #fff;
border-radius: 50%;
box-sizing: border-box;
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
}
.badge-unknown {
background: #fff;
box-shadow: 0 0 0 4px rgb(199, 199, 199);
&::before {
color: rgb(199, 199, 199);
}
}
.badge-themes-reviewer {
background: rgba(78, 50, 136, 0.25);
box-shadow: 0 0 0 4px rgb(78, 50, 136);
&::before {
color: rgb(78, 50, 136);
}
}
.badge-themes {
background: #fff;
box-shadow: 0 0 0 4px rgb(78, 50, 136);
&::before {
color: rgb(78, 50, 136);
}
}
.badge-plugins-reviewer {
background: rgba(240, 103, 35, 0.25);
box-shadow: 0 0 0 4px rgb(240, 103, 35);
&::before {
color: rgb(240, 103, 35);
}
}
.badge-plugins {
background: #fff;
box-shadow: 0 0 0 4px rgb(240, 103, 35);
&::before {
color: rgb(240, 103, 35);
}
}
.badge-community {
background: rgba(17, 121, 157, 0.25);
box-shadow: 0 0 0 4px rgb(17, 121, 157);
&::before {
color: rgb(17, 121, 157);
}
}
.badge-community-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(17, 121, 157);
&::before {
color: rgb(17, 121, 157);
}
}
.badge-meta {
background: rgba(174, 173, 173, 0.25);
box-shadow: 0 0 0 4px rgb(174, 173, 173);
&::before {
color: rgb(174, 173, 173);
}
}
.badge-meta-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(174, 173, 173);
&::before {
color: rgb(174, 173, 173);
}
}
.badge-code-committer {
background: rgba(205, 0, 0, 0.25);
box-shadow: 0 0 0 4px rgb(205, 0, 0);
&::before {
color: rgb(205, 0, 0);
}
}
.badge-code {
background: #fff;
box-shadow: 0 0 0 4px rgb(205, 0, 0);
&::before {
color: rgb(205, 0, 0);
}
}
.badge-support {
background: rgba(51, 180, 206, 0.25);
box-shadow: 0 0 0 4px rgb(51, 180, 206);
&::before {
color: rgb(51, 180, 206);
}
}
.badge-support-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(51, 180, 206);
&::before {
color: rgb(51, 180, 206);
}
}
.badge-wordpress-tv {
background: rgba(115, 173, 48, 0.25);
box-shadow: 0 0 0 4px rgb(115, 173, 48);
&::before {
color: rgb(115, 173, 48);
}
}
.badge-wordpress-tv-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(115, 173, 48);
&::before {
color: rgb(115, 173, 48);
}
}
.badge-organizer {
background: #fff;
box-shadow: 0 0 0 4px rgb(247, 173, 67);
&::before {
color: rgb(247, 173, 67);
}
}
.badge-speaker {
background: #fff;
box-shadow: 0 0 0 4px rgb(247, 173, 67);
&::before {
color: rgb(247, 173, 67);
}
}
.badge-accessibility {
background: rgba(17, 121, 157, 0.25);
box-shadow: 0 0 0 4px rgb(17, 121, 157);
&::before {
color: rgb(17, 121, 157);
}
}
.badge-accessibility-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(17, 121, 157);
&::before {
color: rgb(17, 121, 157);
}
}
.badge-documentation {
background: rgba(59, 114, 54, 0.25);
box-shadow: 0 0 0 4px rgb(59, 114, 54);
&::before {
color: rgb(59, 114, 54);
}
}
.badge-documentation-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(59, 114, 54);
&::before {
color: rgb(59, 114, 54);
}
}
.badge-mobile {
background: rgba(251, 161, 108, 0.25);
box-shadow: 0 0 0 4px rgb(251, 161, 108);
&::before {
color: rgb(251, 161, 108);
}
}
.badge-training {
background: rgba(233, 192, 45, 0.25);
box-shadow: 0 0 0 4px rgb(233, 192, 45);
&::before {
color: rgb(233, 192, 45);
}
}
.badge-training-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(233, 192, 45);
&::before {
color: rgb(233, 192, 45);
}
}
.badge-translation-editor {
background: rgba(195, 34, 131, 0.25);
box-shadow: 0 0 0 4px rgb(195, 34, 131);
&::before {
color: rgb(195, 34, 131);
}
}
.badge-translation-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(195, 34, 131);
&::before {
color: rgb(195, 34, 131);
}
}
.badge-design {
background: rgba(238, 194, 106, 0.25);
box-shadow: 0 0 0 4px rgb(238, 194, 106);
&::before {
color: rgb(238, 194, 106);
}
}
.badge-design-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(238, 194, 106);
&::before {
color: rgb(238, 194, 106);
}
}
.badge-marketing {
background: rgba(71, 190, 167, 0.25);
box-shadow: 0 0 0 4px rgb(71, 190, 167);
&::before {
color: rgb(71, 190, 167);
}
}
.badge-marketing-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(71, 190, 167);
&::before {
color: rgb(71, 190, 167);
}
}
.badge-media-corps-team,
.badge-media-corps-contributor {
background: rgba(19, 159, 148, 0.25);
box-shadow: 0 0 0 4px rgb(19, 159, 148);
&::before {
color: rgb(19, 159, 148);
}
}
.badge-media-corps-contributor {
background: #fff;
}
.badge-wp-cli {
background: rgba(66, 66, 66, 0.25);
box-shadow: 0 0 0 4px rgb(66, 66, 66);
&::before {
color: rgb(66, 66, 66);
}
}
.badge-wp-cli-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(66, 66, 66);
&::before {
color: rgb(66, 66, 66);
}
}
.badge-hosting {
background: rgba(83, 88, 166, 0.25);
box-shadow: 0 0 0 4px rgb(83, 88, 166);
&::before {
color: rgb(83, 88, 166);
}
}
.badge-hosting-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(83, 88, 166);
&::before {
color: rgb(83, 88, 166);
}
}
.badge-tide {
background: rgba(21, 38, 255, 0.25);
box-shadow: 0 0 0 4px rgb(21, 38, 255);
&::before {
color: rgb(21, 38, 255);
}
}
.badge-tide-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(21, 38, 255);
&::before {
color: rgb(21, 38, 255);
}
}
.badge-security-team,
.badge-security-contributor {
background: rgba(0, 204, 58, 0.25);
box-shadow: 0 0 0 4px rgb(0, 204, 58);
&::before {
color: rgb(0, 204, 58);
}
}
.badge-security-contributor {
background: unset;
}
.badge-bbpress {
background: rgba(45, 142, 66, 0.25);
box-shadow: 0 0 0 4px rgb(45, 142, 66);
&::before {
color: rgb(45, 142, 66);
}
}
.badge-bbpress-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(45, 142, 66);
&::before {
color: rgb(45, 142, 66);
}
}
.badge-buddypress,
.badge-buddypress-contributor {
box-shadow: 0 0 0 4px rgb(216, 72, 0);
/* stylelint-disable-next-line */
background: url('data:image/svg+xml;UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="%23d84800" d="M12.377 1.3c-.913-.041-1.756.124-2.242.436-.233.15-.234.15.35.361 1.637.593 2.972 2.183 3.304 3.934.201 1.06.03 2.31-.444 3.246l-.248.488.223-.064c1.077-.311 2.203-1.272 2.674-2.281 1.036-2.217.119-4.743-2.098-5.78-.536-.252-.788-.307-1.52-.34zM8.771 2.736a4.318 4.318 0 00-4.428 3.64c-.368 2.228 1.181 4.47 3.39 4.904 3.13.614 5.84-2.244 5.04-5.315-.206-.792-.483-1.279-1.072-1.896-.593-.623-1.201-.984-2.01-1.195a4.372 4.372 0 00-.92-.138zm6.117 7.386l-.366.438c-.326.388-.349.446-.194.499.963.325 2.04 1.237 2.508 2.124.404.766.775 1.84.847 2.45.033.281.075.566.095.632.027.086.308.12.969.12h.931l-.064-.89c-.094-1.295-.297-2.136-.726-3.006-.704-1.428-1.843-2.24-3.262-2.323l-.738-.044zm-9.39 1.198l-.595.081c-.78.106-1.667.404-2.193.738-.573.365-1.365 1.252-1.664 1.865C.53 15.064.212 16.98.358 18.15l.068.545 8.194-.025 8.192-.024.03-.911c.066-2.164-.524-3.847-1.775-5.063-.655-.636-1.724-1.126-2.793-1.28l-.499-.071-1.52 1.522c-.836.837-1.564 1.523-1.619 1.523-.054 0-.782-.686-1.618-1.523l-1.52-1.522z"/></svg>') no-repeat center/75%;
}
.badge-buddypress {
background-color: rgb(216, 72, 0, 0.25);
}
.badge-test {
background: rgba(0, 128, 128, 0.25);
box-shadow: 0 0 0 4px rgb(0, 128, 128);
&::before {
color: rgb(0, 128, 128);
}
}
.badge-test-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(0, 128, 128);
&::before {
color: rgb(0, 128, 128);
}
}
.badge-openverse {
background: rgba(197, 43, 155, 0.25);
box-shadow: 0 0 0 4px rgb(197, 43, 155);
&::before {
color: rgb(197, 43, 155);
}
}
.badge-openverse-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(197, 43, 155);
&::before {
color: rgb(197, 43, 155);
}
}
.badge-openverse,
.badge-openverse-contributor {
/* stylelint-disable-next-line */
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M142.044 93.023c16.159 0 29.259-13.213 29.259-29.512 0-16.298-13.1-29.511-29.259-29.511s-29.259 13.213-29.259 29.511c0 16.299 13.1 29.512 29.259 29.512ZM28 63.511c0 16.24 12.994 29.512 29.074 29.512V34C40.994 34 28 47.19 28 63.511ZM70.392 63.511c0 16.24 12.994 29.512 29.074 29.512V34c-15.998 0-29.074 13.19-29.074 29.511ZM142.044 165.975c16.159 0 29.259-13.213 29.259-29.512 0-16.298-13.1-29.511-29.259-29.511s-29.259 13.213-29.259 29.511c0 16.299 13.1 29.512 29.259 29.512ZM70.392 136.414c0 16.257 12.994 29.544 29.074 29.544v-59.006c-15.999 0-29.074 13.204-29.074 29.462ZM28 136.414c0 16.34 12.994 29.544 29.074 29.544v-59.006c-16.08 0-29.074 13.204-29.074 29.462Z' fill='%23C52B9B'/%3E%3C/svg%3E%0A");
background-position: center;
background-repeat: no-repeat;
}
.badge-patterns-team,
.badge-pattern-author {
background: rgba(146, 75, 179, 0.25);
box-shadow: 0 0 0 4px rgb(146, 75, 179);
&::before {
color: rgb(146, 75, 179);
}
}
.badge-pattern-author {
background: #fff;
}
.badge-photos-team,
.badge-photo-contributor {
background: rgba(203, 0, 240, 0.25);
box-shadow: 0 0 0 4px rgb(203, 0, 240);
&::before {
color: rgb(203, 0, 240);
}
}
.badge-photo-contributor {
background: #fff;
}
.badge-performance-team {
background: rgba(0, 115, 170, 0.25);
box-shadow: 0 0 0 4px rgb(0, 115, 170);
&::before {
color: rgb(0, 115, 170);
}
}
.badge-performance-contributor {
background: #fff;
box-shadow: 0 0 0 4px rgb(0, 115, 170);
&::before {
color: rgb(0, 115, 170);
}
}
.badge-performance-team,
.badge-performance-contributor {
/* stylelint-disable-next-line */
background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg version='1.1' viewBox='0 0 94 94' xmlns='http://www.w3.org/2000/svg' xmlns:cc='http://creativecommons.org/ns%23' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns%23'%3E%3Cdefs%3E%3Cstyle%3Epath%7Bfill:%230073aa;%7D%3C/style%3E%3C/defs%3E%3Cpath d='m39.21 20.85h-11.69c-1.38 0-2.5 1.12-2.5 2.5v11.69c0 1.38 1.12 2.5 2.5 2.5h11.69c1.38 0 2.5-1.12 2.5-2.5v-11.69c0-1.38-1.12-2.5-2.5-2.5z'/%3E%3Cpath d='M41.71,58.96v11.69c0,.66-.26,1.3-.73,1.77-.47,.47-1.11,.73-1.77,.73h-11.69c-.66,0-1.3-.26-1.77-.73-.47-.47-.73-1.11-.73-1.77v-21.37c0-.4,.1-.79,.28-1.14,.03-.06,.07-.12,.1-.18,.21-.33,.49-.61,.83-.82l11.67-7.04c.44-.27,.95-.39,1.47-.36,.51,.03,1,.23,1.4,.55,.26,.21,.47,.46,.63,.75,.16,.29,.26,.61,.29,.94,.02,.11,.02,.22,.02,.34v5.38s0,.07,0,.11v11.08s0,.04,0,.07Z'/%3E%3Cpath d='M68.98,30.23v16.84c0,.33-.06,.65-.19,.96-.13,.3-.31,.58-.54,.81l-6.88,6.88c-.23,.23-.51,.42-.81,.54-.3,.13-.63,.19-.96,.19h-13.15c-.66,0-1.3-.26-1.77-.73-.47-.47-.73-1.11-.73-1.77v-11.69c0-.66,.26-1.3,.73-1.77,.47-.47,1.11-.73,1.77-.73h13.08s1.11,0,1.11-1.11-1.11-1.11-1.11-1.11h-13.08c-.66,0-1.3-.26-1.77-.73s-.73-1.11-.73-1.77v-11.69c0-.66,.26-1.3,.73-1.77,.47-.47,1.11-.73,1.77-.73h13.15c.33,0,.65,.06,.96,.19,.3,.13,.58,.31,.81,.54l6.88,6.88c.23,.23,.42,.51,.54,.81,.13,.3,.19,.63,.19,.96Z'/%3E%3C/svg%3E%0A");
background-position: center;
background-repeat: no-repeat;
}
.badge-sustainability-team,
.badge-sustainability-contributor {
background: rgba(23, 127, 106, 0.25);
box-shadow: 0 0 0 4px rgb(23, 127, 106);
&::before {
color: rgb(23, 127, 106);
}
}
.badge-sustainability-contributor {
background: #fff;
}
.badge-wordcamp-volunteer {
background: #fff;
box-shadow: 0 0 0 4px rgb(247, 173, 67);
&::before {
color: rgb(247, 173, 67);
}
}