Skip to content

Commit

Permalink
Web > Quality sayfası eklendi.
Browse files Browse the repository at this point in the history
- Web > Fancybox v5.0 plugins eklendi.
- php artisan make:controller Web/QualityController
  • Loading branch information
berkanumutlu committed Jul 6, 2024
1 parent e79a520 commit 0e3f145
Show file tree
Hide file tree
Showing 11 changed files with 246 additions and 9 deletions.
1 change: 1 addition & 0 deletions docker/nginx/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ server {
location / {
try_files $uri $uri/ /index.php?$query_string;
}
client_max_body_size 2048M;
# PHP-FPM Configuration Nginx
location ~ \.php$ {
try_files $uri = 404;
Expand Down
2 changes: 1 addition & 1 deletion project/app/Http/Controllers/Web/CatalogController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function index()
->select(['id', 'title', 'slug', 'image', 'file'])
->orderBy('created_at', 'desc')->orderBy('id', 'desc')
->paginate(16);
$records->map(function ($item) {
$records->each(function ($item) {
if (empty($item->file)) {
$item->file_url = 'javascript:;';
} else {
Expand Down
25 changes: 25 additions & 0 deletions project/app/Http/Controllers/Web/QualityController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace App\Http\Controllers\Web;

use App\Http\Controllers\Controller;
use App\Models\Quality;

class QualityController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
$records = Quality::query()->where('status', 1)
->select(['id', 'title', 'slug', 'image', 'content'])
->orderBy('created_at', 'desc')->orderBy('id', 'desc')
->paginate(18);
$records->each(function ($item) {
$item->image_url = asset('storage/'.$item->image);
});
$title = 'Qualities';
return view('web.quality.index', compact(['title', 'records']));
}
}
1 change: 1 addition & 0 deletions project/public/assets/plugins/fancyapps/fancybox.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions project/public/assets/plugins/fancyapps/fancybox.umd.js

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions project/public/assets/web/css/pages/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,64 @@
-webkit-animation-delay: 0.9s;
animation-delay: 0.9s;
}

/* MARKETING CONTENT
-------------------------------------------------- */

/* Center align the text within the three columns below the carousel */
.marketing .col-lg-4 {
margin-bottom: 1.5rem;
text-align: center;
}

/* rtl:begin:ignore */
.marketing .col-lg-4 p {
margin-right: .75rem;
margin-left: .75rem;
}

/* rtl:end:ignore */

/* Featurettes
------------------------- */

.featurette-divider {
margin: 5rem 0; /* Space out the Bootstrap <hr> more */
}

/* Thin out the marketing headings */
/* rtl:begin:remove */
.featurette-heading {
letter-spacing: -.05rem;
}

.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}

/* rtl:end:remove */

/* RESPONSIVE CSS
-------------------------------------------------- */

@media (min-width: 640px) {
.featurette-heading {
font-size: 50px;
}
}

@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}

@media (min-width: 992px) {
.featurette-heading {
margin-top: 7rem;
}
}
2 changes: 1 addition & 1 deletion project/public/assets/web/css/pages/home.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions project/resources/views/layouts/web.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ class="nav-link d-flex flex-column {{ Route::is('news.list') ? 'text-secondary'
News
</a>
</li>
<li>
<a href="{{ route('quality.list') }}"
class="nav-link d-flex flex-column {{ Route::is('quality.list') ? 'text-secondary' : 'text-white' }}">
<i class="bi bi-award mx-auto fs-4"></i>
Quality
</a>
</li>
</ul>
</div>
</div>
Expand Down
104 changes: 97 additions & 7 deletions project/resources/views/web/home/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@endsection
@section("content")
@if(!empty($slider_list))
<div class="owl-carousel slider-section home-slider" data-ride="carousel">
<div class="owl-carousel slider-section home-slider mb-5" data-ride="carousel">
@foreach($slider_list as $item)
<div class="slider-item">
@if($item->type == 'IMAGE')
Expand All @@ -29,25 +29,115 @@
@endforeach
</div>
@endif
<div class="container marketing">
<!-- Three columns of text below the carousel -->
<div class="row">
<div class="col-lg-4">
<svg class="bd-placeholder-img rounded-circle" width="140" height="140"
xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder"
preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title>
<rect width="100%" height="100%" fill="var(--bs-secondary-color)"></rect>
</svg>
<h2 class="fw-normal">Heading</h2>
<p>Some representative placeholder content for the three columns of text below the carousel. This is the
first column.</p>
<p><a class="btn btn-secondary" href="#">View details »</a></p>
</div><!-- /.col-lg-4 -->
<div class="col-lg-4">
<svg class="bd-placeholder-img rounded-circle" width="140" height="140"
xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder"
preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title>
<rect width="100%" height="100%" fill="var(--bs-secondary-color)"></rect>
</svg>
<h2 class="fw-normal">Heading</h2>
<p>Another exciting bit of representative placeholder content. This time, we've moved on to the second
column.</p>
<p><a class="btn btn-secondary" href="#">View details »</a></p>
</div><!-- /.col-lg-4 -->
<div class="col-lg-4">
<svg class="bd-placeholder-img rounded-circle" width="140" height="140"
xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder"
preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title>
<rect width="100%" height="100%" fill="var(--bs-secondary-color)"></rect>
</svg>
<h2 class="fw-normal">Heading</h2>
<p>And lastly this, the third column of representative placeholder content.</p>
<p><a class="btn btn-secondary" href="#">View details »</a></p>
</div><!-- /.col-lg-4 -->
</div><!-- /.row -->

<!-- START THE FEATURETTES -->
<hr class="featurette-divider">
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading fw-normal lh-1">First featurette heading. <span
class="text-body-secondary">It’ll blow your mind.</span></h2>
<p class="lead">Some great placeholder content for the first featurette here. Imagine some exciting
prose here.</p>
</div>
<div class="col-md-5">
<svg class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto" width="500"
height="500" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: 500x500"
preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title>
<rect width="100%" height="100%" fill="var(--bs-secondary-bg)"></rect>
<text x="50%" y="50%" fill="var(--bs-secondary-color)" dy=".3em">500x500</text>
</svg>
</div>
</div>
<hr class="featurette-divider">
<div class="row featurette">
<div class="col-md-7 order-md-2">
<h2 class="featurette-heading fw-normal lh-1">Oh yeah, it’s that good. <span
class="text-body-secondary">See for yourself.</span></h2>
<p class="lead">Another featurette? Of course. More placeholder content here to give you an idea of how
this layout would work with some actual real-world content in place.</p>
</div>
<div class="col-md-5 order-md-1">
<svg class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto" width="500"
height="500" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: 500x500"
preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title>
<rect width="100%" height="100%" fill="var(--bs-secondary-bg)"></rect>
<text x="50%" y="50%" fill="var(--bs-secondary-color)" dy=".3em">500x500</text>
</svg>
</div>
</div>
<hr class="featurette-divider">
<div class="row featurette">
<div class="col-md-7">
<h2 class="featurette-heading fw-normal lh-1">And lastly, this one. <span class="text-body-secondary">Checkmate.</span>
</h2>
<p class="lead">And yes, this is the last block of representative placeholder content. Again, not really
intended to be actually read, simply here to give you a better view of what this would look like
with some actual content. Your content.</p>
</div>
<div class="col-md-5">
<svg class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto" width="500"
height="500" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Placeholder: 500x500"
preserveAspectRatio="xMidYMid slice" focusable="false"><title>Placeholder</title>
<rect width="100%" height="100%" fill="var(--bs-secondary-bg)"></rect>
<text x="50%" y="50%" fill="var(--bs-secondary-color)" dy=".3em">500x500</text>
</svg>
</div>
</div>
<hr class="featurette-divider">
<!-- /END THE FEATURETTES -->
</div>
@endsection
@section("scripts")
<script src="{{ asset('assets/plugins/owlcarousel/owl.carousel.min.js') }}"></script>
<script>
jQuery(function ($) {
$('.owl-carousel.home-slider').owlCarousel({
animateOut: 'slideOutDown',
animateIn: 'flipInX',
animateOut: 'animate__slideOutLeft',
animateIn: 'animate__slideInRight',
autoplay: true,
autoplayHoverPause: false,
autoplayTimeout: 8000,
loop: true,
rewind: true,
nav: false,
dots: false,
items: 1,
margin: 0,
autoHeight: false,
autoHeightClass: 'owl-height'
items: 1
});
});
</script>
Expand Down
47 changes: 47 additions & 0 deletions project/resources/views/web/quality/index.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@extends("layouts.web")
@section("style")
<link rel="stylesheet" href="{{ asset('assets/plugins/fancyapps/fancybox.css') }}">
@endsection
@section("content")
<div class="quality-page">
<div class="container container-page">
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-6 g-3">
@if($records->total() > 0)
@foreach($records as $item)
<div class="col">
<div class="card shadow-sm">
<a href="{{ $item->image_url }}" data-fancybox="gallery"
data-caption="{{ $item->content }}">
<img src="{{ $item->image_url }}" alt="{{ $item->title }}" class="card-img-top"
width="100%" height="300">
<div class="card-body">
<p class="card-text">{{ $item->title }}</p>
</div>
</a>
</div>
</div>
@endforeach
@else
<div class="alert alert-info">Not found</div>
@endif
@if($records->lastPage() > 1)
<div class="col-12">
<div class="pagination">
{{ $records->links() }}
</div>
</div>
@endif
</div>
</div>
</div>
@endsection
@section("scripts")
<script src="{{ asset('assets/plugins/fancyapps/fancybox.umd.js') }}"></script>
<script>
jQuery(function ($) {
Fancybox.bind('[data-fancybox="gallery"]', {
// Your custom options for a specific gallery
});
});
</script>
@endsection
4 changes: 4 additions & 0 deletions project/routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
Route::get('news/category/{category:slug}', "show_category")->name('category');
Route::get('news/{news:slug}', "show")->name('detail');
});
Route::name('quality.')->controller('\App\Http\Controllers\Web\QualityController')->group(function () {
Route::get('quality', "index")->name('list');
Route::get('quality/{quality:slug}', "show")->name('detail');
});
Route::group(['prefix' => 'admin'], function () {
Voyager::routes();
Route::post('tickets/{id}/reply', [App\Http\Controllers\Admin\TicketController::class, 'reply'])->name('admin.tickets.reply');
Expand Down

0 comments on commit 0e3f145

Please sign in to comment.