diff --git a/routes/routes-project.js b/routes/routes-project.js index 2c4e25a843151b0507288865a14378671d73ab82..f98c3c65cca02b587798929253207cca389735fb 100644 --- a/routes/routes-project.js +++ b/routes/routes-project.js @@ -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) } diff --git a/views/DE/project/projectList.pug b/views/DE/project/projectList.pug index b89bc77eea6969fa36e25fd8d2ca81333795010f..6a6047bdcea4b9ea6bcda905f04ae17c697a2f03 100644 --- a/views/DE/project/projectList.pug +++ b/views/DE/project/projectList.pug @@ -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";