Skip to content

Commit

Permalink
feat: vis on top
Browse files Browse the repository at this point in the history
  • Loading branch information
xnought committed Apr 9, 2024
1 parent 5d183e0 commit 03e5548
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
25 changes: 12 additions & 13 deletions frontend/src/lib/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
TableRowOutline,
BookOutline,
} from "flowbite-svelte-icons";
import {user} from "./stores/user"
import Cookies from "js-cookie"
import { user } from "./stores/user";
import Cookies from "js-cookie";
// Checking if the user has a cookie.
// If they do, set user status for the whole site.
onMount(async () => {
if (Cookies.get("auth")) {
$user.loggedIn = true
$user.loggedIn = true;
}
});
</script>
Expand All @@ -32,9 +32,9 @@
><TableRowOutline size="lg" />Search</a
>
{#if $user.loggedIn}
<a href="/upload" class="flex items-center gap-1">
<UploadOutline size="lg" />Upload</a
>
<a href="/upload" class="flex items-center gap-1">
<UploadOutline size="lg" />Upload</a
>
{/if}
<a href="/tutorials" class="flex items-center gap-1">
<BookOutline size="lg" />Tutorials</a
Expand All @@ -44,13 +44,12 @@

<a href="/login" class="flex items-center gap-1 mr-5">
<UserOutline size="lg" />
{#if $user.loggedIn}
Logout
{:else}
Login
{/if}
</a
>
{#if $user.loggedIn}
Logout
{:else}
Login
{/if}
</a>
</header>
<div style="height: 60px;" />

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/Molstar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
#myViewer {
float: left;
position: relative;
z-index: 997;
z-index: 999;
}
</style>
2 changes: 1 addition & 1 deletion frontend/src/routes/Align.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
>
</div>
</div>
<div>
<div class="z-999">
<Molstar
format="pdb"
url="{BACKEND_URL}/protein/pdb/{combined}"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/Protein.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
{/if}
</div>

<div style="position: sticky; top: 55px; right: 0;">
<div style="position: sticky; top: 55px; right: 0; z-index:999;">
<EntryCard title="Provided Information">
<Molstar
format="pdb"
Expand Down

0 comments on commit 03e5548

Please sign in to comment.