Skip to content

Commit

Permalink
modify front end
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielhCarranza committed Jul 28, 2020
1 parent 3840a64 commit 3fdb286
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 64 deletions.
3 changes: 2 additions & 1 deletion TF_SimilarityAbstractSearch/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ def default_contex(papers, **kwargs):
def main():
papers = paper_dict[:40]
context = default_contex(papers, sort_order='latest')
return render_template('index.html', **context)
# app.run(host="0.0.0.0", port=5000, debug=True)
return render_template('index.html', **context)


if __name__ == "__main__":
main()

41 changes: 0 additions & 41 deletions TF_SimilarityAbstractSearch/api/build_search_index.py

This file was deleted.

4 changes: 2 additions & 2 deletions TF_SimilarityAbstractSearch/api/static/paper_list.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

const Paper = props => {
const p = props.paper
const url = p.id + '.full.pdf';
const url ='https://www.semanticscholar.org/paper/' + p.id ;
return (
<div class={'rel_paper ' + p.id}>
<div class='dllinks'>
<div class='metadata action'><a href={'/sim/' + p.id}>show similar</a></div>
<div class='metadata action'><a href={url}>pdf</a></div>
{/* <div class='metadata rel_date'>{p.rel_date}</div> */}
</div>
<div class='title'><a href={p.id}>{p.title}</a></div>
<div class='title'><a href={url}>{p.title}</a></div>
<div class='EmbeddingID'>{p.EmbeddingID}</div>
<div class='paperAbstract'>{p.paperAbstract}</div>
</div>
Expand Down
34 changes: 23 additions & 11 deletions TF_SimilarityAbstractSearch/api/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,31 @@ body {
padding: 0;
font-family: "Gill Sans", "Gill Sans MT", Helvetica, Arial, sans-serif;
font-weight: 400;
background-color: #F6F3E5;
background-color: lightgray;
}

#titdiv {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}

/* #titdiv {
height: 50px;
background-color: blue;
background-color: #282c34;
color: white;
padding-top: 10px;
padding-left: 20px;
padding-bottom: 30px;
border-bottom: 1px solid #540000;
}
} */
h1 {
font-size: 24px;
font-size: 40px;
padding: 0;
margin: 0;
font-weight: 400;
Expand All @@ -25,10 +36,10 @@ h1 {
font-weight: 300;
}
#titdiv a:visited {
color: white;
color: darkcyan;
}
#titdiv a:link {
color: white;
color: darkcyan;
}

#wrap {
Expand All @@ -44,6 +55,7 @@ h1 {
font-size: 16px;
border: 1px solid #333;
background-color: white;
border-radius: 0.5rem;
}

.rel_paper a {
Expand Down Expand Up @@ -73,12 +85,13 @@ h1 {

.title {
font-size: 18px;
color: darkblue;
}

.paperAbstract {
font-family: Arial, Helvetica, sans-serif;
font-weight: 300;
background-color: #EFE;
background-color: lightcyan;
padding: 10px;
margin-top: 10px;
border-radius: 5px 5px 0px 0px;
Expand All @@ -87,11 +100,12 @@ h1 {

#info {
background-color: #EEF;
padding: 10px;
padding: 5px;
margin: 10px;
border: 1px solid #CCD;
color: #005;
font-weight: 300;
font-size: 10px;
}

#sbox {
Expand All @@ -103,13 +117,11 @@ h1 {
border: 5px solid white;
width: 920px;
border: solid 1px #999;

border-radius: 0.5rem;
height: 40px;
font-size: 22px;
color: "#333";

padding-left: 50px;

background-image:url('/static/search.png');
background-repeat:no-repeat;
background-position:left center;
Expand Down
18 changes: 9 additions & 9 deletions TF_SimilarityAbstractSearch/api/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@
<body>
<div id="titdiv">
<h1>TalkToMedPapers</h1>
<!-- search box -->
<div id="sbox">
<form action="/search" method="get">
<input name="q" type="text" id="qfield" value="{{ gvars.search_query }}">
</form>
</div>

<div id="wrap">
</div>

</div>


<!-- search box -->
<div id="sbox">
<form action="/search" method="get">
<input name="q" type="text" id="qfield" value="{{ gvars.search_query }}">
</form>
</div>



<div id="wrap">
</div>

<!-- React -->
<script src="https://unpkg.com/react@16/umd/react.production.min.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js" crossorigin></script>
Expand Down

0 comments on commit 3fdb286

Please sign in to comment.