mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-20 04:14:12 +01:00
recover a bunch of stats from legacy, fix enhanced armor in sandbox, add game's module layout from the upgrade screen, a bunch of toys from legacy
This commit is contained in:
36 files changed
+2416
-582
No files matched your search
@@ -0,0 +1,48 @@
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--space-5);
|
||||
padding: var(--space-4);
|
||||
|
||||
.cards {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
gap: var(--space-4);
|
||||
width: 100%;
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
border-radius: var(--space-3);
|
||||
background-size: cover;
|
||||
background-position: 0 18px;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
|
||||
.thumbnail {
|
||||
width: 16rem;
|
||||
aspect-ratio: 16 / 9;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: var(--space-1);
|
||||
padding: var(--space-3);
|
||||
backdrop-filter: blur(4rem);
|
||||
-webkit-backdrop-filter: blur(4rem);
|
||||
}
|
||||
|
||||
&:hover .info {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
import { youtubers } from "@blitzkit/core";
|
||||
import { awaitableReviews } from "../../core/awaitables/reviews";
|
||||
import { DuelModule, useDuel } from "../../hooks/useDuel";
|
||||
import { useStrings } from "../../hooks/useStrings";
|
||||
import { Heading } from "../Heading";
|
||||
import { Text } from "../Text";
|
||||
import { VerifiedIcon } from "../VerifiedIcon";
|
||||
import styles from "./index.module.css";
|
||||
|
||||
const reviews = await awaitableReviews;
|
||||
|
||||
export function TankopediaVideos() {
|
||||
const strings = useStrings();
|
||||
const tank = useDuel("protagonist", DuelModule.Tank);
|
||||
const videos = reviews.reviews[tank.id]?.videos;
|
||||
|
||||
if (videos === undefined || videos.length === 0) return null;
|
||||
|
||||
return (
|
||||
<section className={styles.section}>
|
||||
<Heading size="3">{strings.tanks.videos.title}</Heading>
|
||||
|
||||
<div className={styles.cards}>
|
||||
{videos.map((video) => {
|
||||
const image = `https://i.ytimg.com/vi/${video.id}/hqdefault.jpg`;
|
||||
const youtuber = youtubers.find(
|
||||
(youtuber) => youtuber.id === video.author,
|
||||
);
|
||||
|
||||
if (!youtuber) return null;
|
||||
|
||||
return (
|
||||
<a
|
||||
key={video.id}
|
||||
className={styles.card}
|
||||
style={{ backgroundImage: `url(${image})` }}
|
||||
href={`https://www.youtube.com/watch?v=${video.id}`}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<div
|
||||
className={styles.thumbnail}
|
||||
style={{ backgroundImage: `url(${image})` }}
|
||||
/>
|
||||
|
||||
<div className={styles.info}>
|
||||
<Text>{youtuber.name}</Text>
|
||||
<VerifiedIcon width="1em" height="1em" />
|
||||
</div>
|
||||
</a>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user