Skip to content

Commit

Permalink
feat: App update / showcase
Browse files Browse the repository at this point in the history
  • Loading branch information
0gust1 committed Sep 12, 2023
1 parent 5eb3744 commit c067f99
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
</div>

<style lang="postcss">
.mobile-sidebar_backdrop {
/* .mobile-sidebar_backdrop {
}
.mobile-sidebar_backdrop--open {
}
Expand All @@ -136,7 +136,7 @@
.mobile-sidebar_content--open {
}
.mobile-sidebar_content--closed {
}
} */
.doc-content {
@apply px-4 sm:px-6 lg:px-8;
}
Expand Down
12 changes: 9 additions & 3 deletions src/routes/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

This is a collection of [Svelte](https://svelte.dev) components for [Mol\*](https://molstar.org) visualizations.

The goal is to provide a set of composable components that can be used to build web applications/components/websites providing visualization and analysis of biomolecular structures.
[Mol\*](https://molstar.org) (/'molstar/) is a modern web-based open-source toolkit for visualisation and analysis of large-scale molecular data

## Goals
- **Provide a set of composable components** that can be used to build web applications, websites or components enabling visualization and analysis of biomolecular structures.
- **Provide a set of examples** of how to use the components in a Svelte application.
- **Keep the components as simple as possible**, and let the user decide how to use them: The goal **is not** to provide a full set of components with extensive Molstar API coverage, but rather a set of building blocks (and examples) that can be used to build a custom application.

The components are designed to be used in a [Svelte](https://svelte.dev) application, ~~but could be used in any framework that supports [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components)~~ (later).

## Installation
Expand All @@ -21,9 +27,9 @@ TODO

## Licensing and attributions

`molstar-svelte` is licensed under the [MIT License](https://opensource.org/license/mit/).

**Mol\*:**
> David Sehnal, Sebastian Bittrich, Mandar Deshpande, Radka Svobodová, Karel Berka, Václav Bazgier, Sameer Velankar, Stephen K Burley, Jaroslav Koča, Alexander S Rose:
> [Mol* Viewer: modern web app for 3D visualization and analysis of large biomolecular structures, Nucleic Acids Research, 2021; 10.1093/nar/gkab31](https://academic.oup.com/nar/article/49/W1/W431/6270780).
In memory of Jaroslav Koča.

Svelte-molstar is licensed under the [MIT License](https://opensource.org/license/mit/).
21 changes: 20 additions & 1 deletion src/routes/components/simplest/+page.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
<script>
import { browser} from '$app/environment';
const loadModule = async () =>
import('./WrapperRCSB.svelte').then((m) => {
return m.default;
});
const pdbId = '1cbs';
</script>

# Simplest molstar-svelte component

**TODO**
## Empty wrapper (will show nothing)



## Wrapper with pdbId

{#if browser}
{#await loadModule() then MolstarComp}
<svelte:component this={MolstarComp} class="border h-18 bg-slate-300"/>
{/await}
{/if}
Empty file.
13 changes: 13 additions & 0 deletions src/routes/components/simplest/WrapperRCSB.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script lang="ts">
import StructureRCSB from '$lib/elements/StructureRCSB.svelte';
import MolstarWrapper from '$lib/wrappers/SimpleWrapper.svelte';
const pdbIds = ['7D4B'];
</script>

<MolstarWrapper class="h-96">
<svelte:fragment slot="content">
{#each pdbIds as pdbId}
<StructureRCSB {pdbId} />
{/each}
</svelte:fragment>
</MolstarWrapper>

0 comments on commit c067f99

Please sign in to comment.