Skip to content

Commit

Permalink
Merge pull request #147 from gcivil-nyu-org/Justin
Browse files Browse the repository at this point in the history
Justin
  • Loading branch information
Zhiyuan-Wei committed Nov 14, 2023
2 parents fb8f154 + 2157c59 commit e06fdd7
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 67 deletions.
11 changes: 11 additions & 0 deletions rrapp/static/rrapp/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,14 @@ html, body{
background-color:#F9F9F9;
border: var(--bs-border-width) var(--bs-border-style) #dee2e6!important;
}

.home-title{
animation: fadeInAnimation ease 3s;
animation-iteration-count: 1;
animation-fill-mode: forwards;
}

@keyframes fadeInAnimation {
0% {opacity: 0;}
100% {opacity: 1;}
}
Binary file added rrapp/static/rrapp/home_img.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions rrapp/templates/rrapp/confirm_delete.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% extends "rrapp/main.html" %}
{% block content %}
<div class="container my-3 p-3">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-5">
<div class="card shadow-lg border-0 rounded-lg mt-0 mb-3">
<form class="form row w-90 text-center align-items-center" action="" method="POST">
{% csrf_token %}
<h1>Are you sure you want to delete?</h1><br>
<div><input class='btn btn-danger' type='submit' value='Yes' /></div>
<a href="{% url 'rrapp:listing_detail' user_id pk %}"><div class='btn btn-primary'>Cancel</div></a>
</form>
</div>
</div>
</div>
</div>
</div>
{% endblock content %}
12 changes: 10 additions & 2 deletions rrapp/templates/rrapp/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
{% load static %}
<link rel="stylesheet" href="{% static 'rrapp/common.css' %}">
<style>
body {
background-image: url("{% static 'rrapp/home_img.jpg' %}");
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
</style>
</head>
<body class = "align-items-center" style="height:100%;width:100%;">
{% if messages %}
Expand All @@ -15,8 +23,8 @@
{% endfor %}
</ul>
{% endif %}
<div class="px-4 py-5 my-5 text-center">
<h1 class="display-5 fw-bold text-body-emphasis">Hello, world. You're at the rrapp index.</h1>
<div class="px-4 py-5 my-5 text-center home-title">
<h1 class="display-5 fw-bold text-body-emphasis">Find your roomie at RoomieRendezvous!</h1>
<div class="col-lg-6 mx-auto">
<div class="d-grid gap-2 d-sm-flex justify-content-sm-center">
<a href="{% url 'rrapp:login' %}">
Expand Down
2 changes: 1 addition & 1 deletion rrapp/templates/rrapp/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li>{{ message }}</li>
<li {% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
Expand Down
16 changes: 12 additions & 4 deletions rrapp/templates/rrapp/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
{% include 'rrapp/left_bar.html' with user=user path=path %}

<div class="text-center right-page">
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li {% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
<div class="container p-3">
<nav aria-label="breadcrumb" style="--bs-breadcrumb-divider: '>';">
<ol class="breadcrumb p-3 bg-body-tertiary board rounded-3">
Expand Down Expand Up @@ -73,10 +80,11 @@ <h1 class="font-monospace display-5 fw-medium text-body-emphasis my-3">{{ user.e
<button type="submit" class="btn btn-primary m-2" >Save</button>
</div>
</form>

<div class = "p-2">
<a href="{% url 'rrapp:activate_email' %}" class="btn btn-danger">Activate Your Account</a>
</div>
{% if not user.is_verified %}
<div class = "p-2">
<a href="{% url 'rrapp:activate_email' %}" class="btn btn-danger">Activate Your Account</a>
</div>
{% endif %}
<div class = "p-3">
<a href="{% url 'rrapp:deleteAccount' user_id %}" class="btn btn-dark">Delete Account</a>
</div>
Expand Down
97 changes: 49 additions & 48 deletions rrapp/templates/rrapp/rentee_listings.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,124 +41,125 @@
</div>
<div class="mb-3">
<form method="get" action="{% url 'rrapp:rentee_listings' user_id %}">
<label class="form-label">Filter by:</label>
<div class="mb-3 row">
<!-- Monthly Rent Filter -->
<div class="col-md-4">
<div class="col-md-3">
<div class="input-group">
<span class="input-group-text">Monthly Rent</span>
<input type="number" class="form-control" id="filter-monthly_rent" name="monthly_rent" value="{{ request.GET.monthly_rent }}" min="0">
</div>
</div>

<!-- Number of Bedrooms Filter -->
<div class="col-md-4">
<div class="col-md-3">
<div class="input-group">
<span class="input-group-text">Number of Bedrooms</span>
<input type="number" class="form-control" id="filter-number_of_bedrooms" name="number_of_bedrooms" value="{{ request.GET.number_of_bedrooms }}" min="0">
</div>
</div>

<!-- Number of Bathrooms Filter -->
<div class="col-md-4">
<div class="col-md-3">
<div class="input-group">
<span class="input-group-text">Number of Bathrooms</span>
<input type="number" class="form-control" id="filter-number_of_bathrooms" name="number_of_bathrooms" value="{{ request.GET.number_of_bathrooms }}" min="0">
</div>
</div>
</div>

<div class="mb-3 row">
<!-- Room Type Filter -->
<div class="col-md-2">
<!-- <label for="filter-room-type" class="form-label">Room Type</label> -->
<select class="form-select" id="filter-room-type" name="room_type">
<option value="">All Room Type</option>
<option value="private" {% if request.GET.room_type == 'private' %}selected{% endif %}>Private</option>
<option value="shared" {% if request.GET.room_type == 'shared' %}selected{% endif %}>Shared</option>
</select>
</div>

<!-- Food Groups Allowed Filter -->
<div class="col-md-2">
<!-- <label for="filter-food-groups-allowed" class="form-label">Food Groups Allowed</label> -->
<select class="form-select" id="filter-food-groups-allowed" name="food_groups_allowed">
<option value="">All Food Groups</option>
<option value="all" {% if request.GET.food_groups_allowed == 'all' %}selected{% endif %}>All</option>
<option value="vegan" {% if request.GET.food_groups_allowed == 'vegan' %}selected{% endif %}>Vegan</option>
<option value="vegetarian" {% if request.GET.food_groups_allowed == 'vegetarian' %}selected{% endif %}>Vegetarian</option>
<option value="non_vegetarian" {% if request.GET.food_groups_allowed == 'non_vegetarian' %}selected{% endif %}>Non-Vegetarian</option>
</select>
</div>

<!-- Pets Filter -->
<div class="col-md-2">
<!-- <label for="filter-pets_allowed" class="form-label">Pets Allowed</label> -->
<select class="form-select" id="filter-pets_allowed" name="pets_allowed">
<option value="">All Pets Type</option>
<option value="none" {% if request.GET.pets_allowed == 'none' %}selected{% endif %}>None</option>
<option value="all" {% if request.GET.pets_allowed == 'all' %}selected{% endif %}>All</option>
<option value="cats" {% if request.GET.pets_allowed == 'cats' %}selected{% endif %}>Cats</option>
<option value="dogs" {% if request.GET.pets_allowed == 'dogs' %}selected{% endif %}>Dogs</option>
</select>
</div>
</div>

<div class="mb-3 row">
<!-- Washer Filter -->
<div class="col-md-4">
<div class="col-md-1">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="filter-washer" name="washer" {% if request.GET.washer == 'on' %}checked{% endif %}>
<label class="form-check-label" for="filter-washer">Washer</label>
</div>
</div>

<!-- Dryer Filter -->
<div class="col-md-4">
<div class="col-md-1">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="filter-dryer" name="dryer" {% if request.GET.dryer == 'on' %}checked{% endif %}>
<label class="form-check-label" for="filter-dryer">Dryer</label>
</div>
</div>

<!-- Utilities Included Filter -->
<div class="col-md-4">
<div class="col-md-2">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="filter-utilities_included" name="utilities_included" {% if request.GET.utilities_included == 'on' %}checked{% endif %}>
<label class="form-check-label" for="filter-utilities_included">Utilities Included</label>
</div>
</div>

<!-- Furnished Filter -->
<div class="col-md-4">
<div class="col-md-2">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="filter-furnished" name="furnished" {% if request.GET.furnished == 'on' %}checked{% endif %}>
<label class="form-check-label" for="filter-furnished">Furnished</label>
</div>
</div>

<!-- Dishwasher Filter -->
<div class="col-md-4">
<div class="col-md-2">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="filter-dishwasher" name="dishwasher" {% if request.GET.dishwasher == 'on' %}checked{% endif %}>
<label class="form-check-label" for="filter-dishwasher">Dishwasher</label>
</div>
</div>

<!-- Parking Filter -->
<div class="col-md-4">
<div class="col-md-1">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="filter-parking" name="parking" {% if request.GET.parking == 'on' %}checked{% endif %}>
<label class="form-check-label" for="filter-parking">Parking</label>
</div>
</div>

<!-- Room Type Filter -->
<div class="col-md-4">
<label for="filter-room-type" class="form-label">Room Type</label>
<select class="form-select" id="filter-room-type" name="room_type">
<option value="">Select Room Type</option>
<option value="private" {% if request.GET.room_type == 'private' %}selected{% endif %}>Private</option>
<option value="shared" {% if request.GET.room_type == 'shared' %}selected{% endif %}>Shared</option>
</select>
</div>

<!-- Food Groups Allowed Filter -->
<div class="col-md-4">
<label for="filter-food-groups-allowed" class="form-label">Food Groups Allowed</label>
<select class="form-select" id="filter-food-groups-allowed" name="food_groups_allowed">
<option value="">Select Food Groups</option>
<option value="all" {% if request.GET.food_groups_allowed == 'all' %}selected{% endif %}>All</option>
<option value="vegan" {% if request.GET.food_groups_allowed == 'vegan' %}selected{% endif %}>Vegan</option>
<option value="vegetarian" {% if request.GET.food_groups_allowed == 'vegetarian' %}selected{% endif %}>Vegetarian</option>
<option value="non_vegetarian" {% if request.GET.food_groups_allowed == 'non_vegetarian' %}selected{% endif %}>Non-Vegetarian</option>
</select>
</div>

<!-- Pets Filter -->
<div class="col-md-4">
<label for="filter-pets_allowed" class="form-label">Pets Allowed</label>
<select class="form-select" id="filter-pets_allowed" name="pets_allowed">
<option value="">Select Pets Type</option>
<option value="none" {% if request.GET.pets_allowed == 'none' %}selected{% endif %}>None</option>
<option value="all" {% if request.GET.pets_allowed == 'all' %}selected{% endif %}>All</option>
<option value="cats" {% if request.GET.pets_allowed == 'cats' %}selected{% endif %}>Cats</option>
<option value="dogs" {% if request.GET.pets_allowed == 'dogs' %}selected{% endif %}>Dogs</option>
</select>
</div>
</div>
</div>

<button type="submit" class="btn btn-primary my-2">Filter</button>
<button type="button" class="btn btn-secondary my-2" onclick="resetFilters()">Reset</button>
<div class="col-md-6 mx-auto">
<label for="sort-select" class="form-label">Sort by:</label>
<div class="d-flex justify-content-center">
<select class="form-select" id="sort-select" name="sort" onchange="changeSort()" style="width: 250px;">
<option value="">-- Select Sorting Option --</option>
<option value="">Post Time - Old to New</option>
<option value="monthly_rent" {% if request.GET.sort == 'monthly_rent' %}selected{% endif %}>Monthly Rent - Low to High</option>
<option value="-monthly_rent" {% if request.GET.sort == '-monthly_rent' %}selected{% endif %}>Monthly Rent - High to Low</option>
<option value="number_of_bedrooms" {% if request.GET.sort == 'number_of_bedrooms' %}selected{% endif %}>Number of Bedrooms - Low to High</option>
Expand Down

0 comments on commit e06fdd7

Please sign in to comment.