diff options
Diffstat (limited to 'site/resources/views/offer.blade.php')
| -rw-r--r-- | site/resources/views/offer.blade.php | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/site/resources/views/offer.blade.php b/site/resources/views/offer.blade.php index 71fb21a..10f50a1 100644 --- a/site/resources/views/offer.blade.php +++ b/site/resources/views/offer.blade.php @@ -73,7 +73,7 @@ if ( !$data->count() ) { <span class="text-fade-out"></span> </h4> - <p class="card-text mb-auto text-success w-100"><strong class="ffloat-right ttext-large" style="margin-left: 3px;">{{ TF::fF($offer->discounted_price) }}€</strong>* <del class="text-danger">{{ TF::fF($offer->original_price) . "€" }}</del> + <p class="card-text mb-auto text-success w-100"><strong class="ffloat-right text-large" style="margin-left: 3px;">{{ TF::fF($offer->discounted_price) }}€</strong>* <del class="text-danger">{{ TF::fF($offer->original_price) . "€" }}</del> <span class="float-right text-muted">{{ TF::fF($offer->base_price ) }}€/L</span> </p> <div class="mb-1 text-muted w-100"> @@ -108,7 +108,15 @@ if ( !$data->count() ) { <a href="{{ $offer->url }}"> </a> --> - <img class="card-img-top flex-auto d-sm-block img-thumbnail d-md-none" src="{{ $offer->image_url }}" alt="{{ $offer->name }}" title="{{$offer->name}} :: {{ $offer->shop }}"> +<?php + // sets style explicitly for Drankdozijn + if ( "Drankdozijn" == $offer->shop ) { + $style = 'margin-left: auto; margin-right: 25px; width:50%; object-fit: cover; width: 70px;'; + } else { + $style = ''; + } +?> + <img style="{{ $style }}" class="card-img-top flex-auto d-sm-block img-thumbnail d-md-none" src="{{ $offer->image_url }}" alt="{{ $offer->name }}" title="{{$offer->name}} :: {{ $offer->shop }}"> <div class="card-body .d-md-none d-lg-none d-xl-none d-xs-flex flex-column align-items-start"> <!-- <div class="h-100 card-img-overlay"> @@ -131,7 +139,7 @@ if ( !$data->count() ) { <span class="float-right">{{ TF::fF($offer->volume) . " Liter" }}</span><span>{{ TF::fF($offer->abv) . "%" }} Alk.</span> </div> - <p class="card-text mb-auto text-success w-100"><del class="text-danger">{{ TF::fF($offer->original_price) . "€" }}</del> <strong class="ffloat-right">{{ TF::fF($offer->discounted_price) . "€" }}*</strong> + <p class="card-text mb-auto text-success w-100"><strong class="ffloat-right text-large" style="margin-left: 3px;">{{ TF::fF($offer->discounted_price) }}€</strong>* <del class="text-danger">{{ TF::fF($offer->original_price) . "€" }}</del> <span class="float-right text-muted">{{ TF::fF($offer->base_price ) }}€/L</span> </p> <strong><a href="{{ $offer->url }}" class="text-large">Jetzt bestellen</a></strong> @@ -192,3 +200,20 @@ if ( !$data->count() ) { @endsection +@section('scripts') +<script> +$(window).on("load", function(){ + $("img.card-img-top").each( function(k, v){ + + // sets style like with Drankdozijn + if ( (this.naturalWidth / this.naturalHeight) < 0.3 ) { + console.log("debug: changing css for " + this.title); + $(this).css("width", this.naturalWidth); + $(this).css("onject-fit", "cover"); + $(this).css("margin-left", "auto"); + $(this).css("margin-right", "25px"); + } + }); +}); +</script> +@endsection |
