diff options
| author | horus | 2019-07-12 01:53:38 +0200 |
|---|---|---|
| committer | horus | 2019-07-12 01:53:38 +0200 |
| commit | 2b6ef973377f4f36e374e1f672c807932b746364 (patch) | |
| tree | c1c9525ce382e7c7b1e3396ed39c5dc36cebd4bb /resources | |
| parent | a1fa66f7afad278d77a2e44e21720e0e492d6cce (diff) | |
| download | kategorischeraperitif-2b6ef973377f4f36e374e1f672c807932b746364.tar.gz | |
Removes more PHP tags from templates.
Diffstat (limited to 'resources')
| -rw-r--r-- | resources/views/listoffer.blade.php | 38 | ||||
| -rw-r--r-- | resources/views/offers.blade.php | 9 | ||||
| -rw-r--r-- | resources/views/search.blade.php | 43 |
3 files changed, 28 insertions, 62 deletions
diff --git a/resources/views/listoffer.blade.php b/resources/views/listoffer.blade.php index dc5a154..906c83a 100644 --- a/resources/views/listoffer.blade.php +++ b/resources/views/listoffer.blade.php @@ -44,28 +44,22 @@ {{ $data->appends(Input::except('page'))->links('paginate') }} -<?php -if ( !$data->count() ) { - /* Keine Angebote */ -?> +@if ( !$data->count() ) + <!-- /* Keine Angebote */ --> + <div class="alert alert-secondary" data-track-content data-content-name="{{ ucwords($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('offers') + <!-- /* Ende Keine Angebote */ --> +@else + <!-- /* Liste Angebote */ --> + @include('offers') {{ $data->appends(Input::except('page'))->links('paginate') }} -<?php - /* Ende Liste Angebote */ -} -?> + <!-- /* Ende Liste Angebote */ --> +@endif <!-- ./container --> </div> @@ -78,18 +72,4 @@ if ( !$data->count() ) { @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/resources/views/offers.blade.php b/resources/views/offers.blade.php index 360ef52..9d806c9 100644 --- a/resources/views/offers.blade.php +++ b/resources/views/offers.blade.php @@ -1,6 +1,4 @@ -<?php -foreach( $data as $offer) { -?> +@foreach( $data as $offer) <div class="card"> <div class="row "> <div class="col-md-4"> @@ -64,7 +62,4 @@ foreach( $data as $offer) { </div> </div> - -<?php - } -?> +@endforeach diff --git a/resources/views/search.blade.php b/resources/views/search.blade.php index e15c9c2..03047ea 100644 --- a/resources/views/search.blade.php +++ b/resources/views/search.blade.php @@ -14,19 +14,10 @@ Finde den besten Deal <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">{{ $title }}</h1> - <p> - Sie haben nach <strong>{{ ucwords($search_phrase) }}</strong> gesucht ({{$count}} Treffer) - </p> - @include('snippets.filterbuttons') -<?php -} else { -?> +@if ( ! $data->count() ) + + <!-- Keine Ergebnisse --> + <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;"> @@ -47,17 +38,22 @@ if ( $data->count() ) { </p> @include('snippets.spirittypesbuttons') </div> -<?php -} -?> </div> </header><!-- .page-header --> +@else + <!-- Suchergebnisse --> + <div class="card taxonomy-card"> + <div class="card-body"> + <h1 class="card-title page-title">{{ $title }}</h1> + <p> + Sie haben nach <strong>{{ ucwords($search_phrase) }}</strong> gesucht ({{$count}} Treffer) + </p> + @include('snippets.filterbuttons') + </div> +</header><!-- .page-header --> -<?php -if ( $data->count() ) { -?> @include('snippets.spirittypesbuttons') {{ $data->appends(Input::except('page'))->links('paginate') }} @@ -66,15 +62,10 @@ if ( $data->count() ) { {{ $data->appends(Input::except('page'))->links('paginate') }} -<?php - /* Ende Liste Angebote */ -} -?> + <!-- /* Ende Liste Angebote */ --> <!-- ./container --> </div> +@endif @endsection - -@section('scripts') -@endsection |
