aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ufund-ui/src/app/components/need-list/need-list.component.css25
-rw-r--r--ufund-ui/src/app/components/need-list/need-list.component.html7
2 files changed, 28 insertions, 4 deletions
diff --git a/ufund-ui/src/app/components/need-list/need-list.component.css b/ufund-ui/src/app/components/need-list/need-list.component.css
index 622b64a..5cfa479 100644
--- a/ufund-ui/src/app/components/need-list/need-list.component.css
+++ b/ufund-ui/src/app/components/need-list/need-list.component.css
@@ -20,18 +20,34 @@
font-size: 10pt;
}
+.need-image {
+ height: 130px;
+ width: 200px;
+ margin: -10px 0 0 -10px;
+ object-fit: cover;
+ border-radius: 5px;
+ mask-image: linear-gradient(to right, rgb(255,255,255) 0, rgb(255,255,255,.1) 60%, rgb(255,255,255,0) 100%);
+}
+
.split {
display: flex;
flex-direction: row;
- justify-content: space-between;
-
-
+
.left {
+ width: 15%;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .middle {
+ width: 42.5%;
display: flex;
+ align-items: start;
flex-direction: column;
}
.right {
+ width: 42.5%;
display: flex;
flex-direction: column;
align-items: end;
@@ -47,8 +63,11 @@
}
.prog {
+ width: 85%;
display: flex;
flex-direction: column;
+ align-self: end;
+ margin-top: -5.25%;
}
.clickable {
diff --git a/ufund-ui/src/app/components/need-list/need-list.component.html b/ufund-ui/src/app/components/need-list/need-list.component.html
index 406bfa0..1410ce6 100644
--- a/ufund-ui/src/app/components/need-list/need-list.component.html
+++ b/ufund-ui/src/app/components/need-list/need-list.component.html
@@ -2,12 +2,16 @@
<div id="needList">
<div *ngFor="let need of visibleNeeds" class="needEntry">
<div [routerLink]="'/need/' + need.id" class="clickable">
+
<div class="split">
<div class="left">
+ <img *ngIf="need.image" alt="Need image" class="need-image" [src]="need.image"/>
+ </div>
+
+ <div class="middle">
<span class="needName">{{need.name}}</span>
<span class="needType">{{need.type}}</span>
</div>
-
<div class="right">
<span *ngIf="need.urgent" class="urgent">URGENT</span>
<span *ngIf="need.location"><span class="icon">location_on</span>{{need.location}}</span>
@@ -21,6 +25,7 @@
<progress [value]="need.current" [max]="need.maxGoal"></progress>
</div>
</div>
+
<div *ngIf="actionArea" class="actionArea">
<ng-container [ngTemplateOutlet]="actionArea" [ngTemplateOutletContext]="{$implicit: need}"/>
</div>