Add TextLink component
This commit is contained in:
7 files changed
+96
-18
No files matched your search
+5
-3
@@ -26,7 +26,7 @@
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background: black;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.background {
|
.background {
|
||||||
@@ -35,11 +35,12 @@
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
width: calc(100vw + 5em);
|
width: 100vw;
|
||||||
height: calc(100vh + 5em);
|
height: 100vh;
|
||||||
background-image: url("./assetsStatic/splashBg.png");
|
background-image: url("./assetsStatic/splashBg.png");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
|
border-radius: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
@@ -70,6 +71,7 @@
|
|||||||
height: 8px;
|
height: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
backdrop-filter: blur(5px);
|
backdrop-filter: blur(5px);
|
||||||
|
border-radius: 0 0 7px 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.indicator {
|
.indicator {
|
||||||
|
|||||||
@@ -82,7 +82,9 @@
|
|||||||
"resizable": false,
|
"resizable": false,
|
||||||
"url": "splash.html",
|
"url": "splash.html",
|
||||||
"label": "splashscreen",
|
"label": "splashscreen",
|
||||||
"title": "JellyPlayer"
|
"title": "JellyPlayer",
|
||||||
|
"visible": true,
|
||||||
|
"transparent": true
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import PlayButton from "../../buttons/playButton";
|
|||||||
import "./hero.module.scss";
|
import "./hero.module.scss";
|
||||||
import { Blurhash } from "react-blurhash";
|
import { Blurhash } from "react-blurhash";
|
||||||
import { MediaTypeIconCollection } from "../../utils/iconsCollection";
|
import { MediaTypeIconCollection } from "../../utils/iconsCollection";
|
||||||
|
import TextLink from "../../textLink";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Props
|
* @typedef {Object} Props
|
||||||
@@ -511,7 +512,12 @@ const Hero = ({
|
|||||||
marginTop: "0.2em",
|
marginTop: "0.2em",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography fontStyle="italic" variant="h5" mb={1}>
|
<Typography
|
||||||
|
fontStyle="italic"
|
||||||
|
variant="h5"
|
||||||
|
mb={1}
|
||||||
|
mt={1}
|
||||||
|
>
|
||||||
{item.Taglines[0]}
|
{item.Taglines[0]}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="subtitle1">
|
<Typography variant="subtitle1">
|
||||||
@@ -536,14 +542,29 @@ const Hero = ({
|
|||||||
>
|
>
|
||||||
Written by
|
Written by
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="subtitle1">
|
<div className="hero-text-container">
|
||||||
{writers
|
{writers.map((writer, index) => (
|
||||||
.map(
|
<>
|
||||||
(writer, index) =>
|
<TextLink
|
||||||
writer.Name,
|
text={
|
||||||
)
|
index ==
|
||||||
.join(", ")}
|
writers.length
|
||||||
</Typography>
|
? writer.Name
|
||||||
|
: `${writer.Name}`
|
||||||
|
}
|
||||||
|
variant={"subtitle1"}
|
||||||
|
location={`/person/${writer.Id}`}
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
whiteSpace: "pre",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
,{" "}
|
||||||
|
</span>
|
||||||
|
</>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{directors.length > 0 && (
|
{directors.length > 0 && (
|
||||||
@@ -562,11 +583,24 @@ const Hero = ({
|
|||||||
>
|
>
|
||||||
Directed by
|
Directed by
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="subtitle1">
|
<div className="hero-text-container">
|
||||||
{directors
|
{directors.map((director) => (
|
||||||
.map((director) => director.Name)
|
<>
|
||||||
.join(", ")}
|
<TextLink
|
||||||
</Typography>
|
text={director.Name}
|
||||||
|
variant={"subtitle1"}
|
||||||
|
location={`/person/${director.Id}`}
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
whiteSpace: "pre",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
,{" "}
|
||||||
|
</span>
|
||||||
|
</>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{artists.length > 0 && (
|
{artists.length > 0 && (
|
||||||
|
|||||||
@@ -63,4 +63,8 @@ $maskPercentage: 40%;
|
|||||||
transition: opacity $transition-time-fast;
|
transition: opacity $transition-time-fast;
|
||||||
filter: drop-shadow(0px 4px 10px rgb(0 0 0 / 0.5));
|
filter: drop-shadow(0px 4px 10px rgb(0 0 0 / 0.5));
|
||||||
}
|
}
|
||||||
|
&-text-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
|
import "./textLink.module.scss";
|
||||||
|
|
||||||
|
const TextLink = ({ text, location, variant }) => {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Typography
|
||||||
|
variant={variant}
|
||||||
|
className="link"
|
||||||
|
onClick={() => navigate(location)}
|
||||||
|
>
|
||||||
|
{text}
|
||||||
|
</Typography>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TextLink;
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
.link {
|
||||||
|
text-decoration: underline;
|
||||||
|
text-decoration-color: rgb(255 255 255 / 0.5);
|
||||||
|
white-space: pre-line;
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration-color: rgb(255 255 255 / 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -204,6 +204,9 @@ const MusicAlbumTitlePage = () => {
|
|||||||
justifySelf: "start",
|
justifySelf: "start",
|
||||||
}}
|
}}
|
||||||
fontWeight={400}
|
fontWeight={400}
|
||||||
|
onClick={() => {
|
||||||
|
console.log("Hvnrjn");
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Name
|
Name
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
Reference in new issue
Block a user