Skip to content

Commit

Permalink
more card alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
DanCollinz committed Feb 23, 2024
1 parent 800ff89 commit e16275f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions blocks/cards/cta.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,23 @@

.cards.cta.block>ul>li div p.image {
width: 230px;
margin: 0 auto;


}

.cards.cta.block>ul>li picture {
display: block;
position: relative;
height: 100%;
width: 100%;
padding-bottom: 16px;

}

.cards.cta.block>ul>li picture img {
height: 100%;
width: 100%;
object-position: center center;
object-fit: contain;
padding-bottom:8px;
}

.cards.cta.block>ul>li h3 {
Expand Down Expand Up @@ -139,6 +139,6 @@

@media screen and (min-width: 1200px) {
.cards.cta.block>ul>li div p.image {
width: 230px;
width: 100%;
}
}
3 changes: 1 addition & 2 deletions blocks/cards/cta.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ export default async function decorate(block) {
const cardBody = (card.children[1]);
cardBody.classList.add('card-body');
const ButtonContainer = card.querySelector('p.button-container');
ButtonContainer.classList.remove('button-container');
ButtonContainer.classList.add('link-container');
cardBody.prepend(topSection);
const topLink = card.querySelector('p.link-container');

Check failure on line 22 in blocks/cards/cta.js

View workflow job for this annotation

GitHub Actions / build

'topLink' is assigned a value but never used
topSection.append(topLink);
/* cardBody.append(topLink); */
const li = document.createElement('li');
li.classList.add('cta', card.children[0].textContent);
li.append(card.children[1]);
Expand Down

0 comments on commit e16275f

Please sign in to comment.