Fix adjust skill cards handling
This commit is contained in:
parent
b57d2bcf52
commit
54cbb86f68
1 changed files with 11 additions and 8 deletions
|
@ -91,7 +91,9 @@ var projectCards;
|
||||||
function adjustSkillCardsHeight() {
|
function adjustSkillCardsHeight() {
|
||||||
if (!isMobile) { // no need to adjust height for mobile devices
|
if (!isMobile) { // no need to adjust height for mobile devices
|
||||||
// primary skills
|
// primary skills
|
||||||
var el = document.getElementById("primary-skills").children;
|
var skillCards = document.getElementById("primary-skills");
|
||||||
|
if (skillCards != null) {
|
||||||
|
var el = skillCards.children;
|
||||||
var maxHeight = 0;
|
var maxHeight = 0;
|
||||||
for (let i = 0; i < el.length; i++) {
|
for (let i = 0; i < el.length; i++) {
|
||||||
if (el[i].children[0].clientHeight > maxHeight) {
|
if (el[i].children[0].clientHeight > maxHeight) {
|
||||||
|
@ -103,6 +105,7 @@ var projectCards;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
adjustSkillCardsHeight();
|
adjustSkillCardsHeight();
|
||||||
|
|
||||||
// ================== Project cards =====================
|
// ================== Project cards =====================
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue