Commit 61fa3ef4 authored by Rosanny Sihombing's avatar Rosanny Sihombing
Browse files

add keywords

parent e95abf75
......@@ -408,7 +408,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)
}
......
......@@ -41,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}
......@@ -67,12 +72,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";
......
Markdown is supported
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