Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanesa Reinerth committed Jan 11, 2019
2 parents 3bffee9 + 9ebe2be commit d9e27be
Show file tree
Hide file tree
Showing 44 changed files with 9,763 additions and 445 deletions.
339 changes: 339 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ Contributors: getbowtied, vanesareinerth, adrianlbs
Tags: gutenberg, blocks
Requires at least: 5.0
Tested up to: 5.0
Stable tag: 1.3
Stable tag: 1.3.1
Requires PHP: 5.5.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
~Current Version:1.3~
~Current Version:1.3.1~

Extends the functionality of Shopkeeper with Gutenberg elements.

== Changelog ==

= 1.3.1 =
- WordPress 5+ compatibility improvements
- Improved styles for theme neutrality

= 1.3 =
- WordPress 5+ compatibility improvements

Expand Down
2 changes: 1 addition & 1 deletion includes/gbt-blocks/banner/assets/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 5 additions & 20 deletions includes/gbt-blocks/banner/assets/scss/style.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
.gbt_18_sk_banner {

margin-bottom: 2.5rem;

&.aligncenter {
margin: 0 auto 2.5rem;
}

&.full
{
margin-left: calc( -100vw / 2 + 100% / 2 );
margin-right: calc( -100vw / 2 + 100% / 2 );
max-width: 100vw;
}

&.wide
{
@media all and (min-width: 1024px) {
margin-left: calc( -75vw / 2 + 100% / 2 );
margin-right: calc( -75vw / 2 + 100% / 2 );
max-width: 75vw;
}
margin-left: auto;
margin-right: auto;
}

&:hover {
Expand All @@ -35,6 +18,7 @@
margin-bottom:30px;
clear:both;
position: relative;
text-decoration: none !important;

&:hover {
opacity: 1;
Expand Down Expand Up @@ -116,15 +100,16 @@
.gbt_18_sk_banner_title {
padding: 0;
margin: 0;
font-weight: 900;
line-height: 1.391em;
text-decoration: none;
}

.gbt_18_sk_banner_subtitle {
padding: 0;
margin: 0;
font-weight: normal;
line-height: 1.5em;
text-decoration: none;
}
}
}
Expand Down
46 changes: 23 additions & 23 deletions includes/gbt-blocks/banner/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/* Register Block */
registerBlockType( 'getbowtied/sk-banner', {
title: i18n.__( 'Banner' ),
title: i18n.__( 'Banner', 'shopkeeper-extender' ),
icon: el( SVG, { xmlns:'http://www.w3.org/2000/svg', viewBox:'0 0 24 24' },
el( Path, { d:'M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM5 15h14v3H5z' } )
),
Expand Down Expand Up @@ -100,21 +100,21 @@

let colors = [
{
label: i18n.__( 'Title Color' ),
label: i18n.__( 'Title Color', 'shopkeeper-extender' ),
value: attributes.titleColor,
onChange: function( newColor) {
props.setAttributes( { titleColor: newColor } );
},
},
{
label: i18n.__( 'Subtitle Color' ),
label: i18n.__( 'Subtitle Color', 'shopkeeper-extender' ),
value: attributes.subtitleColor,
onChange: function( newColor) {
props.setAttributes( { subtitleColor: newColor } );
},
},
{
label: i18n.__( 'Background Color' ),
label: i18n.__( 'Background Color', 'shopkeeper-extender' ),
value: attributes.backgroundColor,
onChange: function( newColor) {
props.setAttributes( { backgroundColor: newColor } );
Expand All @@ -125,7 +125,7 @@
if( attributes.innerStrokeThickness > 0 ) {
colors.push(
{
label: i18n.__( 'Inner Stroke Color' ),
label: i18n.__( 'Inner Stroke Color', 'shopkeeper-extender' ),
value: attributes.innerStrokeColor,
onChange: function( newColor) {
props.setAttributes( { innerStrokeColor: newColor } );
Expand All @@ -147,15 +147,15 @@
PanelBody,
{
key: 'gbt_18_sk_banner_settings_panel',
title: 'General Settings',
title: i18n.__( 'General Settings', 'shopkeeper-extender' ),
initialOpen: false,
},
el(
TextControl,
{
key: 'gbt_18_sk_banner_url',
type: 'string',
label: i18n.__( 'URL' ),
label: i18n.__( 'URL', 'shopkeeper-extender' ),
value: attributes.url,
onChange: function( newURL ) {
props.setAttributes( { url: newURL } );
Expand All @@ -166,7 +166,7 @@
ToggleControl,
{
key: "gbt_18_sk_banner_new_tab",
label: i18n.__( 'Open link in new tab?' ),
label: i18n.__( 'Open link in new tab?', 'shopkeeper-extender' ),
checked: attributes.blank,
onChange: function() {
props.setAttributes( { blank: ! attributes.blank } );
Expand All @@ -182,7 +182,7 @@
initialPosition: 300,
min: 0,
max: 1000,
label: i18n.__( 'Height' ),
label: i18n.__( 'Height', 'shopkeeper-extender' ),
onChange: function( newNumber ) {
props.setAttributes( { height: newNumber } );
},
Expand All @@ -193,7 +193,7 @@
PanelBody,
{
key: 'gbt_18_sk_banner_font_panel',
title: 'Font Settings',
title: i18n.__( 'Font Settings', 'shopkeeper-extender' ),
initialOpen: false,
},
el(
Expand All @@ -205,7 +205,7 @@
initialPosition: 38,
min: 10,
max: 72,
label: i18n.__( 'Title Font Size' ),
label: i18n.__( 'Title Font Size', 'shopkeeper-extender' ),
onChange: function( newNumber ) {
props.setAttributes( { titleSize: newNumber } );
},
Expand All @@ -220,7 +220,7 @@
initialPosition: 18,
min: 10,
max: 72,
label: i18n.__( 'Subtitle Font Size' ),
label: i18n.__( 'Subtitle Font Size', 'shopkeeper-extender' ),
onChange: function( newNumber ) {
props.setAttributes( { subtitleSize: newNumber } );
},
Expand All @@ -231,7 +231,7 @@
PanelBody,
{
key: 'gbt_18_sk_banner_immer_stroke_settings',
title: 'Inner Stroke',
title: i18n.__( 'Inner Stroke', 'shopkeeper-extender' ),
initialOpen: false
},
el(
Expand All @@ -243,7 +243,7 @@
max: '30',
initialPosition: '2',
allowReset: false,
label: i18n.__( 'Inner Stroke Thickness' ),
label: i18n.__( 'Inner Stroke Thickness', 'shopkeeper-extender' ),
onChange: function( newNumber ) {
props.setAttributes( { innerStrokeThickness: newNumber } );
},
Expand All @@ -254,7 +254,7 @@
ColorSettings,
{
key: 'gbt_18_sk_banner_color_settings',
title: i18n.__( 'Colors' ),
title: i18n.__( 'Colors', 'shopkeeper-extender' ),
initialOpen: false,
colorSettings: getColors()
},
Expand Down Expand Up @@ -317,7 +317,7 @@
className: 'button gbt_18_sk_editor_banner_add_image',
onClick: img.open
},
i18n.__( 'Add Image' )
i18n.__( 'Add Image', 'shopkeeper-extender' )
),
!! attributes.imgID && el(
Button,
Expand All @@ -333,7 +333,7 @@
});
}
},
i18n.__( 'Remove Image' )
i18n.__( 'Remove Image', 'shopkeeper-extender' )
),
];
},
Expand Down Expand Up @@ -369,7 +369,7 @@
tagName: 'h3',
format: 'string',
value: attributes.title,
placeholder: i18n.__( 'Add Title' ),
placeholder: i18n.__( 'Add Title', 'shopkeeper-extender' ),
onChange: function( newTitle) {
props.setAttributes( { title: newTitle } );
}
Expand All @@ -389,7 +389,7 @@
format: 'string',
value: attributes.subtitle,
formattingControls: [],
placeholder: i18n.__( 'Add Subtitle' ),
placeholder: i18n.__( 'Add Subtitle', 'shopkeeper-extender' ),
onChange: function( newSubtitle) {
props.setAttributes( { subtitle: newSubtitle } );
}
Expand All @@ -409,7 +409,7 @@
return el( 'div',
{
key: 'gbt_18_sk_banner',
className: 'gbt_18_sk_banner ' + attributes.align,
className: 'gbt_18_sk_banner',
style:
{
height: attributes.height + 'px',
Expand Down Expand Up @@ -463,7 +463,7 @@
fontSize: attributes.titleSize + 'px'
},
},
attributes.title
i18n.__( attributes.title, 'shopkeeper-extender' )
),
el( 'p',
{
Expand All @@ -473,9 +473,9 @@
{
color: attributes.subtitleColor,
fontSize: attributes.subtitleSize + 'px'
}
},
},
attributes.subtitle
i18n.__( attributes.subtitle, 'shopkeeper-extender' )
)
)
)
Expand Down
1 change: 1 addition & 0 deletions includes/gbt-blocks/banner/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function gbt_18_sk_banner_editor_assets() {
plugins_url( 'block.js', __FILE__ ),
array( 'wp-blocks', 'wp-components', 'wp-editor', 'wp-i18n', 'wp-element' )
);
wp_set_script_translations( 'gbt_18_sk_banner_script', 'shopkeeper-extender', plugin_dir_path( __FILE__ ) . 'languages' );

wp_enqueue_style(
'gbt_18_sk_banner_editor_styles',
Expand Down
2 changes: 1 addition & 1 deletion includes/gbt-blocks/categories_grid/assets/css/editor.css

Large diffs are not rendered by default.

Loading

0 comments on commit d9e27be

Please sign in to comment.