Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 152 additions & 0 deletions components/GiftShop/Card/index.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
@use 'styles/colors';

.root {
width: 35rem;
flex-shrink: 0;
display: flex;
height: 270px;
margin-top: 20px;
padding: 14px;
text-decoration: none;
color: black;
border: 1px solid transparentize(black, 0.9);
border-radius: 8px;
}

.image {
flex-shrink: 0;
max-width: 300px;
height: 100%;
object-fit: cover;
border-radius: 4px;
}

.content {
margin-left: 15px;
}

.main {
grid-area: main;
display: flex;
flex-direction: column;
}

.name {
flex-shrink: 0;
font-size: 25px;
font-weight: 700;
}

.subtitle {
flex-grow: 1;
margin-top: 5px;
margin-bottom: 15px;
font-weight: 600;
opacity: 0.5;
}

.info {
grid-area: info;
}

.bits {
display: flex;
align-items: center;
margin-left: 1px;
font-weight: 900;
color: colors.$purple;
}

.bit {
flex-shrink: 0;
height: 26px;
margin-right: 8px;
}

.time {
display: flex;
align-items: center;
margin: 8px 0 0 3px;
font-weight: 900;
}

.timeInfo {
flex-shrink: 0;
height: 19px;
margin-right: 10px;
}

.participants {
display: flex;
align-items: center;
margin: 8px 0 0 4px;
font-weight: 900;
}

.participant {
flex-shrink: 0;
height: 19px;
margin-right: 10px;
}

.tags {
flex-shrink: 0;
display: flex;
margin-top: 12px;
overflow-x: auto;
}

.tag {
flex-shrink: 0;
padding: 6px 12px;
font-size: 14px;
font-weight: 700;
color: colors.$blue;
background: transparentize(colors.$blue, 0.9);
border-radius: 4px;

& + & {
margin-left: 8px;
}
}

.view {
margin-top: 15px;
justify-self: end;
align-self: end;
display: flex;
justify-content: center;
align-items: center;
position: relative;
max-width: 250px;
min-width: 200px;
width: 100%;
height: 50px;
text-align: center;
font-size: 18px;
font-weight: 700;
color: white;
background: colors.$blue;
border-radius: 4px;
transition: opacity 0.3s;

&:hover {
opacity: 0.7;
}
}

.viewInfo {
$right: 17px;
$width: 26px;

position: absolute;
top: 50%;
right: $right;
width: $width;
transform: translateY(-50%);
transition: transform 0.3s;

.view:hover & {
transform: translate($right + $width, -50%);
}
}
45 changes: 45 additions & 0 deletions components/GiftShop/Card/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import Link from 'next/link'
import { Svg } from 'react-optimized-image'

import bit from 'images/icons/bit.svg'
import right from 'images/icons/arrow-right.svg'
import macbook from 'images/macbook.svg'

import styles from './index.module.scss'

const Prizes = () => {
return (
<>
<Link href="https://adityarawat.me">
<a className={styles.root}>
<img className={styles.image} src={`${macbook}`} loading="lazy" />
<span className={styles.content}>
<span className={styles.main}>
<span className={styles.name}>The Cure</span>
<span className={styles.subtitle}>
This prize allows you to eliminate ED in your body. Your
welcome.
</span>
</span>
<span className={styles.info}>
<span className={styles.bits}>
<Svg className={styles.bit} src={bit} />
100,000
</span>

<span className={styles.tags}>
<span className={styles.tag}>Health</span>
</span>
</span>
<span className={styles.view}>
Buy Now
<Svg className={styles.viewInfo} src={right} />
</span>
</span>
</a>
</Link>
</>
)
}

export default Prizes
111 changes: 111 additions & 0 deletions components/GiftShop/Header/index.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
@use 'styles/colors';

$border-radius: 30px;

.root {
display: flex;
justify-content: space-around;
align-items: center;
padding: 20px 0;
background: colors.$purple;
border-radius: 0 0 $border-radius $border-radius;
}

.info {
color: white;
}

.title {
font-size: 40px;
font-weight: 900;
}

.subtitle {
color: white;
margin-top: 8px;
font-size: 30px;
font-weight: 700;
opacity: 0.5;
}

.subtitleSmall {
color: black;
text-align: center;
margin-top: 10px;
margin-bottom: 10px;
}

.balance {
$height: 54px;
display: flex;
align-items: center;
min-width: 170px;
max-width: max-content;
height: $height;
margin-top: 30px;
padding: 0 16px 0 8px;
font-size: 30px;
font-weight: 900;
background: transparentize(white, 0.7);
border-radius: $height / 2;
}

.bit {
flex-shrink: 0;
height: 46px;
margin-right: 12px;
}

.popular {
margin: 25px 0;
border-radius: 5px;
border-color: black;
border-width: 10px;
background-color: white;
padding: 20px;
}

.art {
flex-shrink: 0;
display: block;
height: 300px;
margin: auto;
}

.buy {
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
position: relative;
height: 50px;
margin-top: 12px;
text-align: center;
font-size: 18px;
font-weight: 700;
color: white;
background: colors.$blue;
border-radius: 4px;
transition: opacity 0.3s;
cursor: pointer;

&:hover {
opacity: 0.7;
}
}

.buyInfo {
$right: 17px;
$width: 26px;

position: absolute;
top: 50%;
right: $right;
width: $width;
transform: translateY(-50%);
transition: transform 0.3s;

.buy:hover & {
transform: translate($right + $width, -50%);
}
}
43 changes: 43 additions & 0 deletions components/GiftShop/Header/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { useRecoilValue } from 'recoil'
import Img, { Svg } from 'react-optimized-image'

import formatNumber from 'lib/format/number'
import userState from 'state/user'

import bit from 'images/icons/bit.svg'
import macbook from 'images/macbook.svg'
import right from 'images/icons/arrow-right.svg'

import styles from './index.module.scss'

const GiftShopHeader = () => {
const user = useRecoilValue(userState)

return (
<header className={styles.root}>
<article className={styles.info}>
<h1 className={styles.title}>Gift Shop</h1>
<h3 className={styles.subtitle}>
Spend Your Hard Earned, Or Paid To Win Bits Here!
</h3>
<p className={styles.balance}>
<Svg className={styles.bit} src={bit} />
Balance: {formatNumber(user?.bits ?? 0)}
</p>
</article>
<div>
<h3 className={styles.subtitle}>Our Most Popular Prize!</h3>
<div className={styles.popular}>
<h3 className={styles.subtitleSmall}>2018 Apple Macbook Pro</h3>
<Img className={styles.art} src={macbook} webp />
<span className={styles.buy}>
Buy!
<Svg className={styles.buyInfo} src={right} />
</span>
</div>
</div>
</header>
)
}

export default GiftShopHeader
9 changes: 9 additions & 0 deletions components/GiftShop/index.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.root {
display: grid;
grid:
'filters summary' auto
'filters results' 1fr /
300px 1fr;
gap: 0 80px;
padding: 40px 50px;
}
22 changes: 22 additions & 0 deletions components/GiftShop/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { NextPage } from 'next'

import Header from './Header'
import Filters from '../Hackathons/Filters'
import Summary from '../Hackathons/Summary'
import Results from '../Hackathons/Results'

import styles from './index.module.scss'
import Prizes from './Card'

const GiftShop: NextPage = () => (
<>
<Header />
<div className={styles.root}>
<Filters />
<Summary />
<Prizes />
</div>
</>
)

export default GiftShop
Binary file modified images/bits/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/home/bits-art.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/home/header-art.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading