generated from nyu-software-engineering/final-project
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from software-students-spring2024/ele-branch
Add changes to front-end
- Loading branch information
Showing
11 changed files
with
882 additions
and
373 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,34 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block container %} | ||
{% extends 'base.html' %} {% block container %} | ||
<div id="login-signup"> | ||
<a href="{{ url_for('log_in') }}" class="active">Log In</a> | ||
<a href="{{ url_for('sign_up') }}">Sign Up</a> | ||
<a href="{{ url_for('log_in') }}" class="active">Log In</a> | ||
<a href="{{ url_for('sign_up') }}">Sign Up</a> | ||
</div> | ||
|
||
<form method="POST" action="{{ url_for('log_in')}}" id="login-form"> | ||
<div id="form-user"> | ||
<label for="fusername">Username</label><br> | ||
<input type="text" id="fusername" name="fusername" placeholder="Username" required/> | ||
</div> | ||
<div id="form-pass"> | ||
<label for="fusername">Password</label><br> | ||
<input type="password" id="fpassword" name="fpassword" placeholder="Enter a Password" required/> | ||
</div> | ||
<div id="form-submit"> | ||
<input type="submit" value="Log In" /> | ||
</div> | ||
<form method="POST" action="{{ url_for('log_in')}}" id="login-signup-form"> | ||
<div> | ||
<label for="fusername">Username</label><br /> | ||
<input | ||
type="text" | ||
id="fusername" | ||
name="fusername" | ||
placeholder="Username" | ||
required | ||
/> | ||
</div> | ||
<div> | ||
<label for="fusername">Password</label><br /> | ||
<input | ||
type="password" | ||
id="fpassword" | ||
name="fpassword" | ||
placeholder="Enter a Password" | ||
required | ||
/> | ||
</div> | ||
<div id="form-submit"> | ||
<input type="submit" value="Log In" /> | ||
</div> | ||
</form> | ||
{% if error %} | ||
<p>{{error}}</p> | ||
{% endif %} | ||
|
||
<script> | ||
|
||
</script> | ||
|
||
{% endblock %} | ||
{% endif %} {% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,95 @@ | ||
{% extends 'base.html' %} {% block container %} | ||
<div> | ||
<a>Offers Recieved</a> | ||
</div> | ||
<div> | ||
{% for doc in docs %} | ||
<div class="listing-alt"> | ||
<a>Offered for item {{doc.offerforid}}</a> | ||
<b>{{doc.status}}</b> | ||
|
||
<div id="offers-sent"> | ||
{% if not offers %} | ||
<!-- if no offers sent then have browse items button --> | ||
<div id="browse"> | ||
<img | ||
src="{{ url_for('static', filename='browse.jpg') }}" | ||
alt="user profile image" | ||
width="400px" | ||
/> | ||
<div id="browse-collection" onclick="window.location.href='/'"> | ||
<div> | ||
<img | ||
src="https://cdn-icons-png.freepik.com/512/8333/8333955.png" | ||
alt="Add Item" | ||
width="30px" | ||
height="30px" | ||
/> | ||
<input type="submit" value="NO OFFERS FOUND. CLICK TO BROWSE." /> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="item-buttons"> | ||
<a href="{{url_for('rejectoffer', offer_id = doc._id)}}">Reject Offer</a> | ||
<br /> | ||
<a href="{{url_for('acceptoffer', offer_id = doc._id)}}">Accept Offer</a> | ||
{% else %} {% for offer in offers %} | ||
<div class="offer-sent"> | ||
<div class="offer-header"> | ||
<div>Your Item</div> | ||
<div>Their Item(s)</div> | ||
</div> | ||
|
||
<div class="offer-content"> | ||
<div class="item-wanted"> | ||
<div class="offer-image"> | ||
<img | ||
src="{{ offer.offerforid.image_url }}" | ||
alt="{{ offer.offerforid.name }}" | ||
referrerpolicy="no-referrer" | ||
/> | ||
</div> | ||
</div> | ||
|
||
<div class="swap-icon"> | ||
<img | ||
src="https://cdn-icons-png.freepik.com/512/10477/10477833.png" | ||
alt="Add Item" | ||
width="30px" | ||
height="30px" | ||
/> | ||
</div> | ||
|
||
<div class="items-offered"> | ||
<div class="items-transformed"> | ||
{% for item in offer.offereditems %} | ||
<div class="offer-image-alt"> | ||
<img | ||
src="{{ item.image_url }}" | ||
alt="{{ item.name }}" | ||
referrerpolicy="no-referrer" | ||
/> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="offer-details-alt"> | ||
<div> | ||
<ul> | ||
<li>{{offer.offerforid.name}}</li> | ||
</ul> | ||
</div> | ||
|
||
<div> | ||
<ul> | ||
{% for item in offer.offereditems %} | ||
<li>{{item.name}}</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="item-buttons"> | ||
<a href="{{url_for('rejectoffer', offer_id = offer._id)}}" | ||
>Reject Offer</a | ||
> | ||
<br /> | ||
<a href="{{url_for('acceptoffer', offer_id = offer._id)}}" | ||
>Accept Offer</a | ||
> | ||
</div> | ||
</div> | ||
{%endfor%} | ||
{% endfor %} {% endif %} | ||
</div> | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,94 @@ | ||
{% extends 'base.html' %} {% block container %} | ||
<div> | ||
<a>Offers Sent</a> | ||
</div> | ||
<div> | ||
{% for doc in docs %} | ||
<div class="listing-alt"> | ||
<a>Offered for item {{doc.offerforid}}</a> | ||
<b>{{doc.status}}</b> | ||
|
||
<div id="offers-sent"> | ||
{% if not offers %} | ||
<!-- if no offers sent then have browse items button --> | ||
<div id="browse"> | ||
<img | ||
src="{{ url_for('static', filename='browse.jpg') }}" | ||
alt="user profile image" | ||
width="400px" | ||
/> | ||
|
||
<div id="browse-collection" onclick="window.location.href='/'"> | ||
<div> | ||
<img | ||
src="https://cdn-icons-png.freepik.com/512/8333/8333955.png" | ||
alt="Add Item" | ||
width="30px" | ||
height="30px" | ||
/> | ||
<input type="submit" value="NO OFFERS FOUND. CLICK TO BROWSE." /> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="item-buttons"> | ||
<a href="{{url_for('deleteoffer', offer_id = doc._id)}}">Delete Offer</a> | ||
{% else %} {% for offer in offers %} | ||
<div class="offer-sent"> | ||
<div class="offer-header"> | ||
<div>Their Item</div> | ||
<div>Your Item(s)</div> | ||
</div> | ||
|
||
<div class="offer-content"> | ||
<div class="item-wanted"> | ||
<div class="offer-image"> | ||
<img | ||
src="{{ offer.offerforid.image_url }}" | ||
alt="{{ offer.offerforid.name }}" | ||
referrerpolicy="no-referrer" | ||
/> | ||
</div> | ||
</div> | ||
|
||
<div class="swap-icon"> | ||
<img | ||
src="https://cdn-icons-png.freepik.com/512/10477/10477833.png" | ||
alt="Add Item" | ||
width="30px" | ||
height="30px" | ||
/> | ||
</div> | ||
|
||
<div class="items-offered"> | ||
<div class="items-transformed"> | ||
{% for item in offer.offereditems %} | ||
<div class="offer-image-alt"> | ||
<img | ||
src="{{ item.image_url }}" | ||
alt="{{ item.name }}" | ||
referrerpolicy="no-referrer" | ||
/> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="offer-details-alt"> | ||
<div> | ||
<ul> | ||
<li>{{offer.offerforid.name}}</li> | ||
</ul> | ||
</div> | ||
|
||
<div> | ||
<ul> | ||
{% for item in offer.offereditems %} | ||
<li>{{item.name}}</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="item-buttons-alt"> | ||
<a href="{{url_for('deleteoffer', offer_id = offer._id)}}">Edit Offer</a> | ||
<br /> | ||
<a href="{{url_for('deleteoffer', offer_id = offer._id)}}" | ||
>Delete Offer</a | ||
> | ||
</div> | ||
</div> | ||
{%endfor%} | ||
{% endfor %} {% endif %} | ||
</div> | ||
|
||
{% endblock %} |
Oops, something went wrong.