' . esc_html( $empty ) . '
'; } if ( ! Keys::is_group_key( $key ) && null === Start::get( $key ) ) { Start::refresh( $key ); } $name = $key; $thumb = ''; foreach ( self::items() as $item ) { if ( $item['embedKey'] === $key ) { $name = $item['name']; $thumb = $item['thumb']; break; } } $html = '
'; $html .= $thumb ? '' : '
' . esc_html( $name ) . '
'; $html .= '' . esc_html( $name ) . ''; return $html . '
'; } /** * The still's look and the SR mark as an icon (`.sranywhere-eicon`), on the design system's tokens. */ public static function enqueue_still_styles() { Block::register_styles(); wp_enqueue_style( 'sranywhere-ui' ); $mark = esc_url_raw( SRANYWHERE_URL . 'assets/sr-mark.svg' ); wp_add_inline_style( 'sranywhere-ui', '.sranywhere-eicon{display:inline-block;width:1em;height:1em;background:currentColor;' . '-webkit-mask:url("' . $mark . '") center/contain no-repeat;mask:url("' . $mark . '") center/contain no-repeat}' . '.sranywhere-el-still{position:relative;border-radius:10px;overflow:hidden;background:var(--sra-fill)}' . '.sranywhere-el-still img{display:block;width:100%;height:auto}' . '.sranywhere-el-still__empty{display:flex;align-items:center;justify-content:center;aspect-ratio:16/9;color:var(--sra-text-muted);font:500 14px/20px var(--sra-font-sans)}' . '.sranywhere-el-still__badge{position:absolute;left:12px;bottom:12px;display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:999px;background:rgba(255,255,255,.92);box-shadow:var(--sra-shadow-pop);color:var(--sra-text);font:500 13px/18px var(--sra-font-sans)}' ); } }