Skip to content

Instantly share code, notes, and snippets.

@AchalJ
Created March 29, 2023 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AchalJ/4d1562b3ffbbc6a1d983cf7c7fd5af93 to your computer and use it in GitHub Desktop.
Save AchalJ/4d1562b3ffbbc6a1d983cf7c7fd5af93 to your computer and use it in GitHub Desktop.
PowerPack Content Grid - Replicate Style 9 with Custom Layout (Beaver Themer)
.pp-content-grid-post-tile {
position: relative;
height: 275px;
}
.pp-content-grid-post-image {
background-repeat: no-repeat;
background-position: center center;
background-size: cover;
height: 100%;
position: relative;
overflow: hidden;
margin: 0;
transition: all 0.5s ease;
will-change: transform;
}
.pp-content-grid-post-tile:hover .pp-content-grid-post-image {
transform: scale(1.1);
}
.pp-content-grid-post-image a {
display: block;
width: 100%;
height: 100%;
}
.pp-content-grid-post-image a:last-child:before {
content: "";
display: block;
height: 70%;
width: 100%;
position: absolute;
bottom: 0;
z-index: 1;
background: linear-gradient(to bottom,rgba(0,0,0,0) 40%,rgba(0,0,0,.7) 100%);
}
.pp-content-grid-post-body {
position: absolute;
bottom: 0;
pointer-events: none;
z-index: 1;
width: 100%;
}
.pp-content-grid-post-title, .pp-content-grid-post-meta {
width: 80%;
margin: 0 0 0 20px;
color: #fff;
}
.pp-content-grid-post-title {
font-size: 16px;
margin-bottom: 10px;
}
.pp-content-grid-post-meta {
font-size: 12px;
margin-bottom: 20px;
}
<div class="pp-content-grid-post-tile">
[wpbb-if post:featured_image]
<div class="pp-content-grid-post-image" style='background-image: url([wpbb post:featured_image size="large" display="url"])'>
<a href="[wpbb post:url]" title="[wpbb post:title]"></a>
</div>
[/wpbb-if]
<div class="pp-content-grid-post-body">
<h2 class="pp-content-grid-post-title">[wpbb post:title]</h2>
<div class="pp-content-grid-post-meta">
<div class="pp-content-grid-post-date">[wpbb post:date format='']</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment