updated plugin ActivityPub version 8.3.0
This commit is contained in:
54
wp-content/plugins/activitypub/build/stats/block.json
Normal file
54
wp-content/plugins/activitypub/build/stats/block.json
Normal file
@ -0,0 +1,54 @@
|
||||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"name": "activitypub/stats",
|
||||
"apiVersion": 3,
|
||||
"version": "unreleased",
|
||||
"title": "ActivityPub Stats",
|
||||
"category": "widgets",
|
||||
"description": "Display your annual Fediverse stats as a shareable card.",
|
||||
"textdomain": "activitypub",
|
||||
"icon": "chart-bar",
|
||||
"keywords": [
|
||||
"fediverse",
|
||||
"activitypub",
|
||||
"stats",
|
||||
"statistics",
|
||||
"annual",
|
||||
"year"
|
||||
],
|
||||
"supports": {
|
||||
"html": false,
|
||||
"align": [
|
||||
"wide",
|
||||
"full"
|
||||
],
|
||||
"color": false,
|
||||
"typography": false,
|
||||
"spacing": {
|
||||
"margin": true,
|
||||
"padding": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"padding": true
|
||||
}
|
||||
},
|
||||
"__experimentalBorder": {
|
||||
"color": true,
|
||||
"radius": true,
|
||||
"style": true,
|
||||
"width": true,
|
||||
"__experimentalSkipSerialization": true
|
||||
},
|
||||
"shadow": true
|
||||
},
|
||||
"attributes": {
|
||||
"selectedUser": {
|
||||
"type": "string"
|
||||
},
|
||||
"year": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"editorScript": "file:./index.js",
|
||||
"style": "file:./style-index.css",
|
||||
"render": "file:./render.php"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-server-side-render'), 'version' => '7042ce0f90bb9fbbfc2a');
|
||||
1
wp-content/plugins/activitypub/build/stats/index.js
Normal file
1
wp-content/plugins/activitypub/build/stats/index.js
Normal file
@ -0,0 +1 @@
|
||||
(()=>{"use strict";var e,t={1868(e,t,i){const s=window.wp.blocks,r=window.wp.serverSideRender;var n=i.n(r);const a=window.wp.components,o=window.wp.blockEditor,l=window.wp.i18n,c=window.wp.element,u=window.wp.apiFetch;var p=i.n(u);const d=window.wp.data;const v=window.ReactJSXRuntime,b=(new Date).getFullYear();function h(){const e=[];for(let t=b;t>=b-5;t--)e.push({label:String(t),value:String(t)});return e}const g=JSON.parse('{"UU":"activitypub/stats"}');(0,s.registerBlockType)(g.UU,{edit:function({attributes:e,setAttributes:t}){const{selectedUser:i,year:s}=e,r=(0,o.useBlockProps)(),u=function({withInherit:e=!1}){const{enabled:t,namespace:i}=window._activityPubOptions||{},[s,r]=(0,c.useState)(!1),{fetchedUsers:n,isLoadingUsers:a}=(0,d.useSelect)(e=>{const{getUsers:i,getIsResolving:s}=e("core");return{fetchedUsers:t?.users?i({capabilities:"activitypub"}):null,isLoadingUsers:!!t?.users&&s("getUsers",[{capabilities:"activitypub"}])}},[t?.users]),o=(0,d.useSelect)(e=>n||a?null:e("core").getCurrentUser(),[n,a]);(0,c.useEffect)(()=>{!n&&!a&&o&&i&&p()({path:`/${i}/actors/${o.id}`,method:"HEAD",headers:{Accept:"application/activity+json"},parse:!1}).then(()=>r(!0)).catch(()=>r(!1))},[n,a,o,i]);const u=(0,c.useMemo)(()=>n||(o&&s?[{id:o.id,name:o.name}]:[]),[n,o,s]);return(0,c.useMemo)(()=>{if(!u.length)return[];const i=[];return t?.blog&&n&&i.push({label:(0,l.__)("Blog","activitypub"),value:"blog"}),e&&t?.users&&n&&i.push({label:(0,l.__)("Dynamic User","activitypub"),value:"inherit"}),u.reduce((e,t)=>(e.push({label:t.name,value:`${t.id}`}),e),i)},[u,t?.blog,t?.users,n,e])}({}),[g,w]=(0,c.useState)(!1);(0,c.useEffect)(()=>{!i&&u.length&&t({selectedUser:u[0].value})},[u]);const y=s||b-1,[f,_]=(0,c.useState)(""),m=(0,c.useCallback)(()=>{if(!i)return;const e=function(e,t){const i=window._activityPubOptions?.statsImageUrlEndpoint||"";if(!i)return"";const s=e&&"blog"!==e?e:0;return i.replace("{user_id}",s).replace("{year}",t)}(i,y);e&&p()({url:e}).then(e=>_(e.url||"")).catch(()=>_(""))},[i,y]);return(0,c.useEffect)(()=>{m()},[m]),(0,v.jsxs)("div",{...r,children:[(0,v.jsxs)(o.InspectorControls,{children:[(0,v.jsxs)(a.PanelBody,{title:(0,l.__)("Settings","activitypub"),children:[u.length>1&&(0,v.jsx)(a.SelectControl,{label:(0,l.__)("Select User","activitypub"),value:i,options:u,onChange:e=>t({selectedUser:e})}),(0,v.jsx)(a.SelectControl,{label:(0,l.__)("Year","activitypub"),value:String(y),options:h(),onChange:e=>t({year:parseInt(e,10)})})]}),f&&(0,v.jsxs)(a.PanelBody,{title:(0,l.__)("Share Image","activitypub"),initialOpen:!1,children:[(0,v.jsx)("p",{className:"description",children:(0,l.__)("Use this URL to share your stats as an image on social media.","activitypub")}),(0,v.jsx)(a.TextControl,{label:(0,l.__)("Share image URL","activitypub"),hideLabelFromVision:!0,__nextHasNoMarginBottom:!0,value:f,readOnly:!0,onClick:e=>e.target.select()}),(0,v.jsxs)("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[(0,v.jsx)(a.Button,{variant:"secondary",onClick:()=>{navigator.clipboard.writeText(f).then(()=>{w(!0),setTimeout(()=>w(!1),2e3)})},children:g?(0,l.__)("Copied!","activitypub"):(0,l.__)("Copy URL","activitypub")}),(0,v.jsx)(a.ExternalLink,{href:f,children:(0,l.__)("Preview","activitypub")})]})]})]}),(0,v.jsx)(a.Disabled,{children:(0,v.jsx)(n(),{block:"activitypub/stats",attributes:{...e,year:y}})})]})}})}},i={};function s(e){var r=i[e];if(void 0!==r)return r.exports;var n=i[e]={exports:{}};return t[e](n,n.exports,s),n.exports}s.m=t,e=[],s.O=(t,i,r,n)=>{if(!i){var a=1/0;for(u=0;u<e.length;u++){for(var[i,r,n]=e[u],o=!0,l=0;l<i.length;l++)(!1&n||a>=n)&&Object.keys(s.O).every(e=>s.O[e](i[l]))?i.splice(l--,1):(o=!1,n<a&&(a=n));if(o){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[i,r,n]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={85:0,721:0};s.O.j=t=>0===e[t];var t=(t,i)=>{var r,n,[a,o,l]=i,c=0;if(a.some(t=>0!==e[t])){for(r in o)s.o(o,r)&&(s.m[r]=o[r]);if(l)var u=l(s)}for(t&&t(i);c<a.length;c++)n=a[c],s.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return s.O(u)},i=globalThis.webpackChunkwordpress_activitypub=globalThis.webpackChunkwordpress_activitypub||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var r=s.O(void 0,[721],()=>s(1868));r=s.O(r)})();
|
||||
239
wp-content/plugins/activitypub/build/stats/render.php
Normal file
239
wp-content/plugins/activitypub/build/stats/render.php
Normal file
@ -0,0 +1,239 @@
|
||||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `activitypub/stats` block.
|
||||
*
|
||||
* @package Activitypub
|
||||
*/
|
||||
|
||||
use Activitypub\Blocks;
|
||||
use Activitypub\Collection\Actors;
|
||||
use Activitypub\Statistics;
|
||||
|
||||
if ( is_feed() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* @var array $attributes Block attributes. */
|
||||
$attributes = wp_parse_args( $attributes );
|
||||
|
||||
$user_id = Blocks::get_user_id( $attributes['selectedUser'] ?? 'blog' );
|
||||
$stats_year = (int) ( $attributes['year'] ?? ( (int) \gmdate( 'Y' ) - 1 ) );
|
||||
|
||||
// Try stored annual summary first, fall back to live computation.
|
||||
$summary = Statistics::get_annual_summary( $user_id, $stats_year );
|
||||
|
||||
if ( ! $summary ) {
|
||||
$summary = Statistics::compile_annual_summary( $user_id, $stats_year );
|
||||
}
|
||||
|
||||
if ( ! $summary || empty( $summary['posts_count'] ) ) {
|
||||
if ( \defined( 'REST_REQUEST' ) && REST_REQUEST ) {
|
||||
printf(
|
||||
'<div class="components-placeholder"><div class="components-placeholder__label">%s</div><div class="components-placeholder__instructions">%s</div></div>',
|
||||
\esc_html__( 'Fediverse Stats', 'activitypub' ),
|
||||
\sprintf(
|
||||
/* translators: %d: The year */
|
||||
\esc_html__( 'No stats available for %d. Stats are collected monthly and compiled at the end of each year.', 'activitypub' ),
|
||||
(int) $stats_year
|
||||
)
|
||||
);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Get comment types for dynamic display.
|
||||
$comment_types = Statistics::get_comment_types_for_stats();
|
||||
|
||||
// Calculate total engagement.
|
||||
$total_engagement = 0;
|
||||
foreach ( array_keys( $comment_types ) as $ct_slug ) {
|
||||
$total_engagement += $summary[ $ct_slug . '_count' ] ?? 0;
|
||||
}
|
||||
|
||||
// Most active month name.
|
||||
$most_active_month_name = '';
|
||||
if ( ! empty( $summary['most_active_month'] ) ) {
|
||||
$most_active_month_name = gmdate( 'F', gmmktime( 0, 0, 0, $summary['most_active_month'], 1, $stats_year ) );
|
||||
}
|
||||
|
||||
// Follower growth.
|
||||
$followers_start = $summary['followers_start'] ?? 0;
|
||||
$followers_end = $summary['followers_end'] ?? 0;
|
||||
$followers_net_change = $summary['followers_net_change'] ?? ( $followers_end - $followers_start );
|
||||
$change_sign = $followers_net_change >= 0 ? '+' : '';
|
||||
|
||||
// Get actor webfinger for the card header.
|
||||
$actor = Actors::get_by_id( $user_id );
|
||||
|
||||
if ( \is_wp_error( $actor ) ) {
|
||||
// Fall back to direct model instantiation for blog/application actors.
|
||||
if ( Actors::BLOG_USER_ID === $user_id ) {
|
||||
$actor = new \Activitypub\Model\Blog();
|
||||
} elseif ( Actors::APPLICATION_USER_ID === $user_id ) {
|
||||
$actor = new \Activitypub\Model\Application();
|
||||
}
|
||||
}
|
||||
|
||||
$actor_webfinger = ! \is_wp_error( $actor ) ? $actor->get_webfinger() : '';
|
||||
|
||||
// Site name for branding.
|
||||
$site_name = \get_bloginfo( 'name' );
|
||||
|
||||
$block_id = 'activitypub-stats-' . \wp_unique_id();
|
||||
$title_text = \sprintf(
|
||||
/* translators: %d: The year */
|
||||
\__( 'Fediverse Stats %d', 'activitypub' ),
|
||||
(int) $stats_year
|
||||
);
|
||||
|
||||
/*
|
||||
* Build border styles using WP_Style_Engine for sanitization.
|
||||
* Border serialization is skipped in block.json to avoid double
|
||||
* rendering in the editor, so we apply it here manually.
|
||||
*/
|
||||
$border_result = \wp_style_engine_get_styles( array( 'border' => $attributes['style']['border'] ?? array() ) );
|
||||
$extra_styles = $border_result['css'] ?? '';
|
||||
|
||||
// Handle preset border color slug (not part of style.border).
|
||||
if ( ! empty( $attributes['borderColor'] ) ) {
|
||||
$preset_color = 'var(--wp--preset--color--' . \sanitize_key( $attributes['borderColor'] ) . ')';
|
||||
$extra_styles = 'border-color:' . $preset_color . ';' . $extra_styles;
|
||||
}
|
||||
|
||||
// Resolve the border color for inner elements via CSS variable.
|
||||
$border_color = '';
|
||||
if ( ! empty( $attributes['style']['border']['color'] ) ) {
|
||||
$border_color = $attributes['style']['border']['color'];
|
||||
} elseif ( ! empty( $attributes['borderColor'] ) ) {
|
||||
$border_color = 'var(--wp--preset--color--' . \sanitize_key( $attributes['borderColor'] ) . ')';
|
||||
}
|
||||
|
||||
if ( $border_color ) {
|
||||
$extra_styles .= '--activitypub-stats--border-color:' . \esc_attr( $border_color ) . ';';
|
||||
}
|
||||
|
||||
$wrapper_attrs = array(
|
||||
'id' => $block_id,
|
||||
'class' => 'activitypub-stats',
|
||||
);
|
||||
|
||||
$wrapper_html = \get_block_wrapper_attributes( $wrapper_attrs );
|
||||
|
||||
// Merge border styles into the existing style attribute.
|
||||
if ( $extra_styles ) {
|
||||
if ( \str_contains( $wrapper_html, 'style="' ) ) {
|
||||
$wrapper_html = \str_replace( 'style="', 'style="' . \esc_attr( $extra_styles ), $wrapper_html );
|
||||
} else {
|
||||
$wrapper_html .= ' style="' . \esc_attr( $extra_styles ) . '"';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div
|
||||
<?php
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput
|
||||
echo $wrapper_html;
|
||||
?>
|
||||
data-year="<?php echo esc_attr( $stats_year ); ?>"
|
||||
>
|
||||
<div class="activitypub-stats__header">
|
||||
<h2 class="activitypub-stats__title"><?php echo \esc_html( $title_text ); ?></h2>
|
||||
<?php if ( $actor_webfinger ) : ?>
|
||||
<p class="activitypub-stats__subtitle"><?php echo \esc_html( '@' . $actor_webfinger ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="activitypub-stats__stats">
|
||||
<div class="activitypub-stats__stat activitypub-stats__stat--highlight">
|
||||
<span class="activitypub-stats__stat-value"><?php echo esc_html( number_format_i18n( $summary['posts_count'] ) ); ?></span>
|
||||
<span class="activitypub-stats__stat-label"><?php esc_html_e( 'Posts Federated', 'activitypub' ); ?></span>
|
||||
</div>
|
||||
<div class="activitypub-stats__stat activitypub-stats__stat--highlight">
|
||||
<span class="activitypub-stats__stat-value"><?php echo esc_html( number_format_i18n( $total_engagement ) ); ?></span>
|
||||
<span class="activitypub-stats__stat-label"><?php esc_html_e( 'Total Engagements', 'activitypub' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="activitypub-stats__engagement">
|
||||
<?php foreach ( $comment_types as $slug => $type_info ) : ?>
|
||||
<?php $count = $summary[ $slug . '_count' ] ?? 0; ?>
|
||||
<?php if ( $count > 0 ) : ?>
|
||||
<div class="activitypub-stats__stat">
|
||||
<span class="activitypub-stats__stat-value"><?php echo esc_html( number_format_i18n( $count ) ); ?></span>
|
||||
<span class="activitypub-stats__stat-label"><?php echo esc_html( $type_info['label'] ); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<div class="activitypub-stats__details">
|
||||
<div class="activitypub-stats__detail">
|
||||
<span class="activitypub-stats__detail-label"><?php esc_html_e( 'Follower Growth', 'activitypub' ); ?></span>
|
||||
<span class="activitypub-stats__detail-value">
|
||||
<?php echo esc_html( $change_sign . number_format_i18n( $followers_net_change ) ); ?>
|
||||
</span>
|
||||
<span class="activitypub-stats__detail-extra">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: 1: follower count at start of year, 2: follower count at end of year */
|
||||
esc_html__( '%1$s → %2$s followers', 'activitypub' ),
|
||||
esc_html( number_format_i18n( $followers_start ) ),
|
||||
esc_html( number_format_i18n( $followers_end ) )
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<?php if ( $most_active_month_name ) : ?>
|
||||
<div class="activitypub-stats__detail">
|
||||
<span class="activitypub-stats__detail-label"><?php esc_html_e( 'Most Active Month', 'activitypub' ); ?></span>
|
||||
<span class="activitypub-stats__detail-value"><?php echo esc_html( $most_active_month_name ); ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( ! empty( $summary['top_multiplicator'] ) ) : ?>
|
||||
<div class="activitypub-stats__detail">
|
||||
<span class="activitypub-stats__detail-label"><?php esc_html_e( 'Top Supporter', 'activitypub' ); ?></span>
|
||||
<span class="activitypub-stats__detail-value">
|
||||
<a href="<?php echo esc_url( $summary['top_multiplicator']['url'] ); ?>"><?php echo esc_html( $summary['top_multiplicator']['name'] ); ?></a>
|
||||
</span>
|
||||
<span class="activitypub-stats__detail-extra">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: Number of boosts */
|
||||
esc_html( _n( '%s boost', '%s boosts', (int) $summary['top_multiplicator']['count'], 'activitypub' ) ),
|
||||
esc_html( number_format_i18n( $summary['top_multiplicator']['count'] ) )
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if ( ! empty( $summary['top_posts'] ) ) : ?>
|
||||
<div class="activitypub-stats__top-posts">
|
||||
<h3 class="activitypub-stats__section-title"><?php esc_html_e( 'Top Posts', 'activitypub' ); ?></h3>
|
||||
<ol>
|
||||
<?php foreach ( array_slice( $summary['top_posts'], 0, 5 ) as $top_post ) : ?>
|
||||
<li>
|
||||
<a href="<?php echo esc_url( $top_post['url'] ); ?>">
|
||||
<?php echo esc_html( $top_post['title'] ? $top_post['title'] : __( '(no title)', 'activitypub' ) ); ?>
|
||||
</a>
|
||||
<span class="activitypub-stats__post-engagement">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: engagement count */
|
||||
esc_html__( '%s engagements', 'activitypub' ),
|
||||
esc_html( number_format_i18n( $top_post['engagement_count'] ?? 0 ) )
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="activitypub-stats__footer">
|
||||
<span class="activitypub-stats__branding"><?php echo \esc_html( $site_name ); ?> · <?php \esc_html_e( 'Powered by the ActivityPub plugin', 'activitypub' ); ?></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1 @@
|
||||
.wp-block-activitypub-stats{background-color:var(--wp--preset--color--base,var(--wp--preset--color--white,#fff));color:var(--wp--preset--color--contrast,var(--wp--preset--color--black,inherit));max-width:var(--wp--style--global--content-size,600px);--activitypub-stats--border-color:color-mix(in srgb,currentcolor 20%,transparent)}.wp-block-activitypub-stats.alignwide{max-width:var(--wp--style--global--wide-size)}.wp-block-activitypub-stats.alignfull{max-width:none}.activitypub-stats__header{margin-bottom:1.5rem;text-align:center}.activitypub-stats__title{color:inherit;font-size:1.75em;font-weight:800;letter-spacing:-.02em;margin:0 0 .25rem}.activitypub-stats__subtitle{color:color-mix(in srgb,currentcolor 60%,transparent);font-size:1em;margin:0}.activitypub-stats__stats{display:flex;gap:1rem;margin-bottom:1.25rem}.activitypub-stats__stat{flex:1;padding:.75rem .5rem;text-align:center}.activitypub-stats__stat--highlight{border:1px solid var(--activitypub-stats--border-color);border-radius:8px}.activitypub-stats__stat-value{color:inherit;display:block;font-size:2em;font-weight:800;line-height:1.2}.activitypub-stats__stat--highlight .activitypub-stats__stat-value{font-size:2.5em}.activitypub-stats__stat-label{color:color-mix(in srgb,currentcolor 50%,transparent);display:block;font-size:.8em;letter-spacing:.05em;margin-top:.25rem;text-transform:uppercase}.activitypub-stats__engagement{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.5rem}.activitypub-stats__engagement .activitypub-stats__stat{border:1px solid var(--activitypub-stats--border-color);border-radius:8px;flex:1 1 calc(33.333% - 0.5rem);min-width:5rem;padding:.625rem .5rem}.activitypub-stats__details{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}.activitypub-stats__detail{border:1px solid var(--activitypub-stats--border-color);border-radius:8px;flex:1 1 calc(50% - 0.5rem);min-width:7.5rem;padding:.875rem}.activitypub-stats__detail-label{color:color-mix(in srgb,currentcolor 50%,transparent);display:block;font-size:.75em;letter-spacing:.05em;margin-bottom:.25rem;text-transform:uppercase}.activitypub-stats__detail-value{color:inherit;display:block;font-size:1.25em;font-weight:700}.activitypub-stats__detail-value a{color:inherit;text-decoration:underline;text-underline-offset:.15em}.activitypub-stats__detail-value a:hover{color:color-mix(in srgb,currentcolor 70%,transparent)}.activitypub-stats__detail-value--negative,.activitypub-stats__detail-value--positive{color:inherit}.activitypub-stats__detail-extra{color:color-mix(in srgb,currentcolor 45%,transparent);display:block;font-size:.8em;margin-top:.125rem}.activitypub-stats__top-posts{margin-bottom:1.25rem}.activitypub-stats__section-title{color:color-mix(in srgb,currentcolor 50%,transparent);font-size:.85em;letter-spacing:.05em;margin:0 0 .75rem;text-transform:uppercase}.activitypub-stats__top-posts ol{list-style:decimal;margin:0;padding-right:1.5em}.activitypub-stats__top-posts li{padding:.5rem 0}.activitypub-stats__top-posts li:last-child{padding-bottom:0}.activitypub-stats__top-posts li a{color:inherit;text-decoration:none}.activitypub-stats__top-posts li a:hover{text-decoration:underline}.activitypub-stats__post-engagement{color:color-mix(in srgb,currentcolor 45%,transparent);font-size:.8em;margin-right:.25rem}.activitypub-stats__footer{margin-top:1.25rem;text-align:center}.activitypub-stats__branding{color:color-mix(in srgb,currentcolor 45%,transparent);font-size:.75em}
|
||||
@ -0,0 +1 @@
|
||||
.wp-block-activitypub-stats{background-color:var(--wp--preset--color--base,var(--wp--preset--color--white,#fff));color:var(--wp--preset--color--contrast,var(--wp--preset--color--black,inherit));max-width:var(--wp--style--global--content-size,600px);--activitypub-stats--border-color:color-mix(in srgb,currentcolor 20%,transparent)}.wp-block-activitypub-stats.alignwide{max-width:var(--wp--style--global--wide-size)}.wp-block-activitypub-stats.alignfull{max-width:none}.activitypub-stats__header{margin-bottom:1.5rem;text-align:center}.activitypub-stats__title{color:inherit;font-size:1.75em;font-weight:800;letter-spacing:-.02em;margin:0 0 .25rem}.activitypub-stats__subtitle{color:color-mix(in srgb,currentcolor 60%,transparent);font-size:1em;margin:0}.activitypub-stats__stats{display:flex;gap:1rem;margin-bottom:1.25rem}.activitypub-stats__stat{flex:1;padding:.75rem .5rem;text-align:center}.activitypub-stats__stat--highlight{border:1px solid var(--activitypub-stats--border-color);border-radius:8px}.activitypub-stats__stat-value{color:inherit;display:block;font-size:2em;font-weight:800;line-height:1.2}.activitypub-stats__stat--highlight .activitypub-stats__stat-value{font-size:2.5em}.activitypub-stats__stat-label{color:color-mix(in srgb,currentcolor 50%,transparent);display:block;font-size:.8em;letter-spacing:.05em;margin-top:.25rem;text-transform:uppercase}.activitypub-stats__engagement{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.5rem}.activitypub-stats__engagement .activitypub-stats__stat{border:1px solid var(--activitypub-stats--border-color);border-radius:8px;flex:1 1 calc(33.333% - 0.5rem);min-width:5rem;padding:.625rem .5rem}.activitypub-stats__details{display:flex;flex-wrap:wrap;gap:1rem;margin-bottom:1.5rem}.activitypub-stats__detail{border:1px solid var(--activitypub-stats--border-color);border-radius:8px;flex:1 1 calc(50% - 0.5rem);min-width:7.5rem;padding:.875rem}.activitypub-stats__detail-label{color:color-mix(in srgb,currentcolor 50%,transparent);display:block;font-size:.75em;letter-spacing:.05em;margin-bottom:.25rem;text-transform:uppercase}.activitypub-stats__detail-value{color:inherit;display:block;font-size:1.25em;font-weight:700}.activitypub-stats__detail-value a{color:inherit;text-decoration:underline;text-underline-offset:.15em}.activitypub-stats__detail-value a:hover{color:color-mix(in srgb,currentcolor 70%,transparent)}.activitypub-stats__detail-value--negative,.activitypub-stats__detail-value--positive{color:inherit}.activitypub-stats__detail-extra{color:color-mix(in srgb,currentcolor 45%,transparent);display:block;font-size:.8em;margin-top:.125rem}.activitypub-stats__top-posts{margin-bottom:1.25rem}.activitypub-stats__section-title{color:color-mix(in srgb,currentcolor 50%,transparent);font-size:.85em;letter-spacing:.05em;margin:0 0 .75rem;text-transform:uppercase}.activitypub-stats__top-posts ol{list-style:decimal;margin:0;padding-left:1.5em}.activitypub-stats__top-posts li{padding:.5rem 0}.activitypub-stats__top-posts li:last-child{padding-bottom:0}.activitypub-stats__top-posts li a{color:inherit;text-decoration:none}.activitypub-stats__top-posts li a:hover{text-decoration:underline}.activitypub-stats__post-engagement{color:color-mix(in srgb,currentcolor 45%,transparent);font-size:.8em;margin-left:.25rem}.activitypub-stats__footer{margin-top:1.25rem;text-align:center}.activitypub-stats__branding{color:color-mix(in srgb,currentcolor 45%,transparent);font-size:.75em}
|
||||
Reference in New Issue
Block a user