diff options
Diffstat (limited to 'resources/views/search.blade.php')
| -rw-r--r-- | resources/views/search.blade.php | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/resources/views/search.blade.php b/resources/views/search.blade.php new file mode 100644 index 0000000..2f381d7 --- /dev/null +++ b/resources/views/search.blade.php @@ -0,0 +1,175 @@ +@extends('layouts.base') + +@section('header') +Finde den besten Deal +@endsection + +@section('feed') + {!! Feed::link(secure_url($rss_feed), 'atom', 'Feed von ' . $search_phrase , 'de') !!} +@endsection + +@section('content') +<div class="container"> + <nav class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/" aria-label="breadcrumb"> + <ol class="breadcrumb"> + <!-- Breadcrumb NavXT 6.2.1 --> +<li class="home breadcrumb-item"><span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="Gehe zur Startseite: Fuselkönig.de" href="https://www.fuselkoenig.de" class="home"><span property="name">Startseite</span></a><meta property="position" content="1"></span></li> +<li class="post post-angebote-archive breadcrumb-item"><span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="Schau dir Angebote an." href="/angebote/" class="post post-angebote-archive"><span property="name">Angebote</span></a><meta property="position" content="2"></span></li> +<li class="archive taxonomy type current-item breadcrumb-item active" aria-current="page"><span property="itemListElement" typeof="ListItem"><span property="name">Suche nach <strong>"{{ ucwords($search_phrase) }}"</strong></span><meta property="position" content="3"></span></li> + </ol> + </nav> + </div> + + <div class="container"> + +<header class="page-header"> +<?php +if ( $data->count() ) { +?> + <div class="card taxonomy-card"> + <div class="card-body"> + <h1 class="card-title page-title">Suche</h1> + <p> + Sie haben nach <strong>{{ ucwords($search_phrase) }}</strong> gesucht ({{$count->count()}} Treffer) + </p> + @include('snippets.sortbuttons') +<?php +} else { +?> +<div class="alert alert-error" data-track-content data-content-name="Suche" data-content-piece="Keine Angebote" data-content-target=""> + <h1 class="alert-heading">Keinen Treffer</h1> + <p style="font-size: 17px;"> + Leider hat Ihre Suche nach <strong>{{ ucwords($search_phrase) }}</strong> keine Ergebnisse ergeben. Bitte versuchen sie es erneut mit einem anderen Begriff. + </p> + + <form action="/angebote/search"> + <div class="form-group"> + <label for=""></label> + <input type="text" class="form-control" name="q" id="front_search_form" aria-describedby="suchform-help" placeholder="Hier nach der gewünschten Spirituose suchen..."> + <p id="front_search_help" class="form-text">Suche zum Beispiel nach Glenfiddich oder Champagner.</p> + </div> + <button type="submit" class="btn btn-secondary">Suchen</button> + </form> +</div> +<?php +} +?> + + </div> +</header><!-- .page-header --> + + {{ $data->appends(Input::except('page'))->links('paginate') }} + +<?php + +<?php +if ( !$data->count() ) { + /* Keine Angebote */ +?> +<?php + /* Ende Keine Angebote */ +} else { + /* Liste Angebote */ + +//@include('snippets.sortbuttons') +$css_border_left = ""; + +foreach( $data as $offer) { +?> + + + + + + <div class="card <?php echo $css_border_left; ?>"> + <div class="row "> + <div class="col-md-4"> + <div class="card-header-dp-none"> + <p><strong> + <span style="visibility: hidden;"> + {{ ucwords($offer->spirit_type) }} <span class="float-right">{{ $offer->shop }}</span> + </span> + </strong></p> + </div> + <div class="card-img-overlay card-img-overlay-badge" > + <p class="card-text float-right rounded off-badge" >{{ $offer->procent}} %</p> + </div> + <img src="{{ $offer->image_url }}" class="card-img img-fluid mx-auto d-block" > + </div> + <div class="col-md-8 px-10"> + <div class="card-header"> + <p><strong> + {{ ucwords($offer->spirit_type) }} <span class="float-right">{{ $offer->shop }}</span> + </strong></p> + </div> + <div class="card-block card-body px-3"> + + <h3 class="card-title">{{ $offer->name }}</h3> + + <div class="row"> + <p class="card-text col-md-6"> + <strong class="new-price">Neuer Preis: {{ TF::fF($offer->discounted_price) }} €</strong> + <br> + statt <strong><del>{{ TF::fF($offer->original_price) }} €</del></strong> + <br> + {{ TF::fF($offer->base_price ) }} € / Liter + </p> + <p class="card-text col-md-6"> + Alkohol: {{ TF::fF($offer->abv) }} % + <br> + Volumen: {{ TF::fF($offer->volume) }} Liter + <br> + Versand: {{ TF::fF($offer->shipping_costs) }} € + <br> + <br> + </p> + </div> + </div> + <div class="card-footer row"> + <div class="col-md-6 col-sm-6"> + <a href="{{ $offer->url }}" class="btn btn-primary">Zum Shop</a> + </div> + <div class="col-md-6 col-sm-6"> + <p> + Preis vom {{ strftime("%d. %B", $offer->created_at) }} + </p> + </div> + </div> + </div> + + </div> + </div> + +<?php + } +?> + + {{ $data->appends(Input::except('page'))->links('paginate') }} + +<?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 |
