diff options
Diffstat (limited to 'site/resources')
| -rw-r--r-- | site/resources/views/feeds.blade.php | 8 | ||||
| -rw-r--r-- | site/resources/views/offer.blade.php | 31 | ||||
| -rw-r--r-- | site/resources/views/search.blade.php | 4 |
3 files changed, 33 insertions, 10 deletions
diff --git a/site/resources/views/feeds.blade.php b/site/resources/views/feeds.blade.php index e4b4aca..972114e 100644 --- a/site/resources/views/feeds.blade.php +++ b/site/resources/views/feeds.blade.php @@ -51,23 +51,21 @@ foreach( $data as $offer) { <div class="col-md-6 col-sm-12" id="{{ $offer->name }}" data-track-content data-content-name="RSS-Feed" data-content-piece="{{ ucfirst($offer->spirit_type) }}" data-content-target="{{ $offer->url }}"> <div class="card flex-md-row mb-4 box-shadow h-md-250 h-sm-500"> <img class="card-img-top flex-auto d-xs-block d-sm-block img-thumbnail d-md-none" src="{{ $offer->image_url }}" alt="{{ $offer->name }}" title="{{ $offer->name }}"> - <a href="/{{ $offer->url }}" title="Link zum RSS-Feed"> <div class="card-body d-flex flex-column align-items-start"> - <div class="card-img-overlay" title="Link zum RSS-Feed"> + <div data-href="/{{ $offer->url }}" class="card-img-overlay js-link-replacement" title="Link zum RSS-Feed"> <span class="float-right rounded btn btn-rss oi oi-rss-alt" title="RSS-Feed" aria-hidden="true"></span> </div> <div class="d-inline align-items-start text-left w-100 mb-2"> <strong class="text-dark">{{ $offer->spirit_type }}</strong> </div> <h3 class="mb-0 d-inline-block h-100"> - <a class="text-dark" href="/{{ $offer->url }}"> + <a class="text-dark card-link" href="/{{ $offer->url }}"> Hier geht es zum {{ $offer->feedname }} </a> </h3> - <a class="w-100 u card-link" href="/{{ $offer->url }}" style="word-wrap: none;">{{ $offer->linktext }}</a> + <a class="w-100 u card-link" href="/{{ $offer->url }}" style="word-wrap: none;" title="Link zum RSS-Feed">{{ $offer->linktext }}</a> </div> - </a> <img {{ $width }} data-href="/{{ $offer->url }}" class="card-img-right border-white img-thumbnail d-none d-xs-none d-md-block float-right img-responsive js-link-replacement" src="{{ $offer->image_url }}" alt="{{ $offer->name }}" title="{{ $offer->name }}"> </div> </div> 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 diff --git a/site/resources/views/search.blade.php b/site/resources/views/search.blade.php index 34ec2c3..920a913 100644 --- a/site/resources/views/search.blade.php +++ b/site/resources/views/search.blade.php @@ -106,7 +106,7 @@ if ( "" == $search_phrase || !$data->count()) { <span class="text-fade-out"></span> </h4> - <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> <div class="mb-1 text-muted w-100"> @@ -153,7 +153,7 @@ if ( "" == $search_phrase || !$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> |
