Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Commit

Permalink
xs/xl options to section template
Browse files Browse the repository at this point in the history
* Added: Extra Small and Extra Large height options to Sections template.
* Fixed: Height ratios for more consistent scaling.
* Fixed: Banner height upgrade default to 'lg' if image used.
  • Loading branch information
Mike Hemberger committed Sep 29, 2017
1 parent b20168b commit aace71f
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 21 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
### Changelog

#### 1.1.6.1 (9/29/17)
* Added: Extra Small and Extra Large height options to Sections template.
* Fixed: Height ratios for more consistent scaling.
* Fixed: Banner height upgrade default to 'lg' if image used.

#### 1.1.6 (9/29/17)
* Added: Banner "Height" setting in customizer.
* Added: [section] Add "Text Size" field to Sections template (and [section text_size="lg"] shortcode).
Expand Down
20 changes: 10 additions & 10 deletions assets/css/mai-pro.css
Original file line number Diff line number Diff line change
Expand Up @@ -975,28 +975,28 @@ td {
}

.height-xs {
padding-top: calc(1.25rem + 1.25vw);
padding-bottom: calc(1.25rem + 1.25vw);
padding-top: calc(1rem + 1vw);
padding-bottom: calc(1rem + 1vw);
}

.height-sm {
padding-top: calc(1.25rem + 2.441vw);
padding-bottom: calc(1.25rem + 2.441vw);
padding-top: calc(1rem + 1.953vw);
padding-bottom: calc(1rem + 1.953vw);
}

.height-md {
padding-top: calc(1.25rem + 5.96vw);
padding-bottom: calc(1.25rem + 5.96vw);
padding-top: calc(1rem + 3.815vw);
padding-bottom: calc(1rem + 3.815vw);
}

.height-lg {
padding-top: calc(1.25rem + 9.313vw);
padding-bottom: calc(1.25rem + 9.313vw);
padding-top: calc(1rem + 7.451vw);
padding-bottom: calc(1rem + 7.451vw);
}

.height-xl {
padding-top: calc(1.25rem + 14.552vw);
padding-bottom: calc(1.25rem + 14.552vw);
padding-top: calc(1rem + 14.552vw);
padding-bottom: calc(1rem + 14.552vw);
}

.columns > .col {
Expand Down
2 changes: 1 addition & 1 deletion assets/css/mai-pro.min.css

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion lib/settings/metaboxes/sections.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,11 @@ function mai_do_sections_metabox() {
'default' => 'md',
'options' => array(
'auto' => __( 'Auto (Use height of content)', 'mai-pro-engine' ),
'xs' => __( 'Extra Small', 'mai-pro-engine' ),
'sm' => __( 'Small', 'mai-pro-engine' ),
'md' => __( 'Medium', 'mai-pro-engine' ),
'md' => __( 'Medium (Default)', 'mai-pro-engine' ),
'lg' => __( 'Large', 'mai-pro-engine' ),
'xl' => __( 'Extra Large', 'mai-pro-engine' ),
),
) );

Expand Down
11 changes: 5 additions & 6 deletions lib/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function mai_update_database_version() {
mai_upgrade_1100();
}

if ( $option_db_version < '1160' ) {
mai_upgrade_1160();
if ( $option_db_version < '1161' ) {
mai_upgrade_1161();
}

// Update the version number option.
Expand All @@ -34,9 +34,9 @@ function mai_update_database_version() {
/**
* Update banner_height to 'md' if banner image is set.
*
* @since 1.1.6
* @since 1.1.6.1
*/
function mai_upgrade_1160() {
function mai_upgrade_1161() {

// Banner disabled.
if ( ! mai_is_banner_area_enabled_globally() ) {
Expand All @@ -47,11 +47,10 @@ function mai_upgrade_1160() {
if ( genesis_get_option( 'banner_id' ) ) {
// Update banner_height.
genesis_update_settings( array(
'banner_height' => 'md',
'banner_height' => 'lg',
) );
}


}

/**
Expand Down
6 changes: 3 additions & 3 deletions mai-pro-engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Plugin URI: https://maipro.io/
* Description: The Mai Pro Engine plugin
*
* Version: 1.1.6
* Version: 1.1.6.1
*
* GitHub URI: maiprowp/mai-pro-engine
*
Expand Down Expand Up @@ -91,10 +91,10 @@ public function __wakeup() {
private function setup_constants() {

// Plugin version.
define( 'MAI_PRO_ENGINE_VERSION', '1.1.6' );
define( 'MAI_PRO_ENGINE_VERSION', '1.1.6.1' );

// DB version.
define( 'MAI_PRO_ENGINE_DB_VERSION', '1160' );
define( 'MAI_PRO_ENGINE_DB_VERSION', '1161' );

// Plugin Folder Path.
define( 'MAI_PRO_ENGINE_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
Expand Down

0 comments on commit aace71f

Please sign in to comment.