Commit a962690f authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

add keywords

parent f5486c86
......@@ -433,7 +433,8 @@ module.exports = function (app) {
logo: projectData[i].avatar_url,
name: projectData[i].name,
weburl: projectData[i].web_url,
desc: projectData[i].description
desc: projectData[i].description,
keywords: projectData[i].tag_list
}
projectArr.push(project)
}
......
......@@ -12,7 +12,6 @@ html(lang="de")
position: relative;
color: white;
}
.card-title-bottom-left {
position: absolute;
bottom: 0px;
......@@ -23,7 +22,6 @@ html(lang="de")
text-align: left;
padding: 5px
}
.card-img-top {
height: 15vw;
object-fit: cover;
......@@ -43,6 +41,11 @@ html(lang="de")
h5(class="card-title-bottom-left") #{item.name}
img(class="card-img-top", src=item.logo)
div(class="card-body")
div(class="row")
each key in item.keywords
h6
span(class="badge badge-pill badge-primary px-2") #{key}
|  
div(class="row")
div(class="col-9")
p(class="card-text") #{item.desc}
......@@ -71,12 +74,14 @@ html(lang="de")
var i
for (i = 0; i < cards.length; i++) {
cardTitle = cards[i].getElementsByClassName("card-title-bottom-left");
cardBody = cards[i].getElementsByClassName("card-body");
cardText = cards[i].getElementsByClassName("card-text");
titleValue = cardTitle[0].textContent || cardTitle[0].innerText;
bodyValue = cardBody[0].textContent || cardBody[0].innerText;
textValue = cardText[0].textContent || cardText[0].innerText;
if (titleValue.toUpperCase().indexOf(filter) > -1 || textValue.toUpperCase().indexOf(filter) > -1) {
if (titleValue.toUpperCase().indexOf(filter) > -1 || bodyValue.toUpperCase().indexOf(filter) > -1 || textValue.toUpperCase().indexOf(filter) > -1) {
cards[i].style.display = "block";
} else {
cards[i].style.display = "none";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment