Add (posts)
This commit is contained in:
@@ -13,23 +13,25 @@
|
||||
<div class="container">
|
||||
<h3 class="h4 fw-bold text-center mb-3">Featured Articles</h3>
|
||||
<div class="row g-3 justify-content-center">
|
||||
@for ($i = 1; $i <= 3; $i++)
|
||||
@foreach($featured_posts as $post)
|
||||
<div class="col-12 col-xl-3">
|
||||
<a href="{{ route('home.country.post', ['country' => $country_locale->country_iso, 'post' => str_random() ]) }}" class="text-decoration-none">
|
||||
<div class="card shadow-sm">
|
||||
<img src="https://placekitten.com/400/300" alt="" class="card-img-top">
|
||||
<a href="{{ route('home.country.post', ['country' => $country_locale->country_iso, 'post' => $post->slug]) }}" class="text-decoration-none">
|
||||
<div class="card shadow-sm" style="height:100%;">
|
||||
<div class="card-img-top ratio ratio-16x9">
|
||||
<img src="{{ $post->featured_image }}" alt="">
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<p class="card-text fw-bold">Here is why a kitten catches mice faster than an adult cat.
|
||||
</p>
|
||||
<p class="card-text fw-bold">{{ $post->title }}</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<small class="text-body-secondary">5 April 2023</small>
|
||||
<small class="text-body-secondary">9 mins</small>
|
||||
<small class="text-body-secondary">{{ $post->created_at->format('j F Y') }}</small>
|
||||
{{-- <small class="text-body-secondary">9 min read</small> --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@endfor
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,25 +39,24 @@
|
||||
<div class="container-fluid py-4">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col col-lg-9">
|
||||
<div class="col col-md-12 col-lg-12 col-xl-11 col-xxl-9">
|
||||
<h3 class="h4 fw-bold text-center mb-3">What's New in {{ get_country_name_by_iso($country_locale->country_iso) }}</h3>
|
||||
<div class="row g-3">
|
||||
@for ($i = 1; $i <= 12; $i++)
|
||||
<div class="col-6">
|
||||
@foreach ($latest_posts as $post)
|
||||
<div class="col-lg-6">
|
||||
<a href="{{ route('home.country.post', ['country' => $country_locale->country_iso, 'post' => str_random() ]) }}" class="text-decoration-none">
|
||||
<div class="card">
|
||||
<div class="card" style="height:100%;">
|
||||
<div class="row g-0">
|
||||
<div class="col-md-4">
|
||||
<img src="https://placekitten.com/400/300" class="img-fluid rounded-start"
|
||||
alt="...">
|
||||
<div class="col-md-5">
|
||||
<div class="img-fluid rounded-start ratio ratio-16x9">
|
||||
<img src="{{ $post->featured_image }}" alt="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-7">
|
||||
<div class="card-body">
|
||||
<p class="card-title fw-bold">Here is why a kitten catches mice faster
|
||||
than an adult cat.</p>
|
||||
<p class="card-title fw-bold">H{{ $post->title }}</p>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<small class="text-body-secondary">5 April 2023</small>
|
||||
<small class="text-body-secondary">9 mins</small>
|
||||
<small class="text-body-secondary">{{ $post->created_at->format('j F Y') }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -63,7 +64,7 @@
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@endfor
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
<div class="text-center py-3">
|
||||
|
||||
70
resources/views/front/country_all.blade.php
Normal file
70
resources/views/front/country_all.blade.php
Normal file
@@ -0,0 +1,70 @@
|
||||
@extends('layouts.front.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container py-3">
|
||||
|
||||
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-lg-11 col-xl-9 col-xxl-8">
|
||||
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8 col-lg-8 col-xl-8">
|
||||
|
||||
<div class="mb-5">
|
||||
<h1 class="h2 fw-bold">All {{ $country_locale->name }} News</h1>
|
||||
<p class="text-secondary">
|
||||
The latest {{ $country_locale->name }} news, brought to you by {{ config('app.name') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@for($i = 0; $i < 10; $i++)
|
||||
<div class="my-3">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card mb-3">
|
||||
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">
|
||||
<a class="text-decoration-none" href="{{ route('home.country.post', ['country' => $country_locale->country_iso, 'post' => str_random() ]) }}">Here is why a kitten catches mice faster than an adult cat.</a></h5>
|
||||
<p class="card-text">
|
||||
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
|
||||
</p>
|
||||
|
||||
<p class="card-text">
|
||||
<small><a class="text-decoration-none" href="{{ route('home.country.category', ['country' => $country_locale->country_iso, 'category' => 'technology' ]) }}">#technology</a> <a class="text-decoration-none" href="{{ route('home.country.category', ['country' => $country_locale->country_iso, 'category' => 'gadgets' ]) }}">#gadgets</a></small>
|
||||
<small class="text-body-secondary ms-2">3 min read</small>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<a class="card-img-top" href="{{ route('home.country.post', ['country' => $country_locale->country_iso, 'post' => str_random() ]) }}">
|
||||
<img src="https://placekitten.com/400/300" class="card-img-top rounded-bottom-2 rounded-top-0" alt="...">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@endfor
|
||||
|
||||
<nav aria-label="Page navigation example">
|
||||
<ul class="pagination">
|
||||
<li class="page-item"><a class="page-link" href="#">Previous</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">1</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">2</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">Next</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
@@ -3,18 +3,21 @@
|
||||
@section('content')
|
||||
<div class="container py-3">
|
||||
|
||||
<div class="mb-5">
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-lg-11 col-xl-9 col-xxl-8">
|
||||
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8 col-lg-8 col-xl-8">
|
||||
|
||||
<div class="mb-5">
|
||||
<h1 class="h2 fw-bold">{{ $category->name }}</h1>
|
||||
<p class="text-secondary">
|
||||
{{ $category->description }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-12 col-lg-11 col-xl-9 col-xxl-8">
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-lg-8 col-xl-8 bg-primary">
|
||||
|
||||
@for($i = 0; $i < 10; $i++)
|
||||
<div class="my-3">
|
||||
|
||||
@@ -30,12 +33,12 @@
|
||||
|
||||
<p class="card-text">
|
||||
<small><a class="text-decoration-none" href="{{ route('home.country.category', ['country' => $country_locale->country_iso, 'category' => 'technology' ]) }}">#technology</a> <a class="text-decoration-none" href="{{ route('home.country.category', ['country' => $country_locale->country_iso, 'category' => 'gadgets' ]) }}">#gadgets</a></small>
|
||||
<small class="text-body-secondary">Updated 3 mins ago</small>
|
||||
<small class="text-body-secondary ms-2">3 min read</small>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<a class="card-img-top" href="{{ route('home.country.post', ['country' => $country_locale->country_iso, 'post' => str_random() ]) }}">
|
||||
<img src="https://placekitten.com/400/300" class="card-img-top" alt="...">
|
||||
<img src="https://placekitten.com/400/300" class="card-img-top rounded-bottom-2 rounded-top-0" alt="...">
|
||||
</a>
|
||||
|
||||
</div>
|
||||
@@ -43,10 +46,22 @@
|
||||
|
||||
</div>
|
||||
@endfor
|
||||
|
||||
<div>
|
||||
<nav class="col" aria-label="Page navigation example">
|
||||
<ul class="pagination">
|
||||
<li class="page-item"><a class="page-link" href="#">Previous</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">1</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">2</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">3</a></li>
|
||||
<li class="page-item"><a class="page-link" href="#">Next</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-lg-4 col-xl-4 bg-secondary">
|
||||
{{-- <div class="col-md-4 col-lg-4 col-xl-4 bg-secondary">
|
||||
b
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
7
resources/views/front/post.blade.php
Normal file
7
resources/views/front/post.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
@extends('layouts.front.app')
|
||||
|
||||
@section('content')
|
||||
<div class="container py-3">
|
||||
Post
|
||||
</div>
|
||||
@endsection
|
||||
@@ -41,6 +41,9 @@
|
||||
|
||||
<div class="p-3">
|
||||
<ul class="navbar-nav justify-content-end flex-grow-1 pe-3">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="{{ route('home.country', ['country' => $current_country_locale->slug ]) }}">Home</a>
|
||||
</li>
|
||||
@foreach ($categories as $category)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="{{ route('home.country.category', ['country' => $category->country_locale_slug, 'category' => $category->slug ]) }}">{{ $category->name }}</a>
|
||||
|
||||
Reference in New Issue
Block a user