Skip to content

Commit

Permalink
Tiled Gallery block: rewrite (#27458)
Browse files Browse the repository at this point in the history
  • Loading branch information
simison authored Nov 29, 2018
1 parent f68ef71 commit 3a151cc
Show file tree
Hide file tree
Showing 16 changed files with 1,485 additions and 589 deletions.
1 change: 0 additions & 1 deletion client/gutenberg/extensions/presets/jetpack/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ import 'gutenberg/extensions/markdown/editor';
import 'gutenberg/extensions/publicize/editor';
import 'gutenberg/extensions/related-posts/editor';
import 'gutenberg/extensions/simple-payments/editor';
import 'gutenberg/extensions/tiled-gallery/editor';
34 changes: 34 additions & 0 deletions client/gutenberg/extensions/tiled-gallery/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/** @format */

/**
* Internal Dependencies
*/
import { _x } from 'gutenberg/extensions/presets/jetpack/utils/i18n';

export const ALLOWED_MEDIA_TYPES = [ 'image' ];
export const DEFAULT_COLUMNS = 3;
export const DEFAULT_GALLERY_WIDTH = 580;
export const DEFAULT_LAYOUT = 'rectangular';
export const LAYOUT_STYLES = [
{
label: _x( 'Tiled mosaic', 'Tiled gallery layout' ),
name: 'rectangular',
isDefault: true,
},
{
label: _x( 'Tiled columns', 'Tiled gallery layout' ),
name: 'columns',
},
{
label: _x( 'Square tiles', 'Tiled gallery layout' ),
name: 'square',
},
{
label: _x( 'Circles', 'Tiled gallery layout' ),
name: 'circle',
},
];
export const LAYOUTS = [ 'rectangular', 'columns', 'square', 'circle' ];
export const MAX_COLUMNS = 20;
export const RESIZE_RATE_IN_MS = 200;
export const TILE_MARGIN = 2;
Loading

0 comments on commit 3a151cc

Please sign in to comment.