diff options
Diffstat (limited to 'resources')
23 files changed, 1324 insertions, 0 deletions
diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js new file mode 100644 index 0000000..98eca79 --- /dev/null +++ b/resources/assets/js/app.js @@ -0,0 +1,22 @@ + +/** + * First we will load all of this project's JavaScript dependencies which + * includes Vue and other libraries. It is a great starting point when + * building robust, powerful web applications using Vue and Laravel. + */ + +require('./bootstrap'); + +window.Vue = require('vue'); + +/** + * Next, we will create a fresh Vue application instance and attach it to + * the page. Then, you may begin adding components to this application + * or customize the JavaScript scaffolding to fit your unique needs. + */ + +Vue.component('example-component', require('./components/ExampleComponent.vue')); + +const app = new Vue({ + el: '#app' +}); diff --git a/resources/assets/js/bootstrap.js b/resources/assets/js/bootstrap.js new file mode 100644 index 0000000..fb0f1ed --- /dev/null +++ b/resources/assets/js/bootstrap.js @@ -0,0 +1,56 @@ + +window._ = require('lodash'); +window.Popper = require('popper.js').default; + +/** + * We'll load jQuery and the Bootstrap jQuery plugin which provides support + * for JavaScript based Bootstrap features such as modals and tabs. This + * code may be modified to fit the specific needs of your application. + */ + +try { + window.$ = window.jQuery = require('jquery'); + + require('bootstrap'); +} catch (e) {} + +/** + * We'll load the axios HTTP library which allows us to easily issue requests + * to our Laravel back-end. This library automatically handles sending the + * CSRF token as a header based on the value of the "XSRF" token cookie. + */ + +window.axios = require('axios'); + +window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; + +/** + * Next we will register the CSRF Token as a common header with Axios so that + * all outgoing HTTP requests automatically have it attached. This is just + * a simple convenience so we don't have to attach every token manually. + */ + +let token = document.head.querySelector('meta[name="csrf-token"]'); + +if (token) { + window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; +} else { + console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); +} + +/** + * Echo exposes an expressive API for subscribing to channels and listening + * for events that are broadcast by Laravel. Echo and event broadcasting + * allows your team to easily build robust real-time web applications. + */ + +// import Echo from 'laravel-echo' + +// window.Pusher = require('pusher-js'); + +// window.Echo = new Echo({ +// broadcaster: 'pusher', +// key: process.env.MIX_PUSHER_APP_KEY, +// cluster: process.env.MIX_PUSHER_APP_CLUSTER, +// encrypted: true +// }); diff --git a/resources/assets/js/components/ExampleComponent.vue b/resources/assets/js/components/ExampleComponent.vue new file mode 100644 index 0000000..2805329 --- /dev/null +++ b/resources/assets/js/components/ExampleComponent.vue @@ -0,0 +1,23 @@ +<template> + <div class="container"> + <div class="row justify-content-center"> + <div class="col-md-8"> + <div class="card card-default"> + <div class="card-header">Example Component</div> + + <div class="card-body"> + I'm an example component. + </div> + </div> + </div> + </div> + </div> +</template> + +<script> + export default { + mounted() { + console.log('Component mounted.') + } + } +</script> diff --git a/resources/assets/sass/_variables.scss b/resources/assets/sass/_variables.scss new file mode 100644 index 0000000..1c44aff --- /dev/null +++ b/resources/assets/sass/_variables.scss @@ -0,0 +1,18 @@ + +// Body +$body-bg: #f5f8fa; + +// Typography +$font-family-sans-serif: "Raleway", sans-serif; +$font-size-base: 0.9rem; +$line-height-base: 1.6; +$text-color: #636b6f; + +// Navbar +$navbar-default-bg: #fff; + +// Buttons +$btn-default-color: $text-color; + +// Panels +$panel-default-heading-bg: #fff; diff --git a/resources/assets/sass/app.scss b/resources/assets/sass/app.scss new file mode 100644 index 0000000..0077cb1 --- /dev/null +++ b/resources/assets/sass/app.scss @@ -0,0 +1,14 @@ + +// Fonts +@import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600"); + +// Variables +@import "variables"; + +// Bootstrap +@import '~bootstrap/scss/bootstrap'; + +.navbar-laravel { + background-color: #fff; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04); +} diff --git a/resources/lang/de/pagination.php b/resources/lang/de/pagination.php new file mode 100644 index 0000000..ad55d91 --- /dev/null +++ b/resources/lang/de/pagination.php @@ -0,0 +1,20 @@ +<?php + +return [ + + /* + |-------------------------------------------------------------------------- + | Pagination Language Lines + |-------------------------------------------------------------------------- + | + | The following language lines are used by the paginator library to build + | the simple pagination links. You are free to change them to anything + | you want to customize your views to better match your application. + | + */ + + 'previous' => '« Vorherige', + 'next' => 'Nächste »', + 'start' => 'Anfang', + +]; diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php new file mode 100644 index 0000000..e5506df --- /dev/null +++ b/resources/lang/en/auth.php @@ -0,0 +1,19 @@ +<?php + +return [ + + /* + |-------------------------------------------------------------------------- + | Authentication Language Lines + |-------------------------------------------------------------------------- + | + | The following language lines are used during authentication for various + | messages that we need to display to the user. You are free to modify + | these language lines according to your application's requirements. + | + */ + + 'failed' => 'These credentials do not match our records.', + 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + +]; diff --git a/resources/lang/en/pagination.php b/resources/lang/en/pagination.php new file mode 100644 index 0000000..d481411 --- /dev/null +++ b/resources/lang/en/pagination.php @@ -0,0 +1,19 @@ +<?php + +return [ + + /* + |-------------------------------------------------------------------------- + | Pagination Language Lines + |-------------------------------------------------------------------------- + | + | The following language lines are used by the paginator library to build + | the simple pagination links. You are free to change them to anything + | you want to customize your views to better match your application. + | + */ + + 'previous' => '« Previous', + 'next' => 'Next »', + +]; diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php new file mode 100644 index 0000000..e5544d2 --- /dev/null +++ b/resources/lang/en/passwords.php @@ -0,0 +1,22 @@ +<?php + +return [ + + /* + |-------------------------------------------------------------------------- + | Password Reset Language Lines + |-------------------------------------------------------------------------- + | + | The following language lines are the default lines which match reasons + | that are given by the password broker for a password update attempt + | has failed, such as for an invalid token or invalid new password. + | + */ + + 'password' => 'Passwords must be at least six characters and match the confirmation.', + 'reset' => 'Your password has been reset!', + 'sent' => 'We have e-mailed your password reset link!', + 'token' => 'This password reset token is invalid.', + 'user' => "We can't find a user with that e-mail address.", + +]; diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php new file mode 100644 index 0000000..edc036d --- /dev/null +++ b/resources/lang/en/validation.php @@ -0,0 +1,121 @@ +<?php + +return [ + + /* + |-------------------------------------------------------------------------- + | Validation Language Lines + |-------------------------------------------------------------------------- + | + | The following language lines contain the default error messages used by + | the validator class. Some of these rules have multiple versions such + | as the size rules. Feel free to tweak each of these messages here. + | + */ + + 'accepted' => 'The :attribute must be accepted.', + 'active_url' => 'The :attribute is not a valid URL.', + 'after' => 'The :attribute must be a date after :date.', + 'after_or_equal' => 'The :attribute must be a date after or equal to :date.', + 'alpha' => 'The :attribute may only contain letters.', + 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', + 'alpha_num' => 'The :attribute may only contain letters and numbers.', + 'array' => 'The :attribute must be an array.', + 'before' => 'The :attribute must be a date before :date.', + 'before_or_equal' => 'The :attribute must be a date before or equal to :date.', + 'between' => [ + 'numeric' => 'The :attribute must be between :min and :max.', + 'file' => 'The :attribute must be between :min and :max kilobytes.', + 'string' => 'The :attribute must be between :min and :max characters.', + 'array' => 'The :attribute must have between :min and :max items.', + ], + 'boolean' => 'The :attribute field must be true or false.', + 'confirmed' => 'The :attribute confirmation does not match.', + 'date' => 'The :attribute is not a valid date.', + 'date_format' => 'The :attribute does not match the format :format.', + 'different' => 'The :attribute and :other must be different.', + 'digits' => 'The :attribute must be :digits digits.', + 'digits_between' => 'The :attribute must be between :min and :max digits.', + 'dimensions' => 'The :attribute has invalid image dimensions.', + 'distinct' => 'The :attribute field has a duplicate value.', + 'email' => 'The :attribute must be a valid email address.', + 'exists' => 'The selected :attribute is invalid.', + 'file' => 'The :attribute must be a file.', + 'filled' => 'The :attribute field must have a value.', + 'image' => 'The :attribute must be an image.', + 'in' => 'The selected :attribute is invalid.', + 'in_array' => 'The :attribute field does not exist in :other.', + 'integer' => 'The :attribute must be an integer.', + 'ip' => 'The :attribute must be a valid IP address.', + 'ipv4' => 'The :attribute must be a valid IPv4 address.', + 'ipv6' => 'The :attribute must be a valid IPv6 address.', + 'json' => 'The :attribute must be a valid JSON string.', + 'max' => [ + 'numeric' => 'The :attribute may not be greater than :max.', + 'file' => 'The :attribute may not be greater than :max kilobytes.', + 'string' => 'The :attribute may not be greater than :max characters.', + 'array' => 'The :attribute may not have more than :max items.', + ], + 'mimes' => 'The :attribute must be a file of type: :values.', + 'mimetypes' => 'The :attribute must be a file of type: :values.', + 'min' => [ + 'numeric' => 'The :attribute must be at least :min.', + 'file' => 'The :attribute must be at least :min kilobytes.', + 'string' => 'The :attribute must be at least :min characters.', + 'array' => 'The :attribute must have at least :min items.', + ], + 'not_in' => 'The selected :attribute is invalid.', + 'numeric' => 'The :attribute must be a number.', + 'present' => 'The :attribute field must be present.', + 'regex' => 'The :attribute format is invalid.', + 'required' => 'The :attribute field is required.', + 'required_if' => 'The :attribute field is required when :other is :value.', + 'required_unless' => 'The :attribute field is required unless :other is in :values.', + 'required_with' => 'The :attribute field is required when :values is present.', + 'required_with_all' => 'The :attribute field is required when :values is present.', + 'required_without' => 'The :attribute field is required when :values is not present.', + 'required_without_all' => 'The :attribute field is required when none of :values are present.', + 'same' => 'The :attribute and :other must match.', + 'size' => [ + 'numeric' => 'The :attribute must be :size.', + 'file' => 'The :attribute must be :size kilobytes.', + 'string' => 'The :attribute must be :size characters.', + 'array' => 'The :attribute must contain :size items.', + ], + 'string' => 'The :attribute must be a string.', + 'timezone' => 'The :attribute must be a valid zone.', + 'unique' => 'The :attribute has already been taken.', + 'uploaded' => 'The :attribute failed to upload.', + 'url' => 'The :attribute format is invalid.', + + /* + |-------------------------------------------------------------------------- + | Custom Validation Language Lines + |-------------------------------------------------------------------------- + | + | Here you may specify custom validation messages for attributes using the + | convention "attribute.rule" to name the lines. This makes it quick to + | specify a specific custom language line for a given attribute rule. + | + */ + + 'custom' => [ + 'attribute-name' => [ + 'rule-name' => 'custom-message', + ], + ], + + /* + |-------------------------------------------------------------------------- + | Custom Validation Attributes + |-------------------------------------------------------------------------- + | + | The following language lines are used to swap attribute place-holders + | with something more reader friendly such as E-Mail Address instead + | of "email". This simply helps us make messages a little cleaner. + | + */ + + 'attributes' => [], + +]; diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php new file mode 100644 index 0000000..7149031 --- /dev/null +++ b/resources/views/index.blade.php @@ -0,0 +1,162 @@ +@extends('layouts.base') + +@section('header') +Angebote +@endsection + +@section('content') +<main class="site-main" id="main"> + <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="archive taxonomy type current-item breadcrumb-item active" aria-current="page"><span property="itemListElement" typeof="ListItem"><span property="name">Angebote</span><meta property="position" content="2"></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">Finde jetzt den besten Deal!</h1> + <p class="lead my-3"> + Du suchst einen neuen Gin, Whisky oder Rum? <em>We've got you covered.</em> <br><br>Suche und finde jetzt dein Lieblingsdrink unter {{$hits->count }} verschiedenen Sonderangeboten. Täglich neue Schnäppchen im Bereich Spirituosen & Co.</p> + <p class="lead my-3"> + <a href="#erfahremehr">Erfahre mehr…</a> + </p> + </div> + </div> +</header><!-- .page-header --> + +<?php + +if ( empty($data) ) { + /* Keine Angebote */ +?> +<div class="alert alert-error"> + <h4 class="alert-heading">Keine Angebote</h4> + Momentan liegen keine Angebote vor. Probieren Sie es später noch einmal. +</div> +<?php + /* Ende Keine Angebote */ +} else { + /* Liste Angebote */ + + $count = 0; + + foreach( $data as $offer) { + + + if ($offer->spirit_type == "RSS-Feeds") { + #$offer->angebotsname = "dem " . $offer->angebotsname; + } else if ( !in_array(strtolower($offer->spirit_type), $views) ) { + $offer->url = "misc"; + $offer->angebotsname = "weiteren Angeboten"; + $offer->linktext = "Weitere günstige Angebote entdecken und bis zu " . $offer->procent . "% sparen."; + $offer->spirit_type = "Verschiedenes"; + } else { + $offer->url = lcfirst($offer->url) ; + $offer->angebotsname = "den " . $offer->angebotsname . "-Angeboten"; + $offer->linktext = "Finde den günstigsten ". $offer->spirit_type ." und spare bis zu " . $offer->procent . "%."; + } + + if ( $count % 2 == 0) { +?> + <div class="row mb-2"> +<?php + } + if ( "RSS-Feeds" != $offer->spirit_type ) { + +?> +<div class="col-md-6 col-sm-12" id="{{ $offer->name }}"> + <div class="card"> + <div class="row "> + <div class="col-md-4"> + <div class="card-header-dp-none"> + <p><strong> + <span style="visibility: hidden;"> + {{ ucfirst($offer->spirit_type) }} <span class="float-right">{{ $offer->name}}</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> + <a href="/angebote/{{ $offer->url }}"> + <img src="{{ $offer->image_url }}" class="card-img img-fluid mx-auto d-block"> + </a> + </div> + <div class="col-md-8 px-10"> + <div class="card-header"> + <p><strong> + <a style="color: inherit;" href="/angebote/search?q={{ ucfirst($offer->spirit_type) }}" title="Alle {{ ucfirst($offer->spirit_type) }} anzeigen">{{ ucfirst($offer->spirit_type) }}</a> + </strong></p> + </div> + <div class="card-block card-body px-3"> + + <a class="text-dark card-link" href="/angebote/{{ $offer->url }}"> + <h3 class="card-title">Hier geht es zu {{ $offer->angebotsname }}</h3> + <p>{{ $offer->linktext }}</p> + </a> + + </div> + </div> + + </div> + </div> +</div> + +<?php + } + if ( $count % 2 == 1) { +?> + </div> +<?php + } + + $count++; + +} + + // schließt den row div wieder bei ungerade anzahl + if ( $count % 2 == 1) { +?> + </div> +<?php + } +} +?> + +<h3 id="erfahremehr">Was passiert hier?</h3> +<p> +Auf dieser Webseite kuratiere ich die aktuellen Sonderangebote der wichtigsten Spirituosenhändler. Neue Angebote werden automatisch erkannt und hinzugefügt; nicht mehr gültige Angebote werden entfernt. +</p> +<h3>Wie häufig werden die Angebote aktualisiert?</h3> +<p> +Mehrmals täglich. +</p> +<h3>Gibt es Push-Nachrichten?</h3> +<p> +Noch nicht. Momentan ist die einzige Möglichkeit den Angeboten via RSS-Feed zu folgen. Mitteilungen per Push, E-Mail oder Twitter sind jedoch geplant. +</p> + </div> +</main> +@endsection + + +@section('scripts') +<script> +$(".js-link-replacement").hover(function(){ + $(this).css( 'cursor', 'pointer' ); +}, +function(){ + $(this).css( 'cursor', 'inherit'); +}); + +$(".js-link-replacement").click(function(){ + window.location.href = $(this).data("href"); +}); +</script> +@endsection diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php new file mode 100644 index 0000000..b7a7dd8 --- /dev/null +++ b/resources/views/layouts/base.blade.php @@ -0,0 +1,91 @@ +<!DOCTYPE html> +<html lang="de"> +<head> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, minimumscale=1.0, maximum-scale=1.0" /> + <meta name="robots" content="noindex,follow"/> + <meta name="description" content=""> + <meta name="author" content=""> + <link rel="icon" href="https://files.fuselkoenig.de/favicon.ico"> + + <title>@yield('header') | {{ env("APP_BRANDING") }}</title> + + <link rel="alternate" type="application/rss+xml" title="Fuselkönig » Feed" href="https://www.fuselkoenig.de/feed/" /> + <link rel="alternate" type="application/rss+xml" title="Fuselkönig » Kommentar-Feed" href="https://www.fuselkoenig.de/comments/feed/" /> + + <link rel='stylesheet' id='yarppWidgetCss-css' href='https://www.fuselkoenig.de/wp-content/plugins/yet-another-related-posts-plugin/style/widget.css' type='text/css' media='all' /> + <link rel='stylesheet' id='social-icons-widget-widget-css' href='https://www.fuselkoenig.de/wp-content/plugins/social-media-icons-widget/css/social_icons_widget.css' type='text/css' media='all' /> + <link rel='stylesheet' id='wp-block-library-css' href='https://www.fuselkoenig.de/wp-includes/css/dist/block-library/style.min.css' type='text/css' media='all' /> + <link rel='stylesheet' id='contact-form-7-css' href='https://www.fuselkoenig.de/wp-content/plugins/contact-form-7/includes/css/styles.css' type='text/css' media='all' /> + <link rel='stylesheet' id='cookie-law-info-css' href='https://www.fuselkoenig.de/wp-content/plugins/cookie-law-info/public/css/cookie-law-info-public.css' type='text/css' media='all' /> + <link rel='stylesheet' id='cookie-law-info-gdpr-css' href='https://www.fuselkoenig.de/wp-content/plugins/cookie-law-info/public/css/cookie-law-info-gdpr.css' type='text/css' media='all' /> + <link rel='stylesheet' id='theme-styles-css' href='https://www.fuselkoenig.de/wp-content/themes/fuselkoenig_de_v2/css/theme.css' type='text/css' media='all' /> + <link rel='stylesheet' id='elasticpress-facets-css' href='https://www.fuselkoenig.de/wp-content/plugins/elasticpress/features/facets/assets/css/facets.min.css' type='text/css' media='all' /> + <link rel='stylesheet' id='recent-posts-widget-with-thumbnails-public-style-css' href='https://www.fuselkoenig.de/wp-content/plugins/recent-posts-widget-with-thumbnails/public.css' type='text/css' media='all' /> + <link rel='stylesheet' href="https://www.fuselkoenig.de/wp-content/themes/fuselkoenig_de_v2/css/open-iconic-bootstrap.css"> + + <script type='text/javascript' src='https://www.fuselkoenig.de/wp-includes/js/jquery/jquery.js?ver=1.4.1'></script> + <script type='text/javascript' src='https://www.fuselkoenig.de/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1'></script> + <link rel="shortcut icon" href="https://www.fuselkoenig.de/wp-content/themes/fuselkoenig_de_v2/img/favicon.png"> + <style> + p { font-size: 18px; } + .main-header { + background-image: url("https://www.fuselkoenig.de/wp-content/themes/fuselkoenig_de_v2/img/angebote_background.jpg");"); + } + </style> + + + + @yield('feed') + @yield('css') + +<?php +if ( "" != env('PIWIK_URL') && "" != env('PIWIK_ID') ) { +?> +<script type="text/javascript"> + var _paq = _paq || []; + /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + _paq.push(['enableHeartBeatTimer', 5]); + _paq.push(['trackVisibleContentImpressions']); + (function() { + var u="{{ env('PIWIK_URL') }}"; + _paq.push(['setTrackerUrl', u+'js/']); + _paq.push(['setSiteId', '{{ env("PIWIK_ID") }}']); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'js/'; s.parentNode.insertBefore(g,s); + })(); +</script> +<?php +} +?> +</head> + +<body> + +<?php +if ( "" != env('PIWIK_URL') && "" != env('PIWIK_ID') ) { +?> +<noscript> +<img src="{{ env('PIWIK_URL') }}js/?idsite={{ env('PIWIK_ID') }}&rec=1" style="border:0" alt="" /> +</noscript> +<?php +} +?> + + @include('snippets.navbar') + + @yield('content') + + @include('snippets.footer') + +<script type='text/javascript' src='https://www.fuselkoenig.de/wp-content/plugins/contact-form-7/includes/js/scripts.js'></script> +<script type='text/javascript' src='https://www.fuselkoenig.de/wp-content/themes/fuselkoenig_de_v2/js/theme.min.js'></script> +<script type='text/javascript' src='https://www.fuselkoenig.de/wp-includes/js/underscore.min.js'></script> +<script type='text/javascript' src='https://www.fuselkoenig.de/wp-content/plugins/elasticpress/features/facets/assets/js/facets.min.js'></script> +<script type='text/javascript' src='https://www.fuselkoenig.de/wp-includes/js/wp-embed.min.js'></script> + + @yield('scripts') +</body> +</html> diff --git a/resources/views/offer.blade.php b/resources/views/offer.blade.php new file mode 100644 index 0000000..636f4ce --- /dev/null +++ b/resources/views/offer.blade.php @@ -0,0 +1,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 diff --git a/resources/views/paginate.blade.php b/resources/views/paginate.blade.php new file mode 100644 index 0000000..1697097 --- /dev/null +++ b/resources/views/paginate.blade.php @@ -0,0 +1,36 @@ +@if ($paginator->hasPages()) + <ul class="pagination"> + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) + <li class="page-item disabled"><span class="page-link">@lang('pagination.previous')</span></li> + @else + <li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a></li> + @endif + + {{-- Pagination Elements --}} + @foreach ($elements as $element) + {{-- "Three Dots" Separator --}} + @if (is_string($element)) + <li class="page-item disabled dp-md-none"><span class="page-link">{{ $element }}</span></li> + @endif + + {{-- Array Of Links --}} + @if (is_array($element)) + @foreach ($element as $page => $url) + @if ($page == $paginator->currentPage()) + <li class="page-item active dp-md-none"><span class="page-link">{{ $page }}</span></li> + @else + <li class="page-item dp-md-none"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li> + @endif + @endforeach + @endif + @endforeach + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) + <li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a></li> + @else + <li class="page-item disabled"><span class="page-link">@lang('pagination.next')</span></li> + @endif + </ul> +@endif 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 diff --git a/resources/views/snippets/footer.blade.php b/resources/views/snippets/footer.blade.php new file mode 100644 index 0000000..a870301 --- /dev/null +++ b/resources/views/snippets/footer.blade.php @@ -0,0 +1,47 @@ +<!-- .custom-footer-widget --> +<div class="wrapper footer" id="wrapper-footer-full"> + <div class="container" id="footer-full-content" tabindex="-1"> + <div class="row"> + <div id="custom_html-2" class="widget_text footer-widget widget_custom_html widget-count-1 col-md-12"> + <div class="textwidget custom-html-widget"> + + <div class="row footer-menu"> + <div class="col-xs col-sm"> + <nav class="nav flex-column"> + <h3 class="nav-item text-muted">Impressum</h3> + <a class="nav-link" rel="nofollow" title="Link zum Impressum" href="/impressum/">Impressum</a> + <a class="nav-link" rel="nofollow" title="Link zum Haftungsausschluss" href="/impressum/#haftungsausschluss">Haftungsausschluss</a> + <a class="nav-link" rel="nofollow" title="Link zur Datenschutzerklärung" href="/impressum/#datenschutz">Datenschutz</a> + </nav> + </div> + <div class="col-xs col-sm"> + <nav class="nav flex-column ml-0"> + <h3 class="nav-item text-muted">Kontakt</h3> + <a class="nav-link" title="Link zum Kontaktformular" href="/kontakt">Kontaktformular</a> + <a class="nav-link" rel="nofollow" title="Über mich" href="/ueber-diesen-blog/">Maximilian Möhring</a> + </nav> + </div> + <div class="col-xs-12 col-sm"> + <nav class="nav flex-column ml-0"> + <h3 class="nav-item text-muted">Social Media</h3> + <ul class="icons-medium nav"> + <li class="pinterest"> + <a title="Pinterest" class="nav-link" href="https://pinterest.de/fuselkoenig" target="_blank"><img class="site-icon" src="/wp-content/plugins/social-media-icons-widget/icons/medium/pinterest.jpg" alt="Pinterest" title="Pinterest" height="32" width="32" /></a> + </li> + <li class="twitter nav-item"> + <a title="Twitter" class="nav-link" href="https://twitter.com/fuselkoenig" target="_blank"><img class="site-icon" src="/wp-content/plugins/social-media-icons-widget/icons/medium/twitter.jpg" alt="Twitter" title="Twitter" height="32" width="32" /></a> + </li> + <li class="rss"> + <a title="RSS-Feed" class="nav-link" href="/feed/" target="_blank"><img class="site-icon" src="/wp-content/plugins/social-media-icons-widget/icons/medium/rss.jpg" alt="RSS Feed" title="RSS Feed" height="32" width="32" /></a> + </li> + </ul> + </nav> + </div> + </div> +</div></div></div><!-- .footer-widget --> + </div> + </div> +<!-- .custom-footer-widget --> + +<a id="back-to-top" href="#" class="btn btn-primary btn-float btn-lg back-to-top" role="button" title="Nach oben" data-toggle="tooltip" data-placement="left"><i class="material-icons">arrow_upward</i></a> +</div><!-- #page we need this extra closing tag here --> diff --git a/resources/views/snippets/navbar.blade.php b/resources/views/snippets/navbar.blade.php new file mode 100644 index 0000000..26e2963 --- /dev/null +++ b/resources/views/snippets/navbar.blade.php @@ -0,0 +1,61 @@ +<div id="wrapper-navbar" itemscope itemtype="http://schema.org/WebSite"> + + <a class="skip-link sr-only sr-only-focusable" href="#content">Skip to content</a> + + <nav class="navbar navbar-expand-md"> + + + <!-- Your site title as branding in the menu --> + + + <a class="navbar-brand" rel="home" href="https://www.fuselkoenig.de/" title="Fuselkönig" itemprop="url"><img src="https://www.fuselkoenig.de/wp-content/themes/fuselkoenig_de_v2/img/paw_with_glencairn.png" width=60 height=60 alt="logo"> Fuselkönig</a> + + + + <!-- end custom logo --> + + <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation"> + <span class="navbar-toggler-icon"></span> + </button> + + <!-- The WordPress Menu goes here --> + <div id="navbarNavDropdown" class="collapse navbar-collapse"><ul id="main-menu" class="navbar-nav ml-auto flex-column-sm"><li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3760" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-ancestor current-menu-parent menu-item-has-children dropdown menu-item-3760 nav-item"><a title="Was wurde getrunken?" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="dropdown-toggle nav-link" id="menu-item-dropdown-3760">Was wurde getrunken?</a> +<ul class="dropdown-menu" aria-labelledby="menu-item-dropdown-3760" role="menu"> + <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3769" class="menu-item menu-item-type-taxonomy menu-item-object-category current-menu-item active menu-item-3769 nav-item"><a title="Whisky" href="https://www.fuselkoenig.de/category/whisky/" class="dropdown-item">Whisky</a></li> + <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3770" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3770 nav-item"><a title="Wodka" href="https://www.fuselkoenig.de/category/wodka/" class="dropdown-item">Wodka</a></li> + <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3768" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3768 nav-item"><a title="Weinbrand" href="https://www.fuselkoenig.de/category/weinbrand/" class="dropdown-item">Weinbrand</a></li> + <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3767" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3767 nav-item"><a title="Obstbrand" href="https://www.fuselkoenig.de/category/obstbrand/" class="dropdown-item">Obstbrand</a></li> + <li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3766" class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3766 nav-item"><a title="Likör" href="https://www.fuselkoenig.de/category/likoer/" class="dropdown-item">Likör</a></li> +</ul> +</li> +<li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3761" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3761 nav-item active"><a title="Sonderangebote" href="/angebote/" class="nav-link">Sonderangebote</a></li> +<li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3764" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3764 nav-item"><a title="Empfehlung" href="/tag/empfehlung/" class="nav-link">Empfehlung</a></li> +<li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3762" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3762 nav-item"><a title="Fuselfotos" href="https://www.fuselkoenig.de/fuselfotos/" class="nav-link">Fuselfotos</a></li> +<li itemscope="itemscope" itemtype="https://www.schema.org/SiteNavigationElement" id="menu-item-3763" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3763 nav-item"><a title="Über mich" href="https://www.fuselkoenig.de/ueber-diesen-blog/" class="nav-link">Über mich</a></li> +</ul></div> + </nav><!-- .site-navigation --> + + </div><!-- #wrapper-navbar end --> + <div class="main-header"> + <div class="container"> + <div class="row"> + <div class="col-sm col-xl-8 align-self-center"> + <h1 class="d-none d-lg-inline"><a class="brand-url" rel="home" href="https://www.fuselkoenig.de/" title="Fuselkönig" itemprop="url">Fuselkönig</a></h1> + <p class="slogan">Finde den besten Deal in Sachen Spirituosen</p> + </div> + <div class="col-sm col-xl-4 align-self-center"> + +<form class="form-inline my-2 my-lg-0 float-none float-sm-right" method="get" id="searchform" action="https://www.fuselkoenig.de/angebote/search" role="search"> + <label class="sr-only" for="s">Search</label> + <div class="input-group"> + <input class="field form-control" id="q" name="q" type="text" + placeholder="Alle Angebote durchsuchen…" value=""> + <span class="input-group-append"> + <button class="btn btn-dark my-2 my-sm-0" id="searchsubmit" name="" type="submit"><i class="material-icons">search</i></button> + </span> + </div> +</form> + </div> + </div> + </div> + </div> diff --git a/resources/views/snippets/sortbuttons.blade.php b/resources/views/snippets/sortbuttons.blade.php new file mode 100644 index 0000000..71ea1e5 --- /dev/null +++ b/resources/views/snippets/sortbuttons.blade.php @@ -0,0 +1,109 @@ +<?php +$filter = Request::Input('sort'); +$order = Request::Input('order'); +$show_filter = false; + +switch( $filter ) { + case "price": + $filter = "Preis"; + break; + case "name": + $filter = "Name"; + break; + case "shop": + $filter = "Shop"; + break; + case "procent": + $filter = "Preisnachlass"; + break; + case "time": + $filter = "Aktualität"; + break; + default: $filter = ""; + break; +} + +if ( "" != $filter ) { + $show_filter = true; +} + +if ( "desc" == $order ) { + $order = "Absteigend"; +} else { + $order = "Aufsteigend"; +} +?> +<p> + <button class="btn btn-white" type="button" data-toggle="collapse" data-target="#collapsefilter" aria-expanded="false" aria-controls="collapsefilter"> + Filter Anzeigen + </button> + <a class="btn btn-rss btn-primary text-white pull-right" href={{ secure_url($rss_feed) }} title="Link zum RSS-Feed" onclick="javascript:_paq.push(['trackEvent', 'Sort-Button', 'RSS-Feed']);"> + <span class="oi oi-rss-alt" title="Link zum RSS-Feed" aria-hidden="true"></span> + </a> +</p> + +<div class="collapse" id="collapsefilter"> +<p>Sortieren nach: <?php if ( $show_filter ) { ?><strong>{{ $filter . " (" . $order . ")" }} </strong><?php }?></p> +<div class="btn-toolbar mb-2 align-top w-100" role="toolbar" aria-label="Sortieren"> + <div class="btn-group mr-2 mt-2" role="group" aria-label="Sortieren"> + <div class="dropdown mr-2"> + <button class="btn btn-complementary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + Preis + </button> + <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <a class="dropdown-item" href="?sort=price&order=asc{!! Request::is('angebote/search') ? '&q=' : '' !!}{{ Request::is('angebote/search') ? $search_phrase : '' }}" onclick="javascript:_paq.push(['trackEvent', 'Sort-Button', 'Preis', 'Niedrigster Preis']);">Niedrigster Preis</a> + <a class="dropdown-item" href="?sort=price&order=desc{!! Request::is('angebote/search') ? '&q=' : '' !!}{{ Request::is('angebote/search') ? $search_phrase : '' }}" onclick="javascript:_paq.push(['trackEvent', 'Sort-Button', 'Preis', 'Höchster Preis']);">Höchster Preis</a> + </div> + </div> + <div class="dropdown mr-2"> + <button class="btn btn-complementary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + Name + </button> + <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <a class="dropdown-item" href="?sort=name&order=asc{!! Request::is('angebote/search') ? '&q=' : '' !!}{{ Request::is('angebote/search') ? $search_phrase : '' }}" onclick="javascript:_paq.push(['trackEvent', 'Sort-Button', 'Name', 'Alphabetisch']);">Alphabetisch</a> + <a class="dropdown-item" href="?sort=name&order=desc{!! Request::is('angebote/search') ? '&q=' : '' !!}{{ Request::is('angebote/search') ? $search_phrase : '' }}" onclick="javascript:_paq.push(['trackEvent', 'Sort-Button', 'Name', 'Umgekehrt']);">Umgekehrt</a> + </div> + </div> + </div> + <div class="btn-group mr-2 mt-2" role="group" aria-label="Sortieren"> + <div class="dropdown mr-2"> + <button class="btn btn-complementary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + Shop + </button> + <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <a class="dropdown-item" href="?sort=shop&order=asc{!! Request::is('angebote/search') ? '&q=' : '' !!}{{ Request::is('angebote/search') ? $search_phrase : '' }}" onclick="javascript:_paq.push(['trackEvent', 'Sort-Button', 'Shop', 'Alphabetisch']);">Alphabetisch</a> + <a class="dropdown-item" href="?sort=shop&order=desc{!! Request::is('angebote/search') ? '&q=' : '' !!}{{ Request::is('angebote/search') ? $search_phrase : '' }}" onclick="javascript:_paq.push(['trackEvent', 'Sort-Button', 'Shop', 'Umgekehrt']);">Umgekehrt</a> + </div> + </div> + </div> + <div class="btn-group mr-2 mt-2" role="group" aria-label="Sortieren"> + <div class="dropdown mr-2"> + <button class="btn btn-complementary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + Preisnachlass + </button> + <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <a class="dropdown-item" href="?sort=procent&order=asc{!! Request::is('angebote/search') ? '&q=' : '' !!}{{ Request::is('angebote/search') ? $search_phrase : '' }}" onclick="javascript:_paq.push(['trackEvent', 'Sort-Button', 'Preisnachlass', 'Niedrigster Preisnachlass']);">Niedrigster Preisnachlass</a> + <a class="dropdown-item" href="?sort=procent&order=desc{!! Request::is('angebote/search') ? '&q=' : '' !!}{{ Request::is('angebote/search') ? $search_phrase : '' }}" onclick="javascript:_paq.push(['trackEvent', 'Sort-Button', 'Preisnachlass', 'Höchster Preisnachlass']);">Höchster Preisnachlass</a> + </div> + </div> + </div> + <div class="btn-group mr-2 mt-2" role="group" aria-label="Sortieren"> + <div class="dropdown"> + <button class="btn btn-complementary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + Aktualität + </button> + <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <a class="dropdown-item" href="?sort=time&order=desc{!! Request::is('angebote/search') ? '&q=' : '' !!}{{ Request::is('angebote/search') ? $search_phrase : '' }}" onclick="javascript:_paq.push(['trackEvent', 'Sort-Button', 'Aktualität', 'Neueste zuerst']);">Neueste zuerst (Standard)</a> + <a class="dropdown-item" href="?sort=time&order=asc{!! Request::is('angebote/search') ? '&q=' : '' !!}{{ Request::is('angebote/search') ? $search_phrase : '' }}" onclick="javascript:_paq.push(['trackEvent', 'Sort-Button', 'Aktualität', 'Älteste zuerst']);">Älteste zuerst</a> + </div> + </div> + </div> + <div class="btn-group mr-2 mt-2" role="group" aria-label="Sortieren"> + <a class="btn btn-white" href="{{ secure_url(Request::url()) }}{!! Request::is('angebote/search') ? '?q=' : '' !!}{{ Request::is('angebote/search') ? $search_phrase : ''}}"> + <span class="fa fa-times-circle"></span> Filter Entfernen + </a> + </div> + + </div> <!-- .btn-toolbar --> + +</div> <!-- .collapse --> diff --git a/resources/views/vendor/pagination/bootstrap-4.blade.php b/resources/views/vendor/pagination/bootstrap-4.blade.php new file mode 100644 index 0000000..3f98455 --- /dev/null +++ b/resources/views/vendor/pagination/bootstrap-4.blade.php @@ -0,0 +1,36 @@ +@if ($paginator->hasPages()) + <ul class="pagination"> + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) + <li class="page-item disabled"><span class="page-link">«</span></li> + @else + <li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li> + @endif + + {{-- Pagination Elements --}} + @foreach ($elements as $element) + {{-- "Three Dots" Separator --}} + @if (is_string($element)) + <li class="page-item disabled"><span class="page-link">{{ $element }}</span></li> + @endif + + {{-- Array Of Links --}} + @if (is_array($element)) + @foreach ($element as $page => $url) + @if ($page == $paginator->currentPage()) + <li class="page-item active"><span class="page-link">{{ $page }}</span></li> + @else + <li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li> + @endif + @endforeach + @endif + @endforeach + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) + <li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li> + @else + <li class="page-item disabled"><span class="page-link">»</span></li> + @endif + </ul> +@endif diff --git a/resources/views/vendor/pagination/default.blade.php b/resources/views/vendor/pagination/default.blade.php new file mode 100644 index 0000000..4e795ff --- /dev/null +++ b/resources/views/vendor/pagination/default.blade.php @@ -0,0 +1,36 @@ +@if ($paginator->hasPages()) + <ul class="pagination"> + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) + <li class="disabled"><span>«</span></li> + @else + <li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li> + @endif + + {{-- Pagination Elements --}} + @foreach ($elements as $element) + {{-- "Three Dots" Separator --}} + @if (is_string($element)) + <li class="disabled"><span>{{ $element }}</span></li> + @endif + + {{-- Array Of Links --}} + @if (is_array($element)) + @foreach ($element as $page => $url) + @if ($page == $paginator->currentPage()) + <li class="active"><span>{{ $page }}</span></li> + @else + <li><a href="{{ $url }}">{{ $page }}</a></li> + @endif + @endforeach + @endif + @endforeach + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) + <li><a href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li> + @else + <li class="disabled"><span>»</span></li> + @endif + </ul> +@endif diff --git a/resources/views/vendor/pagination/semantic-ui.blade.php b/resources/views/vendor/pagination/semantic-ui.blade.php new file mode 100644 index 0000000..c6e0d21 --- /dev/null +++ b/resources/views/vendor/pagination/semantic-ui.blade.php @@ -0,0 +1,36 @@ +@if ($paginator->hasPages()) + <div class="ui pagination menu"> + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) + <a class="icon item disabled"> <i class="left chevron icon"></i> </a> + @else + <a class="icon item" href="{{ $paginator->previousPageUrl() }}" rel="prev"> <i class="left chevron icon"></i> </a> + @endif + + {{-- Pagination Elements --}} + @foreach ($elements as $element) + {{-- "Three Dots" Separator --}} + @if (is_string($element)) + <a class="icon item disabled">{{ $element }}</a> + @endif + + {{-- Array Of Links --}} + @if (is_array($element)) + @foreach ($element as $page => $url) + @if ($page == $paginator->currentPage()) + <a class="item active" href="{{ $url }}">{{ $page }}</a> + @else + <a class="item" href="{{ $url }}">{{ $page }}</a> + @endif + @endforeach + @endif + @endforeach + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) + <a class="icon item" href="{{ $paginator->nextPageUrl() }}" rel="next"> <i class="right chevron icon"></i> </a> + @else + <a class="icon item disabled"> <i class="right chevron icon"></i> </a> + @endif + </div> +@endif diff --git a/resources/views/vendor/pagination/simple-bootstrap-4.blade.php b/resources/views/vendor/pagination/simple-bootstrap-4.blade.php new file mode 100644 index 0000000..a9a18d3 --- /dev/null +++ b/resources/views/vendor/pagination/simple-bootstrap-4.blade.php @@ -0,0 +1,17 @@ +@if ($paginator->hasPages()) + <ul class="pagination"> + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) + <li class="page-item disabled"><span class="page-link">@lang('pagination.previous')</span></li> + @else + <li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a></li> + @endif + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) + <li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a></li> + @else + <li class="page-item disabled"><span class="page-link">@lang('pagination.next')</span></li> + @endif + </ul> +@endif diff --git a/resources/views/vendor/pagination/simple-default.blade.php b/resources/views/vendor/pagination/simple-default.blade.php new file mode 100644 index 0000000..1801609 --- /dev/null +++ b/resources/views/vendor/pagination/simple-default.blade.php @@ -0,0 +1,17 @@ +@if ($paginator->hasPages()) + <ul class="pagination"> + {{-- Previous Page Link --}} + @if ($paginator->onFirstPage()) + <li class="disabled"><span>@lang('pagination.previous')</span></li> + @else + <li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a></li> + @endif + + {{-- Next Page Link --}} + @if ($paginator->hasMorePages()) + <li><a href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a></li> + @else + <li class="disabled"><span>@lang('pagination.next')</span></li> + @endif + </ul> +@endif |
