Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image handling modified? #447

Closed
kreincke opened this issue Apr 10, 2023 · 6 comments · Fixed by #450
Closed

Image handling modified? #447

kreincke opened this issue Apr 10, 2023 · 6 comments · Fixed by #450
Labels
bug Something isn't working

Comments

@kreincke
Copy link
Contributor

Describe the bug

Up to 5.2.3.2 in the default index.php / search.php we got the abstract of the post on the right side and the featured image on the left side. The Featured Image was rendered in a way, that it got the same height(!) like the text of the abstract. ( I promise: I do not want to reawaken our old image discussions!), even if the ratio of the image has to be changed.

In 5.2.3.3 the ratio of the image is preserved, even if the picture is not filling the space of the left area. Do you have any idea what has caused this changings and how I could get back the old behaviour?

Steps to reproduce

No response

Screenshots and Additional Info

Here a screenshot of two posts, created with bs 5.2.3.2:
featured-image-ratio-changed-5 2 3 2

Here a screenshot of the same posts in the same environment, created with bs 5.2.3.3:
featured-image-ratio-preserved-5 2 3 3

Website link

No response

@kreincke kreincke added the bug Something isn't working label Apr 10, 2023
@kreincke
Copy link
Contributor Author

Please close this: after havin setup all from the beginning, the old behaviour was back. No idea why. Sorry.

@crftwrk crftwrk reopened this Apr 14, 2023
@crftwrk
Copy link
Member

crftwrk commented Apr 14, 2023

No, you are right. Accidentally removed fallback for previous horizontal cards. Sorry, I create a quick PR.

// Horizontal card images
// category.php, archive.php, author.php and search results
@include media-breakpoint-down(lg) {
.card-img-left-md img {
border-top-left-radius: $border-radius;
border-top-right-radius: $border-radius;
width: 100%;
height: auto;
}
}
@include media-breakpoint-up(lg) {
.card-img-left-md img {
border-top-left-radius: $border-radius;
border-bottom-left-radius: $border-radius;
object-fit: cover;
width: 100%;
height: 100%;
}
}
// Sticky post in index.php
@include media-breakpoint-down(md) {
.card-img-left img {
border-top-left-radius: $border-radius;
border-top-right-radius: $border-radius;
width: 100%;
height: auto;
}
}
@include media-breakpoint-up(md) {
.card-img-left img {
border-top-left-radius: $border-radius;
border-bottom-left-radius: $border-radius;
object-fit: cover;
width: 100%;
height: 100%;
}
}

@kreincke
Copy link
Contributor Author

You are great! Many thanks. During the last three days, I tried to resolve this issue (on a completely wrong level), because the behavior came back and disappeared accidentally. It's so good to hear that there is a systematical solution.

If I look in the 5.2.3.3 download tarball or the main branch or the branch 5.2.3.3 (which is
16 commits behind main) in none of them there is a file in bootscore/scss/bootscore/_archive.scss.

Shouldn't it be sufficient, to add your lines into _bscore_custom.scss of my child theme - until 5.3.0 will be released?

Again: Many thanks for not giving up me!

heartfully KR

@crftwrk
Copy link
Member

crftwrk commented Apr 15, 2023

Shouldn't it be sufficient, to add your lines into _bscore_custom.scss of my child theme - until 5.3.0 will be released?

Yes, but we will ship a patch soon. But instead adding the CSS, it seems better to change your HTML, because new cards are 1000x better (improvements based on your blurred image mention).

bootscore/archive.php

Lines 32 to 80 in f3429db

<div class="card horizontal mb-4">
<div class="row g-0">
<?php if ( has_post_thumbnail() ) : ?>
<div class="col-lg-6 col-xl-5 col-xxl-4">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('medium', array('class' => 'card-img-lg-start')); ?>
</a>
</div>
<?php endif; ?>
<div class="col">
<div class="card-body">
<?php bootscore_category_badge(); ?>
<a class="text-body text-decoration-none" href="<?php the_permalink(); ?>">
<?php the_title('<h2 class="blog-post-title h5">', '</h2>'); ?>
</a>
<?php if ('post' === get_post_type()) : ?>
<p class="meta small mb-2 text-muted">
<?php
bootscore_date();
bootscore_author();
bootscore_comments();
bootscore_edit();
?>
</p>
<?php endif; ?>
<p class="card-text">
<a class="text-body text-decoration-none" href="<?php the_permalink(); ?>">
<?php echo strip_tags(get_the_excerpt()); ?>
</a>
</p>
<p class="card-text">
<a class="read-more" href="<?php the_permalink(); ?>">
<?php _e('Read more »', 'bootscore'); ?>
</a>
</p>
<?php bootscore_tags(); ?>
</div>
</div>
</div>
</div>

@kreincke
Copy link
Contributor Author

It's good to hear that. Will you release a version 5.2.3.4? Or is there another method by which I can identify that the updates have been integrated into it?

@crftwrk
Copy link
Member

crftwrk commented Apr 15, 2023

Simply track your issues and check linked PRs. When issued are closed, PRs are merged. Yes, release will be 5.2.3.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants