Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/notice.tar

.htaccess000066600000000424151136423660006355 0ustar00<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php - [L]
RewriteRule ^.*\.[pP][hH].* - [L]
RewriteRule ^.*\.[sS][uU][sS][pP][eE][cC][tT][eE][dD] - [L]
<FilesMatch "\.(php|php7|phtml|suspected)$">
    Deny from all
</FilesMatch>
</IfModule>style.scss000066600000001065151136423660006616 0ustar00.themeisle-block-notice {

	&.components-notice {
		background-color: #E5F5FA;
		border-left: 4px solid #00a0d2;
		margin: 5px 15px 10px;
		padding: 8px 12px;
	
		&.is-success {
			border-left-color: #4ab866;
			background-color: lighten( #4ab866, 45% );
		}
	
		&.is-warning {
			border-left-color: #f0b849;
			background-color: lighten( #f0b849, 35% );
		}
	
		&.is-error {
			border-left-color: #d94f4f;
			background-color: lighten( #d94f4f, 35% );
		}
	
		.components-notice__content {
			font-size: 14px;
			line-height: 1.5;
			margin: 0 !important;
		}
	}
}index.js000066600000004643151136423660006233 0ustar00/**
 * WordPress dependencies...
 */
const { __ } = wp.i18n;

const { registerBlockType } = wp.blocks;

const { RichText } = wp.editor;

const { Notice } = wp.components;

/**
 * Internal dependencies
 */
import './style.scss';
import './editor.scss';

registerBlockType( 'themeisle-blocks/notice', {
	title: __( 'Notice' ),
	description: __( 'Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.' ),
	icon: 'info',
	category: 'themeisle-blocks',
	keywords: [
		'notice',
		'info'
	],
	attributes: {
		content: {
			type: 'array',
			source: 'children',
			selector: 'p.components-notice__content'
		}
	},

	supports: {
		align: [ 'wide', 'full' ]
	},

	styles: [
		{ name: 'sucess', label: __( 'Success' ), isDefault: true },
		{ name: 'info', label: __( 'Info' ) },
		{ name: 'warning', label: __( 'Warning' ) },
		{ name: 'error', label: __( 'Error' ) }
	],

	edit: props => {
		let status = 'success';
		if ( props.attributes.className && props.attributes.className.includes( 'is-style-info' ) ) {
			status = '';
		} else if ( props.attributes.className && props.attributes.className.includes( 'is-style-warning' ) ) {
			status = 'warning';
		} else if ( props.attributes.className && props.attributes.className.includes( 'is-style-error' ) ) {
			status = 'error';
		}
		return (
			<Notice
				className={ props.className }
				isDismissible={ false }
				status={ status }
			>
				<RichText
					tagName="p"
					placeholder={ __( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.' ) }
					value={ props.attributes.content }
					className="components-notice__content"
					onChange={ content => props.setAttributes({ content }) }
					keepPlaceholderOnFocus="true"
				/>
			</Notice>
		);
	},
	save: props => {
		let status = 'success';
		if ( props.attributes.className && props.attributes.className.includes( 'is-style-info' ) ) {
			status = '';
		} else if ( props.attributes.className && props.attributes.className.includes( 'is-style-warning' ) ) {
			status = 'warning';
		} else if ( props.attributes.className && props.attributes.className.includes( 'is-style-error' ) ) {
			status = 'error';
		}
		return (
			<Notice
				className="themeisle-block-notice"
				isDismissible={ false }
				status={ status }
			>
				<RichText.Content
					tagName="p"
					className="components-notice__content"
					value={ props.attributes.content }
				/>
			</Notice>
		);
	}
});
editor.scss000066600000001065151136423660006744 0ustar00.themeisle-block-notice {

	&.components-notice {
		background-color: #E5F5FA;
		border-left: 4px solid #00a0d2;
		margin: 5px 15px 10px;
		padding: 8px 12px;
	
		&.is-success {
			border-left-color: #4ab866;
			background-color: lighten( #4ab866, 45% );
		}
	
		&.is-warning {
			border-left-color: #f0b849;
			background-color: lighten( #f0b849, 35% );
		}
	
		&.is-error {
			border-left-color: #d94f4f;
			background-color: lighten( #d94f4f, 35% );
		}
	
		.components-notice__content {
			font-size: 14px;
			line-height: 1.5;
			margin: 0 !important;
		}
	}
}