diff --git a/src/components/manga/MangaGrid.tsx b/src/components/manga/MangaGrid.tsx index fc3f3e8c..eabdf59d 100644 --- a/src/components/manga/MangaGrid.tsx +++ b/src/components/manga/MangaGrid.tsx @@ -44,9 +44,20 @@ export default function MangaGrid(props: IProps) { } else { mapped = mangas.map((it, idx) => { if (idx === mangas.length - 1) { - return ; + return ( + + ); } - return ; + return ( + + ); }); } diff --git a/src/components/manga/SourceCard.tsx b/src/components/manga/SourceCard.tsx index 341224d1..60ad37a2 100644 --- a/src/components/manga/SourceCard.tsx +++ b/src/components/manga/SourceCard.tsx @@ -6,10 +6,15 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import React from 'react'; +import { useTheme } from '@mui/material/styles'; import makeStyles from '@mui/styles/makeStyles'; import Card from '@mui/material/Card'; import CardContent from '@mui/material/CardContent'; +import { Link, useHistory } from 'react-router-dom'; +import SearchIcon from '@mui/icons-material/Search'; import Button from '@mui/material/Button'; +import IconButton from '@mui/material/IconButton'; +import FiberNewOutlinedIcon from '@mui/icons-material/FiberNewOutlined'; import Avatar from '@mui/material/Avatar'; import Typography from '@mui/material/Typography'; import useLocalStorage from 'util/useLocalStorage'; @@ -41,6 +46,26 @@ const useStyles = makeStyles((theme) => ({ }, card: { margin: '10px', + '&:hover': { + backgroundColor: 'rgba(255, 255, 255, 0.2)', + transition: 'background-color 0ms ease', + }, + '&:active': { + backgroundColor: 'rgba(255, 255, 255, 0.1)', + transition: 'background-color 100ms ease-out', + }, + }, + showMobile: { + display: 'flex', + [theme.breakpoints.up('sm')]: { + display: 'none', + }, + }, + showBigger: { + display: 'flex', + [theme.breakpoints.down('sm')]: { + display: 'none', + }, }, })); @@ -56,39 +81,91 @@ export default function SourceCard(props: IProps) { }, } = props; + const theme = useTheme(); + const history = useHistory(); + const [serverAddress] = useLocalStorage('serverBaseURL', ''); const classes = useStyles(); return ( - -
- -
- - {name} - - - {langCodeToName(lang)} - + + + +
+ +
+ + {name} + + + {langCodeToName(lang)} + +
-
-
- {/* {isConfigurable && - } */} - - {supportsLatest && } - -
- +
+
+ history.push(`/sources/${id}/search/`)} + size="large" + edge="end" + > + + + {supportsLatest && ( + history.push(`/sources/${id}/latest/`)} + size="large" + > + + + )} +
+
+ + {supportsLatest && ( + + )} + +
+
+ + ); }