Skip to content

Commit

Permalink
Merge branch 'main' into MaryBranch
Browse files Browse the repository at this point in the history
  • Loading branch information
MaryValencia0220 committed Nov 9, 2021
2 parents 16e5528 + 5dc260a commit c975ab7
Show file tree
Hide file tree
Showing 12 changed files with 155 additions and 155 deletions.
4 changes: 3 additions & 1 deletion application.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sklearn
from datetime import date
from testData import rslts
from profileLoadingTestData import profileResult

from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
Expand Down Expand Up @@ -92,7 +93,8 @@ def user(usr):

@application.route("/profile/")
def profile():
return render_template("profile.html")

return render_template("profile.html", profileResult=profileResult )

@application.route("/profileEdit")
def profileEdit():
Expand Down
34 changes: 34 additions & 0 deletions profileLoadingTestData.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
profileResult={
"profile": {
"userName": "Joe Swanson",
"labor": "Gardener",
"location": "Fresno",
"imgLink": "https://a.ltrbxd.com/resized/film-poster/2/0/9/3/8/2/209382-thor-ragnarok-0-460-0-690-crop.jpg?k=02c656f39b"
},
"projects": [{
"projectName": "Estate Garden",
"projectDescription": " gabba gabbe",
"photoLink1": "../static/Images/testDataImages/projectImg1.jpg",
"photoLink2": "../static/Images/testDataImages/projectImg2.jpg",
"photoLink3": "../static/Images/testDataImages/projectImg3.jpg",
"photoLink4": "../static/Images/testDataImages/projectImg4.jpg"
},
{
"projectName": "Estate Garden",
"projectDescription": " gabba gabbe",
"photoLink1": "../static/Images/testDataImages/projectImg1.jpg",
"photoLink2": "../static/Images/testDataImages/projectImg2.jpg",
"photoLink3": "../static/Images/testDataImages/projectImg3.jpg",
"photoLink4": "../static/Images/testDataImages/projectImg4.jpg"
},
{
"projectName": "Estate Garden",
"projectDescription": " gabba gabbe",
"photoLink1": "../static/Images/testDataImages/projectImg1.jpg",
"photoLink2": "../static/Images/testDataImages/projectImg2.jpg",
"photoLink3": "../static/Images/testDataImages/projectImg3.jpg",
"photoLink4": "../static/Images/testDataImages/projectImg4.jpg"
}
]

}
59 changes: 12 additions & 47 deletions static/CSS/profile.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,18 @@
justify-content:space-evenly;
gap:20px;
}
#searchContainer {

display:flex;
justify-content:space-around;
margin-left:5%;
margin-right:5%;
height:10%;
background-color:white;
}
#searchContainer input{
border:none;
#profileContent{
margin-left:3%;
}
#profilePic{
width:30%;
margin-right:1%;

}
#searchContainer label{
}
#userImg{
width:100%;

padding:2%;;


}
form{
display:flex;
align-content:space-between;
}
label h3{
padding-bottom: 100%;
}
#searchBar{
flex-grow:.8;
border:none;

}
input:focus, textarea:focus, select:focus{
outline: none;
}
#searchButton{
height:100%;
margin-left:10%;

}
#searchIcon2{
height:100%;

}
#locationBar{
flex-grow:.1;

}
#profileContent{
margin-left:2%;
}
.projectPhoto{
width:25%;
}
141 changes: 42 additions & 99 deletions static/CSS/resultsPage.css
Original file line number Diff line number Diff line change
@@ -1,103 +1,46 @@
#searchContainer {

display:flex;
justify-content:space-around;
margin-left:5%;
margin-right:5%;
height:10%;
background-color:white;
}
#searchContainer input{
border:none;

}
#searchContainer label{

padding:2%;;


}
form{
display:flex;
align-content:space-between;
}
label h3{
padding-bottom: 100%;
}
#searchBar{
flex-grow:.8;
border:none;

}
input:focus, textarea:focus, select:focus{
outline: none;
}
#searchButton{
height:100%;
margin-left:10%;

}
#searchIcon2{
height:100%;

}
#locationBar{
flex-grow:.1;

}



hr{
width:90%;
margin-right:20%;
}




#searchButtonContainer{

hr{
width:90%;
margin-right:20%;
}
.result{

display:inline-flex;
margin-bottom:1%;
height:23%;
width:75%;
}

img.result_profileImage {
height:100%;

}
.result{

display:inline-flex;
padding-right:20px;
padding-top:20px;

height:23%;
width:75%;
}

img.result_profileImage {
height:100%;
padding-right:20px;
padding-top:20px;


}
.result_info{
font-size:small;
}
.result_info{
font-size:small;
font-size: 1.5vw;

height:100%;

}
.midSec{

height:90%;
}
#resultsSection{
margin-left: 5%;
height:80%;
}
div.midContent, #results{
height: 100%;
}
html{
height:100%;
padding-bottom:20%;
}
.midSec{

height:90%;
}
#resultsSection{
margin-left: 5%;
height:80%;
}
div.midContent, #results{
height: 100%;
}
html{
height:100%;
}
body{
height:99%;
}
input[type=submit]{
background-image: url('../static/Images/search.png');
}
}
body{
height:99%;
}
input[type=submit]{
background-image: url('../static/Images/search.png');
}
52 changes: 52 additions & 0 deletions static/CSS/searchBar.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#searchContainer {

display:flex;
justify-content:space-around;
margin-left:5%;
margin-right:5%;
height:10%;
background-color:white;
}
#searchContainer input{
border:none;

}
#searchContainer label{

padding:2%;;


}
form{
display:flex;
align-content:space-between;
}
label h3{
padding-bottom: 100%;
}
#searchBar{
flex-grow:.8;
border:none;

}
input:focus, textarea:focus, select:focus{
outline: none;
}
#searchButton{
height:100%;
margin-left:10%;

}
#searchIcon2{
height:100%;

}
#locationBar{
flex-grow:.1;

}
#searchButtonContainer{

height:100%;

}
Binary file added static/Images/testDataImages/projectImg1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/Images/testDataImages/projectImg2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/Images/testDataImages/projectImg3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/Images/testDataImages/projectImg4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions templates/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel = "stylesheet" href = "../static/CSS/profile.css">
<link rel = "stylesheet" href = "../static/CSS/searchBar.css">
{% endblock %}

{% block content %}
Expand Down Expand Up @@ -32,15 +33,15 @@
<div id ="profilePic">


<img src = "profilePic" id = "userImg">
<img src = "{{profileResult.profile.imgLink}}" id = "userImg">
<div id = "ratings">ratings</div>

</div>

<div id = "userDescriptionContainer">
<div id ="info">
<div id = "username"> Username</div>
<div id = "location">Location</div>
<div id = "username"> <h2> {{profileResult.profile.userName}}</h2></div>
<div id = "location">{{profileResult.profile.location}}</div>
</div>

<div id = "userDescription">
Expand All @@ -52,18 +53,19 @@
</section>
<section id = "userProjects">
<h2>Projects</h2>

{% for project in profileResult.projects %}
<article id = "projectContainer">
<h3>Project Title</h3>
<h3>{{project.projectName}}</h3>
<div id = "projectContent">
<img src = "" alt = "photo1" class = "projectPhoto">
<img src = "" alt = "photo2" class = "projectPhoto">
<img src = "{{project.photoLink1}}" alt = "photo1" class = "projectPhoto">
<img src = "{{project.photoLink2}}" alt = "photo2" class = "projectPhoto">
<div id = "projectDescription">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolor repellendus accusamus atque blanditiis voluptate rerum illo.
Ratione at veritatis ab animi? Sunt consequuntur provident, ea tempore nesciunt fugiat esse deserunt?</p>
</div>
</div>
</article>
{% endfor%}
</section>
</section>

Expand Down
3 changes: 2 additions & 1 deletion templates/resultsPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale = 1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="../static/JS/resultsPageJS.js"></script>
<link rel = "stylesheet" href = "../static/CSS/searchBar.css">
{% endblock %}

{% block content %}
Expand Down Expand Up @@ -32,7 +33,7 @@
<h1>Results</h1>

<div id="results">
{%if rslts is defined and rslts != {} %}
{%if rslts is defined and rslts != [{}] %}
{% for users in rslts %}
<article class="result">
<div class="result_imageContainer">
Expand Down
1 change: 1 addition & 0 deletions testData.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"labor": "Taika Waititi",
"location": 2017,
"imgLink": "https://a.ltrbxd.com/resized/film-poster/2/0/9/3/8/2/209382-thor-ragnarok-0-460-0-690-crop.jpg?k=02c656f39b"

},
{
"userName": "My Dinner with Andre",
Expand Down

0 comments on commit c975ab7

Please sign in to comment.