From ae06b6efd154b2a515c6f6729b35a891e6669a07 Mon Sep 17 00:00:00 2001 From: Tyler Hill Date: Thu, 27 Apr 2023 20:32:52 -0500 Subject: [PATCH 1/3] Add what you can enter box --- pages/index.tsx | 53 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index a6ec26d3..9fa2a390 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,12 +1,15 @@ import type { NextPage } from 'next'; import Head from 'next/head'; import { useRouter } from 'next/router'; -import Card from '@mui/material/Card'; +import { Card, Tooltip, Typography, Popper } from '@mui/material'; +import { styled } from '@mui/material/styles'; +import { TooltipProps, tooltipClasses } from '@mui/material/Tooltip'; import { SplashPageSearchBar } from '../components/common/SplashPageSearchBar/splashPageSearchBar'; import { WaveSVG } from '../components/icons/Wave/waveSVG'; import { Wave2SVG } from '../components/icons/Wave2/wave2SVG'; import { LogoIcon } from '../components/icons/LogoIcon/logoIcon'; import { useState } from 'react'; +import { useMediaQuery } from '@mui/material'; type SearchQuery = { prefix?: string; @@ -14,6 +17,16 @@ type SearchQuery = { professorName?: string; sectionNumber?: string; }; + +const TransparentTooltip = styled(({ className, ...props }: TooltipProps) => ( + +))(({ theme }) => ({ + [`& .${tooltipClasses.tooltip}`]: { + backgroundColor: 'transparent', + maxWidth: 'none', + }, +})); + /** * Returns the home page with Nebula Branding, waved background, and SearchBar Components */ @@ -30,6 +43,9 @@ const Home: NextPage = () => { ); } + const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)'); + const darkModeElevation = prefersDarkMode ? 3 : 1; + return ( <> @@ -50,11 +66,44 @@ const Home: NextPage = () => {
-
+
+ + + You can search for: +
    +
  • + A whole course:{' '} + CS 1337 +
  • +
  • + A professor's name:{' '} + Jason Smith +
  • +
  • + A course and professor:{' '} + CS 1337 Jason Smith +
  • +
+

then we'll aggregate grades across every section

+
+ + } + > + + What you can enter?{' '} + Pretty much anything. + +
From 66287caacc1ab711dfb966c393995536ebc15334 Mon Sep 17 00:00:00 2001 From: Tyler Hill Date: Thu, 27 Apr 2023 20:39:25 -0500 Subject: [PATCH 2/3] Prettier --- pages/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index 9fa2a390..348fb8d9 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -90,7 +90,9 @@ const Home: NextPage = () => { CS 1337 Jason Smith -

then we'll aggregate grades across every section

+

+ then we'll aggregate grades across every section +

} From c9522565233fe2d1fa7debab9becd0346358dae8 Mon Sep 17 00:00:00 2001 From: Tyler Hill Date: Thu, 5 Oct 2023 11:56:59 -0500 Subject: [PATCH 3/3] Removed unused import Popper --- pages/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.tsx b/pages/index.tsx index 348fb8d9..06c0ae8b 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,7 +1,7 @@ import type { NextPage } from 'next'; import Head from 'next/head'; import { useRouter } from 'next/router'; -import { Card, Tooltip, Typography, Popper } from '@mui/material'; +import { Card, Tooltip, Typography } from '@mui/material'; import { styled } from '@mui/material/styles'; import { TooltipProps, tooltipClasses } from '@mui/material/Tooltip'; import { SplashPageSearchBar } from '../components/common/SplashPageSearchBar/splashPageSearchBar';