Skip to content

Commit

Permalink
Remove preview cards from sections
Browse files Browse the repository at this point in the history
These are shown in the newly added showcase.
  • Loading branch information
victorlin committed Jun 10, 2024
1 parent 998a9f2 commit 763696f
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 72 deletions.
10 changes: 0 additions & 10 deletions static-site/content/community-datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ data:
maintainers: E. Kinganda Lusamaki, INRB & C. Pratt
date: 13 Oct 2021
title: Genomic epidemiology of the 2018-21 Ebola epidemic
card:
img: "ebola2.png"
url: "/community/inrb-drc/ebola-nord-kivu"
title: "DRC Ebola (2018-19)"
frontpage: true
- url: https://nextstrain.org/community/narratives/ESR-NZ/GenomicsNarrativeSARSCoV2/aotearoa-border-incursions
title: Real-time genomics to track COVID-19 post-elimination border incursions in Aotearoa New Zealand
maintainers: Jordan Douglas, PhD, Jemma L. Geoghegan, PhD, James Hadfield, PhD, Remco Bouckaert, PhD, Matthew Storey, MSc, Xiaoyun Ren, PhD, Joep de Ligt, PhD, Nigel French, PhD, David Welch, PhD
Expand All @@ -43,11 +38,6 @@ data:
maintainers: Katherine Eaton et al
date: '2022-06-13'
title: Yersinia Pestis (multiple datasets)
card:
img: "yersinia.png"
url: "/community/ktmeaton/yersinia-pestis/maximum-likelihood/all?m=div"
title: "Yersinia pestis"
frontpage: true
- url: https://nextstrain.org/community/pestdisplace/CMDAFRICA
maintainers: PestDisPlace
date: 07 Sep 2019
Expand Down
14 changes: 0 additions & 14 deletions static-site/src/components/Cards/coreCards.js

This file was deleted.

14 changes: 0 additions & 14 deletions static-site/src/components/Cards/nCoVCards.js

This file was deleted.

14 changes: 0 additions & 14 deletions static-site/src/components/Cards/narrativeCards.js

This file was deleted.

2 changes: 1 addition & 1 deletion static-site/src/components/splash/groupCards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Cards from "../Cards";
import { theme } from "../../layouts/theme";
import { UserContext } from "../../layouts/userDataWrapper";

export const createGroupCards = (groups, colors = [...theme.titleColors]) => groups.map((group) => {
const createGroupCards = (groups, colors = [...theme.titleColors]) => groups.map((group) => {
const groupColor = colors[0];
colors.push(colors.shift());

Expand Down
20 changes: 1 addition & 19 deletions static-site/src/components/splash/index.jsx
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
import React, { useEffect } from "react";
import ScrollableAnchor, { configureAnchors } from '../../../vendored/react-scrollable-anchor/index';
import Cards from "../Cards";
import nCoVCards from "../Cards/nCoVCards";
import coreCards from "../Cards/coreCards";
import communityDatasets from "../../../content/community-datasets.yaml";
import narrativeCards from "../Cards/narrativeCards";
import Title from "./title";
import * as Styles from "./styles";
import { SmallSpacer, BigSpacer, HugeSpacer, FlexCenter, Line } from "../../layouts/generalComponents";
import Footer from "../Footer";
import { Showcase } from "../ListResources/Showcase";
import { cards } from "./showcase.yaml";
import { createGroupCards } from "./groupCards";

const Section = ({id, title, abstract, cards, buttonText, buttonLink}) => (
const Section = ({id, title, abstract, buttonText, buttonLink}) => (
<div id={id} className="col-md-6" style={{paddingBottom: "40px"}}>
<div style={{display: "flex", flexDirection: "column", alignItems: "center", height: "100%"}}>
<Styles.H1>{title}</Styles.H1>
<Styles.CenteredFocusParagraph style={{flexGrow: 1}}>
{abstract}
</Styles.CenteredFocusParagraph>
<div style={{display: "flex", justifyContent: "space-evenly", flexWrap: "wrap"}}>
<Cards
squashed
compactColumns
cards={cards}
/>
</div>
<BigSpacer/>
<Styles.Button to={buttonLink}>
{buttonText}
Expand Down Expand Up @@ -88,23 +75,20 @@ const Splash = () => {
title="SARS-CoV-2 (COVID-19)"
abstract="We are incorporating SARS-CoV-2 genomes as soon as they are shared and providing analyses and situation reports.
In addition we have developed a number of resources and tools, and are facilitating independent groups to run their own analyses."
cards={nCoVCards}
buttonText="See all resources"
buttonLink="/sars-cov-2"
/>
<Section
id="groups"
title="Nextstrain Groups"
abstract="We want to enable research labs, public health entities and others to share their datasets and narratives through Nextstrain with complete control of their data and audience."
cards={createGroupCards([{name: "neherlab"}, {name: "spheres"}])}
buttonText="See all groups"
buttonLink="/groups"
/>
<Section
id="pathogens"
title="Explore pathogens"
abstract="Genomic analyses of specific pathogens kept up-to-date by the Nextstrain team."
cards={coreCards}
buttonText="See all pathogens"
buttonLink="/pathogens"
/>
Expand All @@ -115,15 +99,13 @@ const Splash = () => {
Analyses by independent groups <a href="https://docs.nextstrain.org/en/latest/guides/share/community-builds.html">stored and
accessed via public GitHub repos</a>
</>)}
cards={communityDatasets.data.filter((c) => c?.card?.frontpage).map((e) => e.card).slice(0, 2)}
buttonText="Learn more"
buttonLink="/community"
/>
<Section
id="narratives"
title="Narratives"
abstract="Narratives are a method of data-driven storytelling. They allow authoring of content which is displayed alongside a view into the data."
cards={narrativeCards}
buttonText="Find out more"
buttonLink="https://docs.nextstrain.org/en/latest/guides/communicate/narratives-intro.html"
/>
Expand Down

0 comments on commit 763696f

Please sign in to comment.