1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02:00

Implement hero balance UI, mobile

This commit is contained in:
sdtsui 2017-08-06 15:46:55 -07:00
parent 17de77f24a
commit 802c29c986
3 changed files with 92 additions and 51 deletions

View File

@ -91,65 +91,52 @@ TxView.prototype.render = function () {
]),
h('div.flex-row', {
style: {
margin: '1.8em 0.9em 0.8em 0.9em',
// flex: '1 0 520px',
}
// laptop: flex-row, flex-center
// mobile: flex-column
h('div.hero-balance', {
style: {},
}, [
// laptop: flex-row
// mobile: flex-column
h('div.flex-row.flex-center', {
style: {
}
}, [
// laptop: 50px 50px
// mobile: 100px 100px
h('img.hero-balance-icon', {
src: '../images/eth_logo.svg',
width: '60px',
height: '60px',
style: {}
}),
// laptop: 50px 50px
// mobile: 100px 100px
h('img', {
src: '../images/eth_logo.svg',
width: '50px',
height: '50px',
style: {
borderRadius: '25px',
border: '1px solid',
}
}),
// laptop: 5vw?
// phone: 50vw?
h('div.flex-column.flex-center', {
// laptop: 5vw?
// phone: 50vw?
h('div.hero-balance-display', {}, [
h('div.token-amount', {
style: {}
}, [
h('div', {}, '1001.124 ETH'),
}, '1001.124 ETH'),
h('div', {}, '$300,000 USD'),
]),
// laptop: 10vw?
// phone: 75vw?
h('div.flex-row.flex-center', {
style: {
width: '100%',
}
}, [
h('button.btn-clear', {
style: {
textAlign: 'center',
},
}, 'BUY'),
h('button.btn-clear', {
style: {
textAlign: 'center',
},
}, 'SEND'),
]),
h('div.fiat-amount', {
style: {}
}, '$300,000 USD'),
]),
// laptop: 10vw?
// phone: 75vw?
h('div.flex-row.flex-center.hero-balance-buttons', {
style: {}
}, [
h('button.btn-clear', {
style: {
textAlign: 'center',
},
}, 'BUY'),
h('button.btn-clear', {
style: {
textAlign: 'center',
marginLeft: '1.4em',
},
}, 'SEND'),
]),
]),
h('div.flex-row', {

View File

@ -0,0 +1,53 @@
$break-small: 575px;
$break-large: 576px;
.hero-balance {
@media screen and (max-width: $break-small) {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
margin: 0.3em 0.9em 0.8em;
}
@media screen and (min-width: $break-large) {
}
.hero-balance-display {
@media screen and (max-width: $break-small) {
text-align: center;
}
@media screen and (min-width: $break-large) {
}
.token-amount {
font-size: 1.8em;
margin-top: 1em;
}
.fiat-amount {
font-size: 1.1em;
margin-top: 0.8em;
color: #A0A0A0;
// TODO: colors
}
}
.hero-balance-icon {
border-radius: 30px;
// TODO: colors
border: 1px solid #DEDEDE;
}
.hero-balance-buttons {
@media screen and (max-width: $break-small) {
width: 100%;
margin-top: 1.3em;
}
@media screen and (min-width: $break-large) {
}
}
}

View File

@ -4,4 +4,5 @@
@import './identicon.scss';
@import './network.scss';
@import './newui-sections.scss';
@import './hero-balance.scss';
@import './sections.scss';