Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaner organism menu #1068

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions website/src/components/Navigation/OrganismSelector.astro
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
import { cleanOrganism } from './cleanOrganism';
import { routes } from '../../routes';
import Arrow from '~icons/ic/sharp-keyboard-arrow-down';
import IwwaArrowDown from '~icons/iwwa/arrow-down';

const { knownOrganisms, organism } = cleanOrganism(Astro.params.organism);

const label = organism === undefined ? 'Choose Organism' : organism.displayName;
---

<div class='dropdown dropdown-hover hidden sm:flex relative'>
<label tabindex='0' class='btn btn-sm py-1'>
<label tabindex='0' class='py-1 block text-gray-900'>
{label}
<Arrow />
<span class='text-primary'> <IwwaArrowDown className='inline-block -mt-1 ml-1 h-4 w-4 ' /></span>
</label>
<ul tabindex='0' class='dropdown-content z-[1] menu p-1 shadow bg-base-100 rounded-box absolute top-full left-0'>
<ul tabindex='0' class='dropdown-content z-[1] menu p-1 shadow bg-base-100 rounded-btn absolute top-full -left-4'>
{
knownOrganisms.map((knownOrganism) => (
<li>
Expand Down
Loading