mirror of
https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
synced 2024-12-26 08:59:10 +00:00
fix tag vertical fitting issue
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
a63552f32b
commit
f99cfd0eff
@ -80,14 +80,18 @@ class ReviewCard extends HTMLElement {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag-container {
|
.tag-container-div {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
display: flex;
|
|
||||||
flex-flow: row wrap;
|
|
||||||
height: 100px;
|
height: 100px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tag-container {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row wrap;
|
||||||
|
height: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
.a-tag {
|
.a-tag {
|
||||||
background-color:#94da97;
|
background-color:#94da97;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@ -95,6 +99,8 @@ class ReviewCard extends HTMLElement {
|
|||||||
padding: 0px 6px 2px 6px;
|
padding: 0px 6px 2px 6px;
|
||||||
margin: 2px 2px 2px 2px;
|
margin: 2px 2px 2px 2px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
overflow: hidden;
|
||||||
|
height: 14px;
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
articleEl.append(styleEl);
|
articleEl.append(styleEl);
|
||||||
@ -191,6 +197,8 @@ class ReviewCard extends HTMLElement {
|
|||||||
ratingDiv.append(starsImg);
|
ratingDiv.append(starsImg);
|
||||||
|
|
||||||
//added tags
|
//added tags
|
||||||
|
let tagContainerDiv = document.createElement("div");
|
||||||
|
tagContainerDiv.setAttribute("class", "tag-container-div");
|
||||||
let tagContainer = document.createElement("div");
|
let tagContainer = document.createElement("div");
|
||||||
tagContainer.setAttribute("class", "tag-container");
|
tagContainer.setAttribute("class", "tag-container");
|
||||||
tagContainer.setAttribute("id", "a-tags");
|
tagContainer.setAttribute("id", "a-tags");
|
||||||
@ -203,6 +211,7 @@ class ReviewCard extends HTMLElement {
|
|||||||
tagContainer.append(newTag);
|
tagContainer.append(newTag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tagContainerDiv.append(tagContainer);
|
||||||
|
|
||||||
//adding final ID to data!
|
//adding final ID to data!
|
||||||
|
|
||||||
@ -210,7 +219,7 @@ class ReviewCard extends HTMLElement {
|
|||||||
articleEl.append(meallabelDiv);
|
articleEl.append(meallabelDiv);
|
||||||
articleEl.append(restaurantLabel);
|
articleEl.append(restaurantLabel);
|
||||||
articleEl.append(ratingDiv);
|
articleEl.append(ratingDiv);
|
||||||
articleEl.append(tagContainer);
|
articleEl.append(tagContainerDiv);
|
||||||
articleEl.append(comments);
|
articleEl.append(comments);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user