cryp box wip
This commit is contained in:
parent
2b4f7de097
commit
7b31b2529f
@ -6,7 +6,7 @@ body {
|
||||
font-family: 'Jura';
|
||||
color: whitesmoke;
|
||||
font-size: 16pt;
|
||||
padding: 1em;
|
||||
padding: 1em 2em;
|
||||
}
|
||||
|
||||
button, input {
|
||||
@ -64,7 +64,7 @@ button:hover {
|
||||
.ping-svg {
|
||||
background-color: black;
|
||||
height: 1em;
|
||||
margin-right: 1em;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
.ping-path {
|
||||
@ -175,3 +175,32 @@ button:hover {
|
||||
.spacer {
|
||||
min-width: 100%;
|
||||
}
|
||||
|
||||
/* CRYP BOX */
|
||||
.cryp-box {
|
||||
display: flex;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.cryp-box figure {
|
||||
width: 50%;
|
||||
margin: 0 0 2em 0;
|
||||
border: 1px solid whitesmoke;
|
||||
}
|
||||
|
||||
.cryp-box .skills {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.cryp-skill-btn:first-child {
|
||||
margin: 0 0 0 -1px;
|
||||
}
|
||||
|
||||
.cryp-skill-btn {
|
||||
font-size: 150%;
|
||||
border-width: 1px;
|
||||
width: 100%;
|
||||
height: 25%;
|
||||
padding: 0;
|
||||
margin: -1px 0 0 -1px;
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "parcel index.html --port 40080",
|
||||
"start": "parcel index.html --port 40080 --no-hmr --no-source-maps",
|
||||
"build": "rm -rf dist && parcel build index.html",
|
||||
"lint": "eslint --fix --ext .jsx src/",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
|
||||
@ -2,6 +2,23 @@ const preact = require('preact');
|
||||
// const key = require('keymaster');
|
||||
|
||||
const VboxContainer = require('./vbox.container');
|
||||
const molecule = require('./molecule');
|
||||
|
||||
function Cryp(cryp) {
|
||||
const skills = cryp.skills.map((s, i) => (
|
||||
<button className="cryp-skill-btn" >{s.skill}</button>
|
||||
));
|
||||
return (
|
||||
<div className="cryp-box">
|
||||
<figure className="cryp-img">
|
||||
{molecule}
|
||||
</figure>
|
||||
<div className="skills">
|
||||
{skills}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function InstanceComponent(args) {
|
||||
const {
|
||||
@ -13,6 +30,8 @@ function InstanceComponent(args) {
|
||||
|
||||
if (!instance) return <div>...</div>;
|
||||
|
||||
let cryps = instance.cryps.map(Cryp);
|
||||
|
||||
return (
|
||||
<section>
|
||||
<div className="row">
|
||||
@ -37,7 +56,7 @@ function InstanceComponent(args) {
|
||||
<div className="row">
|
||||
<VboxContainer />
|
||||
<div className="three columns">
|
||||
{JSON.stringify(instance.cryps)}
|
||||
{cryps}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
22
html-client/src/components/instance.cryps.component.jsx
Normal file
22
html-client/src/components/instance.cryps.component.jsx
Normal file
@ -0,0 +1,22 @@
|
||||
const preact = require('preact');
|
||||
// const key = require('keymaster');
|
||||
|
||||
function Vbox(args) {
|
||||
const {
|
||||
instance,
|
||||
combiner,
|
||||
sendVboxAccept,
|
||||
sendVboxDiscard,
|
||||
sendVboxReclaim,
|
||||
sendVboxCombine,
|
||||
} = args;
|
||||
|
||||
const { cryps } = instance;
|
||||
|
||||
return (
|
||||
<div className="three columns">
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = Vbox;
|
||||
@ -4,11 +4,11 @@ const preact = require('preact');
|
||||
function renderLogin({ account, submitLogin, submitRegister }) {
|
||||
if (account) return (
|
||||
<div className="header-status">
|
||||
<h3 className="header-username">{account.name}</h3>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" className="ping-svg">
|
||||
<path d="M0,50l50,-50v100l50,-50" className="ping-path"/>
|
||||
<path d="M0,50l50,-50v100l50,-50" className="ping-path"/>
|
||||
</svg>
|
||||
<h3 className="header-username">{account.name}</h3>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
4
html-client/src/components/molecule.jsx
Normal file
4
html-client/src/components/molecule.jsx
Normal file
File diff suppressed because one or more lines are too long
@ -71,7 +71,7 @@ function Vbox(args) {
|
||||
|
||||
return (
|
||||
<div className="three columns">
|
||||
<h3>vBox - {vbox.bits}b</h3>
|
||||
<h3>VBOX <span className="u-pull-right">{vbox.bits}b</span></h3>
|
||||
<button
|
||||
className="instance-btn instance-ui-btn vbox-btn"
|
||||
onClick={() => sendVboxDiscard()}>
|
||||
@ -93,7 +93,7 @@ function Vbox(args) {
|
||||
{boundRows}
|
||||
</tbody>
|
||||
</table>
|
||||
<span>iCombinator</span>
|
||||
<span>I-COMBINATOR</span>
|
||||
<button
|
||||
className="instance-btn instance-ui-btn vbox-btn"
|
||||
onClick={() => sendVboxCombine()}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user