aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src
diff options
context:
space:
mode:
authorbenal01 <bja4245@rit.edu>2025-04-02 22:25:30 -0400
committerbenal01 <bja4245@rit.edu>2025-04-02 22:25:30 -0400
commit010d2ed677e1fca33cee0963a897492f5902cb89 (patch)
tree300068341c5ce98fe1d0adea3a1a39829261ccf2 /ufund-ui/src
parent5be753d9826629bdcaff5a7e48ba6b81e8e1e7cf (diff)
downloadJellySolutions-010d2ed677e1fca33cee0963a897492f5902cb89.tar.gz
JellySolutions-010d2ed677e1fca33cee0963a897492f5902cb89.tar.bz2
JellySolutions-010d2ed677e1fca33cee0963a897492f5902cb89.zip
need image support in need page
Diffstat (limited to '')
-rw-r--r--ufund-ui/src/app/components/need-page/need-page.component.css11
-rw-r--r--ufund-ui/src/app/components/need-page/need-page.component.html35
2 files changed, 31 insertions, 15 deletions
diff --git a/ufund-ui/src/app/components/need-page/need-page.component.css b/ufund-ui/src/app/components/need-page/need-page.component.css
index 844410f..e634c8f 100644
--- a/ufund-ui/src/app/components/need-page/need-page.component.css
+++ b/ufund-ui/src/app/components/need-page/need-page.component.css
@@ -31,6 +31,7 @@
.left {
display: flex;
flex-direction: column;
+ width : 50%;
}
.right {
@@ -40,6 +41,16 @@
}
}
+.need-image {
+ width: 80%;
+ height: auto;
+ aspect-ratio: 16/9;
+ object-fit: cover;
+ border-radius: 10px;
+ box-shadow: rgb(0, 40, 70) 0 0 50px;
+
+}
+
.urgent {
font-size: 11pt;
background-color: rgba(255, 165, 0, 0.27);
diff --git a/ufund-ui/src/app/components/need-page/need-page.component.html b/ufund-ui/src/app/components/need-page/need-page.component.html
index 3d362f5..210e444 100644
--- a/ufund-ui/src/app/components/need-page/need-page.component.html
+++ b/ufund-ui/src/app/components/need-page/need-page.component.html
@@ -1,9 +1,6 @@
<div id="box">
<h1>{{need.name}}</h1>
<span class="needType">{{need.type}} GOAL</span>
-
- <img *ngIf="need.image" alt="Need image" [src]="need.image"/>
-
<p>{{need.description}}</p>
<div class="prog">
<!-- <span>{{need?.current}} / {{need?.maxGoal}}</span>-->
@@ -11,25 +8,33 @@
<span>This goal is <strong>{{(((need.current)*100) / (need.maxGoal)).toFixed(0)}}%</strong> complete!</span>
</div>
+ <div class="split">
+ <div class="left">
<span><strong>Target Goal:</strong> {{(need.type === GoalType.MONETARY) ? "$" : ""}}{{need.maxGoal}}</span>
<span><strong>Amount Currently Collected:</strong> {{need.current}}</span>
<span><strong>Location:</strong> {{need.location}}</span>
- <span><strong>Urgency: </strong>
- <span *ngIf="!need.urgent">Not urgent</span>
- <span *ngIf="need.urgent" class="urgent">URGENT</span>
- </span>
-
- <div *ngIf="need.filterAttributes.length > 0">
- <strong>Tags:</strong>
- <ul style="display: flex; column-gap: 24px;">
- <li *ngFor="let tag of need?.filterAttributes">
- <p>{{tag}}</p>
- </li>
- </ul>
+ <span><strong>Urgency: </strong>
+ <span *ngIf="!need.urgent">Not urgent</span>
+ <span *ngIf="need.urgent" class="urgent">URGENT</span>
+ </span>
+
+ <div *ngIf="need.filterAttributes.length > 0">
+ <strong>Tags:</strong>
+ <ul style="display: flex; column-gap: 24px;">
+ <li *ngFor="let tag of need?.filterAttributes">
+ <p>{{tag}}</p>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="right">
+ <img alt="Need image" class="need-image" [src]="need.image ? need.image : '/placeholder.png'"/>
+ </div>
</div>
+
<div class="actionArea">
<button *ngIf="isHelper()" (click)="add(need!)">