Skip to content

Commit c764822

Browse files
committed
fix: corrected category images solution from 4.1, closes #3648
1 parent c3bad3d commit c764822

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

phpmyfaq/assets/scss/layout/_category.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@
22
list-style: none;
33
margin-left: 0;
44
}
5+
6+
// Category image styling to prevent overflow
7+
.bg-light-subtle .img-fluid.float-end {
8+
max-width: 140px !important;
9+
max-height: 140px !important;
10+
width: auto;
11+
height: auto;
12+
object-fit: cover;
13+
}

phpmyfaq/assets/templates/default/show.twig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212

1313
<div class="col-md-4">
1414
<div class="position-sticky" style="top: 2rem">
15-
<div class="p-4 mb-3 bg-light-subtle rounded border">
15+
<div class="p-4 mb-3 bg-light-subtle rounded border clearfix overflow-hidden">
1616
{% if categoryImage is not empty %}
17-
<img src="{{ categoryImage }}" alt="{{ categoryFaqsHeader }}" width="140" height="140"
18-
class="rounded img-fluid float-end m-1">
17+
<img src="{{ categoryImage }}" alt="{{ categoryFaqsHeader }}" class="rounded img-fluid float-end m-1">
1918
{% endif %}
20-
<h4 class="fst-italic">{{ categoryFaqsHeader }}</h4>
21-
<p class="mb-0 small">{{ categoryDescription }}</p>
19+
<h4 class="fst-italic">{{ categoryFaqsHeader | raw }}</h4>
20+
<p class="mb-0 small">{{ categoryDescription | raw }}</p>
2221
</div>
2322

2423
{% if subCategoryContent != null %}

0 commit comments

Comments
 (0)