Skip to content

Commit

Permalink
Theme update
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Nov 28, 2022
1 parent 88536fc commit 90d671b
Show file tree
Hide file tree
Showing 17 changed files with 380 additions and 90 deletions.
62 changes: 62 additions & 0 deletions Resources/Public/Themes/default/account-basket.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
.account-basket {
margin: 0 auto;
}

.account-basket .header {
text-transform: uppercase;
text-align: start;
font-weight: normal;
padding: 0.5rem 1rem;
color: var(--ai-secondary);
border-bottom: 1px solid var(--ai-secondary);
}

.account-basket .basket-item {
border: 1px solid var(--ai-tertiary);
padding: 1rem;
margin: 1rem;
}

.account-basket .basket-basic {
font-weight: bold;
}

.account-basket .name:after {
content: ": ";
}

.account-basket .action {
margin-top: 0.5rem;
}

.account-basket .action .btn {
border: 1px solid var(--ai-secondary);
display: block;
width: 100%;
max-width: 6rem;
margin: auto;
}

.account-basket-detail {
padding-top: 1rem;
display: none;
}

.account-basket-detail a:hover {
text-decoration: underline;
}

.account-basket-detail h2 {
margin: 0.5rem 0;
}

.account-basket-detail h3 {
display: inline-block;
font-size: 1rem;
margin: 0;
}

.account-basket-detail li.attr-item .name,
.account-basket-detail li.attr-item .value {
min-width: 0;
}
37 changes: 37 additions & 0 deletions Resources/Public/Themes/default/account-basket.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* Account basket actions
*/
AimeosAccountBasket = {

/**
* Shows basket details without page reload
*/
onToggleDetail() {

$(".account-basket").on("click", ".basket-item .action .btn", ev => {

const target = $(ev.currentTarget).closest(".basket-item");
const details = $(".account-basket-detail", target);

$(".btn.show", target).toggleClass('hidden');
$(".btn.close", target).toggleClass('hidden');

slideToggle(details[0], 300);

return false;
});
},


/**
* Initializes the account basket actions
*/
init() {
this.onToggleDetail();
}
};


$(() => {
AimeosAccountBasket.init();
});
15 changes: 6 additions & 9 deletions Resources/Public/Themes/default/aimeos.css
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ img {
}

.aimeos .prototype {
display: none;
display: none !important;
}

.aimeos .lazy-image {
Expand Down Expand Up @@ -631,10 +631,6 @@ body > .content, body .main-section {
justify-content: flex-end;
}

.navbar-mainnavigation {
position: fixed !important;
}

.navbar-nav {
padding: 0;
}
Expand Down Expand Up @@ -823,15 +819,15 @@ body > .content, body .main-section {
--swiffy-slider-item-ratio: var(--ai-product-image-ratio);
}

.aimeos .list .product .media-list div:first-of-type,
.aimeos .product-list .media-list div:first-of-type {
.aimeos .list .product .media-list span:first-of-type,
.aimeos .product-list .media-list span:first-of-type {
z-index: 1;
opacity: 1;
transition: opacity .3s linear;
}

.aimeos .list .product .media-list.multiple:hover div:first-of-type,
.aimeos .product-list .media-list.multiple:hover div:first-of-type {
.aimeos .list .product .media-list.multiple:hover span:first-of-type,
.aimeos .product-list .media-list.multiple:hover span:first-of-type {
transition: opacity .3s linear;
opacity: 0;
}
Expand All @@ -851,6 +847,7 @@ body > .content, body .main-section {
left: 0;
width: 100%;
height: 100%;
display: block;
object-fit: contain;
}

Expand Down
23 changes: 20 additions & 3 deletions Resources/Public/Themes/default/aimeos.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,22 @@ Aimeos = {
},


/**
* Delays the function by the given timeout
*
* @param {Function} fcn Function to delay
* @param {int} timeout Timeout in milliseconds
* @returns {Function} Function wrapped into timer function
*/
debounce( fcn, timeout = 300) {
let timer;
return (...args) => {
clearTimeout(timer);
timer = setTimeout(() => { fcn.apply(this, args); }, timeout);
};
},


/**
* Removes an existing overlay from the current page
*/
Expand Down Expand Up @@ -125,7 +141,7 @@ Aimeos = {

$(".aimeos .lazy-image").each((idx, el) => {
(new IntersectionObserver(callback, {
root: $(el).closest('.product')[0],
root: null,
rootMargin: '320px',
threshold: 0
})).observe(el);
Expand Down Expand Up @@ -314,7 +330,8 @@ AimeosBasket = {
}

if( index === 0 ) {
$(".select-option", select).removeAttr("disabled").data("disabled", 0).data("by", {});
$(".select-option", select).prop("checked", false).prop("selected", false)
.removeAttr("disabled").data("disabled", 0).data("by", {});
}

$(".select-option", select).each((idx, option) => {
Expand Down Expand Up @@ -545,7 +562,7 @@ AimeosBasket = {
$(".articleitem", item).removeClass("price-actual");
newPrice.addClass("price-actual");

if(!(item.data("reqstock") && $(".stockitem", newStock).hasClass("stock-out"))) {
if(!(item.data("reqstock") && $(".stockitem", newStock).filter(".stock-out").length == $(".stockitem", newStock).length)) {
stock = true;
}

Expand Down
4 changes: 2 additions & 2 deletions Resources/Public/Themes/default/app.css

Large diffs are not rendered by default.

88 changes: 44 additions & 44 deletions Resources/Public/Themes/default/app.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Resources/Public/Themes/default/app.rtl.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Resources/Public/Themes/default/basket-bulk.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
.basket-bulk .headline,
.basket-bulk .bulk-content .details {
border-bottom: 1px solid var(--ai-secondary);
}

.basket-bulk .row {
align-items: center;
}

Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/Themes/default/basket-mini.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AimeosBasketMini = {
const price = Number.parseFloat(attr['order.base.price']);
const delivery = Number.parseFloat(attr['order.base.costs']);

const formatter = new Intl.NumberFormat([], {
const formatter = new Intl.NumberFormat(attr['order.base.languageid'], {
currency: attr['order.base.currencyid'],
style: "currency"
});
Expand Down
23 changes: 23 additions & 0 deletions Resources/Public/Themes/default/basket-standard.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@
padding: 2rem 0;
}

.basket-standard .header {
align-items: center;
padding: 0 1rem;
}

.basket-standard .header h1 {
margin: 0;
}

.basket-standard .basket-save.input-group {
border-bottom: 1px solid var(--ai-secondary);
width: auto;
}

.basket-standard .basket-save .basket-name {
border: none;
}

.basket-standard .basket-save .btn {
border: none;
width: 5rem;
}

.basket-standard-main {
border: 1px solid var(--ai-tertiary);
padding: 1rem;
Expand Down
3 changes: 2 additions & 1 deletion Resources/Public/Themes/default/catalog-detail.css
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@
}

.catalog-detail-supplier .media-item {
display: block;
float: right;
margin: 1rem;
}
Expand Down Expand Up @@ -871,7 +872,6 @@
.catalog-detail-bought .product,
.catalog-detail-bundle .product,
.catalog-detail-suggest .product {
display: inline-block;
vertical-align: top;
position: relative;
width: 160px;
Expand All @@ -891,6 +891,7 @@
.catalog-detail-bought .media-item,
.catalog-detail-bundle .media-item,
.catalog-detail-suggest .media-item {
display: block;
height: 213px;
width: 160px;
}
Expand Down
19 changes: 19 additions & 0 deletions Resources/Public/Themes/default/catalog-detail.js

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

Loading

0 comments on commit 90d671b

Please sign in to comment.