diff options
author | benal01 <bja4245@rit.edu> | 2025-04-02 23:00:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-02 23:00:14 -0400 |
commit | 2f67d2218b48937a370c5562eff5141b80475524 (patch) | |
tree | c744dd407f46f71b692aaaad6d4c66237c8ba9a5 /ufund-ui/src/app/components/need-page/need-page.component.html | |
parent | 2b7c42ffacaaf884bc9497e975c0c3274e9f966e (diff) | |
parent | fb6d8140830bbb5081056105eaa775f26885da8f (diff) | |
download | JellySolutions-2f67d2218b48937a370c5562eff5141b80475524.tar.gz JellySolutions-2f67d2218b48937a370c5562eff5141b80475524.tar.bz2 JellySolutions-2f67d2218b48937a370c5562eff5141b80475524.zip |
Merge pull request #25 from RIT-SWEN-261-02/need-image
Need image support + need page image styling
Diffstat (limited to 'ufund-ui/src/app/components/need-page/need-page.component.html')
-rw-r--r-- | ufund-ui/src/app/components/need-page/need-page.component.html | 56 |
1 files changed, 31 insertions, 25 deletions
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 12e9b74..6921eac 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,35 +1,41 @@ <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> + <h1>{{need.name}}</h1> + <span class="needType">{{need.type}} GOAL</span> + <p>{{need.description}}</p> <div class="prog"> <!-- <span>{{need?.current}} / {{need?.maxGoal}}</span>--> - <progress [value]="need?.current" [max]="need?.maxGoal"></progress> - <span>This goal is <strong>{{(((need?.current ?? 0)*100) / (need?.maxGoal ?? 0)).toFixed(0)}}%</strong> complete!</span> + <progress [value]="need.current" [max]="need.maxGoal"></progress> + <span>This goal is <strong>{{(((need.current)*100) / (need.maxGoal)).toFixed(0)}}%</strong> complete!</span> </div> - <span><strong>Target Goal:</strong> {{need.type.toString() == 'MONETARY' ? '$' : ''}}{{need.maxGoal}}</span> - - <span><strong>Amount Currently Collected:</strong> {{need.type.toString() == 'MONETARY' ? '$' : ''}}{{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 class="split"> + <div class="left"> + <span><strong>Target Goal:</strong> {{(need.type === GoalType.MONETARY) ? "$" : ""}}{{need.maxGoal}}</span> + + <span><strong>Amount Currently Collected:</strong> {{need.type.toString() == 'MONETARY' ? '$' : ''}}{{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> + <div class="actionArea"> <button *ngIf="isHelper()" (click)="add(need!)"> |