| 32846 |
ranu |
1 |
<style>
|
| 35396 |
amit |
2 |
.grid-box {
|
|
|
3 |
display: grid;
|
|
|
4 |
grid-template-columns: repeat(2, 1fr); /* 2 columns */
|
|
|
5 |
gap: 10px;
|
| 32846 |
ranu |
6 |
}
|
| 32848 |
ranu |
7 |
|
| 35396 |
amit |
8 |
.item {
|
|
|
9 |
background: #f2f2f2;
|
|
|
10 |
padding: 16px;
|
|
|
11 |
/*height: 120px; same height for all, adjust as needed */
|
|
|
12 |
box-sizing: border-box;
|
| 32848 |
ranu |
13 |
}
|
| 32846 |
ranu |
14 |
</style>
|
| 35396 |
amit |
15 |
<div class="grid-box">
|
|
|
16 |
#foreach( $offer in $publishedOffers )
|
|
|
17 |
<div class="item info-box white-bg mk_offer_container" style="margin-bottom:1px">
|
|
|
18 |
<h3 style="margin-top:-2px;color:#c70db8;margin-bottom:4px;font-weight:bold; font-size:20px;">
|
| 35675 |
amit |
19 |
<a href="javascript:void(0)" class="description-offer" data-offerid="$offer.getId()"
|
|
|
20 |
style="color:#c70db8; text-decoration:none;">
|
|
|
21 |
$offer.getName()
|
|
|
22 |
</a>
|
| 35396 |
amit |
23 |
</h3>
|
|
|
24 |
<h5 style="margin-top:-2px;font-size:15px;color:#5547d0;font-weight:bold">
|
|
|
25 |
From $dateMonthFormatter.format($offer.getStartDate())
|
|
|
26 |
to $dateMonthFormatter.format($offer.getEndDate()), Based
|
|
|
27 |
on $offer.getSchemeType()
|
|
|
28 |
</h5>
|
|
|
29 |
<!--<h4 style="color:green;margin-top:0px;margin-bottom:0px;">
|
|
|
30 |
##$offer.getDashboardHtml()
|
|
|
31 |
</h4>-->
|
|
|
32 |
<br>
|
| 32846 |
ranu |
33 |
|
| 35396 |
amit |
34 |
<p style="float:right;font-size:15px; margin:0px 0px 0px; " class="description-offer"
|
|
|
35 |
data-offerid="$offer.getId()" data-toggle="modal"
|
|
|
36 |
data-backdrop="static" data-keyboard="false"><a href="javascript:void(0)">All terms & conditions</a></p>
|
|
|
37 |
</div>
|
|
|
38 |
#end
|
| 32846 |
ranu |
39 |
</div>
|
|
|
40 |
|
|
|
41 |
<script>
|
|
|
42 |
function showMore(button) {
|
|
|
43 |
// Find the closest parent container with the class "mk_offer_container"
|
|
|
44 |
var parentContainer = button.closest(".mk_offer_container");
|
|
|
45 |
var mainparentContainer = button.closest("#offer-container");
|
|
|
46 |
|
|
|
47 |
// Get all elements with class "mk_show" inside the parent container
|
|
|
48 |
var mkShowElements = parentContainer.getElementsByClassName("mk_show");
|
|
|
49 |
|
|
|
50 |
// Toggle the class "expanded" on the main parent container
|
|
|
51 |
mainparentContainer.classList.toggle("expanded");
|
|
|
52 |
|
|
|
53 |
// Loop through the elements and toggle their display
|
|
|
54 |
for (var i = 0; i < mkShowElements.length; i++) {
|
|
|
55 |
mkShowElements[i].style.display = (mkShowElements[i].style.display === 'block') ? 'none' : 'block';
|
|
|
56 |
}
|
|
|
57 |
|
|
|
58 |
// Toggle the text content of the clicked span
|
|
|
59 |
button.textContent = (button.textContent === 'See More') ? 'Less' : 'See More';
|
|
|
60 |
}
|
|
|
61 |
</script>
|