Skip to content

Commit

Permalink
fixed me styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Andcool-Systems committed Sep 29, 2024
1 parent 525aaae commit 3d10007
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
9 changes: 7 additions & 2 deletions src/app/me/stars/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ const Main = () => {
skinViewer.camera.position.y = 6.5;
skinViewer.camera.position.z = 11;
skinViewer.loadBackground("/static/background.png").then(() => asyncImage('/static/workshop_base.png').then((base_skin) => {
Promise.all(data.map(async (el) => {
Promise.all(data.map(async el => {
try {
const result = await generateSkin(el.base64, base_skin, el.categories.some(val => val.id == 3))
await skinViewer.loadSkin(result, { model: 'default' });
skinViewer.render();
const image = skinViewer.canvas.toDataURL();
console.log(styles_me)
return <Card el={el} base64={image} key={el.id} className={styles_me} />
} catch {
return;
Expand All @@ -83,7 +84,11 @@ const Main = () => {
<Me>
{data && data.length != 0 ?
<div id="sidebar" className={style_sidebar.skins_container_2} style={elements ? { opacity: "1", transform: "translateY(0)" } : { opacity: "0", transform: "translateY(50px)" }}>
<AdaptiveGrid child_width={300}>{elements}</AdaptiveGrid>
<AdaptiveGrid
className={styles_me}
child_width={300}>
{elements}
</AdaptiveGrid>
</div> :
<div className={style_sidebar.animated} style={elements ? { opacity: "1", transform: "translateY(0)", width: "100%" } : { opacity: "0", transform: "translateY(50px)", width: "100%" }}>
<p style={{ display: "flex", alignItems: "center", fontSize: "1.1rem", fontWeight: 500, width: "100%", justifyContent: "center", margin: 0 }}><Image style={{ marginRight: ".5rem" }} src="/static/theres_nothing_here.png" alt="" width={56} height={56} />Похоже, тут ничего нет</p>
Expand Down
6 changes: 3 additions & 3 deletions src/app/styles/me/me.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,19 @@
}
}

@media (min-width: 1006px) {
@media (min-width: 1020px) {
.create {
width: calc(600px + 1rem);
}
}

@media (min-width: 1322px) {
@media (min-width: 1335px) {
.create {
width: calc(900px + 2rem);
}
}

@media(max-width: 650px) {
@media(max-width: 730px) {
.create {
width: 100% !important;
min-width: 300px !important;
Expand Down
2 changes: 1 addition & 1 deletion src/app/styles/me/sidebar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
}


@media(max-width: 650px) {
@media(max-width: 730px) {
.main {
flex-direction: column;
align-items: stretch;
Expand Down

0 comments on commit 3d10007

Please sign in to comment.