Make Skills and Projects cards linkable (#46)

* Project card header is now can be clicked

* skill is card now having url to add on it's header

* urls added to some skills

* div class synced with original

* guthub button text synced with original

* text decoration removed

* remove next line in card header for text

* whole Skill Card now is under hyperlink

* hyperlink class separated from card

* removed text-decoration from .card class

* ProjectCard header hyperlink decoration removed

* call adjustSkillCardsHeight after page is loaded

* Add "#" in href field when respective URL is not provided

Co-authored-by: hossainemruz <emruz@appscode.com>
This commit is contained in:
Yuriy 2020-07-23 22:16:48 +02:00 committed by GitHub
parent d7df50ed2a
commit 64fb493030
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 43 additions and 41 deletions

View file

@ -69,20 +69,22 @@ var projectCards;
// primary skills
var skillCards = document.getElementById("primary-skills");
if (skillCards != null) {
var el = skillCards.children;
var cardElems = skillCards.getElementsByClassName("card");
var maxHeight = 0;
for (let i = 0; i < el.length; i++) {
if (el[i].children[0].clientHeight > maxHeight) {
maxHeight = el[i].children[0].clientHeight;
for (let i = 0; i < cardElems.length; i++) {
if (cardElems.item(i).clientHeight > maxHeight) {
maxHeight = cardElems.item(i).clientHeight;
}
}
for (let i = 0; i < el.length; i++) {
el[i].children[0].setAttribute("style", "min-height: " + maxHeight + "px;")
for (let i = 0; i < cardElems.length; i++) {
cardElems.item(i).setAttribute("style", "min-height: " + maxHeight + "px;");
}
}
}
}
adjustSkillCardsHeight();
$(window).on("load", function () {
adjustSkillCardsHeight();
});
// ================== Project cards =====================
// Add click action on project category selector buttons