Single Post

This commit is contained in:
Roman Pyrih
2025-08-29 15:55:29 +02:00
parent 43c2862974
commit 0be0da088b
6 changed files with 669 additions and 63 deletions

View File

@@ -1960,4 +1960,261 @@ body.page-id-59 footer::before {
background: linear-gradient(0deg, #d9d9d9 0%, rgba(255, 255, 255, 0) 100%);
transform: translateY(-100%);
z-index: -1;
}
body.single-post main.page-single-post {
margin-top: 50px;
}
body.single-post main.page-single-post .box-1 {
margin-bottom: 120px;
}
body.single-post main.page-single-post .box-1 .row {
display: flex;
flex-direction: row;
}
body.single-post main.page-single-post .box-1 .row .col-1 {
padding-right: 70px;
border-right: 1px solid #d4d4d4;
width: 100%;
max-width: 800px;
}
body.single-post main.page-single-post .box-1 .row .col-1 .btn-back-page:hover path {
stroke: #ffffff;
}
body.single-post main.page-single-post .box-1 .row .col-1 .btn-back-page path {
transition: all 250ms ease-in-out;
}
body.single-post main.page-single-post .box-1 .row .col-2 {
flex-basis: 480px;
}
body.single-post main.page-single-post .box-1 .row .col-2 .post-thumbnail {
position: sticky;
top: 0px;
}
body.single-post main.page-single-post .box-1 .row .col-2 img {
width: 100%;
}
body.single-post main.page-single-post .box-2 {
padding-top: 135px;
padding-bottom: 160px;
background: #fafafa;
}
body.single-post main.page-single-post .box-2 .row {
position: relative;
padding-left: 64px;
}
body.single-post main.page-single-post .box-2 .row::before {
content: attr(box-title);
color: #d4d4d4;
font-weight: 700;
font-size: 16px;
line-height: 1;
letter-spacing: -0.34px;
transform: rotate(180deg);
position: absolute;
left: 0;
top: 0;
writing-mode: vertical-rl;
padding-top: 24px;
background: #fafafa;
z-index: 1;
}
body.single-post main.page-single-post .box-2 .row::after {
content: "";
position: absolute;
left: 7px;
top: 10px;
bottom: 0;
width: 1px;
background: #d4d4d4;
}
body.single-post main.page-single-post .box-2 .row .box-head h2 {
margin-bottom: 40px;
color: #232323;
font-weight: 400;
font-size: 48px;
line-height: 1;
letter-spacing: -0.96px;
}
body.single-post main.page-single-post .box-2 .row .other-posts {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 32px;
}
body.single-post main.page-single-post article.post .entry-header {
margin: 32px 0;
}
body.single-post main.page-single-post article.post .entry-header h1 {
color: #232323;
font-weight: 500;
font-size: 48px;
line-height: 1.2;
letter-spacing: -0.96px;
margin: 0;
}
body.single-post main.page-single-post article.post .entry-content {
margin-bottom: 50px;
}
body.single-post main.page-single-post article.post .entry-content pre.wp-block-preformatted {
position: relative;
color: #232323;
font-family: "Helvetica Neue", sans-serif;
font-weight: 400;
font-size: 24px;
line-height: 1.5;
letter-spacing: -0.48px;
padding: 0 0 50px 0;
margin: 0 0 16px 0;
background: transparent;
}
body.single-post main.page-single-post article.post .entry-content pre.wp-block-preformatted::before {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100px;
height: 1px;
background: #d9ba5c;
}
body.single-post main.page-single-post article.post .entry-content h2 {
color: #232323;
margin-bottom: 32px;
font-weight: 400;
font-size: 24px;
line-height: 1.5;
letter-spacing: -0.48px;
}
body.single-post main.page-single-post article.post .entry-content p {
color: #232323;
font-weight: 500;
font-size: 18px;
line-height: 1.5;
letter-spacing: -0.36px;
}
body.single-post main.page-single-post article.post .entry-content p strong {
color: #d9ba5c;
}
body.single-post main.page-single-post article.post .entry-content a {
color: #d9ba5c;
text-decoration: underline;
}
body.single-post main.page-single-post article.post .entry-content ul {
padding: 0;
margin-left: 0;
}
body.single-post main.page-single-post article.post .entry-content ul li {
position: relative;
padding-left: 40px;
color: #232323;
font-weight: 500;
font-size: 18px;
line-height: 1.5;
letter-spacing: -0.36px;
}
body.single-post main.page-single-post article.post .entry-content ul li:not(:last-child) {
margin-bottom: 16px;
}
body.single-post main.page-single-post article.post .entry-content ul li::before {
content: "";
position: absolute;
top: 12px;
left: 0;
width: 18px;
height: 1px;
background: #d9ba5c;
transform: translateY(-50%);
}
body.single-post main.page-single-post article.post .entry-content ol {
counter-reset: custom-counter;
padding: 0;
margin-left: 0;
}
body.single-post main.page-single-post article.post .entry-content ol li {
position: relative;
padding-left: 40px;
color: #232323;
font-weight: 500;
font-size: 18px;
line-height: 1.5;
letter-spacing: -0.36px;
}
body.single-post main.page-single-post article.post .entry-content ol li:not(:last-child) {
margin-bottom: 16px;
}
body.single-post main.page-single-post article.post .entry-content ol li::before {
counter-increment: custom-counter;
content: counter(custom-counter) ".";
position: absolute;
top: 0;
left: 0;
color: #d9ba5c;
font-weight: 500;
font-size: 18px;
}
body.single-post main.page-single-post article.post .entry-content figure.wp-block-pullquote {
padding: 0;
margin: 50px 0;
}
body.single-post main.page-single-post article.post .entry-content figure.wp-block-pullquote blockquote {
position: relative;
padding: 32px 130px 32px 32px;
background-color: #fafafa;
}
body.single-post main.page-single-post article.post .entry-content figure.wp-block-pullquote blockquote::before {
content: "";
position: absolute;
top: 32px;
right: 32px;
width: 32px;
height: 28px;
background-image: url("/wp-content/uploads/2025/08/quote.svg");
background-position: center;
background-size: contain;
background-repeat: no-repeat;
}
body.single-post main.page-single-post article.post .entry-content figure.wp-block-pullquote blockquote p {
color: #232323;
font-weight: 500;
font-size: 20px;
line-height: 1.5;
letter-spacing: -0.38px;
margin-bottom: 0;
}
body.single-post main.page-single-post article.post .entry-content figure.wp-block-pullquote blockquote cite {
position: relative;
color: #232323;
font-weight: 500;
font-size: 18px;
font-style: normal;
line-height: 1;
letter-spacing: -0.36px;
padding-left: 35px;
margin-top: 24px;
}
body.single-post main.page-single-post article.post .entry-content figure.wp-block-pullquote blockquote cite::before {
content: "";
position: absolute;
top: 50%;
left: 0;
width: 18px;
height: 1px;
background: #d9ba5c;
transform: translateY(-50%);
}
body.single-post main.page-single-post article.post .entry-footer .entry-meta {
display: flex;
flex-direction: row;
align-items: center;
}
body.single-post main.page-single-post article.post .entry-footer .entry-meta > span:not(:last-child) {
margin-right: 5px;
padding-right: 5px;
border-right: 1px solid #8f8f8f;
}
body.single-post main.page-single-post article.post .entry-footer .entry-meta * {
color: #8f8f8f;
font-weight: 400;
font-size: 16px;
line-height: 1;
letter-spacing: -0.32px;
}/*# sourceMappingURL=custom.css.map */

File diff suppressed because one or more lines are too long

View File

@@ -2039,3 +2039,291 @@ body.page-id-59 {
@include box_top_shadow($cLightGray);
}
}
//* Single post
body.single-post {
main.page-single-post {
margin-top: 50px;
.box-1 {
margin-bottom: 120px;
.row {
display: flex;
flex-direction: row;
.col {
&-1 {
// flex: 1;
padding-right: 70px;
border-right: 1px solid #d4d4d4;
width: 100%;
max-width: 800px;
.btn-back-page {
&:hover {
path {
stroke: $cWhite;
}
}
path {
transition: all 250ms ease-in-out;
}
}
}
&-2 {
flex-basis: 480px;
.post-thumbnail {
position: sticky;
top: 0px;
}
img {
width: 100%;
}
}
}
}
}
.box-2 {
padding-top: 135px;
padding-bottom: 160px;
background: #fafafa;
.row {
@include box_title_line(#d4d4d4, #fafafa);
padding-left: 64px;
.box-head {
h2 {
margin-bottom: 40px;
color: $cBlack;
font-weight: 400;
font-size: 48px;
line-height: 1;
letter-spacing: -0.96px;
}
}
.other-posts {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 32px;
}
}
}
article.post {
.entry-header {
margin: 32px 0;
h1 {
color: $cBlack;
font-weight: 500;
font-size: 48px;
line-height: 1.2;
letter-spacing: -0.96px;
margin: 0;
}
}
.entry-content {
margin-bottom: 50px;
pre.wp-block-preformatted {
position: relative;
color: $cBlack;
font-family: $fHelveticaNeue;
font-weight: 400;
font-size: 24px;
line-height: 1.5;
letter-spacing: -0.48px;
padding: 0 0 50px 0;
margin: 0 0 16px 0;
background: transparent;
&::before {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100px;
height: 1px;
background: $cGold;
}
}
h2 {
color: $cBlack;
margin-bottom: 32px;
font-weight: 400;
font-size: 24px;
line-height: 1.5;
letter-spacing: -0.48px;
}
p {
color: $cBlack;
font-weight: 500;
font-size: 18px;
line-height: 1.5;
letter-spacing: -0.36px;
strong {
color: $cGold;
}
}
a {
color: $cGold;
text-decoration: underline;
}
ul {
padding: 0;
margin-left: 0;
li {
position: relative;
padding-left: 40px;
color: $cBlack;
font-weight: 500;
font-size: 18px;
line-height: 1.5;
letter-spacing: -0.36px;
&:not(:last-child) {
margin-bottom: 16px;
}
&::before {
content: '';
position: absolute;
top: 12px;
left: 0;
width: 18px;
height: 1px;
background: $cGold;
transform: translateY(-50%);
}
}
}
ol {
counter-reset: custom-counter;
padding: 0;
margin-left: 0;
li {
position: relative;
padding-left: 40px;
color: $cBlack;
font-weight: 500;
font-size: 18px;
line-height: 1.5;
letter-spacing: -0.36px;
&:not(:last-child) {
margin-bottom: 16px;
}
&::before {
counter-increment: custom-counter;
content: counter(custom-counter) '.';
position: absolute;
top: 0;
left: 0;
color: $cGold;
font-weight: 500;
font-size: 18px;
}
}
}
figure.wp-block-pullquote {
padding: 0;
margin: 50px 0;
blockquote {
position: relative;
padding: 32px 130px 32px 32px;
background-color: #fafafa;
&::before {
content: '';
position: absolute;
top: 32px;
right: 32px;
width: 32px;
height: 28px;
background-image: url('/wp-content/uploads/2025/08/quote.svg');
background-position: center;
background-size: contain;
background-repeat: no-repeat;
}
p {
color: $cBlack;
font-weight: 500;
font-size: 20px;
line-height: 1.5;
letter-spacing: -0.38px;
margin-bottom: 0;
}
cite {
position: relative;
color: $cBlack;
font-weight: 500;
font-size: 18px;
font-style: normal;
line-height: 1;
letter-spacing: -0.36px;
padding-left: 35px;
margin-top: 24px;
&::before {
content: '';
position: absolute;
top: 50%;
left: 0;
width: 18px;
height: 1px;
background: $cGold;
transform: translateY(-50%);
}
}
}
}
}
.entry-footer {
.entry-meta {
display: flex;
flex-direction: row;
align-items: center;
> span {
&:not(:last-child) {
margin-right: 5px;
padding-right: 5px;
border-right: 1px solid #8f8f8f;
}
}
* {
color: #8f8f8f;
font-weight: 400;
font-size: 16px;
line-height: 1;
letter-spacing: -0.32px;
}
}
}
}
}
}

View File

@@ -25,10 +25,13 @@ if ( ! function_exists( 'brpp_prawo_podatki_posted_on' ) ) :
esc_html( get_the_modified_date() )
);
// $posted_on = sprintf(
// esc_html_x( 'Posted on %s', 'post date', 'brpp-prawo-podatki' ),
// '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
// );
$posted_on = sprintf(
/* translators: %s: post date. */
esc_html_x( 'Posted on %s', 'post date', 'brpp-prawo-podatki' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
esc_html_x( '%s', 'post date', 'brpp-prawo-podatki' ), $time_string
);
echo '<span class="posted-on">' . $posted_on . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
@@ -43,7 +46,7 @@ if ( ! function_exists( 'brpp_prawo_podatki_posted_by' ) ) :
function brpp_prawo_podatki_posted_by() {
$byline = sprintf(
/* translators: %s: post author. */
esc_html_x( 'by %s', 'post author', 'brpp-prawo-podatki' ),
esc_html_x( '%s', 'post author', 'brpp-prawo-podatki' ),
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
);

View File

@@ -10,28 +10,75 @@
get_header();
?>
<main id="primary" class="site-main">
<main id="primary" class="site-main page-single-post">
<div class="box-1">
<div class="container">
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', get_post_type() );
if (true == false) {
the_post_navigation(
array(
'prev_text' => '<span class="nav-subtitle">' . esc_html__( 'Previous:', 'brpp-prawo-podatki' ) . '</span> <span class="nav-title">%title</span>',
'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next:', 'brpp-prawo-podatki' ) . '</span> <span class="nav-title">%title</span>',
)
);
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
}
endwhile; // End of the loop.
?>
</div>
</div>
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', get_post_type() );
the_post_navigation(
array(
'prev_text' => '<span class="nav-subtitle">' . esc_html__( 'Previous:', 'brpp-prawo-podatki' ) . '</span> <span class="nav-title">%title</span>',
'next_text' => '<span class="nav-subtitle">' . esc_html__( 'Next:', 'brpp-prawo-podatki' ) . '</span> <span class="nav-title">%title</span>',
)
$args = array(
'post_type' => 'post',
'posts_per_page' => 3,
'orderby' => 'date',
'order' => 'DESC',
'post__not_in' => array(get_the_ID()),
);
$other_posts = new WP_Query($args);
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile; // End of the loop.
if ($other_posts->have_posts()) :
?>
<div class="box-2">
<div class="container">
<div class="row" box-title="Blog">
<div class="box-head">
<h2>Zobacz też inne wpisy</h2>
<div class="other-posts">
<?php
while ($other_posts->have_posts()) : $other_posts->the_post();
$image = get_the_post_thumbnail_url(get_the_ID(), 'medium');
$title = get_the_title();
$link = get_permalink();
get_template_part(
'inc/template-article-card', null, [
'image' => $image,
'title' => $title,
'link' => $link
]
);
endwhile;
wp_reset_postdata();
?>
</div>
</div>
</div>
</div>
</div>
<?php endif; ?>
</main><!-- #main -->
<?php

View File

@@ -10,54 +10,65 @@
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
if ( is_singular() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
endif;
<div class="row">
<div class="col col-1">
<a class="btn_1 btn-back-page" href="/blog-brpp">
<svg width="46" height="14" viewBox="0 0 46 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M46 7L1 7" stroke="#9E9E9E"/>
<path d="M7 1L1 7L7 13" stroke="#9E9E9E"/>
</svg>
</a>
if ( 'post' === get_post_type() ) :
?>
<div class="entry-meta">
<header class="entry-header">
<?php
brpp_prawo_podatki_posted_on();
brpp_prawo_podatki_posted_by();
if ( is_singular() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
endif;
?>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->
</header><!-- .entry-header -->
<?php brpp_prawo_podatki_post_thumbnail(); ?>
<div class="entry-content">
<?php
the_content(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'brpp-prawo-podatki' ),
array(
'span' => array(
'class' => array(),
<div class="entry-content">
<?php
the_content(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'brpp-prawo-podatki' ),
array(
'span' => array(
'class' => array(),
),
)
),
wp_kses_post( get_the_title() )
)
),
wp_kses_post( get_the_title() )
)
);
);
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'brpp-prawo-podatki' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'brpp-prawo-podatki' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<footer class="entry-footer">
<?php brpp_prawo_podatki_entry_footer(); ?>
</footer><!-- .entry-footer -->
<footer class="entry-footer">
<?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-meta">
<?php
brpp_prawo_podatki_posted_by();
brpp_prawo_podatki_posted_on();
?>
</div>
<?php endif; ?>
<!-- <?php brpp_prawo_podatki_entry_footer(); ?> -->
</footer><!-- .entry-footer -->
</div>
<div class="col col-2">
<?php brpp_prawo_podatki_post_thumbnail(); ?>
</div>
</div>
</article><!-- #post-<?php the_ID(); ?> -->