summaryrefslogtreecommitdiff
path: root/site/resources/views/fk-offer.blade.php
diff options
context:
space:
mode:
Diffstat (limited to 'site/resources/views/fk-offer.blade.php')
-rw-r--r--site/resources/views/fk-offer.blade.php219
1 files changed, 219 insertions, 0 deletions
diff --git a/site/resources/views/fk-offer.blade.php b/site/resources/views/fk-offer.blade.php
new file mode 100644
index 0000000..10f50a1
--- /dev/null
+++ b/site/resources/views/fk-offer.blade.php
@@ -0,0 +1,219 @@
+@extends('layouts.base')
+
+@section('header')
+{{ ucfirst($title) }}
+@endsection
+
+@section('feed')
+ {!! Feed::link(secure_url($rss_feed), 'atom', 'Feed von ' . $spirit_type, 'de') !!}
+@endsection
+
+@section('content')
+ <div class="container">
+ <div class="jumbotron p-3 p-md-5 text-white rounded bg-dark bbg-white ttext-dark box-shadow">
+ <div class="col-md-6 px-0">
+ <h1 class="display-4 font-italic">{{ ucfirst($spirit_type) }} <span class="text-mute ml-10">({{$count}} Angebote)</span><!-- --></h1>
+ <!--p class="lead my-3">Finde immer die günstigsten Angebote im Bereich Spirituosen. Täglich neue Schnäppchen.</p-->
+ <p class="lead mb-0"><a href="/" class="text-white font-weight-bold">Zurück zur Übersicht...</a></p>
+ </div>
+ </div>
+
+<?php
+if ( !$data->count() ) {
+ /* Keine Angebote */
+?>
+<div class="alert alert-secondary" data-track-content data-content-name="{{ ucfirst($spirit_type) }}" data-content-piece="Keine Angebote" data-content-target="">
+ <h4 class="alert-heading">Keine Angebote</h4>
+ Momentan liegen keine {{ $title }} vor. Probieren Sie es später noch einmal.
+</div>
+<?php
+ /* Ende Keine Angebote */
+} else {
+ /* Liste Angebote */
+
+?>
+
+@include('snippets.sortbuttons')
+<?php
+ $count = 0;
+ foreach( $data as $offer) {
+
+ if ( $count % 2 == 0) {
+?>
+<!-- .row -->
+ <div class="row mb-2">
+<?php
+ }
+
+?>
+ <div class="col-md-6 col-sm-12" id="{{ $offer->name }}" data-track-content data-content-name="{{ ucfirst($spirit_type) }}" data-content-piece="{{ $offer->name }}" data-content-target="{{ $offer->url }}">
+ <div class="card flex-md-row mb-4 box-shadow h-md-250 h-sm-500">
+
+ <!-- >= md -->
+ <div class="card-body d-none d-md-flex flex-row align-items-start">
+ <div class="card-img-overlay" title="{{$offer->name}} :: {{ $offer->shop }}">
+ <p class="card-text bg-danger float-right rounded off-badge">{{ $offer->procent}}%</p>
+<!--
+ <p class="card-text h-100 float-right">
+ <span class="bg-danger ffloat-right rounded off-badge">{{ $offer->procent}}%</span>
+ <span class="created_at d-flex ffloat-right rounded">{{ date("d.m.y", $offer->created_at) }}</span>
+ </p>
+-->
+
+ <!--p class="card-text created_at h-100 float-right d-flex fflex-column justify-content-end">{{ $offer->created_at}}</p-->
+ </div>
+ <div class="card-img-overlay w-55">
+ <div class="d-inline align-items-start text-left w-100 mb-2">
+ <a class="s-link" title="Alles anzeigen von: {{ $offer->spirit_type }}" href="/search?q={{ $offer->spirit_type }}"><strong class="text-primary">{{ $offer->spirit_type }}</strong></a>
+ <a class="text-dark float-right" href="{{ $offer->shop_url }}">{{ $offer->shop }}</a>
+ </div>
+
+ <h4 class="mb-0 hide-overflow h-45">
+ <a class="text-dark ttext-truncate hide-overflow" href="{{ $offer->url }}" title="{{$offer->name}}" >{{ $offer->name }}</a>
+ <span class="text-fade-out"></span>
+ </h4>
+
+ <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">
+ <span class="float-right">{{ TF::fF($offer->volume) . " Liter" }}</span><span>{{ TF::fF($offer->abv) . "%" }} Alk.</span>
+ </div>
+ <a class="u ttext-large" href="{{ $offer->url }}" title="Link zum Angebot bei {{$offer->shop}}">Jetzt bestellen</a>
+ <p class="text-muted text-small w-100 nnmt-10">
+ Versand: <strong>{{ TF::fF($offer->shipping_costs) }}€</strong>
+<?php
+ if ( "" != $offer->free_shipping ) {
+?>
+ <span class=" float-right">Gratis ab <strong>{{ $offer->free_shipping }}</strong></span>
+<?php
+ } else {
+?>
+ <span class=" float-right">Versand ist nie kostenlos.</span>
+<?php
+ }
+?>
+ <br>
+<!--
+ <span class=" float-right">{{ date("d.m.Y", $offer->created_at) }}</span>
+-->
+ <span class=" float-right">* Preis vom <strong>{{ strftime("%d. %B", $offer->created_at) }}</strong></span>
+ </p>
+ </div>
+ </div>
+ <img class="card-img-right flex-auto d-none d-md-block border-white img-thumbnail" src="{{ $offer->image_url }}" alt="{{ $offer->name }}" title="{{$offer->name}} :: {{ $offer->shop }}">
+
+ <!-- <= sm -->
+ <!-- Maybe make the image a link
+ <a href="{{ $offer->url }}">
+ </a>
+ -->
+<?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">
+ <p class="card-text bg-danger float-right rounded" style="color: white; font-size: 150%; padding-right: 10px; padding-left:10px; opacity: 0.9;">{{ $offer->procent}}%</p>
+ </div>
+-->
+ <div class="flex-column bg-dark-opacity" >
+ <div class="d-inline align-items-start text-left w-100 mb-2">
+ <p class="card-text bg-danger rounded off-badge text-center" title="{{$offer->name}} :: {{ $offer->shop }}"><strong>{{ $offer->procent}}%</strong> gesenkt</p>
+ <a class="text-dark float-right text-dotted" href="{{ $offer->shop_url }}">{{ $offer->shop }}</a>
+ </div>
+ <div class="d-block align-items-start text-left w-100 mb-2">
+ <strong class="text-primary">{{ $offer->spirit_type }}</strong>
+ </div>
+ <h3 class="mb-0 d-inline-block hide-overflow h-100">
+ <a class="text-dark ttext-truncate" href="{{ $offer->url }}" title="{{$offer->name}}" >{{ $offer->name }}</a>
+ </h3>
+
+ <div class="mb-1 text-muted w-100">
+ <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"><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>
+ <p class="text-muted text-small w-100 nmt-10">
+ Versand: <strong>{{ TF::fF($offer->shipping_costs) }}€</strong>
+<?php
+ if ( "" != $offer->free_shipping ) {
+?>
+ <span class=" float-right">Gratis ab <strong>{{ $offer->free_shipping }}</strong></span>
+<?php
+ } else {
+?>
+ <span class=" float-right">Versand ist nie kostenlos.</span>
+<?php
+ }
+?>
+ <br>
+ <span class=" float-right">* Preis vom <strong>{{ strftime("%d. %B", $offer->created_at) }}</strong></span>
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+
+<?php
+
+
+ if ( $count % 2 == 1) {
+?>
+ <!-- ./row -->
+ </div>
+<?php
+ }
+
+ $count++;
+
+ }
+
+ // schließt den div bei ungerade einträgen
+ if ( $count % 2 == 1) {
+?>
+ <!-- ./row -->
+ </div>
+<?php
+ }
+
+?>
+
+ {{ $data->appends(Input::except('page'))->links() }}
+
+<?php
+ /* Ende Liste Angebote */
+}
+?>
+
+<!-- ./container -->
+ </div>
+
+@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