Skip to content

Commit 164dca9

Browse files
committed
finish css of rollover
1 parent a9f9041 commit 164dca9

File tree

3 files changed

+38
-18
lines changed

3 files changed

+38
-18
lines changed

src/pages/display/index.js

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react'
2-
import { Button, Primary, Secondary } from '../../components/button'
2+
import { Button, Primary, Secondary, Purchase } from '../../components/button'
33
import { HicetnuncContext } from '../../context/HicetnuncContext'
44
import { Page, Container, Padding } from '../../components/layout'
55
import { BottomBanner } from '../../components/bottom-banner'
@@ -46,10 +46,6 @@ query collectorGallery($address: String!) {
4646
address
4747
name
4848
}
49-
swaps {
50-
amount
51-
price
52-
}
5349
}
5450
}
5551
}
@@ -797,7 +793,9 @@ export default class Display extends Component {
797793
collection
798794
</Primary>
799795
</Button>
800-
<Button onClick={() => this.setState({ filter: !this.state.filter })}>
796+
<Button onClick={() => this.setState({
797+
filter: !this.state.filter
798+
})}>
801799
<Primary>
802800
filter
803801
</Primary>
@@ -1055,13 +1053,22 @@ export default class Display extends Component {
10551053
{this.state.items.map((nft) => {
10561054
console.log('nft asdfadf: ' + JSON.stringify(nft))
10571055
return (
1058-
<Button style={{ position: 'relative' }} key={nft.token.id} to={`${PATH.OBJKT}/${nft.token.id}`}>
1056+
<Button className={styles.cardContainer}
1057+
style={{ position: 'relative' }}
1058+
key={nft.token.id}
1059+
to={`${PATH.OBJKT}/${nft.token.id}`}>
10591060
<div className={styles.card}>
10601061
<div className={styles.cardText}>
1061-
<div>#{nft.token.id}</div>
1062+
<div>OBJKT#{nft.token.id}</div>
10621063
<div>{nft.token.title}</div>
10631064
<div>{nft.token.creator.name}</div>
1064-
<div>24tez</div>
1065+
</div>
1066+
<div className={styles.cardCollect}>
1067+
<Purchase>
1068+
<div className={styles.cardCollectPrice}>
1069+
collect for 24 tez
1070+
</div>
1071+
</Purchase>
10651072
</div>
10661073
</div>
10671074
<div className={styles.container}>

src/pages/display/styles.module.scss

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,15 @@
4242
.card {
4343
position: absolute;
4444
left: 0;
45-
top: 0;
4645
right: 0;
4746
bottom: 0;
4847
width: 100%;
49-
height: 100%;
50-
background: black;
48+
height: 30%;
49+
min-height: 150px;
50+
51+
background-color: var(--text-color);
5152
transition: background-color #{$theme-duration} ease-out,
52-
color #{$theme-duration} ease-out, opacity ease-out 0.2s;
53+
color #{$theme-duration} ease-out, opacity ease-out #{$theme-duration};
5354
z-index: 100;
5455
opacity: 0;
5556
&:hover {
@@ -58,11 +59,24 @@
5859
}
5960

6061
.cardText {
62+
position: relative;
63+
color: var(--background-color);
64+
margin-top: 20px;
65+
margin-left: 20px;
66+
}
67+
68+
.cardCollect {
6169
position: absolute;
62-
top: 50%;
63-
left: 50%;
64-
transform: translate(-50%, -50%);
65-
color: white;
70+
bottom: 0;
71+
right: 0;
72+
border-right: 2px solid var(--background-color);
73+
border-bottom: 2px solid var(--background-color);
74+
margin-bottom: 20px;
75+
margin-right: 20px;
76+
77+
.cardCollectPrice {
78+
color: var(--background-color);
79+
}
6680
}
6781

6882
.tag {

src/styles/main.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ body {
1616
// font-family: 'Courier New', 'Courier', monospace; // README: old font
1717
overflow-x: hidden;
1818
color: var(--text-color);
19-
2019
background-color: var(--background-color);
2120
transition: background-color #{$theme-duration} ease-out,
2221
color #{$theme-duration} ease-out;

0 commit comments

Comments
 (0)