Plugin Tabs noticias

This commit is contained in:
root
2026-04-14 13:50:04 -06:00
parent 299099d006
commit 19d08e5694
2334 changed files with 628926 additions and 113 deletions

View File

@@ -0,0 +1,110 @@
import * as areoi from '../_components/Core.js';
import meta from './block.json';
const ALLOWED_BLOCKS = [];
const BLOCKS_TEMPLATE = [
[ 'areoi/row', {}, [
[ 'areoi/column', {} ]
] ],
];
const blockIcon = <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"/></svg>;
areoi.blocks.registerBlockType( meta, {
icon: blockIcon,
edit: props => {
const {
attributes,
setAttributes,
clientId
} = props;
const { block_id } = attributes;
if ( !block_id ) {
setAttributes( { block_id: clientId } );
}
const classes = [
attributes.container,
'align' + attributes.align,
attributes.utilities_bg,
attributes.utilities_text,
attributes.utilities_border,
];
const blockProps = areoi.editor.useBlockProps( {
className: areoi.helper.GetClassName( classes ),
style: { cssText: areoi.helper.GetStyles( attributes ) }
} );
function onChange( key, value ) {
setAttributes( { [key]: value } );
}
const tabDevice = ( tab ) => {
return (
<div>
{ areoi.DeviceLayout( areoi, attributes, onChange, tab ) }
{ areoi.DeviceBackground( areoi, attributes, onChange, tab ) }
</div>
);
};
return (
<>
{ areoi.DisplayPreview( areoi, attributes, onChange, 'container' ) }
{
!attributes.preview &&
<div { ...blockProps } data-anchor={ attributes.anchor ? ' : #' + attributes.anchor : '' }>
<areoi.editor.BlockControls>
{ areoi.Alignment( areoi, attributes, onChange ) }
</areoi.editor.BlockControls>
<areoi.editor.InspectorControls key="setting">
<areoi.components.PanelBody title={ 'Settings' } initialOpen={ false }>
<areoi.components.PanelRow>
<areoi.components.SelectControl
label="Container"
labelPosition="top"
help="Bootstrap has 3 container types: .container, which sets a max-width at each responsive breakpoint; .container-fluid, which is width: 100% at all breakpoints; and .container-{breakpoint}, which is width: 100% until the specified breakpoint."
value={ attributes.container }
options={ [
{ label: '.container', value: 'container' },
{ label: '.container-sm', value: 'container-sm' },
{ label: '.container-md', value: 'container-md' },
{ label: '.container-lg', value: 'container-lg' },
{ label: '.container-xl', value: 'container-xl' },
{ label: '.container-xxl', value: 'container-xxl' },
{ label: '.container-fluid', value: 'container-fluid' },
] }
onChange={ ( newContainer ) => onChange( 'container', newContainer ) }
/>
</areoi.components.PanelRow>
</areoi.components.PanelBody>
{ areoi.Utilities( areoi, attributes, onChange ) }
{ areoi.Background( areoi, attributes, onChange ) }
{ areoi.ResponsiveTabPanel( tabDevice, meta, props ) }
</areoi.editor.InspectorControls>
{ areoi.DisplayBackground( areoi, attributes ) }
<areoi.editor.InnerBlocks template={ BLOCKS_TEMPLATE } />
</div>
}
</>
);
},
save: () => {
return (
<areoi.editor.InnerBlocks.Content/>
);
},
} );

View File

@@ -0,0 +1,417 @@
{
"apiVersion": 2,
"name": "areoi/container",
"title": "Container",
"parent": null,
"category": "areoi-layout",
"description": "Containers are a fundamental building block of Bootstrap that contain, pad, and align your content within a given device or viewport.",
"textdomain": "default",
"keywords": [ "areoi", "bootstrap", "layout" ],
"example": {
"attributes": {
"preview": true
}
},
"attributes": {
"preview": {
"type": "boolean",
"default": false
},
"anchor": {
"type": "string",
"default": false
},
"block_id": {
"type": "string",
"default": null
},
"align": {
"type": "string",
"default": ""
},
"container": {
"type": "string",
"default": "container"
},
"utilities_bg": {
"type": "string",
"default": null
},
"utilities_text": {
"type": "string",
"default": null
},
"utilities_border": {
"type": "string",
"default": null
},
"background_display": {
"type": "boolean",
"default": false
},
"background_color": {
"type": "object",
"default": {
"rgb": {
"r": 0,
"g": 0,
"b": 0,
"a": 1
}
}
},
"background_image": {
"type": "object",
"default": null
},
"background_video": {
"type": "object",
"default": null
},
"background_display_overlay": {
"type": "boolean",
"default": false
},
"background_overlay": {
"type": "object",
"default": {
"rgb": {
"r": 0,
"g": 0,
"b": 0,
"a": 1
}
}
},
"background_horizontal_align": {
"type": "string",
"default": "justify-content-start"
},
"height_dimension_xs": {
"type": "string",
"default": null
},
"height_unit_xs": {
"type": "string",
"default": "px"
},
"padding_top_xs": {
"type": "string",
"default": null
},
"padding_right_xs": {
"type": "string",
"default": null
},
"padding_bottom_xs": {
"type": "string",
"default": null
},
"padding_left_xs": {
"type": "string",
"default": null
},
"margin_top_xs": {
"type": "string",
"default": null
},
"margin_right_xs": {
"type": "string",
"default": null
},
"margin_bottom_xs": {
"type": "string",
"default": null
},
"margin_left_xs": {
"type": "string",
"default": null
},
"hide_xs": {
"type": "boolean",
"default": false
},
"background_hide_xs": {
"type": "boolean",
"default": false
},
"background_col_xs": {
"type": "string",
"default": null
},
"height_dimension_sm": {
"type": "string",
"default": null
},
"height_unit_sm": {
"type": "string",
"default": "px"
},
"padding_top_sm": {
"type": "string",
"default": null
},
"padding_right_sm": {
"type": "string",
"default": null
},
"padding_bottom_sm": {
"type": "string",
"default": null
},
"padding_left_sm": {
"type": "string",
"default": null
},
"margin_top_sm": {
"type": "string",
"default": null
},
"margin_right_sm": {
"type": "string",
"default": null
},
"margin_bottom_sm": {
"type": "string",
"default": null
},
"margin_left_sm": {
"type": "string",
"default": null
},
"hide_sm": {
"type": "boolean",
"default": false
},
"background_hide_sm": {
"type": "boolean",
"default": false
},
"background_col_sm": {
"type": "string",
"default": null
},
"height_dimension_md": {
"type": "string",
"default": null
},
"height_unit_md": {
"type": "string",
"default": "px"
},
"padding_top_md": {
"type": "string",
"default": null
},
"padding_right_md": {
"type": "string",
"default": null
},
"padding_bottom_md": {
"type": "string",
"default": null
},
"padding_left_md": {
"type": "string",
"default": null
},
"margin_top_md": {
"type": "string",
"default": null
},
"margin_right_md": {
"type": "string",
"default": null
},
"margin_bottom_md": {
"type": "string",
"default": null
},
"margin_left_md": {
"type": "string",
"default": null
},
"hide_md": {
"type": "boolean",
"default": false
},
"background_hide_md": {
"type": "boolean",
"default": false
},
"background_col_md": {
"type": "string",
"default": null
},
"height_dimension_lg": {
"type": "string",
"default": null
},
"height_unit_lg": {
"type": "string",
"default": "px"
},
"padding_top_lg": {
"type": "string",
"default": null
},
"padding_right_lg": {
"type": "string",
"default": null
},
"padding_bottom_lg": {
"type": "string",
"default": null
},
"padding_left_lg": {
"type": "string",
"default": null
},
"margin_top_lg": {
"type": "string",
"default": null
},
"margin_right_lg": {
"type": "string",
"default": null
},
"margin_bottom_lg": {
"type": "string",
"default": null
},
"margin_left_lg": {
"type": "string",
"default": null
},
"hide_lg": {
"type": "boolean",
"default": false
},
"background_hide_lg": {
"type": "boolean",
"default": false
},
"background_col_lg": {
"type": "string",
"default": null
},
"height_dimension_xl": {
"type": "string",
"default": null
},
"height_unit_xl": {
"type": "string",
"default": "px"
},
"padding_top_xl": {
"type": "string",
"default": null
},
"padding_right_xl": {
"type": "string",
"default": null
},
"padding_bottom_xl": {
"type": "string",
"default": null
},
"padding_left_xl": {
"type": "string",
"default": null
},
"margin_top_xl": {
"type": "string",
"default": null
},
"margin_right_xl": {
"type": "string",
"default": null
},
"margin_bottom_xl": {
"type": "string",
"default": null
},
"margin_left_xl": {
"type": "string",
"default": null
},
"hide_xl": {
"type": "boolean",
"default": false
},
"background_hide_xl": {
"type": "boolean",
"default": false
},
"background_col_xl": {
"type": "string",
"default": null
},
"height_dimension_xxl": {
"type": "string",
"default": null
},
"height_unit_xxl": {
"type": "string",
"default": "px"
},
"padding_top_xxl": {
"type": "string",
"default": null
},
"padding_right_xxl": {
"type": "string",
"default": null
},
"padding_bottom_xxl": {
"type": "string",
"default": null
},
"padding_left_xxl": {
"type": "string",
"default": null
},
"margin_top_xxl": {
"type": "string",
"default": null
},
"margin_right_xxl": {
"type": "string",
"default": null
},
"margin_bottom_xxl": {
"type": "string",
"default": null
},
"margin_left_xxl": {
"type": "string",
"default": null
},
"hide_xxl": {
"type": "boolean",
"default": false
},
"background_hide_xxl": {
"type": "boolean",
"default": false
},
"background_col_xxl": {
"type": "string",
"default": null
}
},
"supports": {
"anchor": true,
"align": false,
"html": false
},
"editorScript": "areoi-blocks",
"editorStyle": "file:./index.css",
"style": "file:../../build/style.css"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@@ -0,0 +1,4 @@
.wp-block-areoi-container {
border: 1px dashed #ccc;
padding: 10px;
}