-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,667 additions
and
202 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,7 @@ | ||
/* #root { | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
text-align: center; | ||
} | ||
.logo { | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
transition: filter 300ms; | ||
} | ||
.logo:hover { | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
} | ||
.logo.react:hover { | ||
filter: drop-shadow(0 0 2em #61dafbaa); | ||
} | ||
@keyframes logo-spin { | ||
from { | ||
transform: rotate(0deg); | ||
} | ||
to { | ||
transform: rotate(360deg); | ||
} | ||
} | ||
@media (prefers-reduced-motion: no-preference) { | ||
a:nth-of-type(2) .logo { | ||
animation: logo-spin infinite 20s linear; | ||
} | ||
} | ||
.card { | ||
padding: 2em; | ||
} | ||
.read-the-docs { | ||
color: #888; | ||
} */ | ||
:root { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
background-color: #191919; | ||
font-family: 'Roboto', sans-serif; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React from "react"; | ||
|
||
import Card from "@mui/material/Card"; | ||
import CardContent from "@mui/material/CardContent"; | ||
import CardMedia from "@mui/material/CardMedia"; | ||
import Typography from "@mui/material/Typography"; | ||
import { CardActionArea } from "@mui/material"; | ||
|
||
import { Link } from "react-router-dom"; | ||
import { useAnimeContext } from "../context/animeContext"; | ||
|
||
const AnimeCard = ({ anime }) => { | ||
const { setAnimeId } = useAnimeContext(); | ||
const anime_id = anime._id; | ||
|
||
const imgUrl = anime.image; | ||
const img = imgUrl.split("https"); | ||
|
||
let anime_image; | ||
|
||
if (typeof img[2] === "undefined") { | ||
anime_image = `https` + img[1]; | ||
} else { | ||
anime_image = `https` + img[2]; | ||
} | ||
|
||
let anime_title; | ||
const title = anime.title; | ||
if (title.length > 25) { | ||
anime_title = title.substring(0, 25) + `...`; | ||
} else { | ||
anime_title = title; | ||
} | ||
|
||
const anime_url = encodeURIComponent(anime.title); | ||
|
||
return ( | ||
<Link to={`/${anime_url}`} onClick={() => setAnimeId(anime_id)}> | ||
<Card sx={{ maxWidth: 150 }} className="h-full"> | ||
<CardActionArea> | ||
<CardMedia | ||
component="img" | ||
height="150" | ||
image={anime_image} | ||
alt={anime.title} | ||
/> | ||
<CardContent> | ||
{/* <Typography gutterBottom component="div"> | ||
{anime_title} | ||
</Typography> */} | ||
<Typography variant="body2" color="text.secondary"> | ||
{anime_title} | ||
</Typography> | ||
</CardContent> | ||
</CardActionArea> | ||
</Card> | ||
</Link> | ||
); | ||
}; | ||
|
||
export default AnimeCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,3 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap'); | ||
|
||
:root { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
background-color: #191919; | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
|
||
/* :root { | ||
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; | ||
line-height: 1.5; | ||
font-weight: 400; | ||
color-scheme: light dark; | ||
color: rgba(255, 255, 255, 0.87); | ||
background-color: #242424; | ||
font-synthesis: none; | ||
text-rendering: optimizeLegibility; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
a { | ||
font-weight: 500; | ||
color: #646cff; | ||
text-decoration: inherit; | ||
} | ||
a:hover { | ||
color: #535bf2; | ||
} | ||
body { | ||
margin: 0; | ||
display: flex; | ||
place-items: center; | ||
min-width: 320px; | ||
min-height: 100vh; | ||
} | ||
h1 { | ||
font-size: 3.2em; | ||
line-height: 1.1; | ||
} | ||
button { | ||
border-radius: 8px; | ||
border: 1px solid transparent; | ||
padding: 0.6em 1.2em; | ||
font-size: 1em; | ||
font-weight: 500; | ||
font-family: inherit; | ||
background-color: #1a1a1a; | ||
cursor: pointer; | ||
transition: border-color 0.25s; | ||
} | ||
button:hover { | ||
border-color: #646cff; | ||
} | ||
button:focus, | ||
button:focus-visible { | ||
outline: 4px auto -webkit-focus-ring-color; | ||
} | ||
@media (prefers-color-scheme: light) { | ||
:root { | ||
color: #213547; | ||
background-color: #ffffff; | ||
} | ||
a:hover { | ||
color: #747bff; | ||
} | ||
button { | ||
background-color: #f9f9f9; | ||
} | ||
} */ | ||
|
||
|
||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
export default { | ||
content: [ | ||
"./index.html", | ||
"./src/**/*.{js,ts,jsx,tsx}", | ||
], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
} |