align recent post height via css
This commit is contained in:
parent
a06ee73c4a
commit
954507a20d
2 changed files with 5 additions and 21 deletions
|
@ -8,6 +8,11 @@
|
|||
display: block;
|
||||
}
|
||||
|
||||
.recent-posts-section .card {
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
.recent-posts-section .card .card-footer span {
|
||||
font-size: 10pt;
|
||||
color: #6c757d !important;
|
||||
|
|
|
@ -73,27 +73,6 @@ var projectCards, publicationCards;
|
|||
}
|
||||
showGithubStars();
|
||||
|
||||
// ==================== Adjust height of the recent-posts card =============
|
||||
|
||||
function adjustRecentPostsHeight() {
|
||||
if (!isMobile) { // no need to adjust height for mobile devices
|
||||
let recentPostCards = document.getElementById("recent-post-cards")
|
||||
if (recentPostCards != null) {
|
||||
let el = recentPostCards.children;
|
||||
let maxHeight = 0;
|
||||
for (let i = 0; i < el.length; i++) {
|
||||
if (el[i].children[1].clientHeight > maxHeight) {
|
||||
maxHeight = el[i].children[1].clientHeight;
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < el.length; i++) {
|
||||
el[i].children[1].setAttribute("style", "min-height: " + maxHeight + "px;")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
adjustRecentPostsHeight();
|
||||
|
||||
// =============== Achievements ===========
|
||||
|
||||
function fourColumRow(gallery, entries, i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue