diff --git a/packages/app/src/components/Home.tsx b/packages/app/src/components/Home.tsx index fcf17f34..982a601f 100644 --- a/packages/app/src/components/Home.tsx +++ b/packages/app/src/components/Home.tsx @@ -1,9 +1,25 @@ import { Box, Card, CardActionArea, CardContent, CardMedia, Link, Typography } from "@mui/material" +const cardTextStyle = { + position: 'absolute', + paddingLeft: "0.8rem", + paddingTop: '5rem', + bottom: '0.5rem', + width: '100%', + boxShadow: 'inset 0 -230px 70px -120px #fff' +} + +const cardStyle = { + boxShadow: 4, + borderRadius: "8px", + width: '100%', + height: '100%' +} + export const Home = () => { return ( - + Welcome to UpSet 2.0 @@ -19,27 +35,66 @@ export const Home = () => { If this is your first time visiting UpSet, click on the images below to explore some examples. - - - window.open('/?workspace=Upset+Examples&table=movies&sessionId=192')}> - - - - Movies - Upset - - - - - - window.open('/?workspace=Upset+Examples&table=simpsons&sessionId=193')}> - - - - Simpsons - Upset - - - - + + + + window.open('/?workspace=Upset+Examples&table=movies&sessionId=2835')}> + + + + Movies - Upset + + + + + + window.open('/?workspace=Upset+Examples&table=Covid_Symptoms&sessionId=2783')}> + + + + Covid Symptoms - Upset + + + + + + window.open('/?workspace=Upset+Examples&table=Tennis_Grand_Slam_Champions&sessionId=2780')}> + + + + Tennis Tournament Winners - Upset + + + + + + window.open('/?workspace=Upset+Examples&table=International_Organizations&sessionId=2777')}> + + + + World Organizations - UpSet + + + + + diff --git a/packages/app/src/components/Root.tsx b/packages/app/src/components/Root.tsx index 9c2ef54e..1fdcf89d 100644 --- a/packages/app/src/components/Root.tsx +++ b/packages/app/src/components/Root.tsx @@ -3,7 +3,7 @@ import { convertConfig, UpsetConfig } from "@visdesignlab/upset2-core" import { Box, css } from "@mui/material" import { Body } from "./Body" import Header from "./Header" -import { useRef, useState, useEffect, createContext } from "react" +import { useRef, useState, useEffect, createContext, useMemo } from "react" import React from "react" import Footer from "./Footer" import { useRecoilValue } from "recoil" @@ -18,13 +18,6 @@ type Props = { config?: UpsetConfig } -const AppCss = css` - overflow: hidden; - height: 100vh; - display: grid; - grid-template-rows: min-content auto; -`; - export const ProvenanceContext = createContext<{ provenance: UpsetProvenance; actions: UpsetActions; @@ -34,6 +27,15 @@ export const Root = ({provenance, actions, data, config}: Props) => { const headerDiv = useRef(null); const [headerHeight, setHeaderHeight] = useState(-1); + const AppCss = useMemo(() => { + return css` + overflow: ${data === null ? "auto" : "hidden"}; + height: 100vh; + display: grid; + grid-template-rows: min-content auto; + `; + }, [data]); + useEffect(() => { const { current } = headerDiv; if (!current) return;