Last active
April 24, 2019 14:32
-
-
Save buchin/0169855a2995e39829249925e6b66db0 to your computer and use it in GitHub Desktop.
Pasang iklan di yang ditandai dengan kode <!-- Iklan -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@foreach(collect($images)->shuffle()->take(32)->chunk(4) as $c_image) | |
<div class="row mb-5 row-eq-height"> | |
@foreach($c_image as $image) | |
<div class="col-md-3"> | |
<div class="card h-100"> | |
@php | |
$link = is_active('home') ? route('category', ['slug' => Str::slug($image->snp)]) : '#'; | |
@endphp | |
<a href="{{ $link }}"><img height="150" onerror="this.onerror=null;this.src='{{ route('thumbr', ['id' => Base64Url\Base64Url::encode($image->turl), 'filetype' => $image->mf]) }}';" class="card-img-top" src="{{ route('thumb', ['id' => Base64Url\Base64Url::encode($image->turl), 'filetype' => $image->mf]) }}" alt="{{ $image->snp }}"></a> | |
<div class="card-header text-center"> | |
<span class="badge badge-pill badge-secondary">{{ $image->mf }}</span> | |
<span class="badge badge-pill badge-secondary">{{ $image->ow }}x{{ $image->oh }}</span> | |
</div> | |
<div class="card-body text-center"> | |
<p> | |
<a href="{{ route('download', ['id' => Base64Url\Base64Url::encode($image->imgurl), 'filetype' => $image->mf]) }}" class="btn btn-primary btn-sm mb-3" download="{{ str_slug($image->snp) }}.{{ $image->mf }}">Download Image</a> | |
<br> | |
{{ $image->snp }} | |
</p> | |
<small><a href="{{ $image->surl }}" rel="nofollow noreferrer">More @ {{ $image->dm }}</a></small> | |
</div> | |
</div> | |
</div> | |
@endforeach | |
</div> | |
@if($loop->first) | |
<div class="text-center mb-5"> | |
<!-- Iklan --> | |
<img src="https://via.placeholder.com/728x90.png?text=framework/resources/views/_grid.blade.php" alt=""> | |
</div> | |
@endif | |
@endforeach |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@extends('layouts.app') | |
@section('content') | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-12 text-center mb-3"> | |
<!-- Iklan --> | |
<img src="https://via.placeholder.com/728x90.png?text=framework/resources/views/home.blade.php" alt=""> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-md-9"> | |
@if (session('status')) | |
<div class="alert alert-success"> | |
{{ session('status') }} | |
</div> | |
@endif | |
@if(isset($featured_images)) | |
<div class="p-3 mb-3" style="background: #f8f9fa!important;"> | |
<h1>Featured: {{ config('app.featured') }}</h1> | |
@include('_grid', ['images' => collect($featured_images)->take(8)]) | |
<div class="text-center mb-5"> | |
<a href="{{ route('category', Str::slug(config('app.featured'))) }}" class="btn btn-primary" style="width:66%;">More: {{ config('app.featured') }}</a> | |
</div> | |
</div> | |
@endif | |
<h1 class="mb-3">{{ $title }}</h1> | |
@php | |
$keywords = \App\Keyword::inRandomOrder()->take(2)->pluck('term'); | |
@endphp | |
@if($keywords->count() == 2) | |
<div class="row mb-3"> | |
<div class="col text-left"> | |
<a href="{{ route('category', ['slug' => Str::slug($keywords->first())]) }}">← Prev</a> | |
</div> | |
<div class="col text-right"> | |
<a href="{{ route('category', ['slug' => Str::slug($keywords->last())]) }}">Next →</a> | |
</div> | |
</div> | |
@endif | |
@if(is_active('home')) | |
@include('_grid_6', ['images' => $images]) | |
@else | |
@include('_grid', ['images' => $images]) | |
@endif | |
</div> | |
<div class="col-md-3"> | |
<!-- Iklan --> | |
<img src="https://via.placeholder.com/250x250.png?text=framework/resources/views/home.blade.php" alt=""> | |
@include('_categories', ['categories' => config('app.categories'), 'title' => 'Category']) | |
@include('_categories', ['categories' => collect($related)->shuffle()->take(5), 'title' => 'Related']) | |
</div> | |
</div> | |
</div> | |
@endsection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment