This commit is contained in:
Roman Pyrih
2025-08-29 13:36:07 +02:00
parent 5381f432e1
commit 43c2862974
4 changed files with 57 additions and 26 deletions

View File

@@ -9,31 +9,43 @@
$args = [
'post_type' => 'post',
'posts_per_page' => get_option('posts_per_page'),
'paged' => $paged,
'paged' => $paged,
'orderby' => 'date',
'order' => 'DESC',
];
$query = new WP_Query($args);
?>
<main id="primary" class="site-main blog-page">
<div class="box-1">
<div class="container">
<div class="box--wrapper">
<div class="box-bg">
<img src="/wp-content/uploads/2025/08/blog-bg.jpg" alt="">
</div>
<div class="row">
<div class="col col-1">
<?php get_template_part('inc/breadcrumb');?>
<?php
if ($query->have_posts()) :
$query->the_post();
$banner_image = get_the_post_thumbnail_url(get_the_ID(), 'large');
$banner_title = get_the_title();
$banner_link = get_permalink();
?>
<div class="box-1">
<div class="container">
<div class="box--wrapper">
<div class="box-bg">
<img src="<?php echo $banner_image; ?>" alt="">
</div>
<div class="col col-2">
<div class="box-head">
<h2>Korzyści w podatku CIT wynikające z rozliczania hipotetycznych odsetek</h2>
<div class="row">
<div class="col col-1">
<?php get_template_part('inc/breadcrumb');?>
</div>
<div class="col col-2">
<div class="box-head">
<h2><?php echo $banner_title; ?></h2>
</div>
<a class="btn_4" href="<?php echo $banner_link; ?>">Czytaj więcej</a>
</div>
<a class="btn_4" href="#">Czytaj więcej</a>
</div>
</div>
</div>
</div>
</div>
<?php
endif;
?>
<div class="box-2">
<div class="container">
@@ -45,12 +57,11 @@
$title = get_the_title();
$link = get_permalink();
get_template_part(
'inc/template-article-card', null, [
'image' => $image,
'title' => $title,
'link' => $link
'image' => $image,
'title' => $title,
'link' => $link
]
);
endwhile;
@@ -58,12 +69,15 @@
endif;
?>
</div>
<div class="posts-more">
<a class="btn_3" href="#" id="load-more-posts" data-page="1">
Więcej artykułów
<span class="loader"></span>
</a>
</div>
<?php
if ($query->found_posts > get_option('posts_per_page')) : ?>
<div class="posts-more">
<a class="btn_3" href="#" id="load-more-posts" data-page="1">
Więcej artykułów
<span class="loader"></span>
</a>
</div>
<?php endif; ?>
</div>
</div>
</main>

View File

@@ -1768,6 +1768,15 @@ body.blog main.blog-page .box-1 .box--wrapper {
body.blog main.blog-page .box-1 .box-bg {
position: absolute;
inset: 0;
filter: brightness(0.7);
}
body.blog main.blog-page .box-1 .box-bg img {
width: 100%;
-o-object-fit: cover;
object-fit: cover;
height: 100%;
-o-object-position: center;
object-position: center;
}
body.blog main.blog-page .box-1 .row {
position: relative;

File diff suppressed because one or more lines are too long

View File

@@ -1808,6 +1808,14 @@ body.blog {
.box-bg {
position: absolute;
inset: 0;
filter: brightness(0.7);
img {
width: 100%;
object-fit: cover;
height: 100%;
object-position: center;
}
}
.row {