Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
m4lab_tv1
Project Page
Commits
a962690f
Commit
a962690f
authored
Sep 04, 2020
by
Rosanny Sihombing
Browse files
add keywords
parent
f5486c86
Changes
2
Hide whitespace changes
Inline
Side-by-side
routes/routes-project.js
View file @
a962690f
...
...
@@ -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
)
}
...
...
views/DE/project/projectList.pug
View file @
a962690f
...
...
@@ -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";
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment