Skip to content

Commit

Permalink
feat: display the similar proteins
Browse files Browse the repository at this point in the history
  • Loading branch information
xnought committed Feb 28, 2024
1 parent 90ed183 commit 5f4ca0e
Showing 1 changed file with 41 additions and 24 deletions.
65 changes: 41 additions & 24 deletions frontend/src/lib/SimilarProteins.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,30 @@
});
</script>

<table>
<tr>
<th> Name </th>
<th> Probability Match</th>
<th> E-Value </th>
<th> Description </th>
</tr>
{#each similarProteins as protein}
<tr class="pdb-row">
<td>
<!-- TODO: figure out how to make this a simple route instead of reloading the entire page -->
<a href="/protein/{protein.name}"
><LinkOutline size="sm" />
{undoFormatProteinName(protein.name)}</a
>
</td>
<td>{protein.prob}</td>
<td>{protein.evalue}</td>
<td class="pdb-desc">{protein.description}</td>
<div style="max-height: 300px; overflow-y: scroll;">
<table>
<tr>
<th> Name </th>
<th> Probability Match</th>
<th> E-Value </th>
<th> Description </th>
</tr>
{/each}
</table>
{#each similarProteins as protein}
<tr class="pdb-row">
<td>
<!-- TODO: figure out how to make this a simple route instead of reloading the entire page -->
<a href="/protein/{protein.name}"
><LinkOutline size="sm" />
{undoFormatProteinName(protein.name)}</a
>
</td>
<td>{protein.prob}</td>
<td>{protein.evalue}</td>
<td class="pdb-desc">{protein.description}</td>
</tr>
{/each}
</table>
</div>

<style>
table {
Expand Down Expand Up @@ -70,8 +72,23 @@
gap: 1px;
align-items: center;
}
table {
overflow-y: scroll;
max-height: 300px;
/* width */
::-webkit-scrollbar {
width: 3px;
}
/* Track */
::-webkit-scrollbar-track {
background: #f1f1f1;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #888;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
</style>

0 comments on commit 5f4ca0e

Please sign in to comment.