diff --git a/includes/block-hook/index.php b/includes/block-hook/index.php index 115de78..f82b188 100644 --- a/includes/block-hook/index.php +++ b/includes/block-hook/index.php @@ -39,6 +39,7 @@ function mone_register_block_hook() { 'query-pagination-previous', 'quote', 'separator', + 'social-link', 'site-logo', 'table', 'template-part', diff --git a/src/block-hook/social-link/block.json b/src/block-hook/social-link/block.json new file mode 100644 index 0000000..883dd32 --- /dev/null +++ b/src/block-hook/social-link/block.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://schemas.wp.org/trunk/block.json", + "editorScript": "file:./index.js" +} diff --git a/src/block-hook/social-link/index.js b/src/block-hook/social-link/index.js new file mode 100644 index 0000000..a7338d2 --- /dev/null +++ b/src/block-hook/social-link/index.js @@ -0,0 +1,35 @@ +import { registerBlockVariation } from '@wordpress/blocks'; +import { Path, SVG } from '@wordpress/primitives'; +import './style.scss'; + +const NoteIcon = ( + + + +); + +const LineIcon = ( + + + +); + +registerBlockVariation( 'core/social-link', { + name: 'mone/note', + title: 'Note', + icon: NoteIcon, + attributes: { + service: 'mone-note', + }, + isActive: [ 'service' ], +} ); + +registerBlockVariation( 'core/social-link', { + name: 'mone/line', + title: 'Line', + icon: LineIcon, + attributes: { + service: 'mone-line', + }, + isActive: [ 'service' ], +} ); diff --git a/src/block-hook/social-link/index.php b/src/block-hook/social-link/index.php new file mode 100644 index 0000000..d546022 --- /dev/null +++ b/src/block-hook/social-link/index.php @@ -0,0 +1,34 @@ + 'Note', + 'icon' => '', + ); + + $services_data['mone-line'] = array( + 'name' => 'Line', + 'icon' => '', + ); + + return $services_data; +} +add_filter( 'block_core_social_link_get_services', __NAMESPACE__ . '\droplet_block_core_social_link' ); diff --git a/src/block-hook/social-link/style.scss b/src/block-hook/social-link/style.scss new file mode 100644 index 0000000..58baac4 --- /dev/null +++ b/src/block-hook/social-link/style.scss @@ -0,0 +1,7 @@ +.wp-block-social-links .wp-social-link-mone-note { + color: #040000; +} + +.wp-block-social-links .wp-social-link-mone-line { + color: #00c300; +}