blob: 636f4ce42e668987d27cc29d33703af08fddebbf (
plain)
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
|
@extends('layouts.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.sortbuttons')
</div>
</div>
</header><!-- .page-header -->
{{ $data->appends(Input::except('page'))->links('paginate') }}
<?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 */
$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
</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>
</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
|