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

refactor(website): Refactor "Explore Loculus data!" message into the welcome message to allow per-instance customisation #2011

Merged
merged 6 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions website/src/components/IndexPage/OrganismCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const { key, image, displayName, organismStatistics, numberDaysAgoStatistics } =
class='block rounded border border-gray-300 p-4 m-2 w-64 text-center hover:bg-gray-100'
>
{image !== undefined && <img src={image} class='h-32 mx-auto mb-4' alt={displayName} />}
<h3 class='font-semibold text-gray-700'>{displayName}</h3>
<p class='text-gray-700 text-sm'>
<h3 class='font-semibold'>{displayName}</h3>
<p class='text-sm'>
{organismStatistics.totalSequences} sequences<br />
(+{organismStatistics.recentSequences} in last {numberDaysAgoStatistics} days)<br />
{organismStatistics.lastUpdatedAt && <>Last updated {organismStatistics.lastUpdatedAt.toRelative()}</>}
Expand Down
4 changes: 3 additions & 1 deletion website/src/components/IndexPage/WelcomeMessage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
const websiteName = Astro.props.websiteName;
---

<p class='text-gray-700 my-4'>
<p class='my-4'>
Welcome to {websiteName}, a system for sharing pathogen genome data.
</p>

<h2 class='font-semibold my-3 text-lg'>Explore {websiteName} data!</h2>
2 changes: 0 additions & 2 deletions website/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ const organismStatisticsMap = await getOrganismStatisticsMap(
<div class='max-w-6xl mx-auto'>
<WelcomeMessage websiteName={websiteName} />

<h2 class='font-semibold text-gray-700 my-3 text-lg'>Explore {websiteName} data!</h2>

<div class='flex flex-wrap'>
{
getConfiguredOrganisms().map(({ key, displayName, image }) => (
Expand Down
Loading