mirror of
https://github.com/codex-storage/codex-marketplace-ui.git
synced 2025-02-23 21:28:26 +00:00
Fix items
This commit is contained in:
parent
9aa8180927
commit
a27cfb6bc5
@ -171,4 +171,14 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.peers-chart {
|
||||
transform: scale(0.5);
|
||||
|
||||
@media (min-width: 1000px) {
|
||||
& {
|
||||
transform: scale(0.73);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
width: 350px;
|
||||
height: 175px;
|
||||
overflow: hidden;
|
||||
transform: scale(0.5);
|
||||
margin: auto;
|
||||
left: -32px;
|
||||
|
||||
|
@ -1,13 +1,18 @@
|
||||
.welcome-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
--codex-welcome-card-background-position: right;
|
||||
|
||||
&.welcome-card--tiny {
|
||||
--codex-welcome-card-background-position: 450px;
|
||||
}
|
||||
|
||||
> div {
|
||||
padding: 16px;
|
||||
background-color: #141414;
|
||||
background-image: url(img/welcome.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: right;
|
||||
background-position: var(--codex-welcome-card-background-position);
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -6,10 +6,34 @@ import { Logotype } from "../Logotype/Logotype";
|
||||
import { DiscordIcon } from "./DiscordIcon";
|
||||
import { Alert } from "@codex-storage/marketplace-ui-components";
|
||||
import { AlertIcon } from "../AlertIcon/AlertIcon";
|
||||
import { useEffect, useRef } from "react";
|
||||
|
||||
export function WelcomeCard() {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
const onResize = () => {
|
||||
const current = ref.current;
|
||||
if (!current) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (current.clientWidth > 800) {
|
||||
current.classList.remove("welcome-card--tiny");
|
||||
} else {
|
||||
current.classList.add("welcome-card--tiny");
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener("resize", onResize);
|
||||
|
||||
return () => {
|
||||
window.removeEventListener("resize", onResize);
|
||||
};
|
||||
}, [ref.current]);
|
||||
|
||||
return (
|
||||
<div className="welcome-card card">
|
||||
<div className="welcome-card card" ref={ref}>
|
||||
<div className="card">
|
||||
<header>
|
||||
<div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user