1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
|
@extends('layouts.fk-base')
@section('header')
{{ ucwords($title) }}
@endsection
@section('feed')
{!! Feed::link(secure_url($rss_feed) . "/", 'atom', 'Feed von ' . ucwords($spirit_type) . '-Angeboten', 'de') !!}
@endsection
@section('content')
<main class="site-main" id="main">
<?php
$header = "";
$header_text = "Du bist auf der Suche nach einer neuen Lieblingsspirituose? Hier sind alle aktuell reduzierten Angebote aufgelistet. Viel Spaß beim stöbern!";
if ( "Alle Angebote" == $spirit_type ) {
$header = "Alle aktuellen Sonderangebote";
} else if ( "Andere Angebote" == $spirit_type ){
$header = "Aktuelle Spirituosen-Sonderangebote";
} else {
$header = "Aktuelle " . ucwords($spirit_type) . "-Angebote";
$header_text = "Du bist auf der Suche nach einem neuen Lieblings" . $spirit_type . "? Hier sind alle aktuell reduzierten " . ucwords($spirit_type) . "s aufgelistet. Happy Dramming!";
}
?>
<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">{{ ucwords($spirit_type) }}</span><meta property="position" content="3"></span></li>
</ol>
</nav>
</div>
<div class="container">
<header class="page-header">
<div class="card taxonomy-card">
<div class="card-body">
<h1 class="card-title page-title">{{ $header }}</h1>
<p>
{{ $header_text }}
</p>
@include('snippets.fk-sortbuttons')
</div>
</div>
</header><!-- .page-header -->
{{ $data->appends(Input::except('page'))->links('paginate') }}
<?php
/*
<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">{{ ucwords($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="{{ 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('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>
<a style="color: inherit;" href="/angebote/search?q={{ ucwords($offer->spirit_type) }}" title="Alle {{ ucwords($offer->spirit_type) }} anzeigen">{{ ucwords($offer->spirit_type) }}</a> <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">
<span class="card-text col-md-6">
<p>
<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
<!--
<span sstyle="color:red;">Alter Preis: <del>{{ TF::fF($offer->original_price) }} €</del></span>
<strong style="font-size: 1.5rem;">{{ TF::fF($offer->discounted_price) }} €</strong>
<strong style="font-size: 1rem;">{{ TF::fF($offer->discounted_price) }} €</strong>
<br>
statt <del>{{ TF::fF($offer->original_price) }} €</del>
<br>
{{ TF::fF($offer->base_price ) }} € / Liter
-->
</p>
</span>
<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 %Y", $offer->created_at) }}
</p>
</div>
<?php
/*if ( $offer['include_post_link'] ) {
?>
<a href="<?php echo get_post_permalink( $post ); ?>#title" class="btn btn-light" title="Kommentieren und mehr">Detailansicht</a>
<?php
}
*/
?>
<!--p class="float-right">Preis vom {{ strftime("%d. %B", $offer->created_at) }}</p-->
</div>
</div>
</div>
</div>
<?php
}
/*
<div class="col-md-6 col-sm-12" id="{{ $offer->name }}" data-track-content data-content-name="{{ ucwords($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
*/
?>
{{ $data->appends(Input::except('page'))->links('paginate') }}
<?php
/* Ende Liste Angebote */
}
?>
<!-- ./container -->
</div>
</main>
@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
|