diff --git a/.editorconfig b/.editorconfig index 17c30a62d6a66d..446a47c3b39826 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,7 +8,7 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[{package.json,.travis.yml}] +[{*.json,*.yml}] indent_style = space indent_size = 2 diff --git a/.eslintrc.json b/.eslintrc.json index 4fe46964516009..69be6d90c0d781 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,6 +8,7 @@ ], "env": { "browser": false, + "es6": true, "node": true, "mocha": true }, @@ -35,6 +36,7 @@ "rules": { "array-bracket-spacing": [ "error", "always" ], "brace-style": [ "error", "1tbs" ], + "camelcase": [ "error", { "properties": "never" } ], "comma-dangle": [ "error", "always-multiline" ], "comma-spacing": "error", "comma-style": "error", diff --git a/.gitignore b/.gitignore index d0b63c022ec569..283066ff44c040 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ gutenberg.pot *.log yarn.lock gutenberg.zip +storybook-static diff --git a/.storybook/addons.js b/.storybook/addons.js new file mode 100644 index 00000000000000..5659100510d17d --- /dev/null +++ b/.storybook/addons.js @@ -0,0 +1,2 @@ +import '@storybook/addon-knobs/register'; +import '@storybook/addon-options/register'; diff --git a/.storybook/config.js b/.storybook/config.js new file mode 100644 index 00000000000000..8dd25411a71b30 --- /dev/null +++ b/.storybook/config.js @@ -0,0 +1,33 @@ +/** + * External dependencies + */ +import 'prismjs'; +import { configure, setAddon } from '@storybook/react'; +import infoAddon from '@storybook/addon-info'; +import { setOptions } from '@storybook/addon-options'; + +/** + * Internal dependencies + */ +import * as element from 'element'; +import './style.scss'; + +function loadStories() { + window.wp = { ...window.wp, element }; + require( '../components/story' ); + require( '../components/button/story' ); +} + +setOptions( { + name: 'Gutenberg', + url: 'https://github.com/WordPress/gutenberg', + goFullScreen: false, + showLeftPanel: true, + showDownPanel: true, + showSearchBox: false, + downPanelInRight: true, + sortStoriesByKind: false, +} ); +setAddon( infoAddon ); + +configure( loadStories, module ); diff --git a/.storybook/style.scss b/.storybook/style.scss new file mode 100644 index 00000000000000..59e6f6366a2c5d --- /dev/null +++ b/.storybook/style.scss @@ -0,0 +1,52 @@ +@import url( 'https://wordpress.org/wp-admin/load-styles.php?c=0&dir=ltr&load%5B%5D=common,buttons,dashicons,forms' ); + +html { + height: auto; +} + +body { + background: none; + padding: 20px; + margin: 0; +} + +p, h1, h2, li { + // Match Info Addon Styling + font-family: -apple-system, ".SFNSText-Regular", "San Francisco", Roboto, "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; + color: rgb(68, 68, 68); + -webkit-font-smoothing: antialiased; + font-weight: 400; + line-height: 1.45; + font-size: 15px; +} + +h1 { + font-size: 2em; + margin: .67em 0; + font-weight: 600; +} + +h2 { + margin: 0px 0px 10px; + padding: 0px; + font-weight: 400; + font-size: 22px; +} + +pre { + font-size: 0.88em; + font-family: Menlo, Monaco, "Courier New", monospace; + background-color: rgb(250, 250, 250); + padding: 0.5rem; + line-height: 1.5; + overflow-x: auto !important; // Overrides the Info Addon Styling + + &:before, &:after { + background: red; + } +} + +code { + font-family: Menlo, Monaco, "Courier New", monospace; + background-color: rgb(250, 250, 250); +} diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js new file mode 100644 index 00000000000000..e24e1bd60eb898 --- /dev/null +++ b/.storybook/webpack.config.js @@ -0,0 +1,35 @@ +const config = require( '../webpack.config' ); +const webpack = require( 'webpack' ); +config.module.rules = [ + // Exclude the sass loader to override it + ...config.module.rules.filter( ( rule ) => ! rule.test.test( '.scss' ) ), + { + test: /\.md/, + use: 'raw-loader', + }, + { + test: /\.scss$/, + use: [ + { loader: 'style-loader' }, + { loader: 'css-loader' }, + { loader: 'postcss-loader' }, + { + loader: 'sass-loader', + query: { + includePaths: [ 'editor/assets/stylesheets' ], + data: '@import "variables"; @import "mixins"; @import "animations";@import "z-index";', + outputStyle: 'production' === process.env.NODE_ENV ? + 'compressed' : 'nested', + }, + }, + ], + }, +]; +config.externals = []; + +// Exclude Uglify Plugin to avoid breaking the React Components Display Name +config.plugins = config.plugins.filter( plugin => { + return plugin.constructor !== webpack.optimize.UglifyJsPlugin; +} ); + +module.exports = config; diff --git a/.travis.yml b/.travis.yml index dae3085e5b875b..9861d4b2e3d6d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,8 +44,7 @@ before_script: fi - | if [[ "$TRAVISCI" == "phpcs" ]] ; then - composer global require wp-coding-standards/wpcs - phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs + composer install fi script: @@ -58,10 +57,19 @@ script: fi - | if [[ "$TRAVISCI" == "phpcs" ]] ; then - phpcs + ./vendor/bin/phpcs fi - | if [[ "$TRAVISCI" == "js" ]] ; then npm install || exit 1 npm run ci || exit 1 fi + +before_deploy: + - npm install && npm run build-storybook + +deploy: + provider: surge + project: ./storybook-static/ + domain: gutenberg-devdoc.surge.sh + skip_cleanup: true diff --git a/blocks/alignment-toolbar/index.js b/blocks/alignment-toolbar/index.js new file mode 100644 index 00000000000000..f0fa63c6a11e13 --- /dev/null +++ b/blocks/alignment-toolbar/index.js @@ -0,0 +1,40 @@ +/** + * WordPress dependencies + */ +import { __ } from 'i18n'; +import { Toolbar } from 'components'; + +const ALIGNMENT_CONTROLS = [ + { + icon: 'editor-alignleft', + title: __( 'Align left' ), + align: 'left', + }, + { + icon: 'editor-aligncenter', + title: __( 'Align center' ), + align: 'center', + }, + { + icon: 'editor-alignright', + title: __( 'Align right' ), + align: 'right', + }, +]; + +export default function AlignmentToolbar( { value, onChange } ) { + return ( + { + const { align } = control; + const isActive = ( value === align ); + + return { + ...control, + isActive, + onClick: () => onChange( isActive ? null : align ), + }; + } ) } + /> + ); +} diff --git a/blocks/api/categories.js b/blocks/api/categories.js index 05361f55ff39bc..2ca1fbbea3b8bc 100644 --- a/blocks/api/categories.js +++ b/blocks/api/categories.js @@ -14,8 +14,9 @@ import { __ } from 'i18n'; const categories = [ { slug: 'common', title: __( 'Common Blocks' ) }, { slug: 'formatting', title: __( 'Formatting' ) }, - { slug: 'embed', title: __( 'Embed' ) }, { slug: 'layout', title: __( 'Layout Blocks' ) }, + { slug: 'widgets', title: __( 'Widgets' ) }, + { slug: 'embed', title: __( 'Embed' ) }, ]; /** diff --git a/blocks/api/registration.js b/blocks/api/registration.js index 275bcb872a9546..7b5e8ce3906d16 100644 --- a/blocks/api/registration.js +++ b/blocks/api/registration.js @@ -1,4 +1,4 @@ -/* eslint-disable no-console */ +/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */ /** * Block settings keyed by block slug. diff --git a/blocks/block-controls/index.js b/blocks/block-controls/index.js index 8ed9ec31efa21b..e554ef073f1911 100644 --- a/blocks/block-controls/index.js +++ b/blocks/block-controls/index.js @@ -8,10 +8,11 @@ import { Fill } from 'react-slot-fill'; */ import { Toolbar } from 'components'; -export default function BlockControls( { controls } ) { +export default function BlockControls( { controls, children } ) { return ( + { children } ); } diff --git a/blocks/editable/index.js b/blocks/editable/index.js index b0645495cec1fb..34116d99d0d156 100644 --- a/blocks/editable/index.js +++ b/blocks/editable/index.js @@ -2,7 +2,7 @@ * External dependencies */ import classnames from 'classnames'; -import { last, isEqual, capitalize, omitBy, forEach, merge, identity, find } from 'lodash'; +import { last, isEqual, omitBy, forEach, merge, identity, find } from 'lodash'; import { nodeListToReact } from 'dom-react'; import { Fill } from 'react-slot-fill'; import 'element-closest'; @@ -10,7 +10,6 @@ import 'element-closest'; /** * WordPress dependencies */ -import { Toolbar } from 'components'; import { BACKSPACE, DELETE } from 'utils/keycodes'; /** @@ -20,30 +19,6 @@ import './style.scss'; import FormatToolbar from './format-toolbar'; import TinyMCE from './tinymce'; -const alignmentMap = { - alignleft: 'left', - alignright: 'right', - aligncenter: 'center', -}; - -const ALIGNMENT_CONTROLS = [ - { - icon: 'editor-alignleft', - title: wp.i18n.__( 'Align left' ), - align: 'left', - }, - { - icon: 'editor-aligncenter', - title: wp.i18n.__( 'Align center' ), - align: 'center', - }, - { - icon: 'editor-alignright', - title: wp.i18n.__( 'Align right' ), - align: 'right', - }, -]; - function createElement( type, props, ...children ) { if ( props[ 'data-mce-bogus' ] === 'all' ) { return null; @@ -78,7 +53,6 @@ export default class Editable extends wp.element.Component { this.state = { formats: {}, - alignment: null, bookmark: null, empty: ! props.value || ! props.value.length, }; @@ -137,7 +111,10 @@ export default class Editable extends wp.element.Component { empty: ! content || ! content.length, } ); - if ( this.props.focus.collapsed !== collapsed ) { + if ( + this.props.focus && this.props.onFocus && + this.props.focus.collapsed !== collapsed + ) { this.props.onFocus( { ...this.props.focus, collapsed, @@ -293,12 +270,10 @@ export default class Editable extends wp.element.Component { } const activeFormats = this.editor.formatter.matchAll( [ 'bold', 'italic', 'strikethrough' ] ); activeFormats.forEach( ( activeFormat ) => formats[ activeFormat ] = true ); - const alignments = this.editor.formatter.matchAll( [ 'alignleft', 'aligncenter', 'alignright' ] ); - const alignment = alignments.length > 0 ? alignmentMap[ alignments[ 0 ] ] : null; const focusPosition = this.getRelativePosition( element ); const bookmark = this.editor.selection.getBookmark( 2, true ); - this.setState( { alignment, bookmark, formats, focusPosition } ); + this.setState( { bookmark, formats, focusPosition } ); } updateContent() { @@ -344,7 +319,7 @@ export default class Editable extends wp.element.Component { } componentDidUpdate( prevProps ) { - if ( this.props.focus !== prevProps.focus ) { + if ( ! isEqual( this.props.focus, prevProps.focus ) ) { this.updateFocus(); } @@ -397,20 +372,6 @@ export default class Editable extends wp.element.Component { this.editor.setDirty( true ); } - isAlignmentActive( align ) { - return this.state.alignment === align; - } - - toggleAlignment( align ) { - this.editor.focus(); - - if ( this.isAlignmentActive( align ) ) { - this.editor.execCommand( 'JustifyNone' ); - } else { - this.editor.execCommand( 'Justify' + capitalize( align ) ); - } - } - render() { const { tagName, @@ -418,7 +379,6 @@ export default class Editable extends wp.element.Component { value, focus, className, - showAlignments = false, inlineToolbar = false, formattingControls, placeholder, @@ -443,15 +403,6 @@ export default class Editable extends wp.element.Component {
{ focus && - { showAlignments && - ( { - ...control, - onClick: () => this.toggleAlignment( control.align ), - isActive: this.isAlignmentActive( control.align ), - } ) ) } - /> - } { ! inlineToolbar && formatToolbar } } diff --git a/blocks/editable/tinymce.js b/blocks/editable/tinymce.js index e12b769474319a..914369df0cc7f7 100644 --- a/blocks/editable/tinymce.js +++ b/blocks/editable/tinymce.js @@ -2,6 +2,7 @@ * External dependencies */ import tinymce from 'tinymce'; +import { isEqual } from 'lodash'; export default class TinyMCE extends wp.element.Component { componentDidMount() { @@ -22,6 +23,10 @@ export default class TinyMCE extends wp.element.Component { if ( this.editorNode.getAttribute( 'data-is-empty' ) !== isEmpty ) { this.editorNode.setAttribute( 'data-is-empty', isEmpty ); } + + if ( ! isEqual( this.props.style, nextProps.style ) ) { + Object.assign( this.editorNode.style, nextProps.style ); + } } componentWillUnmount() { diff --git a/blocks/index.js b/blocks/index.js index 5b40f139bc29b9..c73c2217117d5d 100644 --- a/blocks/index.js +++ b/blocks/index.js @@ -13,5 +13,7 @@ import './library'; // Blocks are inferred from the HTML source of a post through a parsing mechanism // and then stored as objects in state, from which it is then rendered for editing. export * from './api'; +export { default as AlignmentToolbar } from './alignment-toolbar'; +export { default as BlockControls } from './block-controls'; export { default as Editable } from './editable'; export { default as MediaUploadButton } from './media-upload-button'; diff --git a/blocks/library/embed/index.js b/blocks/library/embed/index.js index 251a5c35b90958..a58e571bb77a9e 100644 --- a/blocks/library/embed/index.js +++ b/blocks/library/embed/index.js @@ -1,3 +1,9 @@ +/** + * External dependencies + */ +import { parse } from 'url'; +import { includes } from 'lodash'; + /** * WordPress dependencies */ @@ -12,6 +18,8 @@ import Editable from '../../editable'; const { attr, children } = query; +const HOSTS_NO_PREVIEWS = [ 'facebook.com' ]; + /** * Returns an attribute setter with behavior that if the target value is * already the assigned attribute value, it will be set to undefined. @@ -26,178 +34,226 @@ function toggleAlignment( align ) { }; } -registerBlockType( 'core/embed', { - title: wp.i18n.__( 'Embed' ), - - icon: 'video-alt3', +function getEmbedBlockSettings( { title, icon, category = 'embed' } ) { + return { + title: wp.i18n.__( title ), - category: 'embed', + icon, - attributes: { - title: attr( 'iframe', 'title' ), - caption: children( 'figcaption' ), - }, + category, - controls: [ - { - icon: 'align-left', - title: wp.i18n.__( 'Align left' ), - isActive: ( { align } ) => 'left' === align, - onClick: toggleAlignment( 'left' ), - }, - { - icon: 'align-center', - title: wp.i18n.__( 'Align center' ), - isActive: ( { align } ) => ! align || 'center' === align, - onClick: toggleAlignment( 'center' ), + attributes: { + title: attr( 'iframe', 'title' ), + caption: children( 'figcaption' ), }, - { - icon: 'align-right', - title: wp.i18n.__( 'Align right' ), - isActive: ( { align } ) => 'right' === align, - onClick: toggleAlignment( 'right' ), - }, - { - icon: 'align-full-width', - title: wp.i18n.__( 'Wide width' ), - isActive: ( { align } ) => 'wide' === align, - onClick: toggleAlignment( 'wide' ), + + controls: [ + { + icon: 'align-left', + title: wp.i18n.__( 'Align left' ), + isActive: ( { align } ) => 'left' === align, + onClick: toggleAlignment( 'left' ), + }, + { + icon: 'align-center', + title: wp.i18n.__( 'Align center' ), + isActive: ( { align } ) => ! align || 'center' === align, + onClick: toggleAlignment( 'center' ), + }, + { + icon: 'align-right', + title: wp.i18n.__( 'Align right' ), + isActive: ( { align } ) => 'right' === align, + onClick: toggleAlignment( 'right' ), + }, + { + icon: 'align-full-width', + title: wp.i18n.__( 'Wide width' ), + isActive: ( { align } ) => 'wide' === align, + onClick: toggleAlignment( 'wide' ), + }, + ], + + getEditWrapperProps( attributes ) { + const { align } = attributes; + if ( 'left' === align || 'right' === align || 'wide' === align ) { + return { 'data-align': align }; + } }, - ], - - getEditWrapperProps( attributes ) { - const { align } = attributes; - if ( 'left' === align || 'right' === align || 'wide' === align ) { - return { 'data-align': align }; - } - }, - - edit: class extends wp.element.Component { - constructor() { - super( ...arguments ); - this.doServerSideRender = this.doServerSideRender.bind( this ); - this.state = { - html: '', - type: '', - error: false, - fetching: false, - }; - this.noPreview = [ - 'facebook.com', - ]; - if ( this.props.attributes.url ) { - // if the url is already there, we're loading a saved block, so we need to render - this.doServerSideRender(); + + edit: class extends wp.element.Component { + constructor() { + super( ...arguments ); + this.doServerSideRender = this.doServerSideRender.bind( this ); + this.state = { + html: '', + type: '', + error: false, + fetching: false, + }; } - } - componentWillUnmount() { - // can't abort the fetch promise, so let it know we will unmount - this.unmounting = true; - } + componentWillMount() { + if ( this.props.attributes.url ) { + // if the url is already there, we're loading a saved block, so we need to render + // a different thing, which is why this doesn't use 'fetching', as that + // is for when the user is putting in a new url on the placeholder form + this.setState( { fetching: true } ); + this.doServerSideRender(); + } + } - doServerSideRender( event ) { - if ( event ) { - event.preventDefault(); + componentWillUnmount() { + // can't abort the fetch promise, so let it know we will unmount + this.unmounting = true; } - const { url } = this.props.attributes; - const api_url = wpApiSettings.root + 'oembed/1.0/proxy?url=' + encodeURIComponent( url ) + '&_wpnonce=' + wpApiSettings.nonce; - - this.setState( { error: false, fetching: true } ); - window.fetch( api_url, { - credentials: 'include', - } ).then( - ( response ) => { - if ( this.unmounting ) { - return; - } - response.json().then( ( obj ) => { - const { html, type } = obj; - if ( html ) { - this.setState( { html, type } ); - } else { - this.setState( { error: true } ); - } - this.setState( { fetching: false } ); - } ); + + doServerSideRender( event ) { + if ( event ) { + event.preventDefault(); } - ); - } + const { url } = this.props.attributes; + const apiURL = wpApiSettings.root + 'oembed/1.0/proxy?url=' + encodeURIComponent( url ) + '&_wpnonce=' + wpApiSettings.nonce; - render() { - const { html, type, error, fetching } = this.state; - const { url, caption } = this.props.attributes; - const { setAttributes, focus, setFocus } = this.props; + this.setState( { error: false, fetching: true } ); + window.fetch( apiURL, { + credentials: 'include', + } ).then( + ( response ) => { + if ( this.unmounting ) { + return; + } + response.json().then( ( obj ) => { + const { html, type } = obj; + if ( html ) { + this.setState( { html, type } ); + } else { + this.setState( { error: true } ); + } + this.setState( { fetching: false } ); + } ); + } + ); + } - if ( ! html ) { - return ( - -
- setAttributes( { url: event.target.value } ) } /> - { ! fetching - ?
+ ); + } + + if ( ! html ) { + return ( + + + setAttributes( { url: event.target.value } ) } /> + - : - } - { error &&

{ wp.i18n.__( 'Sorry, we could not embed that content.' ) }

} - -
+ { error &&

{ wp.i18n.__( 'Sorry, we could not embed that content.' ) }

} + + + ); + } + + const parsedUrl = parse( url ); + const cannotPreview = includes( HOSTS_NO_PREVIEWS, parsedUrl.host.replace( /^www\./, '' ) ); + let typeClassName = 'blocks-embed'; + + if ( 'video' === type ) { + typeClassName = 'blocks-embed-video'; + } + + return ( +
+ { ( cannotPreview ) ? ( + +

{ url }

+

{ wp.i18n.__( 'Previews for this are unavailable in the editor, sorry!' ) }

+
+ ) : ( + + ) } + { ( caption && caption.length > 0 ) || !! focus ? ( + setAttributes( { caption: value } ) } + inline + inlineToolbar + /> + ) : null } +
); } + }, - const domain = url.split( '/' )[ 2 ].replace( /^www\./, '' ); - const cannotPreview = this.noPreview.includes( domain ); - let typeClassName = 'blocks-embed'; - - if ( 'video' === type ) { - typeClassName = 'blocks-embed-video'; + save( { attributes } ) { + const { url, caption } = attributes; + if ( ! caption || ! caption.length ) { + return url; } return ( -
- { ( cannotPreview ) ? ( - -

{ url }

-

{ wp.i18n.__( 'Previews for this are unavailable in the editor, sorry!' ) }

-
- ) : ( - - ) } - { ( caption && caption.length > 0 ) || !! focus ? ( - setAttributes( { caption: value } ) } - inline - inlineToolbar - /> - ) : null } +
{ '\n' } + { url } +
{ caption }
); - } - }, - - save( { attributes } ) { - const { url, caption } = attributes; - if ( ! caption || ! caption.length ) { - return url; - } - - return ( -
- { url } -
{ caption }
-
- ); - }, -} ); + }, + }; +} + +registerBlockType( 'core/embed', getEmbedBlockSettings( { title: 'Embed', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embedanimoto', getEmbedBlockSettings( { title: 'Animoto', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embedcloudup', getEmbedBlockSettings( { title: 'Cloudup', icon: 'cloud' } ) ); +registerBlockType( 'core/embedcollegehumor', getEmbedBlockSettings( { title: 'CollegeHumor', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embeddailymotion', getEmbedBlockSettings( { title: 'Dailymotion', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embedfacebook', getEmbedBlockSettings( { title: 'Facebook', icon: 'facebook' } ) ); +registerBlockType( 'core/embedflickr', getEmbedBlockSettings( { title: 'Flickr', icon: 'format-image' } ) ); +registerBlockType( 'core/embedfunnyordie', getEmbedBlockSettings( { title: 'Funny or Die', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embedhulu', getEmbedBlockSettings( { title: 'Hulu', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embedimgur', getEmbedBlockSettings( { title: 'Imgur', icon: 'format-image' } ) ); +registerBlockType( 'core/embedinstagram', getEmbedBlockSettings( { title: 'Instagram', icon: 'camera' } ) ); +registerBlockType( 'core/embedissuu', getEmbedBlockSettings( { title: 'Issuu', icon: 'media-default' } ) ); +registerBlockType( 'core/embedkickstarter', getEmbedBlockSettings( { title: 'Kickstarter', icon: 'lightbulb' } ) ); +registerBlockType( 'core/embedmeetupcom', getEmbedBlockSettings( { title: 'Meetup.com', icon: 'location-alt' } ) ); +registerBlockType( 'core/embedmixcloud', getEmbedBlockSettings( { title: 'Mixcloud', icon: 'format-audio' } ) ); +registerBlockType( 'core/embedphotobucket', getEmbedBlockSettings( { title: 'Photobucket', icon: 'camera' } ) ); +registerBlockType( 'core/embedpolldaddy', getEmbedBlockSettings( { title: 'Polldaddy', icon: 'yes' } ) ); +registerBlockType( 'core/embedreddit', getEmbedBlockSettings( { title: 'Reddit', icon: 'share' } ) ); +registerBlockType( 'core/embedreverbnation', getEmbedBlockSettings( { title: 'ReverbNation', icon: 'format-audio' } ) ); +registerBlockType( 'core/embedscreencast', getEmbedBlockSettings( { title: 'Screencast', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embedscribd', getEmbedBlockSettings( { title: 'Scribd', icon: 'book-alt' } ) ); +registerBlockType( 'core/embedslideshare', getEmbedBlockSettings( { title: 'Slideshare', icon: 'slides' } ) ); +registerBlockType( 'core/embedsmugmug', getEmbedBlockSettings( { title: 'SmugMug', icon: 'camera' } ) ); +registerBlockType( 'core/embedsoundcloud', getEmbedBlockSettings( { title: 'SoundCloud', icon: 'format-audio' } ) ); +registerBlockType( 'core/embedspeaker', getEmbedBlockSettings( { title: 'Speaker', icon: 'format-audio' } ) ); +registerBlockType( 'core/embedspotify', getEmbedBlockSettings( { title: 'Spotify', icon: 'format-audio' } ) ); +registerBlockType( 'core/embedted', getEmbedBlockSettings( { title: 'TED', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embedtumblr', getEmbedBlockSettings( { title: 'Tumblr', icon: 'share' } ) ); +registerBlockType( 'core/embedtwitter', getEmbedBlockSettings( { title: 'Twitter', icon: 'twitter' } ) ); +registerBlockType( 'core/embedvideopress', getEmbedBlockSettings( { title: 'VideoPress', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embedvimeo', getEmbedBlockSettings( { title: 'Vimeo', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embedvine', getEmbedBlockSettings( { title: 'Vine', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embedwordpress', getEmbedBlockSettings( { title: 'WordPress', icon: 'wordpress' } ) ); +registerBlockType( 'core/embedwordpresstv', getEmbedBlockSettings( { title: 'WordPress.tv', icon: 'video-alt3' } ) ); +registerBlockType( 'core/embedyoutube', getEmbedBlockSettings( { title: 'YouTube', icon: 'video-alt3' } ) ); diff --git a/blocks/library/embed/style.scss b/blocks/library/embed/style.scss index 7abbf2de165903..f35c8f90fae3fb 100644 --- a/blocks/library/embed/style.scss +++ b/blocks/library/embed/style.scss @@ -1,6 +1,22 @@ .blocks-embed, .blocks-embed-video { margin: 0; + clear: both; // necessary because we use responsive trickery to set width/height, and therefore the video doesn't intrinsically clear floats like an img does + + &.is-loading { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 1em; + min-height: 200px; + text-align: center; + background: $light-gray-100; + p { + font-family: $default-font; + font-size: $default-font-size; + } + } } .blocks-embed-video > div:first-child { @@ -17,44 +33,3 @@ width: 100%; height: 100%; } - -div[data-type="core/embed"] { - &[data-align="left"], - &[data-align="right"] { - // Without z-index, won't be clickable as "above" adjacent content - z-index: z-index( '.editor-visual-editor__block {core/image aligned left or right}' ); - width: 370px; - } - - &[data-align="left"] { - float: left; - margin-right: $block-padding; - } - - &[data-align="right"] { - float: right; - margin-left: $block-padding; - } - - &[data-align="wide"] { - padding-left: 0; - padding-right: 0; - margin-right: -#{ $block-padding + $block-mover-margin }; /* Compensate for .editor-visual-editor centering padding */ - - &:before { - left: 0; - border-left-width: 0; - border-right-width: 0; - } - - .editor-block-mover { - display: none; - } - - .editor-visual-editor__block-controls { - max-width: #{ $visual-editor-max-width - $block-padding - ( $block-padding * 2 + $block-mover-margin ) }; - margin-left: auto; - margin-right: auto; - } - } -} diff --git a/blocks/library/freeform/freeform-block.js b/blocks/library/freeform/freeform-block.js index 05ad3cae02ab1e..bf25eb52675064 100644 --- a/blocks/library/freeform/freeform-block.js +++ b/blocks/library/freeform/freeform-block.js @@ -45,6 +45,7 @@ const FREEFORM_CONTROLS = [ title: wp.i18n.__( 'Convert to ordered' ), }, { + leftDivider: true, id: 'bold', icon: 'editor-bold', title: wp.i18n.__( 'Bold' ), diff --git a/blocks/library/image/index.js b/blocks/library/image/index.js index 2b7d06ab90810a..1bdfe5ac0dbbed 100644 --- a/blocks/library/image/index.js +++ b/blocks/library/image/index.js @@ -60,16 +60,22 @@ registerBlockType( 'core/image', { onClick: toggleAlignment( 'right' ), }, { - icon: 'align-full-width', + icon: 'align-wide', title: wp.i18n.__( 'Wide width' ), isActive: ( { align } ) => 'wide' === align, onClick: toggleAlignment( 'wide' ), }, + { + icon: 'align-full-width', + title: wp.i18n.__( 'Full width' ), + isActive: ( { align } ) => 'full' === align, + onClick: toggleAlignment( 'full' ), + }, ], getEditWrapperProps( attributes ) { const { align } = attributes; - if ( 'left' === align || 'right' === align || 'wide' === align ) { + if ( 'left' === align || 'right' === align || 'wide' === align || 'full' === align ) { return { 'data-align': align }; } }, diff --git a/blocks/library/image/style.scss b/blocks/library/image/style.scss index f91f979a4d5bf2..b45d7085c0885c 100644 --- a/blocks/library/image/style.scss +++ b/blocks/library/image/style.scss @@ -1,45 +1,3 @@ -.editor-visual-editor__block[data-type="core/image"] { - &[data-align="left"], - &[data-align="right"] { - // Without z-index, won't be clickable as "above" adjacent content - z-index: z-index( '.editor-visual-editor__block {core/image aligned left or right}' ); - max-width: 370px; - } - - &[data-align="left"] { - float: left; - margin-right: $block-padding; - } - - &[data-align="right"] { - float: right; - margin-left: $block-padding; - } - - &[data-align="wide"] { - padding-left: 0; - padding-right: 0; - margin-right: -#{ $block-padding + $block-mover-margin }; /* Compensate for .editor-visual-editor centering padding */ - - &:before { - left: 0; - border-left-width: 0; - border-right-width: 0; - } - - .editor-block-mover { - display: none; - } - - .editor-visual-editor__block-controls { - max-width: #{ $visual-editor-max-width - $block-padding - ( $block-padding * 2 + $block-mover-margin ) }; - margin-left: auto; - margin-right: auto; - } - - } -} - .blocks-image { margin: 0; diff --git a/blocks/library/index.js b/blocks/library/index.js index bf5e64d4a9cef6..c611bf9984bcea 100644 --- a/blocks/library/index.js +++ b/blocks/library/index.js @@ -12,3 +12,4 @@ import './table'; import './preformatted'; import './code'; import './gallery'; +import './latest-posts'; diff --git a/blocks/library/latest-posts/data.js b/blocks/library/latest-posts/data.js new file mode 100644 index 00000000000000..e48dbd2544d48f --- /dev/null +++ b/blocks/library/latest-posts/data.js @@ -0,0 +1,19 @@ +/** + * Returns a Promise with the latest posts or an error on failure. + * + * @param {Number} postsToShow Number of posts to display. + * + * @returns {wp.api.collections.Posts} Returns a Promise with the latest posts. + */ +export function getLatestPosts( postsToShow = 5 ) { + const postsCollection = new wp.api.collections.Posts(); + + const posts = postsCollection.fetch( { + data: { + per_page: postsToShow, + }, + } ); + + return posts; +} + diff --git a/blocks/library/latest-posts/index.js b/blocks/library/latest-posts/index.js new file mode 100644 index 00000000000000..bd2fcd6c0fe0bd --- /dev/null +++ b/blocks/library/latest-posts/index.js @@ -0,0 +1,74 @@ +/** + * WordPress dependencies + */ +import { Placeholder } from 'components'; +import { __ } from 'i18n'; + +/** + * Internal dependencies + */ +import { registerBlockType } from '../../api'; +import { getLatestPosts } from './data.js'; + +registerBlockType( 'core/latestposts', { + title: __( 'Latest Posts' ), + + icon: 'list-view', + + category: 'widgets', + + defaultAttributes: { + poststoshow: 5, + }, + + edit: class extends wp.element.Component { + constructor() { + super( ...arguments ); + + const { poststoshow } = this.props.attributes; + + this.state = { + latestPosts: [], + }; + + this.latestPostsRequest = getLatestPosts( poststoshow ); + + this.latestPostsRequest + .then( latestPosts => this.setState( { latestPosts } ) ); + } + + render() { + const { latestPosts } = this.state; + + if ( ! latestPosts.length ) { + return ( + + + ); + } + + return ( +
+ +
+ ); + } + }, + + componentWillUnmount() { + if ( this.latestPostsRequest.state() === 'pending' ) { + this.latestPostsRequest.abort(); + } + }, + + save() { + return null; + }, +} ); diff --git a/blocks/library/latest-posts/index.php b/blocks/library/latest-posts/index.php new file mode 100644 index 00000000000000..e947a54f8aaa2e --- /dev/null +++ b/blocks/library/latest-posts/index.php @@ -0,0 +1,60 @@ + 0 && + $posts_to_show_attr < 100 + ) { + $posts_to_show = $attributes['poststoshow']; + } + } + + $recent_posts = wp_get_recent_posts( array( + 'numberposts' => $posts_to_show, + 'post_status' => 'publish', + ) ); + + $posts_content = ''; + + foreach ( $recent_posts as $post ) { + $post_id = $post['ID']; + $post_permalink = get_permalink( $post_id ); + $post_title = get_the_title( $post_id ); + + $posts_content .= "
  • {$post_title}
  • \n"; + } + + $block_content = << +
      + {$posts_content} +
    + + +CONTENT; + + return $block_content; +} + +register_block_type( 'core/latestposts', array( + 'render' => 'gutenberg_block_core_latest_posts', +) ); diff --git a/blocks/library/list/index.js b/blocks/library/list/index.js index 80bec7d99f42c5..b8376e153f12fa 100644 --- a/blocks/library/list/index.js +++ b/blocks/library/list/index.js @@ -1,8 +1,9 @@ /** * WordPress dependencies */ -import { switchChildrenNodeName } from 'element'; +import { Component, createElement, switchChildrenNodeName } from 'element'; import { find } from 'lodash'; +import { __ } from 'i18n'; /** * Internal dependencies @@ -10,45 +11,12 @@ import { find } from 'lodash'; import './style.scss'; import { registerBlockType, query as hpq, createBlock } from '../../api'; import Editable from '../../editable'; +import BlockControls from '../../block-controls'; const { children, prop } = hpq; -function execCommand( command ) { - return ( { editor } ) => { - if ( editor ) { - editor.execCommand( command ); - } - }; -} - -function listIsActive( listType ) { - return ( { nodeName = 'OL', internalListType } ) => { - return listType === ( internalListType ? internalListType : nodeName ); - }; -} - -function listSetType( listType, editorCommand ) { - return ( { internalListType, editor }, setAttributes ) => { - if ( internalListType ) { - // only change list types, don't toggle off internal lists - if ( internalListType !== listType ) { - if ( editor ) { - editor.execCommand( editorCommand ); - } - } - } else { - setAttributes( { nodeName: listType } ); - } - }; -} - -function findInternalListType( { parents } ) { - const list = find( parents, ( node ) => node.nodeName === 'UL' || node.nodeName === 'OL' ); - return list ? list.nodeName : null; -} - registerBlockType( 'core/list', { - title: wp.i18n.__( 'List' ), + title: __( 'List' ), icon: 'editor-ul', category: 'common', @@ -57,31 +25,6 @@ registerBlockType( 'core/list', { values: children( 'ol,ul' ), }, - controls: [ - { - icon: 'editor-ul', - title: wp.i18n.__( 'Convert to unordered' ), - isActive: listIsActive( 'UL' ), - onClick: listSetType( 'UL', 'InsertUnorderedList' ), - }, - { - icon: 'editor-ol', - title: wp.i18n.__( 'Convert to ordered' ), - isActive: listIsActive( 'OL' ), - onClick: listSetType( 'OL', 'InsertOrderedList' ), - }, - { - icon: 'editor-outdent', - title: wp.i18n.__( 'Outdent list item' ), - onClick: execCommand( 'Outdent' ), - }, - { - icon: 'editor-indent', - title: wp.i18n.__( 'Indent list item' ), - onClick: execCommand( 'Indent' ), - }, - ], - transforms: { from: [ { @@ -108,37 +51,129 @@ registerBlockType( 'core/list', { ], }, - edit( { attributes, setAttributes, focus, setFocus } ) { - const { nodeName = 'OL', values = [] } = attributes; - return ( - ( { - ...settings, - plugins: ( settings.plugins || [] ).concat( 'lists' ), - lists_indent_on_tab: false, - } ) } - onSetup={ ( editor ) => { - editor.on( 'nodeChange', ( nodeInfo ) => { - setAttributes( { internalListType: findInternalListType( nodeInfo ) } ); - } ); - setAttributes( { editor } ); - } } - onChange={ ( nextValues ) => { - setAttributes( { values: nextValues } ); - } } - value={ values } - focus={ focus } - onFocus={ setFocus } - showAlignments - className="blocks-list" /> - ); + edit: class extends Component { + constructor() { + super( ...arguments ); + + this.setupEditor = this.setupEditor.bind( this ); + this.getEditorSettings = this.getEditorSettings.bind( this ); + this.setNextValues = this.setNextValues.bind( this ); + + this.state = { + internalListType: null, + }; + } + + isListActive( listType ) { + const { internalListType } = this.state; + const { nodeName = 'OL' } = this.props.attributes; + + return listType === ( internalListType ? internalListType : nodeName ); + } + + findInternalListType( { parents } ) { + const list = find( parents, ( node ) => node.nodeName === 'UL' || node.nodeName === 'OL' ); + return list ? list.nodeName : null; + } + + setupEditor( editor ) { + editor.on( 'nodeChange', ( nodeInfo ) => { + this.setState( { + internalListType: this.findInternalListType( nodeInfo ), + } ); + } ); + + this.editor = editor; + } + + createSetListType( type, command ) { + return () => { + const { setAttributes } = this.props; + const { internalListType } = this.state; + if ( internalListType ) { + // only change list types, don't toggle off internal lists + if ( internalListType !== type && this.editor ) { + this.editor.execCommand( command ); + } + } else { + setAttributes( { nodeName: type } ); + } + }; + } + + createExecCommand( command ) { + return () => { + if ( this.editor ) { + this.editor.execCommand( command ); + } + }; + } + + getEditorSettings( settings ) { + return { + ...settings, + plugins: ( settings.plugins || [] ).concat( 'lists' ), + lists_indent_on_tab: false, + }; + } + + setNextValues( nextValues ) { + this.props.setAttributes( { values: nextValues } ); + } + + render() { + const { attributes, focus, setFocus } = this.props; + const { nodeName = 'OL', values = [] } = attributes; + + return [ + focus && ( + + ), + , + ]; + } }, save( { attributes } ) { const { nodeName = 'OL', values = [] } = attributes; - return wp.element.createElement( + return createElement( nodeName.toLowerCase(), null, values diff --git a/blocks/library/quote/index.js b/blocks/library/quote/index.js index e75a009503d7f2..bb850669689463 100644 --- a/blocks/library/quote/index.js +++ b/blocks/library/quote/index.js @@ -8,6 +8,8 @@ import { switchChildrenNodeName } from 'element'; */ import './style.scss'; import { registerBlockType, createBlock, query as hpq } from '../../api'; +import AlignmentToolbar from '../../alignment-toolbar'; +import BlockControls from '../../block-controls'; import Editable from '../../editable'; const { children, query } = hpq; @@ -111,11 +113,24 @@ registerBlockType( 'core/quote', { }, edit( { attributes, setAttributes, focus, setFocus, mergeBlocks } ) { - const { value, citation, style = 1 } = attributes; + const { align, value, citation, style = 1 } = attributes; const focusedEditable = focus ? focus.editable || 'value' : null; - return ( -
    + return [ + focus && ( + + { + setAttributes( { align: nextAlign } ); + } } + /> + + ), +
    setFocus( { editable: 'value' } ) } onMerge={ mergeBlocks } - showAlignments + style={ { textAlign: align } } /> { ( ( citation && citation.length > 0 ) || !! focus ) && ( ) } -
    - ); +
    , + ]; }, save( { attributes } ) { - const { value, citation, style = 1 } = attributes; + const { align, value, citation, style = 1 } = attributes; return (
    { value && value.map( ( paragraph, i ) => ( -

    { paragraph }

    +

    + { paragraph } +

    ) ) } { citation && citation.length > 0 && (
    { citation }
    diff --git a/blocks/library/text/index.js b/blocks/library/text/index.js index e98587fabb174c..1f679feed9cf68 100644 --- a/blocks/library/text/index.js +++ b/blocks/library/text/index.js @@ -1,7 +1,14 @@ +/** + * WordPress dependencies + */ +import { Children, cloneElement } from 'element'; + /** * Internal dependencies */ import { registerBlockType, createBlock, query } from '../../api'; +import AlignmentToolbar from '../../alignment-toolbar'; +import BlockControls from '../../block-controls'; import Editable from '../../editable'; const { children } = query; @@ -17,10 +24,6 @@ registerBlockType( 'core/text', { content: children(), }, - defaultAttributes: { - content:

    , - }, - merge( attributes, attributesToMerge ) { return { content: wp.element.concatChildren( attributes.content, attributesToMerge.content ), @@ -28,10 +31,21 @@ registerBlockType( 'core/text', { }, edit( { attributes, setAttributes, insertBlockAfter, focus, setFocus, mergeBlocks } ) { - const { content } = attributes; + const { align, content } = attributes; - return ( + return [ + focus && ( + + { + setAttributes( { align: nextAlign } ); + } } + /> + + ), { setAttributes( { @@ -47,13 +61,20 @@ registerBlockType( 'core/text', { } ) ); } } onMerge={ mergeBlocks } - showAlignments - /> - ); + style={ { textAlign: align } } + />, + ]; }, save( { attributes } ) { - const { content } = attributes; - return content; + const { align, content } = attributes; + + if ( ! align ) { + return content; + } + + return Children.map( content, ( paragraph ) => ( + cloneElement( paragraph, { style: { textAlign: align } } ) + ) ); }, } ); diff --git a/blocks/test/fixtures/core-embed-youtube-caption.html b/blocks/test/fixtures/core-embed-youtube-caption.html deleted file mode 100644 index 784220eab0a20e..00000000000000 --- a/blocks/test/fixtures/core-embed-youtube-caption.html +++ /dev/null @@ -1,3 +0,0 @@ - -

    https://www.youtube.com/embed/Nl6U7UotA-M"
    State of the Word 2016
    - \ No newline at end of file diff --git a/blocks/test/fixtures/core-embed-youtube-caption.serialized.html b/blocks/test/fixtures/core-embed-youtube-caption.serialized.html deleted file mode 100644 index f75c6cc292c51a..00000000000000 --- a/blocks/test/fixtures/core-embed-youtube-caption.serialized.html +++ /dev/null @@ -1,6 +0,0 @@ - -
    https://www.youtube.com/watch?v=Nl6U7UotA-M -
    State of the Word 2016
    -
    - - diff --git a/blocks/test/fixtures/core-embed.html b/blocks/test/fixtures/core-embed.html new file mode 100644 index 00000000000000..af8b876de71e0d --- /dev/null +++ b/blocks/test/fixtures/core-embed.html @@ -0,0 +1,6 @@ + +
    + https://example.com/ +
    Embedded content from an example URL
    +
    + diff --git a/blocks/test/fixtures/core-embed-youtube-caption.json b/blocks/test/fixtures/core-embed.json similarity index 57% rename from blocks/test/fixtures/core-embed-youtube-caption.json rename to blocks/test/fixtures/core-embed.json index 104b854351cf97..f9f5ee6c346cda 100644 --- a/blocks/test/fixtures/core-embed-youtube-caption.json +++ b/blocks/test/fixtures/core-embed.json @@ -3,9 +3,9 @@ "uid": "_uid_0", "name": "core/embed", "attributes": { - "url": "https://www.youtube.com/watch?v=Nl6U7UotA-M", + "url": "https://example.com/", "caption": [ - "State of the Word 2016" + "Embedded content from an example URL" ] } } diff --git a/blocks/test/fixtures/core-embed.serialized.html b/blocks/test/fixtures/core-embed.serialized.html new file mode 100644 index 00000000000000..b8b1e50e7afef6 --- /dev/null +++ b/blocks/test/fixtures/core-embed.serialized.html @@ -0,0 +1,7 @@ + +
    + https://example.com/ +
    Embedded content from an example URL
    +
    + + diff --git a/blocks/test/fixtures/core-embedanimoto.html b/blocks/test/fixtures/core-embedanimoto.html new file mode 100644 index 00000000000000..0e464a377f248d --- /dev/null +++ b/blocks/test/fixtures/core-embedanimoto.html @@ -0,0 +1,6 @@ + +
    + https://animoto.com/ +
    Embedded content from animoto
    +
    + diff --git a/blocks/test/fixtures/core-embedanimoto.json b/blocks/test/fixtures/core-embedanimoto.json new file mode 100644 index 00000000000000..4f2cbc392247d7 --- /dev/null +++ b/blocks/test/fixtures/core-embedanimoto.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedanimoto", + "attributes": { + "url": "https://animoto.com/", + "caption": [ + "Embedded content from animoto" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedanimoto.serialized.html b/blocks/test/fixtures/core-embedanimoto.serialized.html new file mode 100644 index 00000000000000..e33c67b8256d61 --- /dev/null +++ b/blocks/test/fixtures/core-embedanimoto.serialized.html @@ -0,0 +1,7 @@ + +
    + https://animoto.com/ +
    Embedded content from animoto
    +
    + + diff --git a/blocks/test/fixtures/core-embedcloudup.html b/blocks/test/fixtures/core-embedcloudup.html new file mode 100644 index 00000000000000..4650c84b4b703c --- /dev/null +++ b/blocks/test/fixtures/core-embedcloudup.html @@ -0,0 +1,6 @@ + +
    + https://cloudup.com/ +
    Embedded content from cloudup
    +
    + diff --git a/blocks/test/fixtures/core-embedcloudup.json b/blocks/test/fixtures/core-embedcloudup.json new file mode 100644 index 00000000000000..6bda5b3051eef3 --- /dev/null +++ b/blocks/test/fixtures/core-embedcloudup.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedcloudup", + "attributes": { + "url": "https://cloudup.com/", + "caption": [ + "Embedded content from cloudup" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedcloudup.serialized.html b/blocks/test/fixtures/core-embedcloudup.serialized.html new file mode 100644 index 00000000000000..02951c1171ec50 --- /dev/null +++ b/blocks/test/fixtures/core-embedcloudup.serialized.html @@ -0,0 +1,7 @@ + +
    + https://cloudup.com/ +
    Embedded content from cloudup
    +
    + + diff --git a/blocks/test/fixtures/core-embedcollegehumor.html b/blocks/test/fixtures/core-embedcollegehumor.html new file mode 100644 index 00000000000000..5ecdbc3e4dd880 --- /dev/null +++ b/blocks/test/fixtures/core-embedcollegehumor.html @@ -0,0 +1,6 @@ + +
    + https://collegehumor.com/ +
    Embedded content from collegehumor
    +
    + diff --git a/blocks/test/fixtures/core-embedcollegehumor.json b/blocks/test/fixtures/core-embedcollegehumor.json new file mode 100644 index 00000000000000..aa9183ead77484 --- /dev/null +++ b/blocks/test/fixtures/core-embedcollegehumor.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedcollegehumor", + "attributes": { + "url": "https://collegehumor.com/", + "caption": [ + "Embedded content from collegehumor" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedcollegehumor.serialized.html b/blocks/test/fixtures/core-embedcollegehumor.serialized.html new file mode 100644 index 00000000000000..82ffd18b7c8296 --- /dev/null +++ b/blocks/test/fixtures/core-embedcollegehumor.serialized.html @@ -0,0 +1,7 @@ + +
    + https://collegehumor.com/ +
    Embedded content from collegehumor
    +
    + + diff --git a/blocks/test/fixtures/core-embeddailymotion.html b/blocks/test/fixtures/core-embeddailymotion.html new file mode 100644 index 00000000000000..08bed7270fe70d --- /dev/null +++ b/blocks/test/fixtures/core-embeddailymotion.html @@ -0,0 +1,6 @@ + +
    + https://dailymotion.com/ +
    Embedded content from dailymotion
    +
    + diff --git a/blocks/test/fixtures/core-embeddailymotion.json b/blocks/test/fixtures/core-embeddailymotion.json new file mode 100644 index 00000000000000..44f0b737a76784 --- /dev/null +++ b/blocks/test/fixtures/core-embeddailymotion.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embeddailymotion", + "attributes": { + "url": "https://dailymotion.com/", + "caption": [ + "Embedded content from dailymotion" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embeddailymotion.serialized.html b/blocks/test/fixtures/core-embeddailymotion.serialized.html new file mode 100644 index 00000000000000..62f55871d1e1fc --- /dev/null +++ b/blocks/test/fixtures/core-embeddailymotion.serialized.html @@ -0,0 +1,7 @@ + +
    + https://dailymotion.com/ +
    Embedded content from dailymotion
    +
    + + diff --git a/blocks/test/fixtures/core-embedfacebook.html b/blocks/test/fixtures/core-embedfacebook.html new file mode 100644 index 00000000000000..4a5044c13d6cdc --- /dev/null +++ b/blocks/test/fixtures/core-embedfacebook.html @@ -0,0 +1,6 @@ + +
    + https://facebook.com/ +
    Embedded content from facebook
    +
    + diff --git a/blocks/test/fixtures/core-embedfacebook.json b/blocks/test/fixtures/core-embedfacebook.json new file mode 100644 index 00000000000000..365f7043c6c808 --- /dev/null +++ b/blocks/test/fixtures/core-embedfacebook.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedfacebook", + "attributes": { + "url": "https://facebook.com/", + "caption": [ + "Embedded content from facebook" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedfacebook.serialized.html b/blocks/test/fixtures/core-embedfacebook.serialized.html new file mode 100644 index 00000000000000..efda5813641da2 --- /dev/null +++ b/blocks/test/fixtures/core-embedfacebook.serialized.html @@ -0,0 +1,7 @@ + +
    + https://facebook.com/ +
    Embedded content from facebook
    +
    + + diff --git a/blocks/test/fixtures/core-embedflickr.html b/blocks/test/fixtures/core-embedflickr.html new file mode 100644 index 00000000000000..2325790efcab2a --- /dev/null +++ b/blocks/test/fixtures/core-embedflickr.html @@ -0,0 +1,6 @@ + +
    + https://flickr.com/ +
    Embedded content from flickr
    +
    + diff --git a/blocks/test/fixtures/core-embedflickr.json b/blocks/test/fixtures/core-embedflickr.json new file mode 100644 index 00000000000000..c4294719f27c10 --- /dev/null +++ b/blocks/test/fixtures/core-embedflickr.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedflickr", + "attributes": { + "url": "https://flickr.com/", + "caption": [ + "Embedded content from flickr" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedflickr.serialized.html b/blocks/test/fixtures/core-embedflickr.serialized.html new file mode 100644 index 00000000000000..4d86c30f5b8811 --- /dev/null +++ b/blocks/test/fixtures/core-embedflickr.serialized.html @@ -0,0 +1,7 @@ + +
    + https://flickr.com/ +
    Embedded content from flickr
    +
    + + diff --git a/blocks/test/fixtures/core-embedfunnyordie.html b/blocks/test/fixtures/core-embedfunnyordie.html new file mode 100644 index 00000000000000..67e845a743e95d --- /dev/null +++ b/blocks/test/fixtures/core-embedfunnyordie.html @@ -0,0 +1,6 @@ + +
    + https://funnyordie.com/ +
    Embedded content from funnyordie
    +
    + diff --git a/blocks/test/fixtures/core-embedfunnyordie.json b/blocks/test/fixtures/core-embedfunnyordie.json new file mode 100644 index 00000000000000..a4787f0a9350ab --- /dev/null +++ b/blocks/test/fixtures/core-embedfunnyordie.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedfunnyordie", + "attributes": { + "url": "https://funnyordie.com/", + "caption": [ + "Embedded content from funnyordie" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedfunnyordie.serialized.html b/blocks/test/fixtures/core-embedfunnyordie.serialized.html new file mode 100644 index 00000000000000..bba227b1c1956e --- /dev/null +++ b/blocks/test/fixtures/core-embedfunnyordie.serialized.html @@ -0,0 +1,7 @@ + +
    + https://funnyordie.com/ +
    Embedded content from funnyordie
    +
    + + diff --git a/blocks/test/fixtures/core-embedhulu.html b/blocks/test/fixtures/core-embedhulu.html new file mode 100644 index 00000000000000..749b3ecb99aeeb --- /dev/null +++ b/blocks/test/fixtures/core-embedhulu.html @@ -0,0 +1,6 @@ + +
    + https://hulu.com/ +
    Embedded content from hulu
    +
    + diff --git a/blocks/test/fixtures/core-embedhulu.json b/blocks/test/fixtures/core-embedhulu.json new file mode 100644 index 00000000000000..7cbe2cd792d5fc --- /dev/null +++ b/blocks/test/fixtures/core-embedhulu.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedhulu", + "attributes": { + "url": "https://hulu.com/", + "caption": [ + "Embedded content from hulu" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedhulu.serialized.html b/blocks/test/fixtures/core-embedhulu.serialized.html new file mode 100644 index 00000000000000..c9c5b31537a69a --- /dev/null +++ b/blocks/test/fixtures/core-embedhulu.serialized.html @@ -0,0 +1,7 @@ + +
    + https://hulu.com/ +
    Embedded content from hulu
    +
    + + diff --git a/blocks/test/fixtures/core-embedimgur.html b/blocks/test/fixtures/core-embedimgur.html new file mode 100644 index 00000000000000..93f03e68d48d8e --- /dev/null +++ b/blocks/test/fixtures/core-embedimgur.html @@ -0,0 +1,6 @@ + +
    + https://imgur.com/ +
    Embedded content from imgur
    +
    + diff --git a/blocks/test/fixtures/core-embedimgur.json b/blocks/test/fixtures/core-embedimgur.json new file mode 100644 index 00000000000000..e0a7537ddcbc4c --- /dev/null +++ b/blocks/test/fixtures/core-embedimgur.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedimgur", + "attributes": { + "url": "https://imgur.com/", + "caption": [ + "Embedded content from imgur" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedimgur.serialized.html b/blocks/test/fixtures/core-embedimgur.serialized.html new file mode 100644 index 00000000000000..e1e3510c97eab8 --- /dev/null +++ b/blocks/test/fixtures/core-embedimgur.serialized.html @@ -0,0 +1,7 @@ + +
    + https://imgur.com/ +
    Embedded content from imgur
    +
    + + diff --git a/blocks/test/fixtures/core-embedinstagram.html b/blocks/test/fixtures/core-embedinstagram.html new file mode 100644 index 00000000000000..12dc0d1ec08537 --- /dev/null +++ b/blocks/test/fixtures/core-embedinstagram.html @@ -0,0 +1,6 @@ + +
    + https://instagram.com/ +
    Embedded content from instagram
    +
    + diff --git a/blocks/test/fixtures/core-embedinstagram.json b/blocks/test/fixtures/core-embedinstagram.json new file mode 100644 index 00000000000000..a2d7ea8e095e50 --- /dev/null +++ b/blocks/test/fixtures/core-embedinstagram.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedinstagram", + "attributes": { + "url": "https://instagram.com/", + "caption": [ + "Embedded content from instagram" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedinstagram.serialized.html b/blocks/test/fixtures/core-embedinstagram.serialized.html new file mode 100644 index 00000000000000..018a38ab8d52b0 --- /dev/null +++ b/blocks/test/fixtures/core-embedinstagram.serialized.html @@ -0,0 +1,7 @@ + +
    + https://instagram.com/ +
    Embedded content from instagram
    +
    + + diff --git a/blocks/test/fixtures/core-embedissuu.html b/blocks/test/fixtures/core-embedissuu.html new file mode 100644 index 00000000000000..6849278719bc4d --- /dev/null +++ b/blocks/test/fixtures/core-embedissuu.html @@ -0,0 +1,6 @@ + +
    + https://issuu.com/ +
    Embedded content from issuu
    +
    + diff --git a/blocks/test/fixtures/core-embedissuu.json b/blocks/test/fixtures/core-embedissuu.json new file mode 100644 index 00000000000000..f1513bd35f5b05 --- /dev/null +++ b/blocks/test/fixtures/core-embedissuu.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedissuu", + "attributes": { + "url": "https://issuu.com/", + "caption": [ + "Embedded content from issuu" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedissuu.serialized.html b/blocks/test/fixtures/core-embedissuu.serialized.html new file mode 100644 index 00000000000000..18903978bd6e18 --- /dev/null +++ b/blocks/test/fixtures/core-embedissuu.serialized.html @@ -0,0 +1,7 @@ + +
    + https://issuu.com/ +
    Embedded content from issuu
    +
    + + diff --git a/blocks/test/fixtures/core-embedkickstarter.html b/blocks/test/fixtures/core-embedkickstarter.html new file mode 100644 index 00000000000000..dbd11a91fe39b4 --- /dev/null +++ b/blocks/test/fixtures/core-embedkickstarter.html @@ -0,0 +1,6 @@ + +
    + https://kickstarter.com/ +
    Embedded content from kickstarter
    +
    + diff --git a/blocks/test/fixtures/core-embedkickstarter.json b/blocks/test/fixtures/core-embedkickstarter.json new file mode 100644 index 00000000000000..cc0a212d539e75 --- /dev/null +++ b/blocks/test/fixtures/core-embedkickstarter.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedkickstarter", + "attributes": { + "url": "https://kickstarter.com/", + "caption": [ + "Embedded content from kickstarter" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedkickstarter.serialized.html b/blocks/test/fixtures/core-embedkickstarter.serialized.html new file mode 100644 index 00000000000000..600c019a803420 --- /dev/null +++ b/blocks/test/fixtures/core-embedkickstarter.serialized.html @@ -0,0 +1,7 @@ + +
    + https://kickstarter.com/ +
    Embedded content from kickstarter
    +
    + + diff --git a/blocks/test/fixtures/core-embedmeetupcom.html b/blocks/test/fixtures/core-embedmeetupcom.html new file mode 100644 index 00000000000000..f72f0acfcea7e9 --- /dev/null +++ b/blocks/test/fixtures/core-embedmeetupcom.html @@ -0,0 +1,6 @@ + +
    + https://meetupcom.com/ +
    Embedded content from meetupcom
    +
    + diff --git a/blocks/test/fixtures/core-embedmeetupcom.json b/blocks/test/fixtures/core-embedmeetupcom.json new file mode 100644 index 00000000000000..5fb470dcd8b6df --- /dev/null +++ b/blocks/test/fixtures/core-embedmeetupcom.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedmeetupcom", + "attributes": { + "url": "https://meetupcom.com/", + "caption": [ + "Embedded content from meetupcom" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedmeetupcom.serialized.html b/blocks/test/fixtures/core-embedmeetupcom.serialized.html new file mode 100644 index 00000000000000..c271a0550b38cc --- /dev/null +++ b/blocks/test/fixtures/core-embedmeetupcom.serialized.html @@ -0,0 +1,7 @@ + +
    + https://meetupcom.com/ +
    Embedded content from meetupcom
    +
    + + diff --git a/blocks/test/fixtures/core-embedmixcloud.html b/blocks/test/fixtures/core-embedmixcloud.html new file mode 100644 index 00000000000000..bf79ac8537924a --- /dev/null +++ b/blocks/test/fixtures/core-embedmixcloud.html @@ -0,0 +1,6 @@ + +
    + https://mixcloud.com/ +
    Embedded content from mixcloud
    +
    + diff --git a/blocks/test/fixtures/core-embedmixcloud.json b/blocks/test/fixtures/core-embedmixcloud.json new file mode 100644 index 00000000000000..f59153c7e00ea2 --- /dev/null +++ b/blocks/test/fixtures/core-embedmixcloud.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedmixcloud", + "attributes": { + "url": "https://mixcloud.com/", + "caption": [ + "Embedded content from mixcloud" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedmixcloud.serialized.html b/blocks/test/fixtures/core-embedmixcloud.serialized.html new file mode 100644 index 00000000000000..dd53c339d93a03 --- /dev/null +++ b/blocks/test/fixtures/core-embedmixcloud.serialized.html @@ -0,0 +1,7 @@ + +
    + https://mixcloud.com/ +
    Embedded content from mixcloud
    +
    + + diff --git a/blocks/test/fixtures/core-embedphotobucket.html b/blocks/test/fixtures/core-embedphotobucket.html new file mode 100644 index 00000000000000..ba8170950c3729 --- /dev/null +++ b/blocks/test/fixtures/core-embedphotobucket.html @@ -0,0 +1,6 @@ + +
    + https://photobucket.com/ +
    Embedded content from photobucket
    +
    + diff --git a/blocks/test/fixtures/core-embedphotobucket.json b/blocks/test/fixtures/core-embedphotobucket.json new file mode 100644 index 00000000000000..36514c153de13a --- /dev/null +++ b/blocks/test/fixtures/core-embedphotobucket.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedphotobucket", + "attributes": { + "url": "https://photobucket.com/", + "caption": [ + "Embedded content from photobucket" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedphotobucket.serialized.html b/blocks/test/fixtures/core-embedphotobucket.serialized.html new file mode 100644 index 00000000000000..e2631ab04ceee4 --- /dev/null +++ b/blocks/test/fixtures/core-embedphotobucket.serialized.html @@ -0,0 +1,7 @@ + +
    + https://photobucket.com/ +
    Embedded content from photobucket
    +
    + + diff --git a/blocks/test/fixtures/core-embedpolldaddy.html b/blocks/test/fixtures/core-embedpolldaddy.html new file mode 100644 index 00000000000000..4176efd62628de --- /dev/null +++ b/blocks/test/fixtures/core-embedpolldaddy.html @@ -0,0 +1,6 @@ + +
    + https://polldaddy.com/ +
    Embedded content from polldaddy
    +
    + diff --git a/blocks/test/fixtures/core-embedpolldaddy.json b/blocks/test/fixtures/core-embedpolldaddy.json new file mode 100644 index 00000000000000..018a0e1c5ea4ef --- /dev/null +++ b/blocks/test/fixtures/core-embedpolldaddy.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedpolldaddy", + "attributes": { + "url": "https://polldaddy.com/", + "caption": [ + "Embedded content from polldaddy" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedpolldaddy.serialized.html b/blocks/test/fixtures/core-embedpolldaddy.serialized.html new file mode 100644 index 00000000000000..20f6eba0732f39 --- /dev/null +++ b/blocks/test/fixtures/core-embedpolldaddy.serialized.html @@ -0,0 +1,7 @@ + +
    + https://polldaddy.com/ +
    Embedded content from polldaddy
    +
    + + diff --git a/blocks/test/fixtures/core-embedreddit.html b/blocks/test/fixtures/core-embedreddit.html new file mode 100644 index 00000000000000..3537909ad8430a --- /dev/null +++ b/blocks/test/fixtures/core-embedreddit.html @@ -0,0 +1,6 @@ + +
    + https://reddit.com/ +
    Embedded content from reddit
    +
    + diff --git a/blocks/test/fixtures/core-embedreddit.json b/blocks/test/fixtures/core-embedreddit.json new file mode 100644 index 00000000000000..011034075516ea --- /dev/null +++ b/blocks/test/fixtures/core-embedreddit.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedreddit", + "attributes": { + "url": "https://reddit.com/", + "caption": [ + "Embedded content from reddit" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedreddit.serialized.html b/blocks/test/fixtures/core-embedreddit.serialized.html new file mode 100644 index 00000000000000..8fda9380fb2093 --- /dev/null +++ b/blocks/test/fixtures/core-embedreddit.serialized.html @@ -0,0 +1,7 @@ + +
    + https://reddit.com/ +
    Embedded content from reddit
    +
    + + diff --git a/blocks/test/fixtures/core-embedreverbnation.html b/blocks/test/fixtures/core-embedreverbnation.html new file mode 100644 index 00000000000000..3e03c3404f7570 --- /dev/null +++ b/blocks/test/fixtures/core-embedreverbnation.html @@ -0,0 +1,6 @@ + +
    + https://reverbnation.com/ +
    Embedded content from reverbnation
    +
    + diff --git a/blocks/test/fixtures/core-embedreverbnation.json b/blocks/test/fixtures/core-embedreverbnation.json new file mode 100644 index 00000000000000..44d1f94f2c59c2 --- /dev/null +++ b/blocks/test/fixtures/core-embedreverbnation.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedreverbnation", + "attributes": { + "url": "https://reverbnation.com/", + "caption": [ + "Embedded content from reverbnation" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedreverbnation.serialized.html b/blocks/test/fixtures/core-embedreverbnation.serialized.html new file mode 100644 index 00000000000000..3f5686dad96cf5 --- /dev/null +++ b/blocks/test/fixtures/core-embedreverbnation.serialized.html @@ -0,0 +1,7 @@ + +
    + https://reverbnation.com/ +
    Embedded content from reverbnation
    +
    + + diff --git a/blocks/test/fixtures/core-embedscreencast.html b/blocks/test/fixtures/core-embedscreencast.html new file mode 100644 index 00000000000000..75e7990c480f78 --- /dev/null +++ b/blocks/test/fixtures/core-embedscreencast.html @@ -0,0 +1,6 @@ + +
    + https://screencast.com/ +
    Embedded content from screencast
    +
    + diff --git a/blocks/test/fixtures/core-embedscreencast.json b/blocks/test/fixtures/core-embedscreencast.json new file mode 100644 index 00000000000000..6dec7a9a1a5322 --- /dev/null +++ b/blocks/test/fixtures/core-embedscreencast.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedscreencast", + "attributes": { + "url": "https://screencast.com/", + "caption": [ + "Embedded content from screencast" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedscreencast.serialized.html b/blocks/test/fixtures/core-embedscreencast.serialized.html new file mode 100644 index 00000000000000..2d6b5468637692 --- /dev/null +++ b/blocks/test/fixtures/core-embedscreencast.serialized.html @@ -0,0 +1,7 @@ + +
    + https://screencast.com/ +
    Embedded content from screencast
    +
    + + diff --git a/blocks/test/fixtures/core-embedscribd.html b/blocks/test/fixtures/core-embedscribd.html new file mode 100644 index 00000000000000..4971e8c9438426 --- /dev/null +++ b/blocks/test/fixtures/core-embedscribd.html @@ -0,0 +1,6 @@ + +
    + https://scribd.com/ +
    Embedded content from scribd
    +
    + diff --git a/blocks/test/fixtures/core-embedscribd.json b/blocks/test/fixtures/core-embedscribd.json new file mode 100644 index 00000000000000..5efcbdf619f5b0 --- /dev/null +++ b/blocks/test/fixtures/core-embedscribd.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedscribd", + "attributes": { + "url": "https://scribd.com/", + "caption": [ + "Embedded content from scribd" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedscribd.serialized.html b/blocks/test/fixtures/core-embedscribd.serialized.html new file mode 100644 index 00000000000000..06069125228bdf --- /dev/null +++ b/blocks/test/fixtures/core-embedscribd.serialized.html @@ -0,0 +1,7 @@ + +
    + https://scribd.com/ +
    Embedded content from scribd
    +
    + + diff --git a/blocks/test/fixtures/core-embedslideshare.html b/blocks/test/fixtures/core-embedslideshare.html new file mode 100644 index 00000000000000..abd33acdf7c46e --- /dev/null +++ b/blocks/test/fixtures/core-embedslideshare.html @@ -0,0 +1,6 @@ + +
    + https://slideshare.com/ +
    Embedded content from slideshare
    +
    + diff --git a/blocks/test/fixtures/core-embedslideshare.json b/blocks/test/fixtures/core-embedslideshare.json new file mode 100644 index 00000000000000..9010eb8206755a --- /dev/null +++ b/blocks/test/fixtures/core-embedslideshare.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedslideshare", + "attributes": { + "url": "https://slideshare.com/", + "caption": [ + "Embedded content from slideshare" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedslideshare.serialized.html b/blocks/test/fixtures/core-embedslideshare.serialized.html new file mode 100644 index 00000000000000..8184fc98e5a1a6 --- /dev/null +++ b/blocks/test/fixtures/core-embedslideshare.serialized.html @@ -0,0 +1,7 @@ + +
    + https://slideshare.com/ +
    Embedded content from slideshare
    +
    + + diff --git a/blocks/test/fixtures/core-embedsmugmug.html b/blocks/test/fixtures/core-embedsmugmug.html new file mode 100644 index 00000000000000..7dc99c1cb7dfb2 --- /dev/null +++ b/blocks/test/fixtures/core-embedsmugmug.html @@ -0,0 +1,6 @@ + +
    + https://smugmug.com/ +
    Embedded content from smugmug
    +
    + diff --git a/blocks/test/fixtures/core-embedsmugmug.json b/blocks/test/fixtures/core-embedsmugmug.json new file mode 100644 index 00000000000000..cecab2e26b8e50 --- /dev/null +++ b/blocks/test/fixtures/core-embedsmugmug.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedsmugmug", + "attributes": { + "url": "https://smugmug.com/", + "caption": [ + "Embedded content from smugmug" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedsmugmug.serialized.html b/blocks/test/fixtures/core-embedsmugmug.serialized.html new file mode 100644 index 00000000000000..4755f4de1a2c54 --- /dev/null +++ b/blocks/test/fixtures/core-embedsmugmug.serialized.html @@ -0,0 +1,7 @@ + +
    + https://smugmug.com/ +
    Embedded content from smugmug
    +
    + + diff --git a/blocks/test/fixtures/core-embedsoundcloud.html b/blocks/test/fixtures/core-embedsoundcloud.html new file mode 100644 index 00000000000000..c02c19b249a0b1 --- /dev/null +++ b/blocks/test/fixtures/core-embedsoundcloud.html @@ -0,0 +1,6 @@ + +
    + https://soundcloud.com/ +
    Embedded content from soundcloud
    +
    + diff --git a/blocks/test/fixtures/core-embedsoundcloud.json b/blocks/test/fixtures/core-embedsoundcloud.json new file mode 100644 index 00000000000000..637ecec8577f85 --- /dev/null +++ b/blocks/test/fixtures/core-embedsoundcloud.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedsoundcloud", + "attributes": { + "url": "https://soundcloud.com/", + "caption": [ + "Embedded content from soundcloud" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedsoundcloud.serialized.html b/blocks/test/fixtures/core-embedsoundcloud.serialized.html new file mode 100644 index 00000000000000..70688f2cad848b --- /dev/null +++ b/blocks/test/fixtures/core-embedsoundcloud.serialized.html @@ -0,0 +1,7 @@ + +
    + https://soundcloud.com/ +
    Embedded content from soundcloud
    +
    + + diff --git a/blocks/test/fixtures/core-embedspeaker.html b/blocks/test/fixtures/core-embedspeaker.html new file mode 100644 index 00000000000000..a7a9332fff5d2a --- /dev/null +++ b/blocks/test/fixtures/core-embedspeaker.html @@ -0,0 +1,6 @@ + +
    + https://speaker.com/ +
    Embedded content from speaker
    +
    + diff --git a/blocks/test/fixtures/core-embedspeaker.json b/blocks/test/fixtures/core-embedspeaker.json new file mode 100644 index 00000000000000..0f0c54b3f0f772 --- /dev/null +++ b/blocks/test/fixtures/core-embedspeaker.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedspeaker", + "attributes": { + "url": "https://speaker.com/", + "caption": [ + "Embedded content from speaker" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedspeaker.serialized.html b/blocks/test/fixtures/core-embedspeaker.serialized.html new file mode 100644 index 00000000000000..77b6efdd62940d --- /dev/null +++ b/blocks/test/fixtures/core-embedspeaker.serialized.html @@ -0,0 +1,7 @@ + +
    + https://speaker.com/ +
    Embedded content from speaker
    +
    + + diff --git a/blocks/test/fixtures/core-embedspotify.html b/blocks/test/fixtures/core-embedspotify.html new file mode 100644 index 00000000000000..bfe67cb9034fc6 --- /dev/null +++ b/blocks/test/fixtures/core-embedspotify.html @@ -0,0 +1,6 @@ + +
    + https://spotify.com/ +
    Embedded content from spotify
    +
    + diff --git a/blocks/test/fixtures/core-embedspotify.json b/blocks/test/fixtures/core-embedspotify.json new file mode 100644 index 00000000000000..2e712f86c1ec4a --- /dev/null +++ b/blocks/test/fixtures/core-embedspotify.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedspotify", + "attributes": { + "url": "https://spotify.com/", + "caption": [ + "Embedded content from spotify" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedspotify.serialized.html b/blocks/test/fixtures/core-embedspotify.serialized.html new file mode 100644 index 00000000000000..8e88da9f4e3a27 --- /dev/null +++ b/blocks/test/fixtures/core-embedspotify.serialized.html @@ -0,0 +1,7 @@ + +
    + https://spotify.com/ +
    Embedded content from spotify
    +
    + + diff --git a/blocks/test/fixtures/core-embedted.html b/blocks/test/fixtures/core-embedted.html new file mode 100644 index 00000000000000..eb58f0c2c39497 --- /dev/null +++ b/blocks/test/fixtures/core-embedted.html @@ -0,0 +1,6 @@ + +
    + https://ted.com/ +
    Embedded content from ted
    +
    + diff --git a/blocks/test/fixtures/core-embedted.json b/blocks/test/fixtures/core-embedted.json new file mode 100644 index 00000000000000..13c190858f8c76 --- /dev/null +++ b/blocks/test/fixtures/core-embedted.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedted", + "attributes": { + "url": "https://ted.com/", + "caption": [ + "Embedded content from ted" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedted.serialized.html b/blocks/test/fixtures/core-embedted.serialized.html new file mode 100644 index 00000000000000..5a9d51536f5daf --- /dev/null +++ b/blocks/test/fixtures/core-embedted.serialized.html @@ -0,0 +1,7 @@ + +
    + https://ted.com/ +
    Embedded content from ted
    +
    + + diff --git a/blocks/test/fixtures/core-embedtumblr.html b/blocks/test/fixtures/core-embedtumblr.html new file mode 100644 index 00000000000000..ee07d48e887ba4 --- /dev/null +++ b/blocks/test/fixtures/core-embedtumblr.html @@ -0,0 +1,6 @@ + +
    + https://tumblr.com/ +
    Embedded content from tumblr
    +
    + diff --git a/blocks/test/fixtures/core-embedtumblr.json b/blocks/test/fixtures/core-embedtumblr.json new file mode 100644 index 00000000000000..17e23cd9a8d0c4 --- /dev/null +++ b/blocks/test/fixtures/core-embedtumblr.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedtumblr", + "attributes": { + "url": "https://tumblr.com/", + "caption": [ + "Embedded content from tumblr" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedtumblr.serialized.html b/blocks/test/fixtures/core-embedtumblr.serialized.html new file mode 100644 index 00000000000000..8f1da3fb2e4d98 --- /dev/null +++ b/blocks/test/fixtures/core-embedtumblr.serialized.html @@ -0,0 +1,7 @@ + +
    + https://tumblr.com/ +
    Embedded content from tumblr
    +
    + + diff --git a/blocks/test/fixtures/core-embedtwitter.html b/blocks/test/fixtures/core-embedtwitter.html new file mode 100644 index 00000000000000..807a6bfd27604d --- /dev/null +++ b/blocks/test/fixtures/core-embedtwitter.html @@ -0,0 +1,6 @@ + +
    + https://twitter.com/automattic +
    We are Automattic
    +
    + diff --git a/blocks/test/fixtures/core-embedtwitter.json b/blocks/test/fixtures/core-embedtwitter.json new file mode 100644 index 00000000000000..b9d463c77dcebd --- /dev/null +++ b/blocks/test/fixtures/core-embedtwitter.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedtwitter", + "attributes": { + "url": "https://twitter.com/automattic", + "caption": [ + "We are Automattic" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedtwitter.serialized.html b/blocks/test/fixtures/core-embedtwitter.serialized.html new file mode 100644 index 00000000000000..bc214e661e01e7 --- /dev/null +++ b/blocks/test/fixtures/core-embedtwitter.serialized.html @@ -0,0 +1,7 @@ + +
    + https://twitter.com/automattic +
    We are Automattic
    +
    + + diff --git a/blocks/test/fixtures/core-embedvideopress.html b/blocks/test/fixtures/core-embedvideopress.html new file mode 100644 index 00000000000000..ba2ff6bdc2e51d --- /dev/null +++ b/blocks/test/fixtures/core-embedvideopress.html @@ -0,0 +1,6 @@ + +
    + https://videopress.com/ +
    Embedded content from videopress
    +
    + diff --git a/blocks/test/fixtures/core-embedvideopress.json b/blocks/test/fixtures/core-embedvideopress.json new file mode 100644 index 00000000000000..8b8f35ff484b57 --- /dev/null +++ b/blocks/test/fixtures/core-embedvideopress.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedvideopress", + "attributes": { + "url": "https://videopress.com/", + "caption": [ + "Embedded content from videopress" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedvideopress.serialized.html b/blocks/test/fixtures/core-embedvideopress.serialized.html new file mode 100644 index 00000000000000..571972d53ff4dd --- /dev/null +++ b/blocks/test/fixtures/core-embedvideopress.serialized.html @@ -0,0 +1,7 @@ + +
    + https://videopress.com/ +
    Embedded content from videopress
    +
    + + diff --git a/blocks/test/fixtures/core-embedvimeo.html b/blocks/test/fixtures/core-embedvimeo.html new file mode 100644 index 00000000000000..81b4698f749c24 --- /dev/null +++ b/blocks/test/fixtures/core-embedvimeo.html @@ -0,0 +1,6 @@ + +
    + https://vimeo.com/ +
    Embedded content from vimeo
    +
    + diff --git a/blocks/test/fixtures/core-embedvimeo.json b/blocks/test/fixtures/core-embedvimeo.json new file mode 100644 index 00000000000000..828eea64c814d1 --- /dev/null +++ b/blocks/test/fixtures/core-embedvimeo.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedvimeo", + "attributes": { + "url": "https://vimeo.com/", + "caption": [ + "Embedded content from vimeo" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedvimeo.serialized.html b/blocks/test/fixtures/core-embedvimeo.serialized.html new file mode 100644 index 00000000000000..eb1522a937aea1 --- /dev/null +++ b/blocks/test/fixtures/core-embedvimeo.serialized.html @@ -0,0 +1,7 @@ + +
    + https://vimeo.com/ +
    Embedded content from vimeo
    +
    + + diff --git a/blocks/test/fixtures/core-embedvine.html b/blocks/test/fixtures/core-embedvine.html new file mode 100644 index 00000000000000..b70558a5fc77b2 --- /dev/null +++ b/blocks/test/fixtures/core-embedvine.html @@ -0,0 +1,6 @@ + +
    + https://vine.com/ +
    Embedded content from vine
    +
    + diff --git a/blocks/test/fixtures/core-embedvine.json b/blocks/test/fixtures/core-embedvine.json new file mode 100644 index 00000000000000..e62878c5dc38a7 --- /dev/null +++ b/blocks/test/fixtures/core-embedvine.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedvine", + "attributes": { + "url": "https://vine.com/", + "caption": [ + "Embedded content from vine" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedvine.serialized.html b/blocks/test/fixtures/core-embedvine.serialized.html new file mode 100644 index 00000000000000..df9496fb94081e --- /dev/null +++ b/blocks/test/fixtures/core-embedvine.serialized.html @@ -0,0 +1,7 @@ + +
    + https://vine.com/ +
    Embedded content from vine
    +
    + + diff --git a/blocks/test/fixtures/core-embedwordpress.html b/blocks/test/fixtures/core-embedwordpress.html new file mode 100644 index 00000000000000..accd979b51f836 --- /dev/null +++ b/blocks/test/fixtures/core-embedwordpress.html @@ -0,0 +1,6 @@ + +
    + https://wordpress.com/ +
    Embedded content from WordPress
    +
    + diff --git a/blocks/test/fixtures/core-embedwordpress.json b/blocks/test/fixtures/core-embedwordpress.json new file mode 100644 index 00000000000000..49ce85cd129344 --- /dev/null +++ b/blocks/test/fixtures/core-embedwordpress.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedwordpress", + "attributes": { + "url": "https://wordpress.com/", + "caption": [ + "Embedded content from WordPress" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedwordpress.serialized.html b/blocks/test/fixtures/core-embedwordpress.serialized.html new file mode 100644 index 00000000000000..0905c1b166b45d --- /dev/null +++ b/blocks/test/fixtures/core-embedwordpress.serialized.html @@ -0,0 +1,7 @@ + +
    + https://wordpress.com/ +
    Embedded content from WordPress
    +
    + + diff --git a/blocks/test/fixtures/core-embedwordpresstv.html b/blocks/test/fixtures/core-embedwordpresstv.html new file mode 100644 index 00000000000000..eca3877f5ced80 --- /dev/null +++ b/blocks/test/fixtures/core-embedwordpresstv.html @@ -0,0 +1,6 @@ + +
    + https://wordpresstv.com/ +
    Embedded content from wordpresstv
    +
    + diff --git a/blocks/test/fixtures/core-embedwordpresstv.json b/blocks/test/fixtures/core-embedwordpresstv.json new file mode 100644 index 00000000000000..43e137a66bdeb8 --- /dev/null +++ b/blocks/test/fixtures/core-embedwordpresstv.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedwordpresstv", + "attributes": { + "url": "https://wordpresstv.com/", + "caption": [ + "Embedded content from wordpresstv" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedwordpresstv.serialized.html b/blocks/test/fixtures/core-embedwordpresstv.serialized.html new file mode 100644 index 00000000000000..bc6c773f16293d --- /dev/null +++ b/blocks/test/fixtures/core-embedwordpresstv.serialized.html @@ -0,0 +1,7 @@ + +
    + https://wordpresstv.com/ +
    Embedded content from wordpresstv
    +
    + + diff --git a/blocks/test/fixtures/core-embedyoutube.html b/blocks/test/fixtures/core-embedyoutube.html new file mode 100644 index 00000000000000..e0832c00589d29 --- /dev/null +++ b/blocks/test/fixtures/core-embedyoutube.html @@ -0,0 +1,6 @@ + +
    + https://youtube.com/ +
    Embedded content from youtube
    +
    + diff --git a/blocks/test/fixtures/core-embedyoutube.json b/blocks/test/fixtures/core-embedyoutube.json new file mode 100644 index 00000000000000..7beb5a715dfef6 --- /dev/null +++ b/blocks/test/fixtures/core-embedyoutube.json @@ -0,0 +1,12 @@ +[ + { + "uid": "_uid_0", + "name": "core/embedyoutube", + "attributes": { + "url": "https://youtube.com/", + "caption": [ + "Embedded content from youtube" + ] + } + } +] diff --git a/blocks/test/fixtures/core-embedyoutube.serialized.html b/blocks/test/fixtures/core-embedyoutube.serialized.html new file mode 100644 index 00000000000000..02fa086d489e79 --- /dev/null +++ b/blocks/test/fixtures/core-embedyoutube.serialized.html @@ -0,0 +1,7 @@ + +
    + https://youtube.com/ +
    Embedded content from youtube
    +
    + + diff --git a/blocks/test/fixtures/core-latestposts.html b/blocks/test/fixtures/core-latestposts.html new file mode 100644 index 00000000000000..cc09cb936f430a --- /dev/null +++ b/blocks/test/fixtures/core-latestposts.html @@ -0,0 +1,2 @@ + + diff --git a/blocks/test/fixtures/core-latestposts.json b/blocks/test/fixtures/core-latestposts.json new file mode 100644 index 00000000000000..619edde2c7b2c0 --- /dev/null +++ b/blocks/test/fixtures/core-latestposts.json @@ -0,0 +1,9 @@ +[ + { + "uid": "_uid_0", + "name": "core/latestposts", + "attributes": { + "poststoshow": 5 + } + } +] diff --git a/blocks/test/fixtures/core-latestposts.serialized.html b/blocks/test/fixtures/core-latestposts.serialized.html new file mode 100644 index 00000000000000..cc09cb936f430a --- /dev/null +++ b/blocks/test/fixtures/core-latestposts.serialized.html @@ -0,0 +1,2 @@ + + diff --git a/blocks/test/fixtures/core-text-align-right.html b/blocks/test/fixtures/core-text-align-right.html index e838100afca72d..d3d0c922ce2bff 100644 --- a/blocks/test/fixtures/core-text-align-right.html +++ b/blocks/test/fixtures/core-text-align-right.html @@ -1,3 +1,3 @@ - +

    ... like this one, which is separate from the above and right aligned.

    diff --git a/blocks/test/fixtures/core-text-align-right.json b/blocks/test/fixtures/core-text-align-right.json index c4854077e88866..3c1eeb3e6ee8bd 100644 --- a/blocks/test/fixtures/core-text-align-right.json +++ b/blocks/test/fixtures/core-text-align-right.json @@ -3,6 +3,7 @@ "uid": "_uid_0", "name": "core/text", "attributes": { + "align": "right", "content": [ { "type": "p", diff --git a/blocks/test/fixtures/core-text-align-right.serialized.html b/blocks/test/fixtures/core-text-align-right.serialized.html index 5a483bb238e29b..5bbeb051d31867 100644 --- a/blocks/test/fixtures/core-text-align-right.serialized.html +++ b/blocks/test/fixtures/core-text-align-right.serialized.html @@ -1,4 +1,4 @@ - +

    ... like this one, which is separate from the above and right aligned.

    diff --git a/components/button/README.md b/components/button/README.md new file mode 100644 index 00000000000000..7f78cb981c7dc6 --- /dev/null +++ b/components/button/README.md @@ -0,0 +1,8 @@ +This component is used to implement dang sweet buttons. + +#### Props + +The following props are used to control the display of the component. Any additional props will be passed to the rendered `` or ` + ), + defaultInfoConfig + ); diff --git a/components/clipboard-button/index.js b/components/clipboard-button/index.js new file mode 100644 index 00000000000000..2bcbb9f403f897 --- /dev/null +++ b/components/clipboard-button/index.js @@ -0,0 +1,48 @@ +/** + * External dependencies + */ +import Clipboard from 'clipboard'; +import classnames from 'classnames'; +import { noop } from 'lodash'; + +/** + * WordPress dependencies + */ +import { findDOMNode, Component } from 'element'; + +/** + * Internal dependencies + */ +import { Button } from '../'; + +class ClipboardButton extends Component { + componentDidMount() { + const { text, onCopy = noop } = this.props; + const button = findDOMNode( this.button ); + this.clipboard = new Clipboard( button, { + text: () => text, + } ); + this.clipboard.on( 'success', onCopy ); + } + + componentWillUnmount() { + this.clipboard.destroy(); + delete this.clipboard; + } + + render() { + const { className, children } = this.props; + const classes = classnames( 'components-clipboard-button', className ); + + return ( + + ); + } +} + +export default ClipboardButton; diff --git a/components/dashicon/index.js b/components/dashicon/index.js index e000904169baa8..4d57249d0950b3 100644 --- a/components/dashicon/index.js +++ b/components/dashicon/index.js @@ -18,975 +18,736 @@ export default class Dashicon extends wp.element.Component { render() { const { icon, className } = this.props; - let path, title; + let path; switch ( icon ) { case 'admin-appearance': - title = 'Admin Appearance'; path = 'M14.48 11.06L7.41 3.99l1.5-1.5c.5-.56 2.3-.47 3.51.32 1.21.8 1.43 1.28 2.91 2.1 1.18.64 2.45 1.26 4.45.85zm-.71.71L6.7 4.7 4.93 6.47c-.39.39-.39 1.02 0 1.41l1.06 1.06c.39.39.39 1.03 0 1.42-.6.6-1.43 1.11-2.21 1.69-.35.26-.7.53-1.01.84C1.43 14.23.4 16.08 1.4 17.07c.99 1 2.84-.03 4.18-1.36.31-.31.58-.66.85-1.02.57-.78 1.08-1.61 1.69-2.21.39-.39 1.02-.39 1.41 0l1.06 1.06c.39.39 1.02.39 1.41 0z'; break; case 'admin-collapse': - title = 'Admin Collapse'; path = 'M10 2.16c4.33 0 7.84 3.51 7.84 7.84s-3.51 7.84-7.84 7.84S2.16 14.33 2.16 10 5.71 2.16 10 2.16zm2 11.72V6.12L6.18 9.97z'; break; case 'admin-comments': - title = 'Admin Comments'; path = 'M5 2h9c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-2l-5 5v-5H5c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2z'; break; case 'admin-customizer': - title = 'Admin Customizer'; path = 'M18.33 3.57s.27-.8-.31-1.36c-.53-.52-1.22-.24-1.22-.24-.61.3-5.76 3.47-7.67 5.57-.86.96-2.06 3.79-1.09 4.82.92.98 3.96-.17 4.79-1 2.06-2.06 5.21-7.17 5.5-7.79zM1.4 17.65c2.37-1.56 1.46-3.41 3.23-4.64.93-.65 2.22-.62 3.08.29.63.67.8 2.57-.16 3.46-1.57 1.45-4 1.55-6.15.89z'; break; case 'admin-generic': - title = 'Admin Generic'; path = 'M18 12h-2.18c-.17.7-.44 1.35-.81 1.93l1.54 1.54-2.1 2.1-1.54-1.54c-.58.36-1.23.63-1.91.79V19H8v-2.18c-.68-.16-1.33-.43-1.91-.79l-1.54 1.54-2.12-2.12 1.54-1.54c-.36-.58-.63-1.23-.79-1.91H1V9.03h2.17c.16-.7.44-1.35.8-1.94L2.43 5.55l2.1-2.1 1.54 1.54c.58-.37 1.24-.64 1.93-.81V2h3v2.18c.68.16 1.33.43 1.91.79l1.54-1.54 2.12 2.12-1.54 1.54c.36.59.64 1.24.8 1.94H18V12zm-8.5 1.5c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3z'; break; case 'admin-home': - title = 'Admin Home'; path = 'M16 8.5l1.53 1.53-1.06 1.06L10 4.62l-6.47 6.47-1.06-1.06L10 2.5l4 4v-2h2v4zm-6-2.46l6 5.99V18H4v-5.97zM12 17v-5H8v5h4z'; break; case 'admin-links': - title = 'Admin Links'; path = 'M17.74 2.76c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-1.12 1.12-2.7 1.47-4.14 1.09l2.62-2.61.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-3.38 3.38c-.37-1.44-.02-3.02 1.1-4.14l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM8.59 13.43l5.34-5.34c.42-.42.42-1.1 0-1.52-.44-.43-1.13-.39-1.53 0l-5.33 5.34c-.42.42-.42 1.1 0 1.52.44.43 1.13.39 1.52 0zm-.76 2.29l4.14-4.15c.38 1.44.03 3.02-1.09 4.14l-1.52 1.53c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.53-1.52c1.12-1.12 2.7-1.47 4.14-1.1l-4.14 4.15c-.85.84-.85 2.2 0 3.05.84.84 2.2.84 3.04 0z'; break; case 'admin-media': - title = 'Admin Media'; path = 'M13 11V4c0-.55-.45-1-1-1h-1.67L9 1H5L3.67 3H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h10c.55 0 1-.45 1-1zM7 4.5c1.38 0 2.5 1.12 2.5 2.5S8.38 9.5 7 9.5 4.5 8.38 4.5 7 5.62 4.5 7 4.5zM14 6h5v10.5c0 1.38-1.12 2.5-2.5 2.5S14 17.88 14 16.5s1.12-2.5 2.5-2.5c.17 0 .34.02.5.05V9h-3V6zm-4 8.05V13h2v3.5c0 1.38-1.12 2.5-2.5 2.5S7 17.88 7 16.5 8.12 14 9.5 14c.17 0 .34.02.5.05z'; break; case 'admin-multisite': - title = 'Admin Multisite'; path = 'M14.27 6.87L10 3.14 5.73 6.87 5 6.14l5-4.38 5 4.38zM14 8.42l-4.05 3.43L6 8.38v-.74l4-3.5 4 3.5v.78zM11 9.7V8H9v1.7h2zm-1.73 4.03L5 10 .73 13.73 0 13l5-4.38L10 13zm10 0L15 10l-4.27 3.73L10 13l5-4.38L20 13zM5 11l4 3.5V18H1v-3.5zm10 0l4 3.5V18h-8v-3.5zm-9 6v-2H4v2h2zm10 0v-2h-2v2h2z'; break; case 'admin-network': - title = 'Admin Network'; path = 'M16.95 2.58c1.96 1.95 1.96 5.12 0 7.07-1.51 1.51-3.75 1.84-5.59 1.01l-1.87 3.31-2.99.31L5 18H2l-1-2 7.95-7.69c-.92-1.87-.62-4.18.93-5.73 1.95-1.96 5.12-1.96 7.07 0zm-2.51 3.79c.74 0 1.33-.6 1.33-1.34 0-.73-.59-1.33-1.33-1.33-.73 0-1.33.6-1.33 1.33 0 .74.6 1.34 1.33 1.34z'; break; case 'admin-page': - title = 'Admin Page'; path = 'M6 15V2h10v13H6zm-1 1h8v2H3V5h2v11z'; break; case 'admin-plugins': - title = 'Admin Plugins'; path = 'M13.11 4.36L9.87 7.6 8 5.73l3.24-3.24c.35-.34 1.05-.2 1.56.32.52.51.66 1.21.31 1.55zm-8 1.77l.91-1.12 9.01 9.01-1.19.84c-.71.71-2.63 1.16-3.82 1.16H6.14L4.9 17.26c-.59.59-1.54.59-2.12 0-.59-.58-.59-1.53 0-2.12l1.24-1.24v-3.88c0-1.13.4-3.19 1.09-3.89zm7.26 3.97l3.24-3.24c.34-.35 1.04-.21 1.55.31.52.51.66 1.21.31 1.55l-3.24 3.25z'; break; case 'admin-post': - title = 'Admin Post'; path = 'M10.44 3.02l1.82-1.82 6.36 6.35-1.83 1.82c-1.05-.68-2.48-.57-3.41.36l-.75.75c-.92.93-1.04 2.35-.35 3.41l-1.83 1.82-2.41-2.41-2.8 2.79c-.42.42-3.38 2.71-3.8 2.29s1.86-3.39 2.28-3.81l2.79-2.79L4.1 9.36l1.83-1.82c1.05.69 2.48.57 3.4-.36l.75-.75c.93-.92 1.05-2.35.36-3.41z'; break; case 'admin-settings': - title = 'Admin Settings'; path = 'M18 16V4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h13c.55 0 1-.45 1-1zM8 11h1c.55 0 1 .45 1 1s-.45 1-1 1H8v1.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V13H6c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V11zm5-2h-1c-.55 0-1-.45-1-1s.45-1 1-1h1V5.5c0-.28.22-.5.5-.5s.5.22.5.5V7h1c.55 0 1 .45 1 1s-.45 1-1 1h-1v5.5c0 .28-.22.5-.5.5s-.5-.22-.5-.5V9z'; break; case 'admin-site': - title = 'Admin Site'; path = 'M19 10c0-4.97-4.03-9-9-9s-9 4.03-9 9 4.03 9 9 9 9-4.03 9-9zm-11 .1c-2.84-.29-4.48-1.17-5.48-2.29.97-3.16 3.8-5.48 7.25-5.63-.84 1.38-1.5 4.13-.03 5.57-1.51.21-2.21-1.86-3.11-1.15-1.43 1.12-.08 2.67 3.2 3.27 3.29.59 3.66 1.58 3.63 3.08-.03 1.47-.8 3.3-4.06 4.7.09-4.18-2.64-3.84-3.2-5.04.2-.87.44-1.78 1.8-2.51zm8.49-4.32c2.15 3.3 1.02 6.08.84 6.68-.77-1.86-2.17-2.29-2.53-3.54-.32-1.11.62-2.23 1.69-3.14z'; break; case 'admin-tools': - title = 'Admin Tools'; path = 'M16.68 9.77c-1.34 1.34-3.3 1.67-4.95.99l-5.41 6.52c-.99.99-2.59.99-3.58 0s-.99-2.59 0-3.57l6.52-5.42c-.68-1.65-.35-3.61.99-4.95 1.28-1.28 3.12-1.62 4.72-1.06l-2.89 2.89 2.82 2.82 2.86-2.87c.53 1.58.18 3.39-1.08 4.65zM3.81 16.21c.4.39 1.04.39 1.43 0 .4-.4.4-1.04 0-1.43-.39-.4-1.03-.4-1.43 0-.39.39-.39 1.03 0 1.43z'; break; case 'admin-users': - title = 'Admin Users'; path = 'M10 9.25c-2.27 0-2.73-3.44-2.73-3.44C7 4.02 7.82 2 9.97 2c2.16 0 2.98 2.02 2.71 3.81 0 0-.41 3.44-2.68 3.44zm0 2.57L12.72 10c2.39 0 4.52 2.33 4.52 4.53v2.49s-3.65 1.13-7.24 1.13c-3.65 0-7.24-1.13-7.24-1.13v-2.49c0-2.25 1.94-4.48 4.47-4.48z'; break; case 'album': - title = 'Album'; path = 'M0 18h10v-.26c1.52.4 3.17.35 4.76-.24 4.14-1.52 6.27-6.12 4.75-10.26-1.43-3.89-5.58-6-9.51-4.98V2H0v16zM9 3v14H1V3h8zm5.45 8.22c-.68 1.35-2.32 1.9-3.67 1.23-.31-.15-.57-.35-.78-.59V8.13c.8-.86 2.11-1.13 3.22-.58 1.35.68 1.9 2.32 1.23 3.67zm-2.75-.82c.22.16.53.12.7-.1.16-.22.12-.53-.1-.7s-.53-.12-.7.1c-.16.21-.12.53.1.7zm3.01 3.67c-1.17.78-2.56.99-3.83.69-.27-.06-.44-.34-.37-.61s.34-.43.62-.36l.17.04c.96.17 1.98-.01 2.86-.59.47-.32.86-.72 1.14-1.18.15-.23.45-.3.69-.16.23.15.3.46.16.69-.36.57-.84 1.08-1.44 1.48zm1.05 1.57c-1.48.99-3.21 1.32-4.84 1.06-.28-.05-.47-.32-.41-.6.05-.27.32-.45.61-.39l.22.04c1.31.15 2.68-.14 3.87-.94.71-.47 1.27-1.07 1.7-1.74.14-.24.45-.31.68-.16.24.14.31.45.16.69-.49.79-1.16 1.49-1.99 2.04z'; break; case 'align-center': - title = 'Align Center'; path = 'M3 5h14V3H3v2zm12 8V7H5v6h10zM3 17h14v-2H3v2z'; break; case 'align-full-width': - title = 'Align Full Width'; path = 'M17 13V3H3v10h14zM5 17h10v-2H5v2z'; break; case 'align-left': - title = 'Align Left'; path = 'M3 5h14V3H3v2zm9 8V7H3v6h9zm2-4h3V7h-3v2zm0 4h3v-2h-3v2zM3 17h14v-2H3v2z'; break; case 'align-none': - title = 'Align None'; path = 'M3 5h14V3H3v2zm10 8V7H3v6h10zM3 17h14v-2H3v2z'; break; case 'align-right': - title = 'Align Right'; path = 'M3 5h14V3H3v2zm0 4h3V7H3v2zm14 4V7H8v6h9zM3 13h3v-2H3v2zm0 4h14v-2H3v2z'; break; case 'align-wide': - title = 'Align Wide'; path = 'M5 5h10V3H5v2zm12 8V7H3v6h14zM5 17h10v-2H5v2z'; break; case 'analytics': - title = 'Analytics'; path = 'M18 18V2H2v16h16zM16 5H4V4h12v1zM7 7v3h3c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3zm1 2V7c1.1 0 2 .9 2 2H8zm8-1h-4V7h4v1zm0 3h-4V9h4v2zm0 2h-4v-1h4v1zm0 3H4v-1h12v1z'; break; case 'archive': - title = 'Archive'; path = 'M19 4v2H1V4h18zM2 7h16v10H2V7zm11 3V9H7v1h6z'; break; case 'arrow-down-alt': - title = 'Arrow Down Alt'; path = 'M9 2h2v12l4-4 2 1-7 7-7-7 2-1 4 4V2z'; break; case 'arrow-down-alt2': - title = 'Arrow Down Alt2'; path = 'M5 6l5 5 5-5 2 1-7 7-7-7z'; break; case 'arrow-down': - title = 'Arrow Down'; path = 'M15 8l-4.03 6L7 8h8z'; break; case 'arrow-left-alt': - title = 'Arrow Left Alt'; path = 'M18 9v2H6l4 4-1 2-7-7 7-7 1 2-4 4h12z'; break; case 'arrow-left-alt2': - title = 'Arrow Left Alt2'; path = 'M14 5l-5 5 5 5-1 2-7-7 7-7z'; break; case 'arrow-left': - title = 'Arrow Left'; path = 'M13 14L7 9.97 13 6v8z'; break; case 'arrow-right-alt': - title = 'Arrow Right Alt'; path = 'M2 11V9h12l-4-4 1-2 7 7-7 7-1-2 4-4H2z'; break; case 'arrow-right-alt2': - title = 'Arrow Right Alt2'; path = 'M6 15l5-5-5-5 1-2 7 7-7 7z'; break; case 'arrow-right': - title = 'Arrow Right'; path = 'M8 6l6 4.03L8 14V6z'; break; case 'arrow-up-alt': - title = 'Arrow Up Alt'; path = 'M11 18H9V6l-4 4-2-1 7-7 7 7-2 1-4-4v12z'; break; case 'arrow-up-alt2': - title = 'Arrow Up Alt2'; path = 'M15 14l-5-5-5 5-2-1 7-7 7 7z'; break; case 'arrow-up': - title = 'Arrow Up'; path = 'M7 13l4.03-6L15 13H7z'; break; case 'art': - title = 'Art'; path = 'M8.55 3.06c1.01.34-1.95 2.01-.1 3.13 1.04.63 3.31-2.22 4.45-2.86.97-.54 2.67-.65 3.53 1.23 1.09 2.38.14 8.57-3.79 11.06-3.97 2.5-8.97 1.23-10.7-2.66-2.01-4.53 3.12-11.09 6.61-9.9zm1.21 6.45c.73 1.64 4.7-.5 3.79-2.8-.59-1.49-4.48 1.25-3.79 2.8z'; break; case 'awards': - title = 'Awards'; path = 'M4.46 5.16L5 7.46l-.54 2.29 2.01 1.24L7.7 13l2.3-.54 2.3.54 1.23-2.01 2.01-1.24L15 7.46l.54-2.3-2-1.24-1.24-2.01-2.3.55-2.29-.54-1.25 2zm5.55 6.34C7.79 11.5 6 9.71 6 7.49c0-2.2 1.79-3.99 4.01-3.99 2.2 0 3.99 1.79 3.99 3.99 0 2.22-1.79 4.01-3.99 4.01zm-.02-1C8.33 10.5 7 9.16 7 7.5c0-1.65 1.33-3 2.99-3S13 5.85 13 7.5c0 1.66-1.35 3-3.01 3zm3.84 1.1l-1.28 2.24-2.08-.47L13 19.2l1.4-2.2h2.5zm-7.7.07l1.25 2.25 2.13-.51L7 19.2 5.6 17H3.1z'; break; case 'backup': - title = 'Backup'; path = 'M13.65 2.88c3.93 2.01 5.48 6.84 3.47 10.77s-6.83 5.48-10.77 3.47c-1.87-.96-3.2-2.56-3.86-4.4l1.64-1.03c.45 1.57 1.52 2.95 3.08 3.76 3.01 1.54 6.69.35 8.23-2.66 1.55-3.01.36-6.69-2.65-8.24C9.78 3.01 6.1 4.2 4.56 7.21l1.88.97-4.95 3.08-.39-5.82 1.78.91C4.9 2.4 9.75.89 13.65 2.88zm-4.36 7.83C9.11 10.53 9 10.28 9 10c0-.07.03-.12.04-.19h-.01L10 5l.97 4.81L14 13l-4.5-2.12.02-.02c-.08-.04-.16-.09-.23-.15z'; break; case 'book-alt': - title = 'Book Alt'; path = 'M5 17h13v2H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h13v14H5c-.55 0-1 .45-1 1s.45 1 1 1zm2-3.5v-11c0-.28-.22-.5-.5-.5s-.5.22-.5.5v11c0 .28.22.5.5.5s.5-.22.5-.5z'; break; case 'book': - title = 'Book'; path = 'M16 3h2v16H5c-1.66 0-3-1.34-3-3V4c0-1.66 1.34-3 3-3h9v14H5c-.55 0-1 .45-1 1s.45 1 1 1h11V3z'; break; case 'building': - title = 'Building'; path = 'M3 20h14V0H3v20zM7 3H5V1h2v2zm4 0H9V1h2v2zm4 0h-2V1h2v2zM7 6H5V4h2v2zm4 0H9V4h2v2zm4 0h-2V4h2v2zM7 9H5V7h2v2zm4 0H9V7h2v2zm4 0h-2V7h2v2zm-8 3H5v-2h2v2zm4 0H9v-2h2v2zm4 0h-2v-2h2v2zm-4 7H5v-6h6v6zm4-4h-2v-2h2v2zm0 3h-2v-2h2v2z'; break; case 'businessman': - title = 'Businessman'; path = 'M7.3 6l-.03-.19c-.04-.37-.05-.73-.03-1.08.02-.36.1-.71.25-1.04.14-.32.31-.61.52-.86s.49-.46.83-.6c.34-.15.72-.23 1.13-.23.69 0 1.26.2 1.71.59s.76.87.91 1.44.18 1.16.09 1.78l-.03.19c-.01.09-.05.25-.11.48-.05.24-.12.47-.2.69-.08.21-.19.45-.34.72-.14.27-.3.49-.47.69-.18.19-.4.34-.67.48-.27.13-.55.19-.86.19s-.59-.06-.87-.19c-.26-.13-.49-.29-.67-.5-.18-.2-.34-.42-.49-.66-.15-.25-.26-.49-.34-.73-.09-.25-.16-.47-.21-.67-.06-.21-.1-.37-.12-.5zm9.2 6.24c.41.7.5 1.41.5 2.14v2.49c0 .03-.12.08-.29.13-.18.04-.42.13-.97.27-.55.12-1.1.24-1.65.34s-1.19.19-1.95.27c-.75.08-1.46.12-2.13.12-.68 0-1.39-.04-2.14-.12-.75-.07-1.4-.17-1.98-.27-.58-.11-1.08-.23-1.56-.34-.49-.11-.8-.21-1.06-.29L3 16.87v-2.49c0-.75.07-1.46.46-2.15s.81-1.25 1.5-1.68C5.66 10.12 7.19 10 8 10l1.67 1.67L9 13v3l1.02 1.08L11 16v-3l-.68-1.33L11.97 10c.77 0 2.2.07 2.9.52.71.45 1.21 1.02 1.63 1.72z'; break; case 'button': - title = 'Button'; path = 'M17 5H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm1 7c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V7c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v5z'; break; case 'calendar-alt': - title = 'Calendar Alt'; path = 'M15 4h3v15H2V4h3V3c0-.41.15-.76.44-1.06.29-.29.65-.44 1.06-.44s.77.15 1.06.44c.29.3.44.65.44 1.06v1h4V3c0-.41.15-.76.44-1.06.29-.29.65-.44 1.06-.44s.77.15 1.06.44c.29.3.44.65.44 1.06v1zM6 3v2.5c0 .14.05.26.15.36.09.09.21.14.35.14s.26-.05.35-.14c.1-.1.15-.22.15-.36V3c0-.14-.05-.26-.15-.35-.09-.1-.21-.15-.35-.15s-.26.05-.35.15c-.1.09-.15.21-.15.35zm7 0v2.5c0 .14.05.26.14.36.1.09.22.14.36.14s.26-.05.36-.14c.09-.1.14-.22.14-.36V3c0-.14-.05-.26-.14-.35-.1-.1-.22-.15-.36-.15s-.26.05-.36.15c-.09.09-.14.21-.14.35zm4 15V8H3v10h14zM7 9v2H5V9h2zm2 0h2v2H9V9zm4 2V9h2v2h-2zm-6 1v2H5v-2h2zm2 0h2v2H9v-2zm4 2v-2h2v2h-2zm-6 1v2H5v-2h2zm4 2H9v-2h2v2zm4 0h-2v-2h2v2z'; break; case 'calendar': - title = 'Calendar'; path = 'M15 4h3v14H2V4h3V3c0-.83.67-1.5 1.5-1.5S8 2.17 8 3v1h4V3c0-.83.67-1.5 1.5-1.5S15 2.17 15 3v1zM6 3v2.5c0 .28.22.5.5.5s.5-.22.5-.5V3c0-.28-.22-.5-.5-.5S6 2.72 6 3zm7 0v2.5c0 .28.22.5.5.5s.5-.22.5-.5V3c0-.28-.22-.5-.5-.5s-.5.22-.5.5zm4 14V8H3v9h14zM7 16V9H5v7h2zm4 0V9H9v7h2zm4 0V9h-2v7h2z'; break; case 'camera': - title = 'Camera'; path = 'M6 5V3H3v2h3zm12 10V4H9L7 6H2v9h16zm-7-8c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3z'; break; case 'carrot': - title = 'Carrot'; path = 'M2 18.43c1.51 1.36 11.64-4.67 13.14-7.21.72-1.22-.13-3.01-1.52-4.44C15.2 5.73 16.59 9 17.91 8.31c.6-.32.99-1.31.7-1.92-.52-1.08-2.25-1.08-3.42-1.21.83-.2 2.82-1.05 2.86-2.25.04-.92-1.13-1.97-2.05-1.86-1.21.14-1.65 1.88-2.06 3-.05-.71-.2-2.27-.98-2.95-1.04-.91-2.29-.05-2.32 1.05-.04 1.33 2.82 2.07 1.92 3.67C11.04 4.67 9.25 4.03 8.1 4.7c-.49.31-1.05.91-1.63 1.69.89.94 2.12 2.07 3.09 2.72.2.14.26.42.11.62-.14.21-.42.26-.62.12-.99-.67-2.2-1.78-3.1-2.71-.45.67-.91 1.43-1.34 2.23.85.86 1.93 1.83 2.79 2.41.2.14.25.42.11.62-.14.21-.42.26-.63.12-.85-.58-1.86-1.48-2.71-2.32C2.4 13.69 1.1 17.63 2 18.43z'; break; case 'cart': - title = 'Cart'; path = 'M6 13h9c.55 0 1 .45 1 1s-.45 1-1 1H5c-.55 0-1-.45-1-1V4H2c-.55 0-1-.45-1-1s.45-1 1-1h3c.55 0 1 .45 1 1v2h13l-4 7H6v1zm-.5 3c.83 0 1.5.67 1.5 1.5S6.33 19 5.5 19 4 18.33 4 17.5 4.67 16 5.5 16zm9 0c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5z'; break; case 'category': - title = 'Category'; path = 'M5 7h13v10H2V4h7l2 2H4v9h1V7z'; break; case 'chart-area': - title = 'Chart Area'; path = 'M18 18l.01-12.28c.59-.35.99-.99.99-1.72 0-1.1-.9-2-2-2s-2 .9-2 2c0 .8.47 1.48 1.14 1.8l-4.13 6.58c-.33-.24-.73-.38-1.16-.38-.84 0-1.55.51-1.85 1.24l-2.14-1.53c.09-.22.14-.46.14-.71 0-1.11-.89-2-2-2-1.1 0-2 .89-2 2 0 .73.4 1.36.98 1.71L1 18h17zM17 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM5 10c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm5.85 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z'; break; case 'chart-bar': - title = 'Chart Bar'; path = 'M18 18V2h-4v16h4zm-6 0V7H8v11h4zm-6 0v-8H2v8h4z'; break; case 'chart-line': - title = 'Chart Line'; path = 'M18 3.5c0 .62-.38 1.16-.92 1.38v13.11H1.99l4.22-6.73c-.13-.23-.21-.48-.21-.76C6 9.67 6.67 9 7.5 9S9 9.67 9 10.5c0 .13-.02.25-.05.37l1.44.63c.27-.3.67-.5 1.11-.5.18 0 .35.04.51.09l3.58-6.41c-.36-.27-.59-.7-.59-1.18 0-.83.67-1.5 1.5-1.5.19 0 .36.04.53.1l.05-.09v.11c.54.22.92.76.92 1.38zm-1.92 13.49V5.85l-3.29 5.89c.13.23.21.48.21.76 0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5l.01-.07-1.63-.72c-.25.18-.55.29-.88.29-.18 0-.35-.04-.51-.1l-3.2 5.09h12.29z'; break; case 'chart-pie': - title = 'Chart Pie'; path = 'M10 10V3c3.87 0 7 3.13 7 7h-7zM9 4v7h7c0 3.87-3.13 7-7 7s-7-3.13-7-7 3.13-7 7-7z'; break; case 'clipboard': - title = 'Clipboard'; path = 'M11.9.39l1.4 1.4c1.61.19 3.5-.74 4.61.37s.18 3 .37 4.61l1.4 1.4c.39.39.39 1.02 0 1.41l-9.19 9.2c-.4.39-1.03.39-1.42 0L1.29 11c-.39-.39-.39-1.02 0-1.42l9.2-9.19c.39-.39 1.02-.39 1.41 0zm.58 2.25l-.58.58 4.95 4.95.58-.58c-.19-.6-.2-1.22-.15-1.82.02-.31.05-.62.09-.92.12-1 .18-1.63-.17-1.98s-.98-.29-1.98-.17c-.3.04-.61.07-.92.09-.6.05-1.22.04-1.82-.15zm4.02.93c.39.39.39 1.03 0 1.42s-1.03.39-1.42 0-.39-1.03 0-1.42 1.03-.39 1.42 0zm-6.72.36l-.71.7L15.44 11l.7-.71zM8.36 5.34l-.7.71 6.36 6.36.71-.7zM6.95 6.76l-.71.7 6.37 6.37.7-.71zM5.54 8.17l-.71.71 6.36 6.36.71-.71zM4.12 9.58l-.71.71 6.37 6.37.71-.71z'; break; case 'clock': - title = 'Clock'; path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 14c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6zm-.71-5.29c.07.05.14.1.23.15l-.02.02L14 13l-3.03-3.19L10 5l-.97 4.81h.01c0 .02-.01.05-.02.09S9 9.97 9 10c0 .28.1.52.29.71z'; break; case 'cloud': - title = 'Cloud'; path = 'M14.85 10.03c1.76.18 3.15 1.66 3.15 3.47 0 1.93-1.57 3.5-3.5 3.5h-10C2.57 17 1 15.43 1 13.5c0-1.79 1.34-3.24 3.06-3.46C4.02 9.87 4 9.69 4 9.5 4 8.12 5.12 7 6.5 7c.34 0 .66.07.95.19C8.11 5.89 9.45 5 11 5c2.21 0 4 1.79 4 4 0 .36-.06.7-.15 1.03z'; break; case 'controls-back': - title = 'Controls Back'; path = 'M2 10l10-6v3.6L18 4v12l-6-3.6V16z'; break; case 'controls-forward': - title = 'Controls Forward'; path = 'M18 10L8 16v-3.6L2 16V4l6 3.6V4z'; break; case 'controls-pause': - title = 'Controls Pause'; path = 'M5 16V4h3v12H5zm7-12h3v12h-3V4z'; break; case 'controls-play': - title = 'Controls Play'; path = 'M5 4l10 6-10 6V4z'; break; case 'controls-repeat': - title = 'Controls Repeat'; path = 'M5 7v3l-2 1.5V5h11V3l4 3.01L14 9V7H5zm10 6v-3l2-1.5V15H6v2l-4-3.01L6 11v2h9z'; break; case 'controls-skipback': - title = 'Controls Skipback'; path = 'M11.98 7.63l6-3.6v12l-6-3.6v3.6l-8-4.8v4.8h-2v-12h2v4.8l8-4.8v3.6z'; break; case 'controls-skipforward': - title = 'Controls Skipforward'; path = 'M8 12.4L2 16V4l6 3.6V4l8 4.8V4h2v12h-2v-4.8L8 16v-3.6z'; break; case 'controls-volumeoff': - title = 'Controls Volumeoff'; path = 'M2 7h4l5-4v14l-5-4H2V7z'; break; case 'controls-volumeon': - title = 'Controls Volumeon'; path = 'M2 7h4l5-4v14l-5-4H2V7zm12.69-2.46C14.82 4.59 18 5.92 18 10s-3.18 5.41-3.31 5.46c-.06.03-.13.04-.19.04-.2 0-.39-.12-.46-.31-.11-.26.02-.55.27-.65.11-.05 2.69-1.15 2.69-4.54 0-3.41-2.66-4.53-2.69-4.54-.25-.1-.38-.39-.27-.65.1-.25.39-.38.65-.27zM16 10c0 2.57-2.23 3.43-2.32 3.47-.06.02-.12.03-.18.03-.2 0-.39-.12-.47-.32-.1-.26.04-.55.29-.65.07-.02 1.68-.67 1.68-2.53s-1.61-2.51-1.68-2.53c-.25-.1-.38-.39-.29-.65.1-.25.39-.39.65-.29.09.04 2.32.9 2.32 3.47z'; break; case 'dashboard': - title = 'Dashboard'; path = 'M3.76 16h12.48c1.1-1.37 1.76-3.11 1.76-5 0-4.42-3.58-8-8-8s-8 3.58-8 8c0 1.89.66 3.63 1.76 5zM10 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM6 6c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm8 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-5.37 5.55L12 7v6c0 1.1-.9 2-2 2s-2-.9-2-2c0-.57.24-1.08.63-1.45zM4 10c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm12 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-5 3c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1z'; break; case 'desktop': - title = 'Desktop'; path = 'M3 2h14c.55 0 1 .45 1 1v10c0 .55-.45 1-1 1h-5v2h2c.55 0 1 .45 1 1v1H5v-1c0-.55.45-1 1-1h2v-2H3c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm13 9V4H4v7h12zM5 5h9L5 9V5z'; break; case 'dismiss': - title = 'Dismiss'; path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm5 11l-3-3 3-3-2-2-3 3-3-3-2 2 3 3-3 3 2 2 3-3 3 3z'; break; case 'download': - title = 'Download'; path = 'M14.01 4v6h2V2H4v8h2.01V4h8zm-2 2v6h3l-5 6-5-6h3V6h4z'; break; case 'edit': - title = 'Edit'; path = 'M13.89 3.39l2.71 2.72c.46.46.42 1.24.03 1.64l-8.01 8.02-5.56 1.16 1.16-5.58s7.6-7.63 7.99-8.03c.39-.39 1.22-.39 1.68.07zm-2.73 2.79l-5.59 5.61 1.11 1.11 5.54-5.65zm-2.97 8.23l5.58-5.6-1.07-1.08-5.59 5.6z'; break; case 'editor-aligncenter': - title = 'Editor Aligncenter'; path = 'M14 5V3H6v2h8zm3 4V7H3v2h14zm-3 4v-2H6v2h8zm3 4v-2H3v2h14z'; break; case 'editor-alignleft': - title = 'Editor Alignleft'; path = 'M12 5V3H3v2h9zm5 4V7H3v2h14zm-5 4v-2H3v2h9zm5 4v-2H3v2h14z'; break; case 'editor-alignright': - title = 'Editor Alignright'; path = 'M17 5V3H8v2h9zm0 4V7H3v2h14zm0 4v-2H8v2h9zm0 4v-2H3v2h14z'; break; case 'editor-bold': - title = 'Editor Bold'; path = 'M6 4v13h4.54c1.37 0 2.46-.33 3.26-1 .8-.66 1.2-1.58 1.2-2.77 0-.84-.17-1.51-.51-2.01s-.9-.85-1.67-1.03v-.09c.57-.1 1.02-.4 1.36-.9s.51-1.13.51-1.91c0-1.14-.39-1.98-1.17-2.5C12.75 4.26 11.5 4 9.78 4H6zm2.57 5.15V6.26h1.36c.73 0 1.27.11 1.61.32.34.22.51.58.51 1.07 0 .54-.16.92-.47 1.15s-.82.35-1.51.35h-1.5zm0 2.19h1.6c1.44 0 2.16.53 2.16 1.61 0 .6-.17 1.05-.51 1.34s-.86.43-1.57.43H8.57v-3.38z'; break; case 'editor-break': - title = 'Editor Break'; path = 'M16 4h2v9H7v3l-5-4 5-4v3h9V4z'; break; case 'editor-code': - title = 'Editor Code'; path = 'M9 6l-4 4 4 4-1 2-6-6 6-6zm2 8l4-4-4-4 1-2 6 6-6 6z'; break; case 'editor-contract': - title = 'Editor Contract'; path = 'M15.75 6.75L18 3v14l-2.25-3.75L17 12h-4v4l1.25-1.25L18 17H2l3.75-2.25L7 16v-4H3l1.25 1.25L2 17V3l2.25 3.75L3 8h4V4L5.75 5.25 2 3h16l-3.75 2.25L13 4v4h4z'; break; case 'editor-customchar': - title = 'Editor Customchar'; path = 'M10 5.4c1.27 0 2.24.36 2.91 1.08.66.71 1 1.76 1 3.13 0 1.28-.23 2.37-.69 3.27-.47.89-1.27 1.52-2.22 2.12v2h6v-2h-3.69c.92-.64 1.62-1.34 2.12-2.34.49-1.01.74-2.13.74-3.35 0-1.78-.55-3.19-1.65-4.22S11.92 3.54 10 3.54s-3.43.53-4.52 1.57c-1.1 1.04-1.65 2.44-1.65 4.2 0 1.21.24 2.31.73 3.33.48 1.01 1.19 1.71 2.1 2.36H3v2h6v-2c-.98-.64-1.8-1.28-2.24-2.17-.45-.89-.67-1.96-.67-3.22 0-1.37.33-2.41 1-3.13C7.75 5.76 8.72 5.4 10 5.4z'; break; case 'editor-expand': - title = 'Editor Expand'; path = 'M7 8h6v4H7zm-5 5v4h4l-1.2-1.2L7 12l-3.8 2.2M14 17h4v-4l-1.2 1.2L13 12l2.2 3.8M14 3l1.3 1.3L13 8l3.8-2.2L18 7V3M6 3H2v4l1.2-1.2L7 8 4.7 4.3'; break; case 'editor-help': - title = 'Editor Help'; path = 'M17 10c0-3.87-3.14-7-7-7-3.87 0-7 3.13-7 7s3.13 7 7 7c3.86 0 7-3.13 7-7zm-6.3 1.48H9.14v-.43c0-.38.08-.7.24-.98s.46-.57.88-.89c.41-.29.68-.53.81-.71.14-.18.2-.39.2-.62 0-.25-.09-.44-.28-.58-.19-.13-.45-.19-.79-.19-.58 0-1.25.19-2 .57l-.64-1.28c.87-.49 1.8-.74 2.77-.74.81 0 1.45.2 1.92.58.48.39.71.91.71 1.55 0 .43-.09.8-.29 1.11-.19.32-.57.67-1.11 1.06-.38.28-.61.49-.71.63-.1.15-.15.34-.15.57v.35zm-1.47 2.74c-.18-.17-.27-.42-.27-.73 0-.33.08-.58.26-.75s.43-.25.77-.25c.32 0 .57.09.75.26s.27.42.27.74c0 .3-.09.55-.27.72-.18.18-.43.27-.75.27-.33 0-.58-.09-.76-.26z'; break; case 'editor-indent': - title = 'Editor Indent'; path = 'M3 5V3h9v2H3zm10-1V3h4v1h-4zm0 3h2V5l4 3.5-4 3.5v-2h-2V7zM3 8V6h9v2H3zm2 3V9h7v2H5zm-2 3v-2h9v2H3zm10 0v-1h4v1h-4zm-4 3v-2h3v2H9z'; break; case 'editor-insertmore': - title = 'Editor Insertmore'; path = 'M17 7V3H3v4h14zM6 11V9H3v2h3zm6 0V9H8v2h4zm5 0V9h-3v2h3zm0 6v-4H3v4h14z'; break; case 'editor-italic': - title = 'Editor Italic'; path = 'M14.78 6h-2.13l-2.8 9h2.12l-.62 2H4.6l.62-2h2.14l2.8-9H8.03l.62-2h6.75z'; break; case 'editor-justify': - title = 'Editor Justify'; path = 'M2 3h16v2H2V3zm0 4h16v2H2V7zm0 4h16v2H2v-2zm0 4h16v2H2v-2z'; break; case 'editor-kitchensink': - title = 'Editor Kitchensink'; path = 'M19 2v6H1V2h18zm-1 5V3H2v4h16zM5 4v2H3V4h2zm3 0v2H6V4h2zm3 0v2H9V4h2zm3 0v2h-2V4h2zm3 0v2h-2V4h2zm2 5v9H1V9h18zm-1 8v-7H2v7h16zM5 11v2H3v-2h2zm3 0v2H6v-2h2zm3 0v2H9v-2h2zm6 0v2h-5v-2h5zm-6 3v2H3v-2h8zm3 0v2h-2v-2h2zm3 0v2h-2v-2h2z'; break; case 'editor-ol': - title = 'Editor Ol'; path = 'M6 7V3h-.69L4.02 4.03l.4.51.46-.37c.06-.05.16-.14.3-.28l-.02.42V7H6zm2-2h9v1H8V5zm-1.23 6.95v-.7H5.05v-.04l.51-.48c.33-.31.57-.54.7-.71.14-.17.24-.33.3-.49.07-.16.1-.33.1-.51 0-.21-.05-.4-.16-.56-.1-.16-.25-.28-.44-.37s-.41-.14-.65-.14c-.19 0-.36.02-.51.06-.15.03-.29.09-.42.15-.12.07-.29.19-.48.35l.45.54c.16-.13.31-.23.45-.3.15-.07.3-.1.45-.1.14 0 .26.03.35.11s.13.2.13.36c0 .1-.02.2-.06.3s-.1.21-.19.33c-.09.11-.29.32-.58.62l-.99 1v.58h2.76zM8 10h9v1H8v-1zm-1.29 3.95c0-.3-.12-.54-.37-.71-.24-.17-.58-.26-1-.26-.52 0-.96.13-1.33.4l.4.6c.17-.11.32-.19.46-.23.14-.05.27-.07.41-.07.38 0 .58.15.58.46 0 .2-.07.35-.22.43s-.38.12-.7.12h-.31v.66h.31c.34 0 .59.04.75.12.15.08.23.22.23.41 0 .22-.07.37-.2.47-.14.1-.35.15-.63.15-.19 0-.38-.03-.57-.08s-.36-.12-.52-.2v.74c.34.15.74.22 1.18.22.53 0 .94-.11 1.22-.33.29-.22.43-.52.43-.92 0-.27-.09-.48-.26-.64s-.42-.26-.74-.3v-.02c.27-.06.49-.19.65-.37.15-.18.23-.39.23-.65zM8 15h9v1H8v-1z'; break; case 'editor-outdent': - title = 'Editor Outdent'; path = 'M7 4V3H3v1h4zm10 1V3H8v2h9zM7 7H5V5L1 8.5 5 12v-2h2V7zm10 1V6H8v2h9zm-2 3V9H8v2h7zm2 3v-2H8v2h9zM7 14v-1H3v1h4zm4 3v-2H8v2h3z'; break; case 'editor-paragraph': - title = 'Editor Paragraph'; path = 'M15 2H7.54c-.83 0-1.59.2-2.28.6-.7.41-1.25.96-1.65 1.65C3.2 4.94 3 5.7 3 6.52s.2 1.58.61 2.27c.4.69.95 1.24 1.65 1.64.69.41 1.45.61 2.28.61h.43V17c0 .27.1.51.29.71.2.19.44.29.71.29.28 0 .51-.1.71-.29.2-.2.3-.44.3-.71V5c0-.27.09-.51.29-.71.2-.19.44-.29.71-.29s.51.1.71.29c.19.2.29.44.29.71v12c0 .27.1.51.3.71.2.19.43.29.71.29.27 0 .51-.1.71-.29.19-.2.29-.44.29-.71V4H15c.27 0 .5-.1.7-.3.2-.19.3-.43.3-.7s-.1-.51-.3-.71C15.5 2.1 15.27 2 15 2z'; break; case 'editor-paste-text': - title = 'Editor Paste Text'; path = 'M12.38 2L15 5v1H5V5l2.64-3h4.74zM10 5c.55 0 1-.44 1-1 0-.55-.45-1-1-1s-1 .45-1 1c0 .56.45 1 1 1zm5.45-1H17c.55 0 1 .45 1 1v12c0 .56-.45 1-1 1H3c-.55 0-1-.44-1-1V5c0-.55.45-1 1-1h1.55L4 4.63V7h12V4.63zM14 11V9H6v2h3v5h2v-5h3z'; break; case 'editor-paste-word': - title = 'Editor Paste Word'; path = 'M12.38 2L15 5v1H5V5l2.64-3h4.74zM10 5c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8 12V5c0-.55-.45-1-1-1h-1.54l.54.63V7H4V4.62L4.55 4H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-3-8l-2 7h-2l-1-5-1 5H6.92L5 9h2l1 5 1-5h2l1 5 1-5h2z'; break; case 'editor-quote': - title = 'Editor Quote'; path = 'M9.49 13.22c0-.74-.2-1.38-.61-1.9-.62-.78-1.83-.88-2.53-.72-.29-1.65 1.11-3.75 2.92-4.65L7.88 4c-2.73 1.3-5.42 4.28-4.96 8.05C3.21 14.43 4.59 16 6.54 16c.85 0 1.56-.25 2.12-.75s.83-1.18.83-2.03zm8.05 0c0-.74-.2-1.38-.61-1.9-.63-.78-1.83-.88-2.53-.72-.29-1.65 1.11-3.75 2.92-4.65L15.93 4c-2.73 1.3-5.41 4.28-4.95 8.05.29 2.38 1.66 3.95 3.61 3.95.85 0 1.56-.25 2.12-.75s.83-1.18.83-2.03z'; break; case 'editor-removeformatting': - title = 'Editor Removeformatting'; path = 'M14.29 4.59l1.1 1.11c.41.4.61.94.61 1.47v2.12c0 .53-.2 1.07-.61 1.47l-6.63 6.63c-.4.41-.94.61-1.47.61s-1.07-.2-1.47-.61l-1.11-1.1-1.1-1.11c-.41-.4-.61-.94-.61-1.47v-2.12c0-.54.2-1.07.61-1.48l6.63-6.62c.4-.41.94-.61 1.47-.61s1.06.2 1.47.61zm-6.21 9.7l6.42-6.42c.39-.39.39-1.03 0-1.43L12.36 4.3c-.19-.19-.45-.29-.72-.29s-.52.1-.71.29l-6.42 6.42c-.39.4-.39 1.04 0 1.43l2.14 2.14c.38.38 1.04.38 1.43 0z'; break; case 'editor-rtl': - title = 'Editor Rtl'; path = 'M5.52 2h7.43c.55 0 1 .45 1 1s-.45 1-1 1h-1v13c0 .55-.45 1-1 1s-1-.45-1-1V5c0-.55-.45-1-1-1s-1 .45-1 1v12c0 .55-.45 1-1 1s-1-.45-1-1v-5.96h-.43C3.02 11.04 1 9.02 1 6.52S3.02 2 5.52 2zM14 14l5-4-5-4v8z'; break; case 'editor-spellcheck': - title = 'Editor Spellcheck'; path = 'M15.84 2.76c.25 0 .49.04.71.11.23.07.44.16.64.25l.35-.81c-.52-.26-1.08-.39-1.69-.39-.58 0-1.09.13-1.52.37-.43.25-.76.61-.99 1.08C13.11 3.83 13 4.38 13 5c0 .99.23 1.75.7 2.28s1.15.79 2.02.79c.6 0 1.13-.09 1.6-.26v-.84c-.26.08-.51.14-.74.19-.24.05-.49.08-.74.08-.59 0-1.04-.19-1.34-.57-.32-.37-.47-.93-.47-1.66 0-.7.16-1.25.48-1.65.33-.4.77-.6 1.33-.6zM6.5 8h1.04L5.3 2H4.24L2 8h1.03l.58-1.66H5.9zM8 2v6h2.17c.67 0 1.19-.15 1.57-.46.38-.3.56-.72.56-1.26 0-.4-.1-.72-.3-.95-.19-.24-.5-.39-.93-.47v-.04c.35-.06.6-.21.78-.44.18-.24.28-.53.28-.88 0-.52-.19-.9-.56-1.14-.36-.24-.96-.36-1.79-.36H8zm.98 2.48V2.82h.85c.44 0 .77.06.97.19.21.12.31.33.31.61 0 .31-.1.53-.29.66-.18.13-.48.2-.89.2h-.95zM5.64 5.5H3.9l.54-1.56c.14-.4.25-.76.32-1.1l.15.52c.07.23.13.4.17.51zm3.34-.23h.99c.44 0 .76.08.98.23.21.15.32.38.32.69 0 .34-.11.59-.32.75s-.52.24-.93.24H8.98V5.27zM4 13l5 5 9-8-1-1-8 6-4-3z'; break; case 'editor-strikethrough': - title = 'Editor Strikethrough'; path = 'M15.82 12.25c.26 0 .5-.02.74-.07.23-.05.48-.12.73-.2v.84c-.46.17-.99.26-1.58.26-.88 0-1.54-.26-2.01-.79-.39-.44-.62-1.04-.68-1.79h-.94c.12.21.18.48.18.79 0 .54-.18.95-.55 1.26-.38.3-.9.45-1.56.45H8v-2.5H6.59l.93 2.5H6.49l-.59-1.67H3.62L3.04 13H2l.93-2.5H2v-1h1.31l.93-2.49H5.3l.92 2.49H8V7h1.77c1 0 1.41.17 1.77.41.37.24.55.62.55 1.13 0 .35-.09.64-.27.87l-.08.09h1.29c.05-.4.15-.77.31-1.1.23-.46.55-.82.98-1.06.43-.25.93-.37 1.51-.37.61 0 1.17.12 1.69.38l-.35.81c-.2-.1-.42-.18-.64-.25s-.46-.11-.71-.11c-.55 0-.99.2-1.31.59-.23.29-.38.66-.44 1.11H17v1h-2.95c.06.5.2.9.44 1.19.3.37.75.56 1.33.56zM4.44 8.96l-.18.54H5.3l-.22-.61c-.04-.11-.09-.28-.17-.51-.07-.24-.12-.41-.14-.51-.08.33-.18.69-.33 1.09zm4.53-1.09V9.5h1.19c.28-.02.49-.09.64-.18.19-.13.28-.35.28-.66 0-.28-.1-.48-.3-.61-.2-.12-.53-.18-.97-.18h-.84zm-3.33 2.64v-.01H3.91v.01h1.73zm5.28.01l-.03-.02H8.97v1.68h1.04c.4 0 .71-.08.92-.23.21-.16.31-.4.31-.74 0-.31-.11-.54-.32-.69z'; break; case 'editor-table': - title = 'Editor Table'; path = 'M18 17V3H2v14h16zM16 7H4V5h12v2zm-7 4H4V9h5v2zm7 0h-5V9h5v2zm-7 4H4v-2h5v2zm7 0h-5v-2h5v2z'; break; case 'editor-textcolor': - title = 'Editor Textcolor'; path = 'M13.23 15h1.9L11 4H9L5 15h1.88l1.07-3h4.18zm-1.53-4.54H8.51L10 5.6z'; break; case 'editor-ul': - title = 'Editor Ul'; path = 'M5.5 7C4.67 7 4 6.33 4 5.5 4 4.68 4.67 4 5.5 4 6.32 4 7 4.68 7 5.5 7 6.33 6.32 7 5.5 7zM8 5h9v1H8V5zm-2.5 7c-.83 0-1.5-.67-1.5-1.5C4 9.68 4.67 9 5.5 9c.82 0 1.5.68 1.5 1.5 0 .83-.68 1.5-1.5 1.5zM8 10h9v1H8v-1zm-2.5 7c-.83 0-1.5-.67-1.5-1.5 0-.82.67-1.5 1.5-1.5.82 0 1.5.68 1.5 1.5 0 .83-.68 1.5-1.5 1.5zM8 15h9v1H8v-1z'; break; case 'editor-underline': - title = 'Editor Underline'; path = 'M14 5h-2v5.71c0 1.99-1.12 2.98-2.45 2.98-1.32 0-2.55-1-2.55-2.96V5H5v5.87c0 1.91 1 4.54 4.48 4.54 3.49 0 4.52-2.58 4.52-4.5V5zm0 13v-2H5v2h9z'; break; case 'editor-unlink': - title = 'Editor Unlink'; path = 'M17.74 2.26c1.68 1.69 1.68 4.41 0 6.1l-1.53 1.52c-.32.33-.69.58-1.08.77L13 10l1.69-1.64.76-.77.76-.76c.84-.84.84-2.2 0-3.04-.84-.85-2.2-.85-3.04 0l-.77.76-.76.76L10 7l-.65-2.14c.19-.38.44-.75.77-1.07l1.52-1.53c1.69-1.68 4.42-1.68 6.1 0zM2 4l8 6-6-8zm4-2l4 8-2-8H6zM2 6l8 4-8-2V6zm7.36 7.69L10 13l.74 2.35-1.38 1.39c-1.69 1.68-4.41 1.68-6.1 0-1.68-1.68-1.68-4.42 0-6.1l1.39-1.38L7 10l-.69.64-1.52 1.53c-.85.84-.85 2.2 0 3.04.84.85 2.2.85 3.04 0zM18 16l-8-6 6 8zm-4 2l-4-8 2 8h2zm4-4l-8-4 8 2v2z'; break; case 'editor-video': - title = 'Editor Video'; path = 'M16 2h-3v1H7V2H4v15h3v-1h6v1h3V2zM6 3v1H5V3h1zm9 0v1h-1V3h1zm-2 1v5H7V4h6zM6 5v1H5V5h1zm9 0v1h-1V5h1zM6 7v1H5V7h1zm9 0v1h-1V7h1zM6 9v1H5V9h1zm9 0v1h-1V9h1zm-2 1v5H7v-5h6zm-7 1v1H5v-1h1zm9 0v1h-1v-1h1zm-9 2v1H5v-1h1zm9 0v1h-1v-1h1zm-9 2v1H5v-1h1zm9 0v1h-1v-1h1z'; break; + case 'ellipsis': + path = 'M5 10c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm12-2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z'; + break; case 'email-alt': - title = 'Email Alt'; path = 'M19 14.5v-9c0-.83-.67-1.5-1.5-1.5H3.49c-.83 0-1.5.67-1.5 1.5v9c0 .83.67 1.5 1.5 1.5H17.5c.83 0 1.5-.67 1.5-1.5zm-1.31-9.11c.33.33.15.67-.03.84L13.6 9.95l3.9 4.06c.12.14.2.36.06.51-.13.16-.43.15-.56.05l-4.37-3.73-2.14 1.95-2.13-1.95-4.37 3.73c-.13.1-.43.11-.56-.05-.14-.15-.06-.37.06-.51l3.9-4.06-4.06-3.72c-.18-.17-.36-.51-.03-.84s.67-.17.95.07l6.24 5.04 6.25-5.04c.28-.24.62-.4.95-.07z'; break; case 'email-alt2': - title = 'Email Alt2'; path = 'M18.01 11.18V2.51c0-1.19-.9-1.81-2-1.37L4 5.91c-1.1.44-2 1.77-2 2.97v8.66c0 1.2.9 1.81 2 1.37l12.01-4.77c1.1-.44 2-1.76 2-2.96zm-1.43-7.46l-6.04 9.33-6.65-4.6c-.1-.07-.36-.32-.17-.64.21-.36.65-.21.65-.21l6.3 2.32s4.83-6.34 5.11-6.7c.13-.17.43-.34.73-.13.29.2.16.49.07.63z'; break; case 'email': - title = 'Email'; path = 'M3.87 4h13.25C18.37 4 19 4.59 19 5.79v8.42c0 1.19-.63 1.79-1.88 1.79H3.87c-1.25 0-1.88-.6-1.88-1.79V5.79c0-1.2.63-1.79 1.88-1.79zm6.62 8.6l6.74-5.53c.24-.2.43-.66.13-1.07-.29-.41-.82-.42-1.17-.17l-5.7 3.86L4.8 5.83c-.35-.25-.88-.24-1.17.17-.3.41-.11.87.13 1.07z'; break; case 'exerpt-view': - title = 'Exerpt View'; path = 'M19 18V2c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1h16c.55 0 1-.45 1-1zM4 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v6H6V3h11zM4 11c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v6H6v-6h11z'; break; case 'external': - title = 'External'; path = 'M9 3h8v8l-2-1V6.92l-5.6 5.59-1.41-1.41L14.08 5H10zm3 12v-3l2-2v7H3V6h8L9 8H5v7h7z'; break; case 'facebook-alt': - title = 'Facebook Alt'; path = 'M8.46 18h2.93v-7.3h2.45l.37-2.84h-2.82V6.04c0-.82.23-1.38 1.41-1.38h1.51V2.11c-.26-.03-1.15-.11-2.19-.11-2.18 0-3.66 1.33-3.66 3.76v2.1H6v2.84h2.46V18z'; break; case 'facebook': - title = 'Facebook'; path = 'M2.89 2h14.23c.49 0 .88.39.88.88v14.24c0 .48-.39.88-.88.88h-4.08v-6.2h2.08l.31-2.41h-2.39V7.85c0-.7.2-1.18 1.2-1.18h1.28V4.51c-.22-.03-.98-.09-1.86-.09-1.85 0-3.11 1.12-3.11 3.19v1.78H8.46v2.41h2.09V18H2.89c-.49 0-.89-.4-.89-.88V2.88c0-.49.4-.88.89-.88z'; break; case 'feedback': - title = 'Feedback'; path = 'M2 2h16c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm15 14V7H3v9h14zM4 8v1h3V8H4zm4 0v3h8V8H8zm-4 4v1h3v-1H4zm4 0v3h8v-3H8z'; break; case 'filter': - title = 'Filter'; path = 'M3 4.5v-2s3.34-1 7-1 7 1 7 1v2l-5 7.03v6.97s-1.22-.09-2.25-.59S8 16.5 8 16.5v-4.97z'; break; case 'flag': - title = 'Flag'; path = 'M5 18V3H3v15h2zm1-6V4c3-1 7 1 11 0v8c-3 1.27-8-1-11 0z'; break; case 'format-aside': - title = 'Format Aside'; path = 'M1 1h18v12l-6 6H1V1zm3 3v1h12V4H4zm0 4v1h12V8H4zm6 5v-1H4v1h6zm2 4l5-5h-5v5z'; break; case 'format-audio': - title = 'Format Audio'; path = 'M6.99 3.08l11.02-2c.55-.08.99.45.99 1V14.5c0 1.94-1.57 3.5-3.5 3.5S12 16.44 12 14.5c0-1.93 1.57-3.5 3.5-3.5.54 0 1.04.14 1.5.35V5.08l-9 2V16c-.24 1.7-1.74 3-3.5 3C2.57 19 1 17.44 1 15.5 1 13.57 2.57 12 4.5 12c.54 0 1.04.14 1.5.35V4.08c0-.55.44-.91.99-1z'; break; case 'format-chat': - title = 'Format Chat'; path = 'M11 6h-.82C9.07 6 8 7.2 8 8.16V10l-3 3v-3H3c-1.1 0-2-.9-2-2V3c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v3zm0 1h6c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2h-2v3l-3-3h-1c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2z'; break; case 'format-gallery': - title = 'Format Gallery'; path = 'M16 4h1.96c.57 0 1.04.47 1.04 1.04v12.92c0 .57-.47 1.04-1.04 1.04H5.04C4.47 19 4 18.53 4 17.96V16H2.04C1.47 16 1 15.53 1 14.96V2.04C1 1.47 1.47 1 2.04 1h12.92c.57 0 1.04.47 1.04 1.04V4zM3 14h11V3H3v11zm5-8.5C8 4.67 7.33 4 6.5 4S5 4.67 5 5.5 5.67 7 6.5 7 8 6.33 8 5.5zm2 4.5s1-5 3-5v8H4V7c2 0 2 3 2 3s.33-2 2-2 2 2 2 2zm7 7V6h-1v8.96c0 .57-.47 1.04-1.04 1.04H6v1h11z'; break; case 'format-image': - title = 'Format Image'; path = 'M2.25 1h15.5c.69 0 1.25.56 1.25 1.25v15.5c0 .69-.56 1.25-1.25 1.25H2.25C1.56 19 1 18.44 1 17.75V2.25C1 1.56 1.56 1 2.25 1zM17 17V3H3v14h14zM10 6c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm3 5s0-6 3-6v10c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1V8c2 0 3 4 3 4s1-3 3-3 3 2 3 2z'; break; case 'format-quote': - title = 'Format Quote'; path = 'M8.54 12.74c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45L6.65 1.94C3.45 3.46.31 6.96.85 11.37 1.19 14.16 2.8 16 5.08 16c1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38zm9.43 0c0-.87-.24-1.61-.72-2.22-.73-.92-2.14-1.03-2.96-.85-.34-1.93 1.3-4.39 3.42-5.45l-1.63-2.28c-3.2 1.52-6.34 5.02-5.8 9.43.34 2.79 1.95 4.63 4.23 4.63 1 0 1.83-.29 2.48-.88.66-.59.98-1.38.98-2.38z'; break; case 'format-status': - title = 'Format Status'; path = 'M10 1c7 0 9 2.91 9 6.5S17 14 10 14s-9-2.91-9-6.5S3 1 10 1zM5.5 9C6.33 9 7 8.33 7 7.5S6.33 6 5.5 6 4 6.67 4 7.5 4.67 9 5.5 9zM10 9c.83 0 1.5-.67 1.5-1.5S10.83 6 10 6s-1.5.67-1.5 1.5S9.17 9 10 9zm4.5 0c.83 0 1.5-.67 1.5-1.5S15.33 6 14.5 6 13 6.67 13 7.5 13.67 9 14.5 9zM6 14.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm-3 2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1z'; break; case 'format-video': - title = 'Format Video'; path = 'M2 1h16c.55 0 1 .45 1 1v16l-18-.02V2c0-.55.45-1 1-1zm4 1L4 5h1l2-3H6zm4 0H9L7 5h1zm3 0h-1l-2 3h1zm3 0h-1l-2 3h1zm1 14V6H3v10h14zM8 7l6 4-6 4V7z'; break; case 'forms': - title = 'Forms'; path = 'M2 2h7v7H2V2zm9 0v7h7V2h-7zM5.5 4.5L7 3H4zM12 8V3h5v5h-5zM4.5 5.5L3 4v3zM8 4L6.5 5.5 8 7V4zM5.5 6.5L4 8h3zM9 18v-7H2v7h7zm9 0h-7v-7h7v7zM8 12v5H3v-5h5zm6.5 1.5L16 12h-3zM12 16l1.5-1.5L12 13v3zm3.5-1.5L17 16v-3zm-1 1L13 17h3z'; break; case 'googleplus': - title = 'Googleplus'; path = 'M6.73 10h5.4c.05.29.09.57.09.95 0 3.27-2.19 5.6-5.49 5.6-3.17 0-5.73-2.57-5.73-5.73 0-3.17 2.56-5.73 5.73-5.73 1.54 0 2.84.57 3.83 1.5l-1.55 1.5c-.43-.41-1.17-.89-2.28-.89-1.96 0-3.55 1.62-3.55 3.62 0 1.99 1.59 3.61 3.55 3.61 2.26 0 3.11-1.62 3.24-2.47H6.73V10zM19 10v1.64h-1.64v1.63h-1.63v-1.63h-1.64V10h1.64V8.36h1.63V10H19z'; break; case 'grid-view': - title = 'Grid View'; path = 'M2 1h16c.55 0 1 .45 1 1v16c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V2c0-.55.45-1 1-1zm7.01 7.99v-6H3v6h6.01zm8 0v-6h-6v6h6zm-8 8.01v-6H3v6h6.01zm8 0v-6h-6v6h6z'; break; case 'groups': - title = 'Groups'; path = 'M8.03 4.46c-.29 1.28.55 3.46 1.97 3.46 1.41 0 2.25-2.18 1.96-3.46-.22-.98-1.08-1.63-1.96-1.63-.89 0-1.74.65-1.97 1.63zm-4.13.9c-.25 1.08.47 2.93 1.67 2.93s1.92-1.85 1.67-2.93c-.19-.83-.92-1.39-1.67-1.39s-1.48.56-1.67 1.39zm8.86 0c-.25 1.08.47 2.93 1.66 2.93 1.2 0 1.92-1.85 1.67-2.93-.19-.83-.92-1.39-1.67-1.39-.74 0-1.47.56-1.66 1.39zm-.59 11.43l1.25-4.3C14.2 10 12.71 8.47 10 8.47c-2.72 0-4.21 1.53-3.44 4.02l1.26 4.3C8.05 17.51 9 18 10 18c.98 0 1.94-.49 2.17-1.21zm-6.1-7.63c-.49.67-.96 1.83-.42 3.59l1.12 3.79c-.34.2-.77.31-1.2.31-.85 0-1.65-.41-1.85-1.03l-1.07-3.65c-.65-2.11.61-3.4 2.92-3.4.27 0 .54.02.79.06-.1.1-.2.22-.29.33zm8.35-.39c2.31 0 3.58 1.29 2.92 3.4l-1.07 3.65c-.2.62-1 1.03-1.85 1.03-.43 0-.86-.11-1.2-.31l1.11-3.77c.55-1.78.08-2.94-.42-3.61-.08-.11-.18-.23-.28-.33.25-.04.51-.06.79-.06z'; break; case 'hammer': - title = 'Hammer'; path = 'M17.7 6.32l1.41 1.42-3.47 3.41-1.42-1.42.84-.82c-.32-.76-.81-1.57-1.51-2.31l-4.61 6.59-5.26 4.7c-.39.39-1.02.39-1.42 0l-1.2-1.21c-.39-.39-.39-1.02 0-1.41l10.97-9.92c-1.37-.86-3.21-1.46-5.67-1.48 2.7-.82 4.95-.93 6.58-.3 1.7.66 2.82 2.2 3.91 3.58z'; break; case 'heading': - title = 'Heading'; path = 'M12.5 4v5.2h-5V4H5v13h2.5v-5.2h5V17H15V4'; break; case 'heart': - title = 'Heart'; path = 'M10 17.12c3.33-1.4 5.74-3.79 7.04-6.21 1.28-2.41 1.46-4.81.32-6.25-1.03-1.29-2.37-1.78-3.73-1.74s-2.68.63-3.63 1.46c-.95-.83-2.27-1.42-3.63-1.46s-2.7.45-3.73 1.74c-1.14 1.44-.96 3.84.34 6.25 1.28 2.42 3.69 4.81 7.02 6.21z'; break; case 'hidden': - title = 'Hidden'; path = 'M17.2 3.3l.16.17c.39.39.39 1.02 0 1.41L4.55 17.7c-.39.39-1.03.39-1.41 0l-.17-.17c-.39-.39-.39-1.02 0-1.41l1.59-1.6c-1.57-1-2.76-2.3-3.56-3.93.81-1.65 2.03-2.98 3.64-3.99S8.04 5.09 10 5.09c1.2 0 2.33.21 3.4.6l2.38-2.39c.39-.39 1.03-.39 1.42 0zm-7.09 4.01c-.23.25-.34.54-.34.88 0 .31.12.58.31.81l1.8-1.79c-.13-.12-.28-.21-.45-.26-.11-.01-.28-.03-.49-.04-.33.03-.6.16-.83.4zM2.4 10.59c.69 1.23 1.71 2.25 3.05 3.05l1.28-1.28c-.51-.69-.77-1.47-.77-2.36 0-1.06.36-1.98 1.09-2.76-1.04.27-1.96.7-2.76 1.26-.8.58-1.43 1.27-1.89 2.09zm13.22-2.13l.96-.96c1.02.86 1.83 1.89 2.42 3.09-.81 1.65-2.03 2.98-3.64 3.99s-3.4 1.51-5.36 1.51c-.63 0-1.24-.07-1.83-.18l1.07-1.07c.25.02.5.05.76.05 1.63 0 3.13-.4 4.5-1.21s2.4-1.84 3.1-3.09c-.46-.82-1.09-1.51-1.89-2.09-.03-.01-.06-.03-.09-.04zm-5.58 5.58l4-4c-.01 1.1-.41 2.04-1.18 2.81-.78.78-1.72 1.18-2.82 1.19z'; break; case 'id-alt': - title = 'Id Alt'; path = 'M18 18H2V2h16v16zM8.05 7.53c.13-.07.24-.15.33-.24.09-.1.17-.21.24-.34.07-.14.13-.26.17-.37s.07-.22.1-.34L8.95 6c0-.04.01-.07.01-.09.05-.32.03-.61-.04-.9-.08-.28-.23-.52-.46-.72C8.23 4.1 7.95 4 7.6 4c-.2 0-.39.04-.56.11-.17.08-.31.18-.41.3-.11.13-.2.27-.27.44-.07.16-.11.33-.12.51s0 .36.01.55l.02.09c.01.06.03.15.06.25s.06.21.1.33.1.25.17.37c.08.12.16.23.25.33s.2.19.34.25c.13.06.28.09.43.09s.3-.03.43-.09zM16 5V4h-5v1h5zm0 2V6h-5v1h5zM7.62 8.83l-1.38-.88c-.41 0-.79.11-1.14.32-.35.22-.62.5-.81.85-.19.34-.29.7-.29 1.07v1.25l.2.05c.13.04.31.09.55.14.24.06.51.12.8.17.29.06.62.1 1 .14.37.04.73.06 1.07.06s.69-.02 1.07-.06.7-.09.98-.14c.27-.05.54-.1.82-.17.27-.06.45-.11.54-.13.09-.03.16-.05.21-.06v-1.25c0-.36-.1-.72-.31-1.07s-.49-.64-.84-.86-.72-.33-1.11-.33zM16 9V8h-3v1h3zm0 2v-1h-3v1h3zm0 3v-1H4v1h12zm0 2v-1H4v1h12z'; break; case 'id': - title = 'Id'; path = 'M18 16H2V4h16v12zM7.05 8.53c.13-.07.24-.15.33-.24.09-.1.17-.21.24-.34.07-.14.13-.26.17-.37s.07-.22.1-.34L7.95 7c0-.04.01-.07.01-.09.05-.32.03-.61-.04-.9-.08-.28-.23-.52-.46-.72C7.23 5.1 6.95 5 6.6 5c-.2 0-.39.04-.56.11-.17.08-.31.18-.41.3-.11.13-.2.27-.27.44-.07.16-.11.33-.12.51s0 .36.01.55l.02.09c.01.06.03.15.06.25s.06.21.1.33.1.25.17.37c.08.12.16.23.25.33s.2.19.34.25c.13.06.28.09.43.09s.3-.03.43-.09zM17 9V5h-5v4h5zm-10.38.83l-1.38-.88c-.41 0-.79.11-1.14.32-.35.22-.62.5-.81.85-.19.34-.29.7-.29 1.07v1.25l.2.05c.13.04.31.09.55.14.24.06.51.12.8.17.29.06.62.1 1 .14.37.04.73.06 1.07.06s.69-.02 1.07-.06.7-.09.98-.14c.27-.05.54-.1.82-.17.27-.06.45-.11.54-.13.09-.03.16-.05.21-.06v-1.25c0-.36-.1-.72-.31-1.07s-.49-.64-.84-.86-.72-.33-1.11-.33zM17 11v-1h-5v1h5zm0 2v-1h-5v1h5zm0 2v-1H3v1h14z'; break; case 'image-crop': - title = 'Image Crop'; path = 'M19 12v3h-4v4h-3v-4H4V7H0V4h4V0h3v4h7l3-3 1 1-3 3v7h4zm-8-5H7v4zm-3 5h4V8z'; break; case 'image-filter': - title = 'Image Filter'; path = 'M14 5.87c0-2.2-1.79-4-4-4s-4 1.8-4 4c0 2.21 1.79 4 4 4s4-1.79 4-4zM3.24 10.66c-1.92 1.1-2.57 3.55-1.47 5.46 1.11 1.92 3.55 2.57 5.47 1.47 1.91-1.11 2.57-3.55 1.46-5.47-1.1-1.91-3.55-2.56-5.46-1.46zm9.52 6.93c1.92 1.1 4.36.45 5.47-1.46 1.1-1.92.45-4.36-1.47-5.47-1.91-1.1-4.36-.45-5.46 1.46-1.11 1.92-.45 4.36 1.46 5.47z'; break; case 'image-flip-horizontal': - title = 'Image Flip Horizontal'; path = 'M19 3v14h-8v3H9v-3H1V3h8V0h2v3h8zm-8.5 14V3h-1v14h1zM7 6.5L3 10l4 3.5v-7zM17 10l-4-3.5v7z'; break; case 'image-flip-vertical': - title = 'Image Flip Vertical'; path = 'M20 9v2h-3v8H3v-8H0V9h3V1h14v8h3zM6.5 7h7L10 3zM17 9.5H3v1h14v-1zM13.5 13h-7l3.5 4z'; break; case 'image-rotate-left': - title = 'Image Rotate Left'; path = 'M7 5H5.05c0-1.74.85-2.9 2.95-2.9V0C4.85 0 2.96 2.11 2.96 5H1.18L3.8 8.39zm13-4v14h-5v5H1V10h9V1h10zm-2 2h-6v7h3v3h3V3zm-5 9H3v6h10v-6z'; break; case 'image-rotate-right': - title = 'Image Rotate Right'; path = 'M15.95 5H14l3.2 3.39L19.82 5h-1.78c0-2.89-1.89-5-5.04-5v2.1c2.1 0 2.95 1.16 2.95 2.9zM1 1h10v9h9v10H6v-5H1V1zm2 2v10h3v-3h3V3H3zm5 9v6h10v-6H8z'; break; case 'image-rotate': - title = 'Image Rotate'; path = 'M10.25 1.02c5.1 0 8.75 4.04 8.75 9s-3.65 9-8.75 9c-3.2 0-6.02-1.59-7.68-3.99l2.59-1.52c1.1 1.5 2.86 2.51 4.84 2.51 3.3 0 6-2.79 6-6s-2.7-6-6-6c-1.97 0-3.72 1-4.82 2.49L7 8.02l-6 2v-7L2.89 4.6c1.69-2.17 4.36-3.58 7.36-3.58z'; break; case 'images-alt': - title = 'Images Alt'; path = 'M4 15v-3H2V2h12v3h2v3h2v10H6v-3H4zm7-12c-1.1 0-2 .9-2 2h4c0-1.1-.89-2-2-2zm-7 8V6H3v5h1zm7-3h4c0-1.1-.89-2-2-2-1.1 0-2 .9-2 2zm-5 6V9H5v5h1zm9-1c1.1 0 2-.89 2-2 0-1.1-.9-2-2-2s-2 .9-2 2c0 1.11.9 2 2 2zm2 4v-2c-5 0-5-3-10-3v5h10z'; break; case 'images-alt2': - title = 'Images Alt2'; path = 'M5 3h14v11h-2v2h-2v2H1V7h2V5h2V3zm13 10V4H6v9h12zm-3-4c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm1 6v-1H5V6H4v9h12zM7 6l10 6H7V6zm7 11v-1H3V8H2v9h12z'; break; case 'index-card': - title = 'Index Card'; path = 'M1 3.17V18h18V4H8v-.83c0-.32-.12-.6-.35-.83S7.14 2 6.82 2H2.18c-.33 0-.6.11-.83.34-.24.23-.35.51-.35.83zM10 6v2H3V6h7zm7 0v10h-5V6h5zm-7 4v2H3v-2h7zm0 4v2H3v-2h7z'; break; case 'info': - title = 'Info'; path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1 4c0-.55-.45-1-1-1s-1 .45-1 1 .45 1 1 1 1-.45 1-1zm0 9V9H9v6h2z'; break; case 'insert': - title = 'Insert'; path = 'M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z'; break; case 'laptop': - title = 'Laptop'; path = 'M3 3h14c.6 0 1 .4 1 1v10c0 .6-.4 1-1 1H3c-.6 0-1-.4-1-1V4c0-.6.4-1 1-1zm13 2H4v8h12V5zm-3 1H5v4zm6 11v-1H1v1c0 .6.5 1 1.1 1h15.8c.6 0 1.1-.4 1.1-1z'; break; case 'layout': - title = 'Layout'; path = 'M2 2h5v11H2V2zm6 0h5v5H8V2zm6 0h4v16h-4V2zM8 8h5v5H8V8zm-6 6h11v4H2v-4z'; break; case 'leftright': - title = 'Leftright'; path = 'M3 10.03L9 6v8zM11 6l6 4.03L11 14V6z'; break; case 'lightbulb': - title = 'Lightbulb'; path = 'M10 1c3.11 0 5.63 2.52 5.63 5.62 0 1.84-2.03 4.58-2.03 4.58-.33.44-.6 1.25-.6 1.8v1c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-1c0-.55-.27-1.36-.6-1.8 0 0-2.02-2.74-2.02-4.58C4.38 3.52 6.89 1 10 1zM7 16.87V16h6v.87c0 .62-.13 1.13-.75 1.13H12c0 .62-.4 1-1.02 1h-2c-.61 0-.98-.38-.98-1h-.25c-.62 0-.75-.51-.75-1.13z'; break; case 'list-view': - title = 'List View'; path = 'M2 19h16c.55 0 1-.45 1-1V2c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1v16c0 .55.45 1 1 1zM4 3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6V3h11zM4 7c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6V7h11zM4 11c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6v-2h11zM4 15c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm13 0v2H6v-2h11z'; break; case 'location-alt': - title = 'Location Alt'; path = 'M13 13.14l1.17-5.94c.79-.43 1.33-1.25 1.33-2.2 0-1.38-1.12-2.5-2.5-2.5S10.5 3.62 10.5 5c0 .95.54 1.77 1.33 2.2zm0-9.64c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5-1.5-.67-1.5-1.5.67-1.5 1.5-1.5zm1.72 4.8L18 6.97v9L13.12 18 7 15.97l-5 2v-9l5-2 4.27 1.41 1.73 7.3z'; break; case 'location': - title = 'Location'; path = 'M10 2C6.69 2 4 4.69 4 8c0 2.02 1.17 3.71 2.53 4.89.43.37 1.18.96 1.85 1.83.74.97 1.41 2.01 1.62 2.71.21-.7.88-1.74 1.62-2.71.67-.87 1.42-1.46 1.85-1.83C14.83 11.71 16 10.02 16 8c0-3.31-2.69-6-6-6zm0 2.56c1.9 0 3.44 1.54 3.44 3.44S11.9 11.44 10 11.44 6.56 9.9 6.56 8 8.1 4.56 10 4.56z'; break; case 'lock': - title = 'Lock'; path = 'M14 9h1c.55 0 1 .45 1 1v7c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1v-7c0-.55.45-1 1-1h1V6c0-2.21 1.79-4 4-4s4 1.79 4 4v3zm-2 0V6c0-1.1-.9-2-2-2s-2 .9-2 2v3h4zm-1 7l-.36-2.15c.51-.24.86-.75.86-1.35 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5c0 .6.35 1.11.86 1.35L9 16h2z'; break; case 'marker': - title = 'Marker'; path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm0 13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5z'; break; case 'media-archive': - title = 'Media Archive'; path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zM8 3.5v2l1.8-1zM11 5L9.2 6 11 7V5zM8 6.5v2l1.8-1zM11 8L9.2 9l1.8 1V8zM8 9.5v2l1.8-1zm3 1.5l-1.8 1 1.8 1v-2zm-1.5 6c.83 0 1.62-.72 1.5-1.63-.05-.38-.49-1.61-.49-1.61l-1.99-1.1s-.45 1.95-.52 2.71c-.07.77.67 1.63 1.5 1.63zm0-2.39c.42 0 .76.34.76.76 0 .43-.34.77-.76.77s-.76-.34-.76-.77c0-.42.34-.76.76-.76z'; break; case 'media-audio': - title = 'Media Audio'; path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm1 7.26V8.09c0-.11-.04-.21-.12-.29-.07-.08-.16-.11-.27-.1 0 0-3.97.71-4.25.78C8.07 8.54 8 8.8 8 9v3.37c-.2-.09-.42-.07-.6-.07-.38 0-.7.13-.96.39-.26.27-.4.58-.4.96 0 .37.14.69.4.95.26.27.58.4.96.4.34 0 .7-.04.96-.26.26-.23.64-.65.64-1.12V10.3l3-.6V12c-.67-.2-1.17.04-1.44.31-.26.26-.39.58-.39.95 0 .38.13.69.39.96.27.26.71.39 1.08.39.38 0 .7-.13.96-.39.26-.27.4-.58.4-.96z'; break; case 'media-code': - title = 'Media Code'; path = 'M12 2l4 4v12H4V2h8zM9 13l-2-2 2-2-1-1-3 3 3 3zm3 1l3-3-3-3-1 1 2 2-2 2z'; break; case 'media-default': - title = 'Media Default'; path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3z'; break; case 'media-document': - title = 'Media Document'; path = 'M12 2l4 4v12H4V2h8zM5 3v1h6V3H5zm7 3h3l-3-3v3zM5 5v1h6V5H5zm10 3V7H5v1h10zM5 9v1h4V9H5zm10 3V9h-5v3h5zM5 11v1h4v-1H5zm10 3v-1H5v1h10zm-3 2v-1H5v1h7z'; break; case 'media-interactive': - title = 'Media Interactive'; path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm2 8V8H6v6h3l-1 2h1l1-2 1 2h1l-1-2h3zm-6-3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm5-2v2h-3V9h3zm0 3v1H7v-1h6z'; break; case 'media-spreadsheet': - title = 'Media Spreadsheet'; path = 'M12 2l4 4v12H4V2h8zm-1 4V3H5v3h6zM8 8V7H5v1h3zm3 0V7H9v1h2zm4 0V7h-3v1h3zm-7 2V9H5v1h3zm3 0V9H9v1h2zm4 0V9h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2zm4 0v-1h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2zm4 0v-1h-3v1h3zm-7 2v-1H5v1h3zm3 0v-1H9v1h2z'; break; case 'media-text': - title = 'Media Text'; path = 'M12 2l4 4v12H4V2h8zM5 3v1h6V3H5zm7 3h3l-3-3v3zM5 5v1h6V5H5zm10 3V7H5v1h10zm0 2V9H5v1h10zm0 2v-1H5v1h10zm-4 2v-1H5v1h6z'; break; case 'media-video': - title = 'Media Video'; path = 'M12 2l4 4v12H4V2h8zm0 4h3l-3-3v3zm-1 8v-3c0-.27-.1-.51-.29-.71-.2-.19-.44-.29-.71-.29H7c-.27 0-.51.1-.71.29-.19.2-.29.44-.29.71v3c0 .27.1.51.29.71.2.19.44.29.71.29h3c.27 0 .51-.1.71-.29.19-.2.29-.44.29-.71zm3 1v-5l-2 2v1z'; break; case 'megaphone': - title = 'Megaphone'; path = 'M18.15 5.94c.46 1.62.38 3.22-.02 4.48-.42 1.28-1.26 2.18-2.3 2.48-.16.06-.26.06-.4.06-.06.02-.12.02-.18.02-.06.02-.14.02-.22.02h-6.8l2.22 5.5c.02.14-.06.26-.14.34-.08.1-.24.16-.34.16H6.95c-.1 0-.26-.06-.34-.16-.08-.08-.16-.2-.14-.34l-1-5.5H4.25l-.02-.02c-.5.06-1.08-.18-1.54-.62s-.88-1.08-1.06-1.88c-.24-.8-.2-1.56-.02-2.2.18-.62.58-1.08 1.06-1.3l.02-.02 9-5.4c.1-.06.18-.1.24-.16.06-.04.14-.08.24-.12.16-.08.28-.12.5-.18 1.04-.3 2.24.1 3.22.98s1.84 2.24 2.26 3.86zm-2.58 5.98h-.02c.4-.1.74-.34 1.04-.7.58-.7.86-1.76.86-3.04 0-.64-.1-1.3-.28-1.98-.34-1.36-1.02-2.5-1.78-3.24s-1.68-1.1-2.46-.88c-.82.22-1.4.96-1.7 2-.32 1.04-.28 2.36.06 3.72.38 1.36 1 2.5 1.8 3.24.78.74 1.62 1.1 2.48.88zm-2.54-7.08c.22-.04.42-.02.62.04.38.16.76.48 1.02 1s.42 1.2.42 1.78c0 .3-.04.56-.12.8-.18.48-.44.84-.86.94-.34.1-.8-.06-1.14-.4s-.64-.86-.78-1.5c-.18-.62-.12-1.24.02-1.72s.48-.84.82-.94z'; break; case 'menu-alt': - title = 'Menu Alt'; path = 'M3 4h14v2H3V4zm0 5h14v2H3V9zm0 5h14v2H3v-2z'; break; case 'menu': - title = 'Menu'; path = 'M17 7V5H3v2h14zm0 4V9H3v2h14zm0 4v-2H3v2h14z'; break; case 'microphone': - title = 'Microphone'; path = 'M12 9V3c0-1.1-.89-2-2-2-1.12 0-2 .94-2 2v6c0 1.1.9 2 2 2 1.13 0 2-.94 2-2zm4 0c0 2.97-2.16 5.43-5 5.91V17h2c.56 0 1 .45 1 1s-.44 1-1 1H7c-.55 0-1-.45-1-1s.45-1 1-1h2v-2.09C6.17 14.43 4 11.97 4 9c0-.55.45-1 1-1 .56 0 1 .45 1 1 0 2.21 1.8 4 4 4 2.21 0 4-1.79 4-4 0-.55.45-1 1-1 .56 0 1 .45 1 1z'; break; case 'migrate': - title = 'Migrate'; path = 'M4 6h6V4H2v12.01h8V14H4V6zm2 2h6V5l6 5-6 5v-3H6V8z'; break; case 'minus': - title = 'Minus'; path = 'M4 9h12v2H4V9z'; break; case 'money': - title = 'Money'; path = 'M0 3h20v12h-.75c0-1.79-1.46-3.25-3.25-3.25-1.31 0-2.42.79-2.94 1.91-.25-.1-.52-.16-.81-.16-.98 0-1.8.63-2.11 1.5H0V3zm8.37 3.11c-.06.15-.1.31-.11.47s-.01.33.01.5l.02.08c.01.06.02.14.05.23.02.1.06.2.1.31.03.11.09.22.15.33.07.12.15.22.23.31s.18.17.31.23c.12.06.25.09.4.09.14 0 .27-.03.39-.09s.22-.14.3-.22c.09-.09.16-.2.22-.32.07-.12.12-.23.16-.33s.07-.2.09-.31c.03-.11.04-.18.05-.22s.01-.07.01-.09c.05-.29.03-.56-.04-.82s-.21-.48-.41-.66c-.21-.18-.47-.27-.79-.27-.19 0-.36.03-.52.1-.15.07-.28.16-.38.28-.09.11-.17.25-.24.4zm4.48 6.04v-1.14c0-.33-.1-.66-.29-.98s-.45-.59-.77-.79c-.32-.21-.66-.31-1.02-.31l-1.24.84-1.28-.82c-.37 0-.72.1-1.04.3-.31.2-.56.46-.74.77-.18.32-.27.65-.27.99v1.14l.18.05c.12.04.29.08.51.14.23.05.47.1.74.15.26.05.57.09.91.13.34.03.67.05.99.05.3 0 .63-.02.98-.05.34-.04.64-.08.89-.13.25-.04.5-.1.76-.16l.5-.12c.08-.02.14-.04.19-.06zm3.15.1c1.52 0 2.75 1.23 2.75 2.75s-1.23 2.75-2.75 2.75c-.73 0-1.38-.3-1.87-.77.23-.35.37-.78.37-1.23 0-.77-.39-1.46-.99-1.86.43-.96 1.37-1.64 2.49-1.64zm-5.5 3.5c0-.96.79-1.75 1.75-1.75s1.75.79 1.75 1.75-.79 1.75-1.75 1.75-1.75-.79-1.75-1.75z'; break; case 'move': - title = 'Move'; path = 'M19 10l-4 4v-3h-4v4h3l-4 4-4-4h3v-4H5v3l-4-4 4-4v3h4V5H6l4-4 4 4h-3v4h4V6z'; break; case 'nametag': - title = 'Nametag'; path = 'M12 5V2c0-.55-.45-1-1-1H9c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h2c.55 0 1-.45 1-1zm-2-3c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm8 13V7c0-1.1-.9-2-2-2h-3v.33C13 6.25 12.25 7 11.33 7H8.67C7.75 7 7 6.25 7 5.33V5H4c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-1-6v6H3V9h14zm-8 2c0-.55-.22-1-.5-1s-.5.45-.5 1 .22 1 .5 1 .5-.45.5-1zm3 0c0-.55-.22-1-.5-1s-.5.45-.5 1 .22 1 .5 1 .5-.45.5-1zm-5.96 1.21c.92.48 2.34.79 3.96.79s3.04-.31 3.96-.79c-.21 1-1.89 1.79-3.96 1.79s-3.75-.79-3.96-1.79z'; break; case 'networking': - title = 'Networking'; path = 'M18 13h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01h-4c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2h-5v2h1c.55 0 1 .45 1 1.01v2.98c0 .56-.45 1.01-1 1.01H8c-.55 0-1-.45-1-1.01v-2.98c0-.56.45-1.01 1-1.01h1v-2H4v2h1c.55 0 1 .45 1 1.01v2.98C6 17.55 5.55 18 5 18H1c-.55 0-1-.45-1-1.01v-2.98C0 13.45.45 13 1 13h1v-2c0-1.1.9-2 2-2h5V7H8c-.55 0-1-.45-1-1.01V3.01C7 2.45 7.45 2 8 2h4c.55 0 1 .45 1 1.01v2.98C13 6.55 12.55 7 12 7h-1v2h5c1.1 0 2 .9 2 2v2z'; break; case 'no-alt': - title = 'No Alt'; path = 'M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z'; break; case 'no': - title = 'No'; path = 'M12.12 10l3.53 3.53-2.12 2.12L10 12.12l-3.54 3.54-2.12-2.12L7.88 10 4.34 6.46l2.12-2.12L10 7.88l3.54-3.53 2.12 2.12z'; break; case 'palmtree': - title = 'Palmtree'; path = 'M8.58 2.39c.32 0 .59.05.81.14 1.25.55 1.69 2.24 1.7 3.97.59-.82 2.15-2.29 3.41-2.29s2.94.73 3.53 3.55c-1.13-.65-2.42-.94-3.65-.94-1.26 0-2.45.32-3.29.89.4-.11.86-.16 1.33-.16 1.39 0 2.9.45 3.4 1.31.68 1.16.47 3.38-.76 4.14-.14-2.1-1.69-4.12-3.47-4.12-.44 0-.88.12-1.33.38C8 10.62 7 14.56 7 19H2c0-5.53 4.21-9.65 7.68-10.79-.56-.09-1.17-.15-1.82-.15C6.1 8.06 4.05 8.5 2 10c.76-2.96 2.78-4.1 4.69-4.1 1.25 0 2.45.5 3.2 1.29-.66-2.24-2.49-2.86-4.08-2.86-.8 0-1.55.16-2.05.35.91-1.29 3.31-2.29 4.82-2.29zM13 11.5c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5.67 1.5 1.5 1.5 1.5-.67 1.5-1.5z'; break; case 'paperclip': - title = 'Paperclip'; path = 'M17.05 2.7c1.93 1.94 1.93 5.13 0 7.07L10 16.84c-1.88 1.89-4.91 1.93-6.86.15-.06-.05-.13-.09-.19-.15-1.93-1.94-1.93-5.12 0-7.07l4.94-4.95c.91-.92 2.28-1.1 3.39-.58.3.15.59.33.83.58 1.17 1.17 1.17 3.07 0 4.24l-4.93 4.95c-.39.39-1.02.39-1.41 0s-.39-1.02 0-1.41l4.93-4.95c.39-.39.39-1.02 0-1.41-.38-.39-1.02-.39-1.4 0l-4.94 4.95c-.91.92-1.1 2.29-.57 3.4.14.3.32.59.57.84s.54.43.84.57c1.11.53 2.47.35 3.39-.57l7.05-7.07c1.16-1.17 1.16-3.08 0-4.25-.56-.55-1.28-.83-2-.86-.08.01-.16.01-.24 0-.22-.03-.43-.11-.6-.27-.39-.4-.38-1.05.02-1.45.16-.16.36-.24.56-.28.14-.02.27-.01.4.02 1.19.06 2.36.52 3.27 1.43z'; break; case 'performance': - title = 'Performance'; path = 'M3.76 17.01h12.48C17.34 15.63 18 13.9 18 12c0-4.41-3.58-8-8-8s-8 3.59-8 8c0 1.9.66 3.63 1.76 5.01zM9 6c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zM4 8c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm4.52 3.4c.84-.83 6.51-3.5 6.51-3.5s-2.66 5.68-3.49 6.51c-.84.84-2.18.84-3.02 0-.83-.83-.83-2.18 0-3.01zM3 13c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm6 0c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1zm6 0c0-.55.45-1 1-1s1 .45 1 1c0 .56-.45 1-1 1s-1-.44-1-1z'; break; case 'phone': - title = 'Phone'; path = 'M12.06 6l-.21-.2c-.52-.54-.43-.79.08-1.3l2.72-2.75c.81-.82.96-1.21 1.73-.48l.21.2zm.53.45l4.4-4.4c.7.94 2.34 3.47 1.53 5.34-.73 1.67-1.09 1.75-2 3-1.85 2.11-4.18 4.37-6 6.07-1.26.91-1.31 1.33-3 2-1.8.71-4.4-.89-5.38-1.56l4.4-4.4 1.18 1.62c.34.46 1.2-.06 1.8-.66 1.04-1.05 3.18-3.18 4-4.07.59-.59 1.12-1.45.66-1.8zM1.57 16.5l-.21-.21c-.68-.74-.29-.9.52-1.7l2.74-2.72c.51-.49.75-.6 1.27-.11l.2.21z'; break; case 'playlist-audio': - title = 'Playlist Audio'; path = 'M17 3V1H2v2h15zm0 4V5H2v2h15zm-7 4V9H2v2h8zm7.45-1.96l-6 1.12c-.16.02-.19.03-.29.13-.11.09-.16.22-.16.37v4.59c-.29-.13-.66-.14-.93-.14-.54 0-1 .19-1.38.57s-.56.84-.56 1.38c0 .53.18.99.56 1.37s.84.57 1.38.57c.49 0 .92-.16 1.29-.48s.59-.71.65-1.19v-4.95L17 11.27v3.48c-.29-.13-.56-.19-.83-.19-.54 0-1.11.19-1.49.57-.38.37-.57.83-.57 1.37s.19.99.57 1.37.84.57 1.38.57c.53 0 .99-.19 1.37-.57s.57-.83.57-1.37V9.6c0-.16-.05-.3-.16-.41-.11-.12-.24-.17-.39-.15zM8 15v-2H2v2h6zm-2 4v-2H2v2h4z'; break; case 'playlist-video': - title = 'Playlist Video'; path = 'M17 3V1H2v2h15zm0 4V5H2v2h15zM6 11V9H2v2h4zm2-2h9c.55 0 1 .45 1 1v8c0 .55-.45 1-1 1H8c-.55 0-1-.45-1-1v-8c0-.55.45-1 1-1zm3 7l3.33-2L11 12v4zm-5-1v-2H2v2h4zm0 4v-2H2v2h4z'; break; case 'plus-alt': - title = 'Plus Alt'; path = 'M15.8 4.2c3.2 3.21 3.2 8.39 0 11.6-3.21 3.2-8.39 3.2-11.6 0C1 12.59 1 7.41 4.2 4.2 7.41 1 12.59 1 15.8 4.2zm-4.3 11.3v-4h4v-3h-4v-4h-3v4h-4v3h4v4h3z'; break; case 'plus-light': - title = 'Plus Light'; path = 'M17 9v2h-6v6H9v-6H3V9h6V3h2v6h6z'; break; case 'plus': - title = 'Plus'; path = 'M17 7v3h-5v5H9v-5H4V7h5V2h3v5h5z'; break; case 'portfolio': - title = 'Portfolio'; path = 'M4 5H.78c-.37 0-.74.32-.69.84l1.56 9.99S3.5 8.47 3.86 6.7c.11-.53.61-.7.98-.7H10s-.7-2.08-.77-2.31C9.11 3.25 8.89 3 8.45 3H5.14c-.36 0-.7.23-.8.64C4.25 4.04 4 5 4 5zm4.88 0h-4s.42-1 .87-1h2.13c.48 0 1 1 1 1zM2.67 16.25c-.31.47-.76.75-1.26.75h15.73c.54 0 .92-.31 1.03-.83.44-2.19 1.68-8.44 1.68-8.44.07-.5-.3-.73-.62-.73H16V5.53c0-.16-.26-.53-.66-.53h-3.76c-.52 0-.87.58-.87.58L10 7H5.59c-.32 0-.63.19-.69.5 0 0-1.59 6.7-1.72 7.33-.07.37-.22.99-.51 1.42zM15.38 7H11s.58-1 1.13-1h2.29c.71 0 .96 1 .96 1z'; break; case 'post-status': - title = 'Post Status'; path = 'M14 6c0 1.86-1.28 3.41-3 3.86V16c0 1-2 2-2 2V9.86c-1.72-.45-3-2-3-3.86 0-2.21 1.79-4 4-4s4 1.79 4 4zM8 5c0 .55.45 1 1 1s1-.45 1-1-.45-1-1-1-1 .45-1 1z'; break; case 'pressthis': - title = 'Pressthis'; path = 'M14.76 1C16.55 1 18 2.46 18 4.25c0 1.78-1.45 3.24-3.24 3.24-.23 0-.47-.03-.7-.08L13 8.47V19H2V4h9.54c.13-2 1.52-3 3.22-3zm0 5.49C16 6.49 17 5.48 17 4.25 17 3.01 16 2 14.76 2s-2.24 1.01-2.24 2.25c0 .37.1.72.27 1.03L9.57 8.5c-.28.28-1.77 2.22-1.5 2.49.02.03.06.04.1.04.49 0 2.14-1.28 2.39-1.53l3.24-3.24c.29.14.61.23.96.23z'; break; case 'products': - title = 'Products'; path = 'M17 8h1v11H2V8h1V6c0-2.76 2.24-5 5-5 .71 0 1.39.15 2 .42.61-.27 1.29-.42 2-.42 2.76 0 5 2.24 5 5v2zM5 6v2h2V6c0-1.13.39-2.16 1.02-3H8C6.35 3 5 4.35 5 6zm10 2V6c0-1.65-1.35-3-3-3h-.02c.63.84 1.02 1.87 1.02 3v2h2zm-5-4.22C9.39 4.33 9 5.12 9 6v2h2V6c0-.88-.39-1.67-1-2.22z'; break; case 'randomize': - title = 'Randomize'; path = 'M18 6.01L14 9V7h-4l-5 8H2v-2h2l5-8h5V3zM2 5h3l1.15 2.17-1.12 1.8L4 7H2V5zm16 9.01L14 17v-2H9l-1.15-2.17 1.12-1.8L10 13h4v-2z'; break; case 'redo': - title = 'Redo'; path = 'M8 5h5V2l6 4-6 4V7H8c-2.2 0-4 1.8-4 4s1.8 4 4 4h5v2H8c-3.3 0-6-2.7-6-6s2.7-6 6-6z'; break; case 'rss': - title = 'Rss'; path = 'M14.92 18H18C18 9.32 10.82 2.25 2 2.25v3.02c7.12 0 12.92 5.71 12.92 12.73zm-5.44 0h3.08C12.56 12.27 7.82 7.6 2 7.6v3.02c2 0 3.87.77 5.29 2.16C8.7 14.17 9.48 16.03 9.48 18zm-5.35-.02c1.17 0 2.13-.93 2.13-2.09 0-1.15-.96-2.09-2.13-2.09-1.18 0-2.13.94-2.13 2.09 0 1.16.95 2.09 2.13 2.09z'; break; case 'saved': - title = 'Saved'; path = 'M15.3 5.3l-6.8 6.8-2.8-2.8-1.4 1.4 4.2 4.2 8.2-8.2'; break; case 'schedule': - title = 'Schedule'; path = 'M2 2h16v4H2V2zm0 10V8h4v4H2zm6-2V8h4v2H8zm6 3V8h4v5h-4zm-6 5v-6h4v6H8zm-6 0v-4h4v4H2zm12 0v-3h4v3h-4z'; break; case 'screenoptions': - title = 'Screenoptions'; path = 'M9 9V3H3v6h6zm8 0V3h-6v6h6zm-8 8v-6H3v6h6zm8 0v-6h-6v6h6z'; break; case 'search': - title = 'Search'; path = 'M12.14 4.18c1.87 1.87 2.11 4.75.72 6.89.12.1.22.21.36.31.2.16.47.36.81.59.34.24.56.39.66.47.42.31.73.57.94.78.32.32.6.65.84 1 .25.35.44.69.59 1.04.14.35.21.68.18 1-.02.32-.14.59-.36.81s-.49.34-.81.36c-.31.02-.65-.04-.99-.19-.35-.14-.7-.34-1.04-.59-.35-.24-.68-.52-1-.84-.21-.21-.47-.52-.77-.93-.1-.13-.25-.35-.47-.66-.22-.32-.4-.57-.56-.78-.16-.2-.29-.35-.44-.5-2.07 1.09-4.69.76-6.44-.98-2.14-2.15-2.14-5.64 0-7.78 2.15-2.15 5.63-2.15 7.78 0zm-1.41 6.36c1.36-1.37 1.36-3.58 0-4.95-1.37-1.37-3.59-1.37-4.95 0-1.37 1.37-1.37 3.58 0 4.95 1.36 1.37 3.58 1.37 4.95 0z'; break; case 'share-alt': - title = 'Share Alt'; path = 'M16.22 5.8c.47.69.29 1.62-.4 2.08-.69.47-1.62.29-2.08-.4-.16-.24-.35-.46-.55-.67-.21-.2-.43-.39-.67-.55s-.5-.3-.77-.41c-.27-.12-.55-.21-.84-.26-.59-.13-1.23-.13-1.82-.01-.29.06-.57.15-.84.27-.27.11-.53.25-.77.41s-.46.35-.66.55c-.21.21-.4.43-.56.67s-.3.5-.41.76c-.01.02-.01.03-.01.04-.1.24-.17.48-.23.72H1V6h2.66c.04-.07.07-.13.12-.2.27-.4.57-.77.91-1.11s.72-.65 1.11-.91c.4-.27.83-.51 1.28-.7s.93-.34 1.41-.43c.99-.21 2.03-.21 3.02 0 .48.09.96.24 1.41.43s.88.43 1.28.7c.39.26.77.57 1.11.91s.64.71.91 1.11zM12.5 10c0-1.38-1.12-2.5-2.5-2.5S7.5 8.62 7.5 10s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5zm-8.72 4.2c-.47-.69-.29-1.62.4-2.09.69-.46 1.62-.28 2.08.41.16.24.35.46.55.67.21.2.43.39.67.55s.5.3.77.41c.27.12.55.2.84.26.59.13 1.23.12 1.82 0 .29-.06.57-.14.84-.26.27-.11.53-.25.77-.41s.46-.35.66-.55c.21-.21.4-.44.56-.67.16-.25.3-.5.41-.76.01-.02.01-.03.01-.04.1-.24.17-.48.23-.72H19v3h-2.66c-.04.06-.07.13-.12.2-.27.4-.57.77-.91 1.11s-.72.65-1.11.91c-.4.27-.83.51-1.28.7s-.93.33-1.41.43c-.99.21-2.03.21-3.02 0-.48-.1-.96-.24-1.41-.43s-.88-.43-1.28-.7c-.39-.26-.77-.57-1.11-.91s-.64-.71-.91-1.11z'; break; case 'share-alt2': - title = 'Share Alt2'; path = 'M18 8l-5 4V9.01c-2.58.06-4.88.45-7 2.99.29-3.57 2.66-5.66 7-5.94V3zM4 14h11v-2l2-1.6V16H2V5h9.43c-1.83.32-3.31 1-4.41 2H4v7z'; break; case 'share': - title = 'Share'; path = 'M14.5 12c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3c0-.24.03-.46.09-.69l-4.38-2.3c-.55.61-1.33.99-2.21.99-1.66 0-3-1.34-3-3s1.34-3 3-3c.88 0 1.66.39 2.21.99l4.38-2.3c-.06-.23-.09-.45-.09-.69 0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3c-.88 0-1.66-.39-2.21-.99l-4.38 2.3c.06.23.09.45.09.69s-.03.46-.09.69l4.38 2.3c.55-.61 1.33-.99 2.21-.99z'; break; case 'shield-alt': - title = 'Shield Alt'; path = 'M10 2s3 2 7 2c0 11-7 14-7 14S3 15 3 4c4 0 7-2 7-2z'; break; case 'shield': - title = 'Shield'; path = 'M10 2s3 2 7 2c0 11-7 14-7 14S3 15 3 4c4 0 7-2 7-2zm0 8h5s1-1 1-5c0 0-5-1-6-2v7H5c1 4 5 7 5 7v-7z'; break; case 'slides': - title = 'Slides'; path = 'M5 14V6h10v8H5zm-3-1V7h2v6H2zm4-6v6h8V7H6zm10 0h2v6h-2V7zm-3 2V8H7v1h6zm0 3v-2H7v2h6z'; break; case 'smartphone': - title = 'Smartphone'; path = 'M6 2h8c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H6c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm7 12V4H7v10h6zM8 5h4l-4 5V5z'; break; case 'smiley': - title = 'Smiley'; path = 'M7 5.2c1.1 0 2 .89 2 2 0 .37-.11.71-.28 1C8.72 8.2 8 8 7 8s-1.72.2-1.72.2c-.17-.29-.28-.63-.28-1 0-1.11.9-2 2-2zm6 0c1.11 0 2 .89 2 2 0 .37-.11.71-.28 1 0 0-.72-.2-1.72-.2s-1.72.2-1.72.2c-.17-.29-.28-.63-.28-1 0-1.11.89-2 2-2zm-3 13.7c3.72 0 7.03-2.36 8.23-5.88l-1.32-.46C15.9 15.52 13.12 17.5 10 17.5s-5.9-1.98-6.91-4.94l-1.32.46c1.2 3.52 4.51 5.88 8.23 5.88z'; break; case 'sort': - title = 'Sort'; path = 'M11 7H1l5 7zm-2 7h10l-5-7z'; break; case 'sos': - title = 'Sos'; path = 'M18 10c0-4.42-3.58-8-8-8s-8 3.58-8 8 3.58 8 8 8 8-3.58 8-8zM7.23 3.57L8.72 7.3c-.62.29-1.13.8-1.42 1.42L3.57 7.23c.71-1.64 2.02-2.95 3.66-3.66zm9.2 3.66L12.7 8.72c-.29-.62-.8-1.13-1.42-1.42l1.49-3.73c1.64.71 2.95 2.02 3.66 3.66zM10 12c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm-6.43.77l3.73-1.49c.29.62.8 1.13 1.42 1.42l-1.49 3.73c-1.64-.71-2.95-2.02-3.66-3.66zm9.2 3.66l-1.49-3.73c.62-.29 1.13-.8 1.42-1.42l3.73 1.49c-.71 1.64-2.02 2.95-3.66 3.66z'; break; case 'star-empty': - title = 'Star Empty'; path = 'M10 1L7 7l-6 .75 4.13 4.62L4 19l6-3 6 3-1.12-6.63L19 7.75 13 7zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15L10 14.88l-4.68 2.34.87-5.15-3.18-3.56 4.65-.58z'; break; case 'star-filled': - title = 'Star Filled'; path = 'M10 1l3 6 6 .75-4.12 4.62L16 19l-6-3-6 3 1.13-6.63L1 7.75 7 7z'; break; case 'star-half': - title = 'Star Half'; path = 'M10 1L7 7l-6 .75 4.13 4.62L4 19l6-3 6 3-1.12-6.63L19 7.75 13 7zm0 2.24l2.34 4.69 4.65.58-3.18 3.56.87 5.15L10 14.88V3.24z'; break; case 'sticky': - title = 'Sticky'; path = 'M5 3.61V1.04l8.99-.01-.01 2.58c-1.22.26-2.16 1.35-2.16 2.67v.5c.01 1.31.93 2.4 2.17 2.66l-.01 2.58h-3.41l-.01 2.57c0 .6-.47 4.41-1.06 4.41-.6 0-1.08-3.81-1.08-4.41v-2.56L5 12.02l.01-2.58c1.23-.25 2.15-1.35 2.15-2.66v-.5c0-1.31-.92-2.41-2.16-2.67z'; break; case 'store': - title = 'Store'; path = 'M1 10c.41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.51.43.54 0 1.08-.14 1.49-.43.62-.46 1-1.17 1-2 0 .83.37 1.54 1 2 .41.29.96.43 1.5.43.55 0 1.09-.14 1.5-.43.63-.46 1-1.17 1-2V7l-3-7H4L0 7v1c0 .83.37 1.54 1 2zm2 8.99h5v-5h4v5h5v-7c-.37-.05-.72-.22-1-.43-.63-.45-1-.73-1-1.56 0 .83-.38 1.11-1 1.56-.41.3-.95.43-1.49.44-.55 0-1.1-.14-1.51-.44-.63-.45-1-.73-1-1.56 0 .83-.38 1.11-1 1.56-.41.3-.95.43-1.5.44-.54 0-1.09-.14-1.5-.44-.63-.45-1-.73-1-1.57 0 .84-.38 1.12-1 1.57-.29.21-.63.38-1 .44v6.99z'; break; case 'tablet': - title = 'Tablet'; path = 'M4 2h12c.55 0 1 .45 1 1v14c0 .55-.45 1-1 1H4c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1zm11 14V4H5v12h10zM6 5h6l-6 5V5z'; break; case 'tag': - title = 'Tag'; path = 'M11 2h7v7L8 19l-7-7zm3 6c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z'; break; case 'tagcloud': - title = 'Tagcloud'; path = 'M11 3v4H1V3h10zm8 0v4h-7V3h7zM7 8v3H1V8h6zm12 0v3H8V8h11zM9 12v2H1v-2h8zm10 0v2h-9v-2h9zM6 15v1H1v-1h5zm5 0v1H7v-1h4zm3 0v1h-2v-1h2zm5 0v1h-4v-1h4z'; break; case 'testimonial': - title = 'Testimonial'; path = 'M4 3h12c.55 0 1.02.2 1.41.59S18 4.45 18 5v7c0 .55-.2 1.02-.59 1.41S16.55 14 16 14h-1l-5 5v-5H4c-.55 0-1.02-.2-1.41-.59S2 12.55 2 12V5c0-.55.2-1.02.59-1.41S3.45 3 4 3zm11 2H4v1h11V5zm1 3H4v1h12V8zm-3 3H4v1h9v-1z'; break; case 'text': - title = 'Text'; path = 'M18 3v2H2V3h16zm-6 4v2H2V7h10zm6 0v2h-4V7h4zM8 11v2H2v-2h6zm10 0v2h-8v-2h8zm-4 4v2H2v-2h12z'; break; case 'thumbs-down': - title = 'Thumbs Down'; path = 'M7.28 18c-.15.02-.26-.02-.41-.07-.56-.19-.83-.79-.66-1.35.17-.55 1-3.04 1-3.58 0-.53-.75-1-1.35-1h-3c-.6 0-1-.4-1-1s2-7 2-7c.17-.39.55-1 1-1H14v9h-2.14c-.41.41-3.3 4.71-3.58 5.27-.21.41-.6.68-1 .73zM18 12h-2V3h2v9z'; break; case 'thumbs-up': - title = 'Thumbs Up'; path = 'M12.72 2c.15-.02.26.02.41.07.56.19.83.79.66 1.35-.17.55-1 3.04-1 3.58 0 .53.75 1 1.35 1h3c.6 0 1 .4 1 1s-2 7-2 7c-.17.39-.55 1-1 1H6V8h2.14c.41-.41 3.3-4.71 3.58-5.27.21-.41.6-.68 1-.73zM2 8h2v9H2V8z'; break; case 'tickets-alt': - title = 'Tickets Alt'; path = 'M20 6.38L18.99 9.2v-.01c-.52-.19-1.03-.16-1.53.08s-.85.62-1.04 1.14-.16 1.03.07 1.53c.24.5.62.84 1.15 1.03v.01l-1.01 2.82-15.06-5.38.99-2.79c.52.19 1.03.16 1.53-.08.5-.23.84-.61 1.03-1.13s.16-1.03-.08-1.53c-.23-.49-.61-.83-1.13-1.02L4.93 1zm-4.97 5.69l1.37-3.76c.12-.31.1-.65-.04-.95s-.39-.53-.7-.65L8.14 3.98c-.64-.23-1.37.12-1.6.74L5.17 8.48c-.24.65.1 1.37.74 1.6l7.52 2.74c.14.05.28.08.43.08.52 0 1-.33 1.17-.83zM7.97 4.45l7.51 2.73c.19.07.34.21.43.39.08.18.09.38.02.57l-1.37 3.76c-.13.38-.58.59-.96.45L6.09 9.61c-.39-.14-.59-.57-.45-.96l1.37-3.76c.1-.29.39-.49.7-.49.09 0 .17.02.26.05zm6.82 12.14c.35.27.75.41 1.2.41H16v3H0v-2.96c.55 0 1.03-.2 1.41-.59.39-.38.59-.86.59-1.41s-.2-1.02-.59-1.41-.86-.59-1.41-.59V10h1.05l-.28.8 2.87 1.02c-.51.16-.89.62-.89 1.18v4c0 .69.56 1.25 1.25 1.25h8c.69 0 1.25-.56 1.25-1.25v-1.75l.83.3c.12.43.36.78.71 1.04zM3.25 17v-4c0-.41.34-.75.75-.75h.83l7.92 2.83V17c0 .41-.34.75-.75.75H4c-.41 0-.75-.34-.75-.75z'; break; case 'tickets': - title = 'Tickets'; path = 'M20 5.38L18.99 8.2v-.01c-1.04-.37-2.19.18-2.57 1.22-.37 1.04.17 2.19 1.22 2.56v.01l-1.01 2.82L1.57 9.42l.99-2.79c1.04.38 2.19-.17 2.56-1.21s-.17-2.18-1.21-2.55L4.93 0zm-5.45 3.37c.74-2.08-.34-4.37-2.42-5.12-2.08-.74-4.37.35-5.11 2.42-.74 2.08.34 4.38 2.42 5.12 2.07.74 4.37-.35 5.11-2.42zm-2.56-4.74c.89.32 1.57.94 1.97 1.71-.01-.01-.02-.01-.04-.02-.33-.12-.67.09-.78.4-.1.28-.03.57.05.91.04.27.09.62-.06 1.04-.1.29-.33.58-.65 1l-.74 1.01.08-4.08.4.11c.19.04.26-.24.08-.29 0 0-.57-.15-.92-.28-.34-.12-.88-.36-.88-.36-.18-.08-.3.19-.12.27 0 0 .16.08.34.16l.01 1.63L9.2 9.18l.08-4.11c.2.06.4.11.4.11.19.04.26-.23.07-.29 0 0-.56-.15-.91-.28-.07-.02-.14-.05-.22-.08.93-.7 2.19-.94 3.37-.52zM7.4 6.19c.17-.49.44-.92.78-1.27l.04 5c-.94-.95-1.3-2.39-.82-3.73zm4.04 4.75l2.1-2.63c.37-.41.57-.77.69-1.12.05-.12.08-.24.11-.35.09.57.04 1.18-.17 1.77-.45 1.25-1.51 2.1-2.73 2.33zm-.7-3.22l.02 3.22c0 .02 0 .04.01.06-.4 0-.8-.07-1.2-.21-.33-.12-.63-.28-.9-.48zm1.24 6.08l2.1.75c.24.84 1 1.45 1.91 1.45H16v3H0v-2.96c1.1 0 2-.89 2-2 0-1.1-.9-2-2-2V9h1.05l-.28.8 4.28 1.52C4.4 12.03 4 12.97 4 14c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.07-.02-.13-.02-.2zm-6.53-2.33l1.48.53c-.14.04-.15.27.03.28 0 0 .18.02.37.03l.56 1.54-.78 2.36-1.31-3.9c.21-.01.41-.03.41-.03.19-.02.17-.31-.02-.3 0 0-.59.05-.96.05-.07 0-.15 0-.23-.01.13-.2.28-.38.45-.55zM4.4 14c0-.52.12-1.02.32-1.46l1.71 4.7C5.23 16.65 4.4 15.42 4.4 14zm4.19-1.41l1.72.62c.07.17.12.37.12.61 0 .31-.12.66-.28 1.16l-.35 1.2zM11.6 14c0 1.33-.72 2.49-1.79 3.11l1.1-3.18c.06-.17.1-.31.14-.46l.52.19c.02.11.03.22.03.34zm-4.62 3.45l1.08-3.14 1.11 3.03c.01.02.01.04.02.05-.37.13-.77.21-1.19.21-.35 0-.69-.06-1.02-.15z'; break; case 'translation': - title = 'Translation'; path = 'M11 7H9.49c-.63 0-1.25.3-1.59.7L7 5H4.13l-2.39 7h1.69l.74-2H7v4H2c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h7c1.1 0 2 .9 2 2v2zM6.51 9H4.49l1-2.93zM10 8h7c1.1 0 2 .9 2 2v7c0 1.1-.9 2-2 2h-7c-1.1 0-2-.9-2-2v-7c0-1.1.9-2 2-2zm7.25 5v-1.08h-3.17V9.75h-1.16v2.17H9.75V13h1.28c.11.85.56 1.85 1.28 2.62-.87.36-1.89.62-2.31.62-.01.02.22.97.2 1.46.84 0 2.21-.5 3.28-1.15 1.09.65 2.48 1.15 3.34 1.15-.02-.49.2-1.44.2-1.46-.43 0-1.49-.27-2.38-.63.7-.77 1.14-1.77 1.25-2.61h1.36zm-3.81 1.93c-.5-.46-.85-1.13-1.01-1.93h2.09c-.17.8-.51 1.47-1 1.93l-.04.03s-.03-.02-.04-.03z'; break; case 'trash': - title = 'Trash'; path = 'M12 4h3c.55 0 1 .45 1 1v1H3V5c0-.55.45-1 1-1h3c.23-1.14 1.29-2 2.5-2s2.27.86 2.5 2zM8 4h3c-.21-.58-.85-1-1.5-1S8.21 3.42 8 4zM4 7h11v10c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1V7zm3 9V9H6v7h1zm3 0V9H9v7h1zm3 0V9h-1v7h1z'; break; case 'twitter': - title = 'Twitter'; path = 'M18.94 4.46c-.49.73-1.11 1.38-1.83 1.9.01.15.01.31.01.47 0 4.85-3.69 10.44-10.43 10.44-2.07 0-4-.61-5.63-1.65.29.03.58.05.88.05 1.72 0 3.3-.59 4.55-1.57-1.6-.03-2.95-1.09-3.42-2.55.22.04.45.07.69.07.33 0 .66-.05.96-.13-1.67-.34-2.94-1.82-2.94-3.6v-.04c.5.27 1.06.44 1.66.46-.98-.66-1.63-1.78-1.63-3.06 0-.67.18-1.3.5-1.84 1.81 2.22 4.51 3.68 7.56 3.83-.06-.27-.1-.55-.1-.84 0-2.02 1.65-3.66 3.67-3.66 1.06 0 2.01.44 2.68 1.16.83-.17 1.62-.47 2.33-.89-.28.85-.86 1.57-1.62 2.02.75-.08 1.45-.28 2.11-.57z'; break; case 'undo': - title = 'Undo'; path = 'M12 5H7V2L1 6l6 4V7h5c2.2 0 4 1.8 4 4s-1.8 4-4 4H7v2h5c3.3 0 6-2.7 6-6s-2.7-6-6-6z'; break; case 'universal-access-alt': - title = 'Universal Access Alt'; path = 'M19 10c0-4.97-4.03-9-9-9s-9 4.03-9 9 4.03 9 9 9 9-4.03 9-9zm-9-7.4c.83 0 1.5.67 1.5 1.5s-.67 1.51-1.5 1.51c-.82 0-1.5-.68-1.5-1.51s.68-1.5 1.5-1.5zM3.4 7.36c0-.65 6.6-.76 6.6-.76s6.6.11 6.6.76-4.47 1.4-4.47 1.4 1.69 8.14 1.06 8.38c-.62.24-3.19-5.19-3.19-5.19s-2.56 5.43-3.18 5.19c-.63-.24 1.06-8.38 1.06-8.38S3.4 8.01 3.4 7.36z'; break; case 'universal-access': - title = 'Universal Access'; path = 'M10 2.6c.83 0 1.5.67 1.5 1.5s-.67 1.51-1.5 1.51c-.82 0-1.5-.68-1.5-1.51s.68-1.5 1.5-1.5zM3.4 7.36c0-.65 6.6-.76 6.6-.76s6.6.11 6.6.76-4.47 1.4-4.47 1.4 1.69 8.14 1.06 8.38c-.62.24-3.19-5.19-3.19-5.19s-2.56 5.43-3.18 5.19c-.63-.24 1.06-8.38 1.06-8.38S3.4 8.01 3.4 7.36z'; break; case 'unlock': - title = 'Unlock'; path = 'M12 9V6c0-1.1-.9-2-2-2s-2 .9-2 2H6c0-2.21 1.79-4 4-4s4 1.79 4 4v3h1c.55 0 1 .45 1 1v7c0 .55-.45 1-1 1H5c-.55 0-1-.45-1-1v-7c0-.55.45-1 1-1h7zm-1 7l-.36-2.15c.51-.24.86-.75.86-1.35 0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5c0 .6.35 1.11.86 1.35L9 16h2z'; break; case 'update': - title = 'Update'; path = 'M10.2 3.28c3.53 0 6.43 2.61 6.92 6h2.08l-3.5 4-3.5-4h2.32c-.45-1.97-2.21-3.45-4.32-3.45-1.45 0-2.73.71-3.54 1.78L4.95 5.66C6.23 4.2 8.11 3.28 10.2 3.28zm-.4 13.44c-3.52 0-6.43-2.61-6.92-6H.8l3.5-4c1.17 1.33 2.33 2.67 3.5 4H5.48c.45 1.97 2.21 3.45 4.32 3.45 1.45 0 2.73-.71 3.54-1.78l1.71 1.95c-1.28 1.46-3.15 2.38-5.25 2.38z'; break; case 'upload': - title = 'Upload'; path = 'M8 14V8H5l5-6 5 6h-3v6H8zm-2 2v-6H4v8h12.01v-8H14v6H6z'; break; case 'vault': - title = 'Vault'; path = 'M18 17V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-1 0H3V3h14v14zM4.75 4h10.5c.41 0 .75.34.75.75V6h-1v3h1v2h-1v3h1v1.25c0 .41-.34.75-.75.75H4.75c-.41 0-.75-.34-.75-.75V4.75c0-.41.34-.75.75-.75zM13 10c0-2.21-1.79-4-4-4s-4 1.79-4 4 1.79 4 4 4 4-1.79 4-4zM9 7l.77 1.15C10.49 8.46 11 9.17 11 10c0 1.1-.9 2-2 2s-2-.9-2-2c0-.83.51-1.54 1.23-1.85z'; break; case 'video-alt': - title = 'Video Alt'; path = 'M8 5c0-.55-.45-1-1-1H2c-.55 0-1 .45-1 1 0 .57.49 1 1 1h5c.55 0 1-.45 1-1zm6 5l4-4v10l-4-4v-2zm-1 4V8c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h8c.55 0 1-.45 1-1z'; break; case 'video-alt2': - title = 'Video Alt2'; path = 'M12 13V7c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2zm1-2.5l6 4.5V5l-6 4.5v1z'; break; case 'video-alt3': - title = 'Video Alt3'; path = 'M19 15V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2zM8 14V6l6 4z'; break; case 'visibility': - title = 'Visibility'; path = 'M19.7 9.4C17.7 6 14 3.9 10 3.9S2.3 6 .3 9.4L0 10l.3.6c2 3.4 5.7 5.5 9.7 5.5s7.7-2.1 9.7-5.5l.3-.6-.3-.6zM10 14.1c-3.1 0-6-1.6-7.7-4.1C3.6 8 5.7 6.6 8 6.1c-.9.6-1.5 1.7-1.5 2.9 0 1.9 1.6 3.5 3.5 3.5s3.5-1.6 3.5-3.5c0-1.2-.6-2.3-1.5-2.9 2.3.5 4.4 1.9 5.7 3.9-1.7 2.5-4.6 4.1-7.7 4.1z'; break; case 'warning': - title = 'Warning'; path = 'M10 2c4.42 0 8 3.58 8 8s-3.58 8-8 8-8-3.58-8-8 3.58-8 8-8zm1.13 9.38l.35-6.46H8.52l.35 6.46h2.26zm-.09 3.36c.24-.23.37-.55.37-.96 0-.42-.12-.74-.36-.97s-.59-.35-1.06-.35-.82.12-1.07.35-.37.55-.37.97c0 .41.13.73.38.96.26.23.61.34 1.06.34s.8-.11 1.05-.34z'; break; case 'welcome-add-page': - title = 'Welcome Add Page'; path = 'M17 7V4h-2V2h-3v1H3v15h11V9h1V7h2zm-1-2v1h-2v2h-1V6h-2V5h2V3h1v2h2z'; break; case 'welcome-comments': - title = 'Welcome Comments'; path = 'M5 2h10c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2h-2l-5 5v-5H5c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2zm8.5 8.5L11 8l2.5-2.5-1-1L10 7 7.5 4.5l-1 1L9 8l-2.5 2.5 1 1L10 9l2.5 2.5z'; break; case 'welcome-learn-more': - title = 'Welcome Learn More'; path = 'M10 10L2.54 7.02 3 18H1l.48-11.41L0 6l10-4 10 4zm0-5c-.55 0-1 .22-1 .5s.45.5 1 .5 1-.22 1-.5-.45-.5-1-.5zm0 6l5.57-2.23c.71.94 1.2 2.07 1.36 3.3-.3-.04-.61-.07-.93-.07-2.55 0-4.78 1.37-6 3.41C8.78 13.37 6.55 12 4 12c-.32 0-.63.03-.93.07.16-1.23.65-2.36 1.36-3.3z'; break; case 'welcome-view-site': - title = 'Welcome View Site'; path = 'M18 14V4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h14c.55 0 1-.45 1-1zm-8-8c2.3 0 4.4 1.14 6 3-1.6 1.86-3.7 3-6 3s-4.4-1.14-6-3c1.6-1.86 3.7-3 6-3zm2 3c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm2 8h3v1H3v-1h3v-1h8v1z'; break; case 'welcome-widgets-menus': - title = 'Welcome Widgets Menus'; path = 'M19 16V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v13c0 .55.45 1 1 1h15c.55 0 1-.45 1-1zM4 4h13v4H4V4zm1 1v2h3V5H5zm4 0v2h3V5H9zm4 0v2h3V5h-3zm-8.5 5c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 10h4v1H6v-1zm6 0h5v5h-5v-5zm-7.5 2c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 12h4v1H6v-1zm7 0v2h3v-2h-3zm-8.5 2c.28 0 .5.22.5.5s-.22.5-.5.5-.5-.22-.5-.5.22-.5.5-.5zM6 14h4v1H6v-1z'; break; case 'welcome-write-blog': - title = 'Welcome Write Blog'; path = 'M16.89 1.2l1.41 1.41c.39.39.39 1.02 0 1.41L14 8.33V18H3V3h10.67l1.8-1.8c.4-.39 1.03-.4 1.42 0zm-5.66 8.48l5.37-5.36-1.42-1.42-5.36 5.37-.71 2.12z'; break; case 'wordpress-alt': - title = 'WordPress Alt'; path = 'M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z'; break; case 'wordpress': - title = 'WordPress'; path = 'M20 10c0-5.52-4.48-10-10-10S0 4.48 0 10s4.48 10 10 10 10-4.48 10-10zM10 1.01c4.97 0 8.99 4.02 8.99 8.99s-4.02 8.99-8.99 8.99S1.01 14.97 1.01 10 5.03 1.01 10 1.01zM8.01 14.82L4.96 6.61c.49-.03 1.05-.08 1.05-.08.43-.05.38-1.01-.06-.99 0 0-1.29.1-2.13.1-.15 0-.33 0-.52-.01 1.44-2.17 3.9-3.6 6.7-3.6 2.09 0 3.99.79 5.41 2.09-.6-.08-1.45.35-1.45 1.42 0 .66.38 1.22.79 1.88.31.54.5 1.22.5 2.21 0 1.34-1.27 4.48-1.27 4.48l-2.71-7.5c.48-.03.75-.16.75-.16.43-.05.38-1.1-.05-1.08 0 0-1.3.11-2.14.11-.78 0-2.11-.11-2.11-.11-.43-.02-.48 1.06-.05 1.08l.84.08 1.12 3.04zm6.02 2.15L16.64 10s.67-1.69.39-3.81c.63 1.14.94 2.42.94 3.81 0 2.96-1.56 5.58-3.94 6.97zM2.68 6.77L6.5 17.25c-2.67-1.3-4.47-4.08-4.47-7.25 0-1.16.2-2.23.65-3.23zm7.45 4.53l2.29 6.25c-.75.27-1.57.42-2.42.42-.72 0-1.41-.11-2.06-.3z'; break; case 'yes': - title = 'Yes'; path = 'M14.83 4.89l1.34.94-5.81 8.38H9.02L5.78 9.67l1.34-1.25 2.57 2.4z'; break; } @@ -998,8 +759,7 @@ export default class Dashicon extends wp.element.Component { const iconClass = [ 'dashicon', 'dashicons-' + icon, className ].filter( Boolean ).join( ' ' ); return ( - - { title ? { title } : null } + ); diff --git a/components/dashicon/test/index.js b/components/dashicon/test/index.js index 331050c3e0fa3d..ccb9dd12caa391 100644 --- a/components/dashicon/test/index.js +++ b/components/dashicon/test/index.js @@ -25,7 +25,6 @@ describe( 'Dashicon', () => { it( 'should render a SVG icon element when a matching icon is provided', () => { const dashicon = shallow( ); - expect( dashicon.find( 'title' ).text() ).to.equal( 'WordPress' ); expect( dashicon.hasClass( 'dashicon' ) ).to.be.true(); expect( dashicon.hasClass( 'dashicons-wordpress' ) ).to.be.true(); expect( dashicon.type() ).to.equal( 'svg' ); diff --git a/components/form-token-field/style.scss b/components/form-token-field/style.scss index 21dba507942310..29413b21e6b6cc 100644 --- a/components/form-token-field/style.scss +++ b/components/form-token-field/style.scss @@ -4,8 +4,9 @@ margin: 0; padding: 0; background-color: $white; + border-radius: 4px; border: 1px solid $light-gray-500; - color: $dark-gray-800; + color: $dark-gray-700; cursor: text; transition: all .15s ease-in-out; @@ -28,7 +29,7 @@ display: flex; flex-wrap: wrap; align-items: flex-start; - padding: 5px 14px 5px 0; + padding: 4px; } // Token input @@ -37,13 +38,13 @@ input[type="text"].components-form-token-field__input { width: auto; max-width: 100%; margin: 2px 0 2px 8px; - padding: 0 0 0 6px; + padding: 0; line-height: 24px; background: inherit; border: 0; outline: none; font-family: inherit; - font-size: 14px; + font-size: $default-font-size; color: $dark-gray-800; box-shadow: none; @@ -54,10 +55,10 @@ input[type="text"].components-form-token-field__input { // Tokens .components-form-token-field__token { - font-size: 14px; + font-size: $default-font-size; display: flex; - margin: 2px 0 2px 8px; - color: $white; + margin: 2px 4px 2px 0; + color: $dark-gray-700; overflow: hidden; &.is-success { @@ -127,32 +128,31 @@ input[type="text"].components-form-token-field__input { } .components-form-token-field__token-text, -.components-form-token-field__remove-token { +.components-form-token-field__remove-token.components-icon-button { display: inline-block; line-height: 24px; - background: $dark-gray-500; + background: $light-gray-500; transition: all .2s cubic-bezier( .4, 1, .4, 1 ); } .components-form-token-field__token-text { - border-radius: 4px 0 0 4px; - padding: 0 4px 0 6px; + border-radius: 12px 0 0 12px; + padding: 0 4px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.components-form-token-field__remove-token { +.components-form-token-field__remove-token.components-icon-button { cursor: pointer; - border-radius: 0 4px 4px 0; + border-radius: 0 12px 12px 0; padding: 0 2px; font-size: 10px; - color: $light-gray-500; + color: $dark-gray-500; line-height: 10px; &:hover { - color: white; - background: $dark-gray-600; + color: $dark-gray-700; } } diff --git a/components/form-token-field/token.js b/components/form-token-field/token.js index f42d46cb0759d4..e16734d413435d 100644 --- a/components/form-token-field/token.js +++ b/components/form-token-field/token.js @@ -43,7 +43,7 @@ function Token( { diff --git a/components/index.js b/components/index.js index 1582340f6b380e..ea4e2e69515ac1 100644 --- a/components/index.js +++ b/components/index.js @@ -1,6 +1,8 @@ export { default as Button } from './button'; +export { default as ClipboardButton } from './clipboard-button'; export { default as Dashicon } from './dashicon'; export { default as FormToggle } from './form-toggle'; +export { default as FormTokenField } from './form-token-field'; export { default as HtmlEmbed } from './html-embed'; export { default as IconButton } from './icon-button'; export { default as Panel } from './panel'; diff --git a/components/panel/test/body.js b/components/panel/test/body.js index acd3bf7a26556d..4b70414e380f1d 100644 --- a/components/panel/test/body.js +++ b/components/panel/test/body.js @@ -7,7 +7,7 @@ import { shallow, mount } from 'enzyme'; /** * Internal dependencies */ -import PanelBody from '../body.js'; +import PanelBody from '../body'; describe( 'PanelBody', () => { describe( 'basic rendering', () => { diff --git a/components/story/index.js b/components/story/index.js new file mode 100644 index 00000000000000..906b7644865bf2 --- /dev/null +++ b/components/story/index.js @@ -0,0 +1,15 @@ +/** + * External dependencies + */ +import ReactMarkdown from 'react-markdown'; +import { storiesOf } from '@storybook/react'; +import { withKnobs } from '@storybook/addon-knobs'; + +/** + * Internal dependencies + */ +import readme from '../README.md'; + +storiesOf( 'Components', module ) + .addDecorator( withKnobs ) + .add( 'Welcome', () => ); diff --git a/components/toolbar/index.js b/components/toolbar/index.js index 785c11336b5480..cd11837875e7e7 100644 --- a/components/toolbar/index.js +++ b/components/toolbar/index.js @@ -28,6 +28,7 @@ function Toolbar( { controls, focus } ) { } } className={ classNames( 'components-toolbar__control', { 'is-active': control.isActive, + 'left-divider': control.leftDivider, } ) } aria-pressed={ control.isActive } focus={ focus && ! index } diff --git a/components/toolbar/style.scss b/components/toolbar/style.scss index b2f35f25e27c1a..d5103c88ab8358 100644 --- a/components/toolbar/style.scss +++ b/components/toolbar/style.scss @@ -64,6 +64,24 @@ // compensate for making the button hit area include the visual spacing .components-toolbar__control.components-button + .components-toolbar__control.components-button { margin-left: -3px; + + &.left-divider { + margin-left: 6px; + position: relative; + overflow: visible; + } + + &.left-divider:before { + display: inline-block; + content: ''; + box-sizing: content-box; + background-color: $light-gray-500; + position: absolute; + top: 8px; + left: -3px; + width: 1px; + height: $icon-button-size - 16px; + } } .components-toolbar__control .dashicon { diff --git a/composer.json b/composer.json new file mode 100644 index 00000000000000..6634332cbd38bf --- /dev/null +++ b/composer.json @@ -0,0 +1,11 @@ +{ + "require-dev": { + "squizlabs/php_codesniffer": "2.9.x", + "wp-coding-standards/wpcs": "^0.11.0" + }, + "scripts": { + "post-install-cmd": [ + "phpcs --config-set installed_paths ../../wp-coding-standards/wpcs/" + ] + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 00000000000000..1739cdc97a899a --- /dev/null +++ b/composer.lock @@ -0,0 +1,132 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "1a5dd686e18346fa4dbc564b7b90f4a1", + "packages": [], + "packages-dev": [ + { + "name": "squizlabs/php_codesniffer", + "version": "2.9.1", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", + "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2017-05-22T02:43:20+00:00" + }, + { + "name": "wp-coding-standards/wpcs", + "version": "0.11.0", + "source": { + "type": "git", + "url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git", + "reference": "407e4b85f547a5251185f89ceae6599917343388" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/407e4b85f547a5251185f89ceae6599917343388", + "reference": "407e4b85f547a5251185f89ceae6599917343388", + "shasum": "" + }, + "require": { + "squizlabs/php_codesniffer": "^2.8.1" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", + "keywords": [ + "phpcs", + "standards", + "wordpress" + ], + "time": "2017-03-20T23:17:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/docs/coding-guidelines.md b/docs/coding-guidelines.md index d52c747d43c047..3bc74b444c4ce0 100644 --- a/docs/coding-guidelines.md +++ b/docs/coding-guidelines.md @@ -92,28 +92,7 @@ When making any changes to the PHP code in this project, it's recommended to install and run `phpcs` on your computer. This is a step in our Travis CI build as well, but it is better to catch errors locally. -You will need to install `phpcs` version 2.9.x, because the 3.x versions are -not yet compatible with the WordPress coding standards. For more information see -[this issue](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/718). - -The easiest way to get `phpcs` is to download the .phar archive from the latest -2.9.x release on GitHub: -[PHP\_CodeSniffer releases](https://github.com/squizlabs/PHP_CodeSniffer/releases). - -For example: - -```sh -wget \ - https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.1/phpcs.phar \ - -O ~/bin/phpcs -chmod +x ~/bin/phpcs -``` - -(If `~/bin` is not in your `$PATH`, pick another directory that is.) - -Then you must install the `WordPress-Coding-Standards` repository and tell -`phpcs` where it lives. See instructions here: - -https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards#standalone - -You should now be able to run `phpcs` from the root directory of this project. +The easiest way to do this is using `composer`. +[Install `composer`](https://getcomposer.org/download/) +on your computer, then run `composer install`. This will install `phpcs` and +`WordPress-Coding-Standards` which you can the run via `vendor/bin/phpcs`. diff --git a/editor/actions.js b/editor/actions.js index 31387abc78b6c3..8370b357e9e0d8 100644 --- a/editor/actions.js +++ b/editor/actions.js @@ -14,6 +14,12 @@ export function deselectBlock( uid ) { }; } +export function clearSelectedBlock() { + return { + type: 'CLEAR_SELECTED_BLOCK', + }; +} + export function replaceBlocks( uids, blocks ) { return { type: 'REPLACE_BLOCKS', @@ -50,11 +56,9 @@ export function editPost( edits ) { }; } -export function savePost( postId, edits ) { +export function savePost() { return { type: 'REQUEST_POST_UPDATE', - edits, - postId, }; } diff --git a/editor/assets/stylesheets/_animations.scss b/editor/assets/stylesheets/_animations.scss index 903917b3ad2850..11355edd884adf 100644 --- a/editor/assets/stylesheets/_animations.scss +++ b/editor/assets/stylesheets/_animations.scss @@ -13,3 +13,18 @@ transform: translateY( 0px ); } } + + +@mixin move_background { + background-size: 28px 28px; + animation: move_background .5s linear infinite; +} + +@keyframes move_background { + from { + background-position: 0 0; + } + to { + background-position: 28px 0; + } +} diff --git a/editor/assets/stylesheets/_mixins.scss b/editor/assets/stylesheets/_mixins.scss index 79084dc57dc1cf..425d35f749296b 100644 --- a/editor/assets/stylesheets/_mixins.scss +++ b/editor/assets/stylesheets/_mixins.scss @@ -34,12 +34,13 @@ } } -// ========================================================================== -// Long content fade mixin -// -// Creates a fading overlay to signify that the content is longer -// than the space allows. -// ========================================================================== +/** + * Long content fade mixin + * + * Creates a fading overlay to signify that the content is longer + * than the space allows. + */ + @mixin long-content-fade( $direction: right, $size: 20%, $color: #fff, $edge: 0px, $z-index: false) { content: ''; display: block; @@ -94,3 +95,16 @@ height: auto; } } + +/** + * Editor Width mixin + * + * This mixin seeks to take the vinegar out of the responsive alignments in the editor. + */ + +@mixin editor-width( $width ) { + @media ( min-width: #{ ( $width ) } ) { + @content; + } +} +$float-margin: calc( 50% - #{ $visual-editor-max-width / 2 } ); diff --git a/editor/assets/stylesheets/_variables.scss b/editor/assets/stylesheets/_variables.scss index cc4093fa55d14d..725d0850ebf3b9 100644 --- a/editor/assets/stylesheets/_variables.scss +++ b/editor/assets/stylesheets/_variables.scss @@ -58,13 +58,15 @@ $text-editor-max-width: 760px; /* Editor */ $text-editor-max-width: 760px; -$visual-editor-max-width: 700px; +$visual-editor-max-width: 636px; // previously 700 $block-controls-height: 38px; $icon-button-size: 36px; /* Blocks */ $block-padding: 14px; $block-mover-margin: 18px; +$block-mover-padding-hidden: 10px; +$block-mover-padding-visible: 32px; /* Media Queries */ diff --git a/editor/assets/stylesheets/main.scss b/editor/assets/stylesheets/main.scss index 0f86e94064f95d..2ae6ac547f49ac 100644 --- a/editor/assets/stylesheets/main.scss +++ b/editor/assets/stylesheets/main.scss @@ -1,4 +1,5 @@ -body.toplevel_page_gutenberg { +body.toplevel_page_gutenberg, +body.gutenberg_page_gutenberg-demo { background: $white; #update-nag, .update-nag { diff --git a/editor/block-mover/index.js b/editor/block-mover/index.js index f040d2394a67f2..fd57c070c1ac2c 100644 --- a/editor/block-mover/index.js +++ b/editor/block-mover/index.js @@ -8,31 +8,48 @@ import { first, last } from 'lodash'; * WordPress dependencies */ import { IconButton } from 'components'; +import { getBlockType } from 'blocks'; /** * Internal dependencies */ import './style.scss'; -import { isFirstBlock, isLastBlock } from '../selectors'; +import { isFirstBlock, isLastBlock, getBlockIndex, getBlock } from '../selectors'; +import { getBlockMoverLabel } from './mover-label'; -function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast } ) { +function BlockMover( { onMoveUp, onMoveDown, isFirst, isLast, uids, blockType, firstIndex } ) { // We emulate a disabled state because forcefully applying the `disabled` // attribute on the button while it has focus causes the screen to change // to an unfocused state (body as active element) without firing blur on, // the rendering parent, leaving it unable to react to focus out. - return (
    @@ -43,6 +60,8 @@ export default connect( ( state, ownProps ) => ( { isFirst: isFirstBlock( state, first( ownProps.uids ) ), isLast: isLastBlock( state, last( ownProps.uids ) ), + firstIndex: getBlockIndex( state, first( ownProps.uids ) ), + blockType: getBlockType( getBlock( state, first( ownProps.uids ) ).name ), } ), ( dispatch, ownProps ) => ( { onMoveDown() { diff --git a/editor/block-mover/mover-label.js b/editor/block-mover/mover-label.js new file mode 100644 index 00000000000000..65db9b512213a3 --- /dev/null +++ b/editor/block-mover/mover-label.js @@ -0,0 +1,109 @@ +/** + * Wordpress dependencies + */ +import { __, sprintf } from 'i18n'; + +/** + * Return a label for the block movement controls depending on block position. + * + * @param {number} selectedCount Number of blocks selected. + * @param {string} type Block type - in the case of a single block, should + * define its 'type'. I.e. 'Text', 'Heading', 'Image' etc. + * @param {number} firstIndex The index (position - 1) of the first block selected. + * @param {boolean} isFirst This is the first block. + * @param {boolean} isLast This is the last block. + * @param {number} dir Direction of movement (> 0 is considered to be going + * down, < 0 is up). + * @return {string} Label for the block movement controls. + */ +export function getBlockMoverLabel( selectedCount, type, firstIndex, isFirst, isLast, dir ) { + const position = ( firstIndex + 1 ); + + if ( selectedCount > 1 ) { + return getMultiBlockMoverLabel( selectedCount, firstIndex, isFirst, isLast, dir ); + } + + if ( isFirst && isLast ) { + // translators: %s: Type of block (i.e. Text, Image etc) + return sprintf( __( 'Block "%s" is the only block, and cannot be moved' ), type ); + } + + if ( dir > 0 && ! isLast ) { + // moving down + return sprintf( + __( 'Move "%(type)s" block from position %(position)d down to position %(newPosition)d' ), + { + type, + position, + newPosition: ( position + 1 ), + } + ); + } + + if ( dir > 0 && isLast ) { + // moving down, and is the last item + // translators: %s: Type of block (i.e. Text, Image etc) + return sprintf( __( 'Block "%s" is at the end of the content and can’t be moved down' ), type ); + } + + if ( dir < 0 && ! isFirst ) { + // moving up + return sprintf( + __( 'Move "%(type)s" block from position %(position)d up to position %(newPosition)d' ), + { + type, + position, + newPosition: ( position - 1 ), + } + ); + } + + if ( dir < 0 && isFirst ) { + // moving up, and is the first item + // translators: %s: Type of block (i.e. Text, Image etc) + return sprintf( __( 'Block "%s" is at the beginning of the content and can’t be moved up' ), type ); + } +} + +/** + * Return a label for the block movement controls depending on block position. + * + * @param {number} selectedCount Number of blocks selected. + * @param {number} firstIndex The index (position - 1) of the first block selected. + * @param {boolean} isFirst This is the first block. + * @param {boolean} isLast This is the last block. + * @param {number} dir Direction of movement (> 0 is considered to be going + * down, < 0 is up). + * @return {string} Label for the block movement controls. + */ +export function getMultiBlockMoverLabel( selectedCount, firstIndex, isFirst, isLast, dir ) { + const position = ( firstIndex + 1 ); + + if ( dir < 0 && isFirst ) { + return __( 'Blocks cannot be moved up as they are already at the top' ); + } + + if ( dir > 0 && isLast ) { + return __( 'Blocks cannot be moved down as they are already at the bottom' ); + } + + if ( dir < 0 && ! isFirst ) { + return sprintf( + __( 'Move %(selectedCount)d blocks from position %(position)d up by one place' ), + { + selectedCount, + position, + } + ); + } + + if ( dir > 0 && ! isLast ) { + return sprintf( + __( 'Move %(selectedCount)d blocks from position %(position)s down by one place' ), + { + selectedCount, + position, + } + ); + } +} diff --git a/editor/block-mover/style.scss b/editor/block-mover/style.scss index fc05da1d3fceb9..08ccb61f7635dd 100644 --- a/editor/block-mover/style.scss +++ b/editor/block-mover/style.scss @@ -1,7 +1,7 @@ .editor-block-mover { position: absolute; top: 10px; - left: 0; + left: -$block-mover-padding-visible; } .editor-block-mover__control { diff --git a/editor/block-mover/test/mover-label.js b/editor/block-mover/test/mover-label.js new file mode 100644 index 00000000000000..354ab70dfb3413 --- /dev/null +++ b/editor/block-mover/test/mover-label.js @@ -0,0 +1,133 @@ +/** + * External dependencies + */ +import { expect } from 'chai'; + +/** + * Internal dependencies + */ +import { getBlockMoverLabel, getMultiBlockMoverLabel } from '../mover-label'; + +describe( 'block mover', () => { + const dirUp = -1, + dirDown = 1; + + describe( 'getBlockMoverLabel', () => { + const type = 'TestType'; + + it( 'Should generate a title for the first item moving up', () => { + expect( getBlockMoverLabel( + 1, + type, + 0, + true, + false, + dirUp, + ) ).to.equal( + `Block "${ type }" is at the beginning of the content and can’t be moved up` + ); + } ); + + it( 'Should generate a title for the last item moving down', () => { + expect( getBlockMoverLabel( + 1, + type, + 3, + false, + true, + dirDown, + ) ).to.equal( + `Block "${ type }" is at the end of the content and can’t be moved down` + ); + } ); + + it( 'Should generate a title for the second item moving up', () => { + expect( getBlockMoverLabel( + 1, + type, + 1, + false, + false, + dirUp, + ) ).to.equal( + `Move "${ type }" block from position 2 up to position 1` + ); + } ); + + it( 'Should generate a title for the second item moving down', () => { + expect( getBlockMoverLabel( + 1, + type, + 1, + false, + false, + dirDown, + ) ).to.equal( + `Move "${ type }" block from position 2 down to position 3` + ); + } ); + + it( 'Should generate a title for the only item in the list', () => { + expect( getBlockMoverLabel( + 1, + type, + 0, + true, + true, + dirDown, + ) ).to.equal( + `Block "${ type }" is the only block, and cannot be moved` + ); + } ); + } ); + + describe( 'getMultiBlockMoverLabel', () => { + it( 'Should generate a title moving multiple blocks up', () => { + expect( getMultiBlockMoverLabel( + 4, + 1, + false, + true, + dirUp, + ) ).to.equal( + 'Move 4 blocks from position 2 up by one place' + ); + } ); + + it( 'Should generate a title moving multiple blocks down', () => { + expect( getMultiBlockMoverLabel( + 4, + 0, + true, + false, + dirDown, + ) ).to.equal( + 'Move 4 blocks from position 1 down by one place' + ); + } ); + + it( 'Should generate a title for a selection of blocks at the top', () => { + expect( getMultiBlockMoverLabel( + 4, + 1, + true, + true, + dirUp, + ) ).to.equal( + 'Blocks cannot be moved up as they are already at the top' + ); + } ); + + it( 'Should generate a title for a selection of blocks at the bottom', () => { + expect( getMultiBlockMoverLabel( + 4, + 2, + false, + true, + dirDown, + ) ).to.equal( + 'Blocks cannot be moved down as they are already at the bottom' + ); + } ); + } ); +} ); diff --git a/editor/block-switcher/style.scss b/editor/block-switcher/style.scss index 322a69a66200d7..cade93664e0edd 100644 --- a/editor/block-switcher/style.scss +++ b/editor/block-switcher/style.scss @@ -2,10 +2,14 @@ border: 1px solid $light-gray-500; box-shadow: $shadow-popover; background-color: $white; - margin-right: 10px; font-family: $default-font; font-size: $default-font-size; line-height: $default-line-height; + margin-right: -1px; + + @include break-small() { + margin-right: $item-spacing; + } } .editor-block-switcher__toggle { diff --git a/editor/effects.js b/editor/effects.js index 153bc11ffca5d7..797523f389fa38 100644 --- a/editor/effects.js +++ b/editor/effects.js @@ -6,7 +6,7 @@ import { get } from 'lodash'; /** * WordPress dependencies */ -import { getBlockType, switchToBlockType } from 'blocks'; +import { serialize, getBlockType, switchToBlockType } from 'blocks'; import { __ } from 'i18n'; /** @@ -14,14 +14,25 @@ import { __ } from 'i18n'; */ import { getGutenbergURL, getWPAdminURL } from './utils/url'; import { focusBlock, replaceBlocks } from './actions'; +import { getCurrentPostId, getBlocks, getPostEdits } from './selectors'; export default { REQUEST_POST_UPDATE( action, store ) { - const { dispatch } = store; - const { postId, edits } = action; + const { dispatch, getState } = store; + const state = getState(); + const postId = getCurrentPostId( state ); const isNew = ! postId; - const toSend = postId ? { id: postId, ...edits } : edits; + const edits = getPostEdits( state ); + const toSend = { + ...edits, + content: serialize( getBlocks( state ) ), + }; + if ( ! isNew ) { + toSend.id = postId; + } + + dispatch( { type: 'CLEAR_POST_EDITS' } ); new wp.api.models.Post( toSend ).save().done( ( newPost ) => { dispatch( { type: 'REQUEST_POST_UPDATE_SUCCESS', @@ -36,7 +47,6 @@ export default { message: __( 'An unknown error occurred.' ), } ), edits, - isNew, } ); } ); }, diff --git a/editor/header/index.js b/editor/header/index.js index ec60075fae70be..f9180ba99a3d0e 100644 --- a/editor/header/index.js +++ b/editor/header/index.js @@ -17,6 +17,7 @@ import ModeSwitcher from './mode-switcher'; import SavedState from './saved-state'; import Tools from './tools'; import { getSelectedBlocks } from '../selectors'; +import { clearSelectedBlock } from '../actions'; function Header( { selectedBlocks, onRemove, onDeselect } ) { const count = selectedBlocks.length; @@ -62,9 +63,7 @@ export default connect( selectedBlocks: getSelectedBlocks( state ), } ), ( dispatch ) => ( { - onDeselect: () => dispatch( { - type: 'CLEAR_SELECTED_BLOCK', - } ), + onDeselect: () => dispatch( clearSelectedBlock() ), onRemove: ( uids ) => dispatch( { type: 'REMOVE_BLOCKS', uids, diff --git a/editor/header/saved-state/index.js b/editor/header/saved-state/index.js index 27fd0e32d6e48c..b8ed533d4a5913 100644 --- a/editor/header/saved-state/index.js +++ b/editor/header/saved-state/index.js @@ -2,51 +2,68 @@ * External dependencies */ import { connect } from 'react-redux'; -import classNames from 'classnames'; +import classnames from 'classnames'; /** * WordPress dependencies */ -import { Dashicon } from 'components'; +import { __ } from 'i18n'; +import { Dashicon, Button } from 'components'; /** * Internal dependencies */ import './style.scss'; -import { isEditedPostNew, isEditedPostDirty } from '../../selectors'; +import { editPost, savePost } from '../../actions'; +import { + isEditedPostNew, + isEditedPostDirty, + isSavingPost, + getCurrentPost, + getEditedPostAttribute, +} from '../../selectors'; -function SavedState( { isNew, isDirty } ) { - const classes = classNames( 'editor-saved-state', { - 'is-new': isNew, - 'is-dirty': isDirty, - } ); +function SavedState( { isNew, isDirty, isSaving, status, onStatusChange, onSave } ) { + const className = 'editor-saved-state'; - let icon, text; - if ( isNew && isDirty ) { - icon = 'warning'; - text = wp.i18n.__( 'New post with changes' ); - } else if ( isNew ) { - icon = 'edit'; - text = wp.i18n.__( 'New post' ); - } else if ( isDirty ) { - icon = 'warning'; - text = wp.i18n.__( 'Unsaved changes' ); - } else { - icon = 'saved'; - text = wp.i18n.__( 'Saved' ); + if ( isSaving ) { + return ( + + { __( 'Saving' ) } + + ); } + if ( ! isNew && ! isDirty ) { + return ( + + + { __( 'Saved' ) } + + ); + } + + const onClick = () => { + onStatusChange( status || 'draft' ); + onSave(); + }; return ( -
    - - { text } -
    + ); } export default connect( ( state ) => ( { + post: getCurrentPost( state ), isNew: isEditedPostNew( state ), isDirty: isEditedPostDirty( state ), - } ) + isSaving: isSavingPost( state ), + status: getEditedPostAttribute( state, 'status' ), + } ), + { + onStatusChange: ( status ) => editPost( { status } ), + onSave: savePost, + } )( SavedState ); diff --git a/editor/header/saved-state/style.scss b/editor/header/saved-state/style.scss index 93e1abffa46d0b..4727e4cc631c8a 100644 --- a/editor/header/saved-state/style.scss +++ b/editor/header/saved-state/style.scss @@ -7,4 +7,18 @@ .dashicon { margin-right: 4px; } + + &.button-link { + text-decoration: underline; + color: $blue-wordpress; + + &:focus { + box-shadow: none; + outline: none; + } + + &:hover { + color: $blue-medium-500; + } + } } diff --git a/editor/header/style.scss b/editor/header/style.scss index 3d60028847719e..6251ba5dae434b 100644 --- a/editor/header/style.scss +++ b/editor/header/style.scss @@ -7,11 +7,14 @@ flex-direction: row; align-items: center; z-index: z-index( '.editor-header' ); - top: $admin-bar-height-big; left: 0; right: 0; + top: 0; + position: sticky; + @include break-small() { + top: $admin-bar-height-big; position: fixed; } diff --git a/editor/header/tools/publish-button.js b/editor/header/tools/publish-button.js index a424c2358ed7c4..48cdfd0699ee92 100644 --- a/editor/header/tools/publish-button.js +++ b/editor/header/tools/publish-button.js @@ -2,6 +2,7 @@ * External dependencies */ import { connect } from 'react-redux'; +import classnames from 'classnames'; /** * WordPress dependencies @@ -11,49 +12,44 @@ import { Button } from 'components'; /** * Internal dependencies */ -import { savePost } from '../../actions'; +import { editPost, savePost } from '../../actions'; import { - isEditedPostDirty, - getCurrentPost, - getPostEdits, - getBlocks, isSavingPost, - didPostSaveRequestSucceed, - didPostSaveRequestFail, - isSavingNewPost, + isEditedPostPublished, + isEditedPostBeingScheduled, + getEditedPostVisibility, + isEditedPostPublishable, } from '../../selectors'; function PublishButton( { - post, - edits, - dirty, - blocks, - isSuccessful, - isRequesting, - isError, - requestIsNewPost, + isSaving, + isPublished, + onStatusChange, onSave, + isBeingScheduled, + visibility, + isPublishable, } ) { - const buttonEnabled = ! isRequesting; - + const buttonEnabled = ! isSaving && isPublishable; let buttonText; - if ( isRequesting ) { - buttonText = requestIsNewPost - ? wp.i18n.__( 'Saving…' ) - : wp.i18n.__( 'Updating…' ); - } else if ( ! dirty && isSuccessful ) { - buttonText = requestIsNewPost - ? wp.i18n.__( 'Saved!' ) - : wp.i18n.__( 'Updated!' ); - } else if ( ! dirty && isError ) { - buttonText = requestIsNewPost - ? wp.i18n.__( 'Save failed' ) - : wp.i18n.__( 'Update failed' ); - } else if ( post && post.id ) { + if ( isPublished ) { buttonText = wp.i18n.__( 'Update' ); + } else if ( isBeingScheduled ) { + buttonText = wp.i18n.__( 'Schedule' ); } else { - buttonText = wp.i18n.__( 'Save draft' ); + buttonText = wp.i18n.__( 'Publish' ); + } + let publishStatus = 'publish'; + if ( isBeingScheduled ) { + publishStatus = 'future'; + } else if ( visibility === 'private' ) { + publishStatus = 'private'; } + const className = classnames( 'editor-tools__publish-button', { 'is-saving': isSaving } ); + const onClick = () => { + onStatusChange( publishStatus ); + onSave(); + }; const buttonDisabledHint = process.env.NODE_ENV === 'production' ? wp.i18n.__( 'The Save button is disabled during early alpha releases.' ) @@ -63,9 +59,10 @@ function PublishButton( { @@ -74,21 +71,14 @@ function PublishButton( { export default connect( ( state ) => ( { - post: getCurrentPost( state ), - edits: getPostEdits( state ), - dirty: isEditedPostDirty( state ), - blocks: getBlocks( state ), - isRequesting: isSavingPost( state ), - isSuccessful: didPostSaveRequestSucceed( state ), - isError: !! didPostSaveRequestFail( state ), - requestIsNewPost: isSavingNewPost( state ), + isSaving: isSavingPost( state ), + isPublished: isEditedPostPublished( state ), + isBeingScheduled: isEditedPostBeingScheduled( state ), + visibility: getEditedPostVisibility( state ), + isPublishable: isEditedPostPublishable( state ), } ), - ( dispatch ) => ( { - onSave( post, edits, blocks ) { - dispatch( savePost( post.id, { - content: wp.blocks.serialize( blocks ), - ...edits, - } ) ); - }, - } ) + { + onStatusChange: ( status ) => editPost( { status } ), + onSave: savePost, + } )( PublishButton ); diff --git a/editor/header/tools/style.scss b/editor/header/tools/style.scss index de9300e3c95dd2..1567e18e1da578 100644 --- a/editor/header/tools/style.scss +++ b/editor/header/tools/style.scss @@ -75,3 +75,34 @@ } } } + +.editor-tools__publish-button.is-saving, +.editor-tools__publish-button.is-saving:disabled { + position: relative; + + // These styles overrides the disabled state with the button primary styles + background: none !important; + border-color: #0073aa #006799 #006799 !important; + box-shadow: 0 1px 0 #006799 !important; + color: #fff !important; + text-decoration: none !important; + text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799 !important; + opacity: 1; + // End of the overriding + + &:hover { + background: none; + } + + &:before { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + content: ''; + background-image: repeating-linear-gradient( -45deg, $blue-wordpress-700, $blue-wordpress-700 11px, $blue-wordpress 10px, $blue-wordpress 20px ); + z-index: -1; + @include move_background; + } +} diff --git a/editor/index.js b/editor/index.js index 7dc82d38a5e84d..38e22dbbd97d1b 100644 --- a/editor/index.js +++ b/editor/index.js @@ -4,6 +4,13 @@ import { Provider as ReduxProvider } from 'react-redux'; import { Provider as SlotFillProvider } from 'react-slot-fill'; import { omit } from 'lodash'; +import moment from 'moment-timezone'; +import 'moment-timezone/moment-timezone-utils'; + +/** + * WordPress dependencies + */ +import { settings } from 'date'; /** * Internal dependencies @@ -12,14 +19,33 @@ import './assets/stylesheets/main.scss'; import Layout from './layout'; import { createReduxStore } from './state'; +// Configure moment globally +moment.locale( settings.l10n.locale ); +if ( settings.timezone.string ) { + moment.tz.setDefault( settings.timezone.string ); +} else { + const momentTimezone = { + name: 'WP', + abbrs: [ 'WP' ], + untils: [ null ], + offsets: [ -settings.timezone.offset * 60 ], + }; + const unpackedTimezone = moment.tz.pack( momentTimezone ); + moment.tz.add( unpackedTimezone ); + moment.tz.setDefault( 'WP' ); +} + /** - * Initializes and returns an instance of Editor. + * Initializes Redux state with bootstrapped post, if provided. * - * @param {String} id Unique identifier for editor instance - * @param {Object} post API entity for post to edit + * @param {Redux.Store} store Redux store instance + * @param {?Object} post Bootstrapped post object */ -export function createEditorInstance( id, post ) { - const store = createReduxStore(); +function preparePostState( store, post ) { + if ( ! post ) { + return; + } + store.dispatch( { type: 'RESET_BLOCKS', post, @@ -39,6 +65,18 @@ export function createEditorInstance( id, post ) { }, } ); } +} + +/** + * Initializes and returns an instance of Editor. + * + * @param {String} id Unique identifier for editor instance + * @param {Object} post API entity for post to edit + */ +export function createEditorInstance( id, post ) { + const store = createReduxStore(); + + preparePostState( store, post ); wp.element.render( diff --git a/editor/modes/text-editor/style.scss b/editor/modes/text-editor/style.scss index 952b97c80b5476..f82ac3201363fa 100644 --- a/editor/modes/text-editor/style.scss +++ b/editor/modes/text-editor/style.scss @@ -3,8 +3,13 @@ border-bottom: 1px solid $light-gray-500; min-height: $admin-sidebar-width-collapsed; top: $admin-bar-height-big + $header-height; - left: 0; - right: 0; + + @include break-medium() { + top: $admin-bar-height + $header-height; + } + + margin-left: -20px; + margin-right: -20px; display: flex; flex-direction: row; flex-wrap: wrap; @@ -35,8 +40,31 @@ } @include break-small() { + left: 0px; + right: 0px; + margin-left: 0; + margin-right: 0; position: fixed; } + + .auto-fold.sticky-menu &, + .auto-fold & { + @include break-medium() { + left: $admin-sidebar-width-collapsed; + } + + @include break-large() { + left: $admin-sidebar-width; + } + } + + .folded & { + left: $admin-sidebar-width-collapsed; + } + + .sticky-menu & { + left: $admin-sidebar-width; + } } .editor-text-editor__formatting .editor-text-editor__bold { @@ -56,21 +84,6 @@ text-decoration:line-through; } -.auto-fold .editor-text-editor__formatting { - @include break-medium() { - left: $admin-sidebar-width-collapsed; - top: $admin-bar-height + $header-height; - } - - @include break-large() { - left: $admin-sidebar-width; - } -} - -.folded .editor-text-editor__formatting { - left: $admin-sidebar-width-collapsed; -} - .editor-text-editor__body { padding-top: 40px; diff --git a/editor/modes/visual-editor/block.js b/editor/modes/visual-editor/block.js index 1bba881de5602b..390e870a973edc 100644 --- a/editor/modes/visual-editor/block.js +++ b/editor/modes/visual-editor/block.js @@ -23,6 +23,7 @@ import { focusBlock, mergeBlocks, insertBlock, + clearSelectedBlock, } from '../../actions'; import { getPreviousBlock, @@ -52,6 +53,10 @@ class VisualEditorBlock extends wp.element.Component { this.maybeStartTyping = this.maybeStartTyping.bind( this ); this.removeOrDeselect = this.removeOrDeselect.bind( this ); this.mergeBlocks = this.mergeBlocks.bind( this ); + this.onFocus = this.onFocus.bind( this ); + this.onPointerDown = this.onPointerDown.bind( this ); + this.onPointerMove = this.onPointerMove.bind( this ); + this.onPointerUp = this.onPointerUp.bind( this ); this.previousOffset = null; } @@ -171,6 +176,25 @@ class VisualEditorBlock extends wp.element.Component { } } + onFocus( event ) { + if ( event.target === this.node ) { + this.props.onSelect(); + } + } + + onPointerDown() { + this.props.onSelectionStart(); + } + + onPointerMove() { + this.props.onSelectionChange(); + this.maybeHover(); + } + + onPointerUp() { + this.props.onSelectionEnd(); + } + render() { const { block, selectedBlocks } = this.props; const blockType = wp.blocks.getBlockType( block.name ); @@ -199,7 +223,7 @@ class VisualEditorBlock extends wp.element.Component { 'is-hovered': isHovered, } ); - const { onSelect, onMouseLeave, onFocus, onInsertAfter } = this.props; + const { onMouseLeave, onFocus, onInsertAfter } = this.props; // Determine whether the block has props to apply to the wrapper. let wrapperProps; @@ -213,15 +237,13 @@ class VisualEditorBlock extends wp.element.Component {
    { - this.props.onSelectionChange(); - this.maybeHover(); - } } - onTouchMove={ this.props.onSelectionChange } - onMouseUp={ this.props.onSelectionEnd } - onTouchEnd={ this.props.onSelectionEnd } + onFocus={ this.onFocus } + onMouseDown={ this.onPointerDown } + onTouchStart={ this.onPointerDown } + onMouseMove={ this.onPointerMove } + onTouchMove={ this.onPointerMove } + onMouseUp={ this.onPointerUp } + onTouchEnd={ this.onPointerUp } onMouseEnter={ this.maybeHover } onMouseLeave={ onMouseLeave } className={ className } @@ -258,8 +280,8 @@ class VisualEditorBlock extends wp.element.Component { ) }
    event.preventDefault() } + onMouseDown={ this.props.onSelect } > ( { - clearSelectedBlock() { - dispatch( { type: 'CLEAR_SELECTED_BLOCK' } ); - }, - } ) + { clearSelectedBlock } )( VisualEditor ); diff --git a/editor/modes/visual-editor/style.scss b/editor/modes/visual-editor/style.scss index ff1a0a3da33d34..3f6239ff023750 100644 --- a/editor/modes/visual-editor/style.scss +++ b/editor/modes/visual-editor/style.scss @@ -1,6 +1,6 @@ .editor-visual-editor { margin: 0 auto; - padding: 50px 10px; /* Floating up/down arrows invisible */ + padding: 50px 0; // Floating up/down arrows invisible &, & p { @@ -10,26 +10,25 @@ } @include break-small() { - padding: 50px 0 50px #{ $block-padding + $block-mover-margin }; /* Floating up/down appear, also compensate for mover */ + padding: 50px 0; } @include break-large() { - padding: 60px 0 60px #{ $block-padding + $block-mover-margin }; /* Compensate for mover on the left side */ + padding: 60px 0; } } -/* "Hassle-free full bleed" from CSS Tricks */ -.editor-visual-editor > *:not( [data-align="wide"] ) { - max-width: $visual-editor-max-width; +.editor-visual-editor { margin-left: auto; margin-right: auto; } .editor-visual-editor__block { + margin-left: auto; + margin-right: auto; + max-width: $visual-editor-max-width; position: relative; - left: -#{ $block-padding + $block-mover-margin }; /* Make room for the mover */ - padding: $block-padding $block-padding $block-padding #{ $block-padding * 2 + $block-mover-margin }; /* Compensate for mover */ - margin-right: #{ $block-padding + $block-mover-margin }; + padding: $block-padding; transition: 0.2s border-color; &:before { @@ -38,7 +37,7 @@ position: absolute; top: 0; bottom: 0; - left: #{ $block-padding + $block-mover-margin }; /* Compensate for mover */ + left: 0; right: 0; border: 2px solid transparent; transition: 0.2s border-color; @@ -78,6 +77,117 @@ &.is-selected .iframe-overlay:before { display: none; } + + // Alignments + &[data-align="left"], + &[data-align="right"] { + // Without z-index, won't be clickable as "above" adjacent content + z-index: z-index( '.editor-visual-editor__block {core/image aligned left or right}' ); + max-width: 370px; + + .editor-block-mover { + display: none; + } + } + + &[data-align="left"] { + float: left; + + // mobile, and no sidebars + margin-right: $block-padding; + + // sidebar (folded) + .auto-fold .editor-layout:not( .is-sidebar-opened ) & { + @include editor-width( $admin-sidebar-width-collapsed + $visual-editor-max-width - $block-padding ) { + margin-left: $float-margin; + } + } + + // sidebar (sticky) + .sticky-menu .editor-layout:not( .is-sidebar-opened ) & { + @include editor-width( $admin-sidebar-width + $visual-editor-max-width - $block-padding ) { + margin-left: $float-margin; + } + } + + // sidebar (sticky) and post settings + .sticky-menu .editor-layout & { + @include editor-width( $admin-sidebar-width + $visual-editor-max-width + $sidebar-width - $block-padding ) { + margin-left: $float-margin; + } + } + + // sidebar and post settings + .auto-fold .is-sidebar-opened & { + @include editor-width( $admin-sidebar-width + $visual-editor-max-width + $sidebar-width ) { + margin-left: $float-margin; + } + } + } + + &[data-align="right"] { + float: right; + + // mobile, and no sidebars + margin-right: $block-padding; + + // sidebar (folded) + .auto-fold .editor-layout:not( .is-sidebar-opened ) & { + @include editor-width( $admin-sidebar-width-collapsed + $visual-editor-max-width - $block-padding ) { + margin-right: $float-margin; + } + } + + // sidebar (sticky) + .sticky-menu .editor-layout:not( .is-sidebar-opened ) & { + @include editor-width( $admin-sidebar-width + $visual-editor-max-width - $block-padding ) { + margin-right: $float-margin; + } + } + + // sidebar (sticky) and post settings + .sticky-menu .editor-layout & { + @include editor-width( $admin-sidebar-width + $visual-editor-max-width + $sidebar-width - $block-padding ) { + margin-right: $float-margin; + } + } + + // sidebar and post settings + .auto-fold .is-sidebar-opened & { + @include editor-width( $admin-sidebar-width + $visual-editor-max-width + $sidebar-width ) { + margin-right: $float-margin; + } + } + } + + &[data-align="wide"] { + max-width: 1100px; + } + + &[data-align="full"] { + max-width: 100%; + padding-left: 0; + padding-right: 0; + + &:before { + left: 0; + border-left-width: 0; + border-right-width: 0; + } + + .editor-block-mover { + display: none; + } + } + + &[data-align="full"], + &[data-align="wide"] { + .editor-visual-editor__block-controls { + width: $visual-editor-max-width - $block-padding - $block-padding; + margin-left: auto; + margin-right: auto; + } + } } .editor-visual-editor__block-controls { @@ -90,7 +200,11 @@ width: 0; white-space: nowrap; - top: $header-height + $admin-bar-height-big + $item-spacing; + top: $header-height + $item-spacing; + + @include break-small() { + top: $header-height + $admin-bar-height-big + $item-spacing; + } @include break-medium() { top: $header-height + $admin-bar-height + $item-spacing; @@ -101,20 +215,20 @@ } } +$sticky-bottom-offset: 20px; .editor-visual-editor__block-controls + div { - margin-top: -20px; - - // prevent collapsing margins between the block and the toolbar - &:before { - content: ""; - display: table; - clear: both; - } -} + // prevent collapsing margins between block and toolbar, matches the 20px bottom offset + margin-top: -$sticky-bottom-offset - 1px; + padding-top: 1px; + } .editor-visual-editor__block-controls .components-toolbar { display: inline-flex; - margin-right: $item-spacing; + margin-right: -1px; + + @include break-small() { + margin-right: $item-spacing; + } } .editor-visual-editor__block-controls .editor-block-switcher { @@ -127,7 +241,9 @@ .editor-visual-editor .editor-visual-editor__insertion-point { position: relative; - margin-right: #{ ( $block-padding + $block-mover-margin) * 2 }; + width: $visual-editor-max-width - $block-padding - $block-padding; + margin-left: auto; + margin-right: auto; &:before { position: absolute; diff --git a/editor/post-permalink/index.js b/editor/post-permalink/index.js new file mode 100644 index 00000000000000..17f682ec61f1f2 --- /dev/null +++ b/editor/post-permalink/index.js @@ -0,0 +1,73 @@ +/** + * External dependencies + */ +import { connect } from 'react-redux'; + +/** + * WordPress dependencies + */ +import { Component } from 'element'; +import { __ } from 'i18n'; +import { Dashicon, ClipboardButton, Button } from 'components'; + +/** + * Internal Dependencies + */ +import './style.scss'; +import { getEditedPostAttribute } from '../selectors'; + +class PostPermalink extends Component { + constructor() { + super( ...arguments ); + this.state = { + showCopyConfirmation: false, + }; + this.onCopy = this.onCopy.bind( this ); + } + + componentWillUnmout() { + clearTimeout( this.dismissCopyConfirmation ); + } + + onCopy() { + this.setState( { + showCopyConfirmation: true, + } ); + + clearTimeout( this.dismissCopyConfirmation ); + this.dismissCopyConfirmation = setTimeout( () => { + this.setState( { + showCopyConfirmation: false, + } ); + }, 4000 ); + } + + render() { + const { link } = this.props; + if ( ! link ) { + return null; + } + + return ( +
    + + { __( 'Permalink:' ) } + + + { this.state.showCopyConfirmation ? __( 'Copied!' ) : __( 'Copy' ) } + +
    + ); + } +} + +export default connect( + ( state ) => { + return { + link: getEditedPostAttribute( state, 'link' ), + }; + } +)( PostPermalink ); + diff --git a/editor/post-permalink/style.scss b/editor/post-permalink/style.scss new file mode 100644 index 00000000000000..76a0f2f9dfd2f7 --- /dev/null +++ b/editor/post-permalink/style.scss @@ -0,0 +1,31 @@ +.editor-post-permalink { + display: inline-flex; + align-items: center; + position: absolute; + top: -36px; + left: 15px; + box-shadow: $shadow-popover; + border: 1px solid $light-gray-500; + background: $white; + padding: 5px; + font-family: $default-font; + font-size: 13px; +} + +.editor-post-permalink__label { + margin: 0 10px; +} + +.editor-post-permalink__link { + color: $dark-gray-200; + text-decoration: underline; + margin-right: 10px; + width: 300px; + overflow: hidden; + position: relative; + white-space: nowrap; + + &:after { + @include long-content-fade( $size: 20% ); + } +} diff --git a/editor/post-title/index.js b/editor/post-title/index.js index 5cefb34b07d8f1..7c82743a730d91 100644 --- a/editor/post-title/index.js +++ b/editor/post-title/index.js @@ -3,10 +3,13 @@ */ import { connect } from 'react-redux'; import Textarea from 'react-autosize-textarea'; +import clickOutside from 'react-click-outside'; +import classnames from 'classnames'; /** * WordPress dependencies */ +import { Component } from 'element'; import { ENTER } from 'utils/keycodes'; /** @@ -14,36 +17,97 @@ import { ENTER } from 'utils/keycodes'; */ import './style.scss'; import { getEditedPostTitle } from '../selectors'; -import { editPost } from '../actions'; +import { editPost, clearSelectedBlock } from '../actions'; +import PostPermalink from '../post-permalink'; /** * Constants */ const REGEXP_NEWLINES = /[\r\n]+/g; -function PostTitle( { title, onUpdate } ) { - const onChange = ( event ) => { +class PostTitle extends Component { + constructor() { + super( ...arguments ); + this.bindTextarea = this.bindTextarea.bind( this ); + this.onChange = this.onChange.bind( this ); + this.onSelect = this.onSelect.bind( this ); + this.onUnselect = this.onUnselect.bind( this ); + this.onSelectionChange = this.onSelectionChange.bind( this ); + this.state = { + isSelected: false, + }; + } + + componentDidMount() { + document.addEventListener( 'selectionchange', this.onSelectionChange ); + } + + componentWillUnmount() { + document.removeEventListener( 'selectionchange', this.onSelectionChange ); + } + + bindTextarea( ref ) { + this.textareaContainer = ref; + } + + onSelectionChange() { + const textarea = this.textareaContainer.textarea; + if ( + document.activeElement === textarea && + textarea.selectionStart !== textarea.selectionEnd + ) { + this.onSelect(); + } + } + + onChange( event ) { const newTitle = event.target.value.replace( REGEXP_NEWLINES, ' ' ); - onUpdate( newTitle ); - }; + this.props.onUpdate( newTitle ); + } + + onSelect() { + this.setState( { isSelected: true } ); + this.props.clearSelectedBlock(); + } + + onUnselect() { + this.setState( { isSelected: false } ); + } + + handleClickOutside() { + this.setState( { isSelected: false } ); + } - const onKeyDown = ( event ) => { + onKeyDown( event ) { if ( event.keyCode === ENTER ) { event.preventDefault(); } - }; - - return ( -

    -