Skip to content

Commit

Permalink
resize images
Browse files Browse the repository at this point in the history
  • Loading branch information
GerFr committed May 29, 2024
1 parent b9b155d commit 6fc4652
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 48 deletions.
3 changes: 2 additions & 1 deletion checkout.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<script src="js/checkout.js"></script>
<style>
.cart-image {
width: 10vh;
width: 30%;
height:30%;
}
</style>
<script>
Expand Down
7 changes: 4 additions & 3 deletions confirmation.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
<script src="js/checkout.js"></script>
<style>
.cart-image {
width: 10vh;
width: 30%;
height:30%;
}
</style>
<script>
Expand Down Expand Up @@ -96,7 +97,7 @@ <h6 class="my-0 text-start">{{ProperName}}</h6>
Distance: {{Distance}}
</small>
</div>
<span class="text-muted">{{Price}}</span>
<span class="text-muted"> {{formatCurrency Price}}</span>
</li>
{{/each}}
</script>
Expand All @@ -110,7 +111,7 @@ <h6 class="my-0 text-start">{{ProperName}}</h6>
Total
</span>
<strong>
{{total}}
{{formatCurrency total}}
</strong>
</li>
</ul>
Expand Down
11 changes: 11 additions & 0 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ function tocart(sID) {
var parsedCartarr = JSON.parse(cartarr)
if (cartarr === null) {
parsedCartarr = [sID]
setTimeout(function () {
alert.classList.remove('d-none');
alert.classList.add('alert-success');
alert.innerHTML = "<p>Added!</p>"
setTimeout(function () {
alert.classList.add('d-none');
alert.classList.remove('alert-success');
alert.innerHTML = ""

}, 500);
}, 20);
}
else if (parsedCartarr.includes(sID) === false) {
parsedCartarr.push(sID);
Expand Down
86 changes: 43 additions & 43 deletions partials/ordermodal.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{#each this}}
<div class="modal fade" id="{{total}}-modal" data-bs-keyboard="false" tabindex="-1"
aria-hidden="true">
<div class="modal fade" id="{{total}}-modal" data-bs-keyboard="false" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-scrollable modal-lg">
<div class="modal-content">
<div class="modal-header">
Expand All @@ -9,53 +8,54 @@ <h1 class="modal-title fs-5 display-2">For {{checkout.[0].value}}</h1>
</div>
<div class="modal-body">
<div class="text-center">
<div class="row justify-content-center">
<ul class="list-group mb-1">
{{#each data}}
<li class="list-group-item ms-2 justify-content-between mb-2 d-flex">
<img src="assets/stars/{{Color}}.png"
class="card-img-top cart-image border-bottom border-dark img-fluid">
<div>
<h6 class="my-0 text-start">{{ProperName}}</h6>
<small class="text-muted">
{{#if (lt Price 100000)}}
<strong>Sale</strong>
{{/if}}
Distance: {{Distance}}
</small>
</div>
<span class="text-muted">€ {{formatCurrency Price}}</span>
</li>
{{/each}}
</ul>
<div class="row justify-content-center mb-2 ">
<div class="col-10 col-sm-8 col-md-6 col-xl-4 justify-center text-center">
<ul>
<li class="list-group-item justify-content-between">
<span>
Total
</span>
<strong>
€ {{formatCurrency total}}
</strong>
</li>
</ul>
<ul class="list-group mb-1">
{{#each data}}
<li class="list-group-item d-flex justify-content-between lh-condensed mb-2">
<img src="assets/stars/{{Color}}.png"
class="card-img-top cart-image border-bottom border-dark img-fluid">
<div>
<h6 class="my-0 text-start">{{ProperName}}</h6>
<small class="text-muted">
{{#if (lt Price 100000)}}
<strong>Sale</strong>
{{/if}}
Distance: {{Distance}}
</small>
</div>
</div>
{{#each checkout}}
<div class="col-12 col-sm-10 col-md-8 col-xl-4">
<ul class="list-group mt-1">
<li class="list-group-item d-flex justify-content-between lh-condensed">
<div>
<h6 class="my-0 text-start">{{name}}</h6>
</div>
<span class="text-muted">{{value}}{{#if (eq value "")}}nothing{{/if}}
<span class="text-muted">€ {{formatCurrency Price}}</span>
</li>
</li>
{{/each}}
</ul>
<div class="row justify-content-center mb-2 ">
<div class="col-10 col-sm-8 col-md-6 col-xl-4 justify-center text-center">
<ul>
<li class="list-group-item justify-content-between">
<span>
Total
</span>
<strong>
€ {{formatCurrency total}}
</strong>
</li>
</ul>
</div>
{{/each}}
</div>
<div class="row justify-content-center">
{{#each checkout}}
<div class="col-12 col-sm-10 col-md-8 col-xl-4">
<ul class="list-group mt-1">
<li class="list-group-item d-flex justify-content-between lh-condensed">
<div>
<h6 class="my-0 text-start">{{name}}</h6>
</div>
<span class="text-muted">{{value}}{{#if (eq value "")}}nothing{{/if}}
</span>
</li>
</ul>
</div>
{{/each}}
</div>
</div>
</div>
<div class="modal-footer">
Expand Down
3 changes: 2 additions & 1 deletion summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<script src="js/vanilla.js"></script>
<style>
.cart-image {
width: 10vh;
width: 30%;
height:30%;
}
</style>
<script>
Expand Down

0 comments on commit 6fc4652

Please sign in to comment.