aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbenal01 <bja4245@rit.edu>2025-04-03 11:55:04 -0400
committerbenal01 <bja4245@rit.edu>2025-04-03 11:55:04 -0400
commit6a93ead4f262bf7571192417cc2f6029e9a9e3a8 (patch)
treecc4a251cab617f063dc961fc899aa207109679c9
parenta6cdb080576ef24718986bccd0a12d174c8aaa05 (diff)
downloadJellySolutions-6a93ead4f262bf7571192417cc2f6029e9a9e3a8.tar.gz
JellySolutions-6a93ead4f262bf7571192417cc2f6029e9a9e3a8.tar.bz2
JellySolutions-6a93ead4f262bf7571192417cc2f6029e9a9e3a8.zip
need-page's transparent image in background
-rw-r--r--ufund-ui/src/app/components/need-page/need-page.component.css27
-rw-r--r--ufund-ui/src/app/components/need-page/need-page.component.html39
2 files changed, 23 insertions, 43 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 44db4b4..0bbc2aa 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
@@ -4,6 +4,7 @@
}
#box {
+ padding-top: 5%;
display: flex;
flex-direction: column;
width: 800px;
@@ -22,32 +23,16 @@
/*margin-bottom: 20px;*/
}
-.split {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
-
-
- .left {
- display: flex;
- flex-direction: column;
- width : 50%;
- }
-
- .right {
- display: flex;
- flex-direction: column;
- align-items: end;
- }
-}
.need-image {
- width: 400px;
- height: auto;
+ width: 55%;
+ height: 40%;
+ position: absolute;
+ left: 22.5%;
aspect-ratio: 16/9;
object-fit: cover;
+ mask-image: linear-gradient(to bottom, rgba(255,255,255,1) 0%, rgba(255,255,255,.15) 35%, transparent 100%);
border-radius: 10px;
- box-shadow: rgb(0, 40, 70) 0 0 50px;
}
.urgent {
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 f8c2007..cd98c3b 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,4 +1,6 @@
-<div id="box">
+<img *ngIf="need.image" alt="Need image" class="need-image" [src]="need.image"/>
+
+<div id="box">
<h1>{{need.name}}</h1>
<span class="needType">{{need.type}} GOAL</span>
<p>{{need.description}}</p>
@@ -8,34 +10,27 @@
<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>
- </div>
- </div>
- <div class="right">
- <img *ngIf="need.image" alt="Need image" class="need-image" [src]="need.image"/>
- </div>
- </div>
+ <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 class="actionArea">
<button *ngIf="isHelper()" (click)="add(need!)">
<span class="icon">add</span>Add To Basket