Skip to content

Commit

Permalink
Elementor compatibility buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomollet committed Mar 17, 2017
1 parent 045a27a commit 8326c47
Show file tree
Hide file tree
Showing 9 changed files with 1,108 additions and 469 deletions.
4 changes: 2 additions & 2 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
'xs' => 12,
'sm' => 6,
'md' => 4,
'lg' => 3
'lg' => 4
] ) ?>

<div class="col-sm-6 col-md-4 col-lg-3">
<div class="col-sm-6 col-md-4">
<?php
$type = get_post_type();
get_template_part( 'content', $type );
Expand Down
1,443 changes: 1,022 additions & 421 deletions css/styles.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions css/styles.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions css/styles.min.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions inc/front/scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ function stormbringer_jquery_footer () {
$wp_scripts->add_data( 'jquery-core', 'group', 1 );
$wp_scripts->add_data( 'jquery-migrate', 'group', 1 );
}
if ( ! is_admin() )
add_action ( 'wp_head', 'stormbringer_jquery_footer' , 1 , 0 );
//if ( ! is_admin() )
//add_action ( 'wp_head', 'stormbringer_jquery_footer' , 1 , 0 );

/**
* Enqueue libraries scripts in the footer
Expand Down
4 changes: 2 additions & 2 deletions inc/front/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function stormbringer_preprocessor() {

}

add_action( 'wp_enqueue_scripts', 'stormbringer_preprocessor');
add_action( 'wp_enqueue_scripts', 'stormbringer_preprocessor', 100);


function stormbringer_livereload(){
Expand Down Expand Up @@ -126,4 +126,4 @@ function stormbringer_css() {
}

}
add_action( 'wp_enqueue_scripts', 'stormbringer_css', 99999 );
add_action( 'wp_enqueue_scripts', 'stormbringer_css' );
4 changes: 2 additions & 2 deletions inc/plugins/woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ function stormbringer_loop_columns()
*/
function wsis_woocommerce_remove_item($wsis_html, $cart_item_key)
{
$cart_item_key = $cart_item_key;
$button = __('Remove this item', 'woocommerce');
$button = '<span class="glyphicon glyphicon-remove"></span>';
$wsis_html = sprintf(
Expand Down Expand Up @@ -355,4 +354,5 @@ function stormbringer_get_product_search_form($ob_get_clean)
}

;
add_filter('get_product_search_form', 'stormbringer_get_product_search_form', 10, 1);
add_filter('get_product_search_form', 'stormbringer_get_product_search_form', 10, 1);

33 changes: 31 additions & 2 deletions scss/helpers/_elementor.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
.elementor-widget-button .elementor-button{
.elementor-button{
@extend .btn;
@extend .btn-default;

transition: none;
&:visited, .elementor-button-text{
color:inherit;
opacity: inherit;
}
&:hover{
opacity: inherit;
}
}

.elementor-element.elementor-button-success .elementor-button,
Expand All @@ -10,4 +19,24 @@
{
@extend .btn;
@extend .btn-primary;
}
}

.elementor-element .elementor-button.elementor-size-xs{
@include button-size($padding-xs-vertical, $padding-xs-horizontal, $font-size-small, $line-height-small, $btn-border-radius-small);
}

.elementor-element .elementor-button.elementor-size-sm{
@include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $btn-border-radius-base);
}

.elementor-element .elementor-button.elementor-size-md{
@include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $btn-border-radius-base);
}

.elementor-element .elementor-button.elementor-size-lg{
@include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $btn-border-radius-large);
}

.elementor-element .elementor-button.elementor-size-xl{
@include button-size($padding-large-vertical, $padding-large-horizontal, $font-size-large, $line-height-large, $btn-border-radius-large);
}
77 changes: 43 additions & 34 deletions scss/helpers/_woocommerce.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.woocommerce #respond input#submit, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button{
@extend .btn;
@extend .btn-default;
}

.navbar-shoppingcart {
list-style-type: none;
Expand Down Expand Up @@ -107,6 +111,9 @@
a{
display: block;
}



a.remove{
position: relative;
float: left;
Expand Down Expand Up @@ -186,7 +193,7 @@ ul.products{
}

// Product single
.single-product{
.single-product, .singular-product{

.wc-tabs-wrapper, .related, .upsells{
margin-top: ($line-height-computed);
Expand Down Expand Up @@ -775,52 +782,54 @@ ul.products{
}
}

table.shop_table_responsive {
thead {
display: none;
}
@media (max-width: $screen-sm-min) {
table.shop_table_responsive {
thead {
display: none;
}

tbody {
tr:first-child {
td:first-child {
border-top: 0;
tbody {
tr:first-child {
td:first-child {
border-top: 0;
}
}
}

th {
display: none;
th {
display: none;
}
}
}

tr {
display: block;

td {
tr {
display: block;
text-align: right !important; // Important to overwrite order status inline styling

&.order-actions {
text-align: left !important;
}
td {
display: block;
text-align: right !important; // Important to overwrite order status inline styling

&:before {
content: attr(data-title) ': ';
font-weight: 700;
float: left;
}
&.order-actions {
text-align: left !important;
}

&.product-remove,
&.actions {
&:before {
display: none;
content: attr(data-title) ': ';
font-weight: 700;
float: left;
}

&.product-remove,
&.actions {
&:before {
display: none;
}
}
}
}

&:nth-child(2n) {
td {
background-color: rgba(0,0,0,0.025);
&:nth-child(2n) {
td {
background-color: rgba(0,0,0,0.025);
}
}
}
}
}
}

0 comments on commit 8326c47

Please sign in to comment.