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

Feature/what you can enter popup #108

Merged
merged 4 commits into from
Oct 12, 2023
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
49 changes: 48 additions & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Tooltip, Typography } from '@mui/material';
import Card from '@mui/material/Card';
import { styled } from '@mui/material/styles';
import { tooltipClasses, TooltipProps } from '@mui/material/Tooltip';
import type { NextPage } from 'next';
import Head from 'next/head';
import { useRouter } from 'next/router';
Expand All @@ -11,6 +14,15 @@ import { Wave2SVG } from '../components/icons/Wave2/wave2SVG';
import SearchQuery from '../modules/SearchQuery/SearchQuery';
import searchQueryLabel from '../modules/searchQueryLabel/searchQueryLabel';

const TransparentTooltip = styled(({ className, ...props }: TooltipProps) => (
<Tooltip {...props} classes={{ popper: className }} />
))(({ theme }) => ({
[`& .${tooltipClasses.tooltip}`]: {
backgroundColor: 'transparent',
maxWidth: 'none',
},
}));

/**
* Returns the home page with Nebula Branding, waved background, and SearchBar Components
*/
Expand Down Expand Up @@ -51,11 +63,46 @@ const Home: NextPage = () => {
<div className="flex justify-center content-center h-screen translate-y-">
<div className="h-1/4 w-full relative m-auto">
<Card className="bg-light relative sm:w-5/12 overflow-visible drop-shadow-lg rounded-xl bg-opacity-50 m-auto xs:w-11/12">
<div className="bottom-0 absolute text-dark w-full h-1/4 m-auto pb-12 mt-4 mb-4">
<div className="bottom-0 absolute text-dark w-full h-1/4 m-auto pb-12 mt-4 mb-6">
<SplashPageSearchBar
selectSearchValue={searchOptionChosen}
disabled={false}
/>
<TransparentTooltip
title={
<Card className="px-3 py-2" elevation={1}>
<Typography variant="body2">
You can search for:
<ul className="list-disc list-inside my-1">
<li>
A whole course:{' '}
<span className="italic">CS 1337</span>
</li>
<li>
A professor&apos;s name:{' '}
<span className="italic">Jason Smith</span>
</li>
<li>
A course and professor:{' '}
<span className="italic">CS 1337 Jason Smith</span>
</li>
</ul>
<p>
then we&apos;ll aggregate grades across every section
</p>
</Typography>
</Card>
}
>
<Typography
className="text-gray-600"
align="center"
variant="subtitle2"
>
What you can enter?{' '}
<span className="underline">Pretty much anything.</span>
</Typography>
</TransparentTooltip>
</div>
<div className="w-11/12 h-3/4 m-auto -translate-y-1/2 relative">
<Card className="bg-primary rounded-xl drop-shadow-lg text-light p-8 relative h-full">
Expand Down