post/categories/"category" view fix

This commit is contained in:
Metehan Celik 2022-02-23 22:46:45 +03:00
parent 173fe4954e
commit 250fadf51d

View File

@ -1,23 +1,27 @@
{% block styles %}
{{ asset_style("visiosoft.theme.base::css/post.scss") }}
{% endblock %}
<div class="container mt-2 mb-4 px-0">
<div class="d-flex justify-content-between align-items-center mb-2">
<h5 class="text-left ml-2">{{ trans('visiosoft.theme.base::field.news_title', {name: setting_value('streams::name')}) }}</h5>
<div class="row mt-2 mb-4 px-0">
<div class="d-flex justify-content-between ml-auto align-items-center mb-2">
<h5 class="text-left mr-2">{{ trans('visiosoft.theme.base::field.news_title', {name: setting_value('streams::name')}) }}</h5>
<a href="{{ url('posts') }}" class="btn btn-outline-primary all-post-btn d-none d-md-block">
{{ trans('visiosoft.theme.base::field.all_news') }}
</a>
</div>
<div class="slider">
<div class="row">
{% if entries('posts','types').findBySlug('default') %}
{% set posts = entries('posts').type('default').live().limit(4).get() %}
{% for post in posts %}
<div class="col-4 mt-2">
<div class="px-2">
<div
class="fs-14 product rounded position-relative bg-white link-dark text-decoration-none border">
<div class="product-img d-flex justify-content-center">
<a href="{{ post.route('view') }}" class="">
{{ img( post.cover_image.make.url ?? 'visiosoft.theme.base::images/no-image.png').class("w-600")|raw }}
<a href="{{ post.route('view') }}" class="news-cover-img-wrapper">
{{ img( post.cover_image.make.url ?? 'visiosoft.theme.base::images/no-image.png').class("w-100 new-img-height")|raw }}
</a>
</div>
<div class="text-center product-text-area p-3">
@ -29,10 +33,24 @@
</div>
</div>
</div>
</div>
{% endfor %}
{% endif %}
</div>
<div class="row">
<a href="{{ url('posts') }}" class="btn btn-outline-yellow mx-2 all-post-btn d-block d-md-none fs-16 font-weight-bold py-2">
{{ trans('visiosoft.theme.base::field.all_news') }}
</a>
</div>
<style>
.container{
max-width: 100% !important;
}
.new-img-height{
height: 300px ;
}
.news-cover-img-wrapper {
padding: 20px;
color: black;
}
</style>