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

File diff suppressed because one or more lines are too long

View File

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