summaryrefslogtreecommitdiff
path: root/site/resources
diff options
context:
space:
mode:
authorMax2018-02-08 01:06:12 +0100
committerMax2018-02-08 01:06:12 +0100
commit51a40b63736d3ce8f0878276823ed6b9ba93ec28 (patch)
tree04be95c91a1378e4d2920a9d55f3f27307841017 /site/resources
parent8641287110ddfdaf3f786c247ef7ef0eb321afa4 (diff)
downloadalkobote-51a40b63736d3ce8f0878276823ed6b9ba93ec28.tar.gz
Adds working view and pagination.
Diffstat (limited to 'site/resources')
-rw-r--r--site/resources/lang/de/pagination.php20
-rw-r--r--site/resources/views/index.blade.php50
-rw-r--r--site/resources/views/layouts/base.blade.php2
3 files changed, 72 insertions, 0 deletions
diff --git a/site/resources/lang/de/pagination.php b/site/resources/lang/de/pagination.php
new file mode 100644
index 0000000..ad55d91
--- /dev/null
+++ b/site/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' => '&laquo; Vorherige',
+ 'next' => 'Nächste &raquo;',
+ 'start' => 'Anfang',
+
+];
diff --git a/site/resources/views/index.blade.php b/site/resources/views/index.blade.php
index 6365aad..57c2c42 100644
--- a/site/resources/views/index.blade.php
+++ b/site/resources/views/index.blade.php
@@ -10,8 +10,56 @@
</div>
</div>
+<?php
+
+$count = 0;
+foreach( $data as $whisky) {
+
+ if ( $count % 2 == 0) {
+?>
<div class="row mb-2">
+<?php
+ }
+
+ if (strlen($whisky->name) > 60 ) {
+ # $whisky->name = substr($whisky->name, 0, 60) . "...";
+ }
+
+?>
+ <div class="col-md-6 col-sm-12" id="<?php echo htmlentities($whisky->name); ?>">
+ <div class="card flex-md-row mb-4 box-shadow h-md-250">
+ <img class="card-img-top flex-auto d-sm-block img-thumbnail d-md-none" src="<?php echo htmlentities($whisky->image_url);?>" alt="<?php echo htmlentities($whisky->name); ?>">
+ <div class="card-body d-flex flex-column align-items-start">
+ <strong class="d-inline-block mb-2 text-primary">Whisky</strong>
+ <h3 class="mb-0 hide-overflow">
+ <a class="text-dark" href="#<?php echo htmlentities($whisky->name); ?>"><?php echo htmlentities($whisky->name); ?></a>
+ </h3>
+ <a class="mb-1 text-muted" href="<?php echo htmlentities($whisky->shop_url); ?>"><?php echo htmlentities($whisky->shop); ?></a>
+ <p class="card-text mb-auto text-success"><del class="text-danger"><?php echo htmlentities($whisky->original_price/100) . "€"; ?></del> <?php echo htmlentities($whisky->discounted_price/100). "€"; ?></p>
+ <a href="<?php echo htmlentities($whisky->url); ?>">Jetzt bestellen</a>
+ </div>
+ <img class="card-img-right flex-auto d-none d-md-block" src="<?php echo htmlentities($whisky->image_url);?>" alt="<?php echo htmlentities($whisky->name); ?>">
+ </div>
+ </div>
+
+<?php
+
+
+ if ( $count % 2 == 1) {
+?>
+ </div>
+<?php
+ }
+
+ $count++;
+}
+?>
+
+{{ $data->links() }}
+
+
+<!--
<div class="col-md-6">
<div class="card flex-md-row mb-4 box-shadow h-md-250">
<div class="card-body d-flex flex-column align-items-start">
@@ -350,9 +398,11 @@
</div>
</div>
+-->
</div>
+
@endsection
diff --git a/site/resources/views/layouts/base.blade.php b/site/resources/views/layouts/base.blade.php
index 24ec0f1..81f11f2 100644
--- a/site/resources/views/layouts/base.blade.php
+++ b/site/resources/views/layouts/base.blade.php
@@ -11,6 +11,7 @@
<link href="/css/bootstrap.css" rel="stylesheet">
<link href="/css/sticky-footer-navbar.css" rel="stylesheet">
<link href="/css/blog.css" rel="stylesheet">
+ <link href="/css/custom.css" rel="stylesheet">
@yield('css')
</head>
@@ -20,6 +21,7 @@
@yield('content')
+<div class="container"><div class="row"></div></div>
<footer class="footer">
<div class="container">
<span class="text-muted">Place sticky footer content here.</span>