-
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 #147 from xnought/frontend-redesign
feat: redesigned frontend
- Loading branch information
Showing
21 changed files
with
392 additions
and
205 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script lang="ts"> | ||
import { Card } from "flowbite-svelte"; | ||
export let title = ""; | ||
</script> | ||
|
||
<Card | ||
class="max-w-full mt-5" | ||
style="padding-top: 15px; color: var(--color-text);" | ||
> | ||
<h2 class="text-darkblue mb-2">{title}</h2> | ||
<slot /> | ||
</Card> |
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 |
---|---|---|
|
@@ -21,4 +21,6 @@ | |
} | ||
</script> | ||
|
||
{@html mdToHTML} | ||
<div style="color: var(--color-text);"> | ||
{@html mdToHTML} | ||
</div> |
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 |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<script lang="ts"> | ||
import { LinkOutline } from "flowbite-svelte-icons"; | ||
import { onMount } from "svelte"; | ||
export let queryProteinName: string; | ||
let similarProteins: any[] = []; | ||
onMount(async () => { | ||
similarProteins = await similarPDBProteins(queryProteinName); | ||
}); | ||
async function similarPDBProteins(queryProteinName: string) { | ||
// TODO: QUERY TO BACKEND WITH ACTUAL CALL INSTEAD OF MOCK DATA | ||
const similarExternalProteins = [ | ||
{ | ||
source: "pdb", | ||
link: "https://www.rcsb.org/structure/1A0S", | ||
name: "1A0S", | ||
prob: 0.99, | ||
}, | ||
{ | ||
source: "pdb", | ||
link: "https://www.rcsb.org/structure/1A0S", | ||
name: "1A0S", | ||
prob: 0.99, | ||
}, | ||
{ | ||
source: "pdb", | ||
link: "https://www.rcsb.org/structure/1A0S", | ||
name: "1A0S", | ||
prob: 0.99, | ||
}, | ||
]; | ||
return similarExternalProteins; | ||
} | ||
</script> | ||
|
||
<table> | ||
<tr> | ||
<th> Source </th> | ||
<th> Name </th> | ||
<th> Desc. </th> | ||
<th> Prob. </th> | ||
</tr> | ||
{#each similarProteins as protein} | ||
<tr class="pdb-row"> | ||
<td> | ||
<a href={protein.link} | ||
><LinkOutline size="sm" /> {protein.source.toUpperCase()}</a | ||
> | ||
</td> | ||
<td>{protein.name}</td> | ||
<td class="pdb-desc">DEscDEscDEscDEsc DEscDEsc DEsc DEsc </td> | ||
<td>{protein.prob}</td> | ||
</tr> | ||
{/each} | ||
<span class="text-gray-400 cursor-pointer">... click to see more</span> | ||
</table> | ||
|
||
<style> | ||
table { | ||
width: 100%; | ||
table-layout: fixed; | ||
border-collapse: separate; /* Add this line */ | ||
border-spacing: 0 5px; /* Adjust as needed */ | ||
} | ||
th { | ||
font-weight: 500; | ||
text-align: left; | ||
} | ||
.pdb-row { | ||
background-color: hsl(var(--lightorange-hsl), 0.11); | ||
} | ||
.pdb-desc { | ||
min-width: 70px; | ||
max-width: 70px; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
} | ||
a { | ||
color: var(--lightorange); | ||
display: flex; | ||
gap: 1px; | ||
align-items: center; | ||
} | ||
</style> |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { writable } from "svelte/store"; | ||
|
||
export const searchBy = writable(""); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
<div class="app"> | ||
<Header /> | ||
|
||
<main class="p-10"> | ||
<main> | ||
<slot /> | ||
</main> | ||
</div> |
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,10 @@ | ||
<script lang="ts"> | ||
import { goto } from "$app/navigation"; | ||
import { onMount } from "svelte"; | ||
// remove once we have a landing page | ||
onMount(() => { | ||
goto("/search"); | ||
}); | ||
</script> | ||
|
||
<svelte:head> | ||
<title>Home</title> | ||
</svelte:head> | ||
|
||
<div>Landing Page</div> | ||
|
||
<style> | ||
/* put stuff here */ | ||
</style> | ||
<div>Home Page!</div> |
Oops, something went wrong.