mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
added fake profile stats
This commit is contained in:
parent
a808045a7d
commit
3cdc382457
4 changed files with 75 additions and 1 deletions
21
src/containers/profile/ProfilePageStats/index.tsx
Normal file
21
src/containers/profile/ProfilePageStats/index.tsx
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
import React, { FC } from 'react';
|
||||||
|
import styles from './styles.module.scss';
|
||||||
|
|
||||||
|
interface Props {}
|
||||||
|
|
||||||
|
const Row: FC<{ count: number; title: string }> = ({ count, title }) => (
|
||||||
|
<div className={styles.row}>
|
||||||
|
<div className={styles.counter}>{count > 999 ? '999+' : count}</div>
|
||||||
|
<div className={styles.title}>{title}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
const ProfilePageStats: FC<Props> = () => (
|
||||||
|
<div className={styles.wrap}>
|
||||||
|
<Row count={9} title="лет в бункере" />
|
||||||
|
<Row count={99} title="постов" />
|
||||||
|
<Row count={99999} title="комментариев" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
export { ProfilePageStats };
|
43
src/containers/profile/ProfilePageStats/styles.module.scss
Normal file
43
src/containers/profile/ProfilePageStats/styles.module.scss
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
@import "~/styles/variables";
|
||||||
|
|
||||||
|
.wrap {
|
||||||
|
@include outer_shadow;
|
||||||
|
|
||||||
|
padding: $gap;
|
||||||
|
background: $content_bg;
|
||||||
|
border-radius: $radius;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
||||||
|
grid-row-gap: $gap;
|
||||||
|
grid-column-gap: $gap;
|
||||||
|
grid-auto-flow: row;
|
||||||
|
|
||||||
|
& > .row:not(:last-child) {
|
||||||
|
margin-bottom: $gap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
width: 100%;
|
||||||
|
background-color: lighten($content_bg, 4%);
|
||||||
|
border-radius: $radius;
|
||||||
|
padding: $gap;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.counter {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
font: $font_32_bold;
|
||||||
|
height: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font: $font_12_semibold;
|
||||||
|
text-align: center;
|
||||||
|
word-wrap: break-word;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
|
@ -11,6 +11,7 @@ import { FlowGrid } from '~/components/flow/FlowGrid';
|
||||||
import { FlowLayout } from '~/layouts/FlowLayout';
|
import { FlowLayout } from '~/layouts/FlowLayout';
|
||||||
import { Sticky } from '~/components/containers/Sticky';
|
import { Sticky } from '~/components/containers/Sticky';
|
||||||
import { selectFlow } from '~/redux/flow/selectors';
|
import { selectFlow } from '~/redux/flow/selectors';
|
||||||
|
import { ProfilePageStats } from '~/containers/profile/ProfilePageStats';
|
||||||
|
|
||||||
type Props = RouteComponentProps<{ username: string }> & {};
|
type Props = RouteComponentProps<{ username: string }> & {};
|
||||||
|
|
||||||
|
@ -34,7 +35,12 @@ const ProfileLayout: FC<Props> = ({
|
||||||
<Container className={styles.wrap}>
|
<Container className={styles.wrap}>
|
||||||
<div className={styles.left}>
|
<div className={styles.left}>
|
||||||
<Sticky>
|
<Sticky>
|
||||||
<ProfilePageLeft profile={profile} username={username} />
|
<div className={styles.row}>
|
||||||
|
<ProfilePageLeft profile={profile} username={username} />
|
||||||
|
</div>
|
||||||
|
<div className={styles.row}>
|
||||||
|
<ProfilePageStats />
|
||||||
|
</div>
|
||||||
</Sticky>
|
</Sticky>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -14,3 +14,7 @@
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.row {
|
||||||
|
margin-bottom: $gap;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue