Skip to content

Commit

Permalink
refactor(website): Refactor "Explore Loculus data!" message into the …
Browse files Browse the repository at this point in the history
…welcome message to allow per-instance customisation (#2011)
  • Loading branch information
theosanderson authored May 23, 2024
1 parent 09d0f2c commit 032ab61
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit 032ab61

Please sign in to comment.