Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ajax_cart_quantity position #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions css/modules/blockcart/blockcart.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,16 @@
font-weight: 300;
}

#blockcart-header:before {
content: "\f291";
#blockcart-header .ajax_cart_icon {
font-family: "FontAwesome";
font-size: 1.6em;
display: inline-block;
margin-right: 5px;
vertical-align: 6%;
vertical-align: middle;
color: #ff6f61;
}

#blockcart-header:hover:before {
#blockcart-header:hover .ajax_cart_icon {
color: #121212;
}

Expand All @@ -62,17 +61,17 @@
}

#blockcart-header .ajax_cart_quantity {
position: absolute;
top: 0;
right: 38px;
display: block !important;
display: inline-block;
min-width: 20px;
min-height: 20px;
line-height: 20px;
background: #121212;
text-align: center;
color: #fff;
border-radius: 50%;
padding: 0 5px;
margin-left: -20px;
vertical-align: top;
}

#blockcart-dropdown {
Expand Down
3 changes: 2 additions & 1 deletion modules/blockcart/includes/header.tpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<a id="blockcart-header" href="{$link->getPageLink($order_process, true)|escape:'html':'UTF-8'}" title="{l s='View my shopping cart' mod='blockcart'}" rel="nofollow">
<b>{l s='My Cart' mod='blockcart'}</b>
<span class="ajax_cart_icon">&#xf291;</span>
<span class="ajax_cart_quantity">{$cart_qties}</span>
<b>{l s='My Cart' mod='blockcart'}</b>
<span class="ajax_cart_product_txt"{if $cart_qties != 1} style="display: none;"{/if}>{l s='Product' mod='blockcart'}</span>
<span class="ajax_cart_product_txt_s"{if $cart_qties < 2} style="display: none;"{/if}>{l s='Products' mod='blockcart'}</span>
<span class="ajax_cart_total"{if $cart_qties == 0} style="display: none;"{/if}>
Expand Down
26 changes: 11 additions & 15 deletions sass/modules/blockcart/partials/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ $bc-header-color: #121212;
}

#blockcart-header {

// Make this block the same dimensions as input-lg (search block to the left)
// @see /sass/vendor/bootstrap/bootstrap/_forms.scss
height: $input-height-large;
Expand All @@ -38,39 +37,36 @@ $bc-header-color: #121212;
overflow: hidden;
font-weight: 300;

&:before{
content: "\f291";
.ajax_cart_icon {
font-family: $font-icon;
font-size: 1.6em;
display: inline-block;
margin-right: 5px;
vertical-align: 6%;
vertical-align: middle;
color: $link-hover-color
}
&:hover {
&:before {
color: $gray-darker;
}
&:hover .ajax_cart_icon {
color: $gray-darker;
}
b{
b {
font-weight: 500;
}
.ajax_cart_product_txt,
.ajax_cart_product_txt_s,
.ajax_cart_no_product{
.ajax_cart_no_product {
display: none !important;
}
.ajax_cart_quantity{
position: absolute;
top: 0;
right: 38px;
display: block !important;
.ajax_cart_quantity {
display: inline-block;
min-width: 20px;
min-height: 20px;
line-height: 20px;
background: $gray-darker;
text-align: center;
color: #fff;
border-radius: 50%;
padding: 0 5px;
margin-left: -20px;
vertical-align: top;
}
}