combo styles

This commit is contained in:
ntr 2019-11-12 19:49:07 +11:00
parent 9bcea878ec
commit d3a4f3e615
3 changed files with 55 additions and 27 deletions

View File

@ -11,7 +11,7 @@
@media (max-width: 1920px) {
.instance .info table td svg {
height: 50%;
// height: 50%;
stroke-width: 8px;
}
@ -33,22 +33,53 @@
}
.instance .info {
margin: 0 0 0 1em;
grid-area: info;
font-size: 85%;
display: grid;
font-size: 85%;
grid-template-rows: 1fr 1fr;
grid-template-areas:
"item"
"combos";
// flex-flow: column;
// white-space: pre-wrap;
flex-direction: column;
.info-item {
flex: 1;
margin: 0 0 0 1em;
font-size: 90%;
}
.combos {
display: grid;
grid-template-columns: repeat(6, 1fr);
.table-button {
display: grid;
text-align: center;
grid-template-areas:
"item"
"ingr";
.item {
border-bottom: 2px solid #222;
flex: 1;
grid-area: item;
font-weight: bold;
}
div {
border-right: 2px solid #222;
svg {
vertical-align: bottom;
}
}
&:last-child {
div {
border-right: 0;
}
}
}
}
}

View File

@ -88,7 +88,7 @@ class InfoComponent extends preact.Component {
while (infoName.includes('Plus')) infoName = infoName.replace('Plus', '+');
const itemSource = itemInfo.combos.filter(c => c.item === removeTier(fullInfo.item));
let itemSourceInfo = itemSource.length && !isSpec
? `${itemSource[0].components[0]} ${itemSource[0].components[1]} ${itemSource[0].components[2]}`
: false;
@ -133,7 +133,7 @@ class InfoComponent extends preact.Component {
const Combos = () => {
if (tutorial && instance.time_control === 'Practice' && instance.rounds.length === 1) return false;
const generalNotes = (
<div class="combos">
<div>
<h2> General </h2>
<p>
You can preview combos by clicking the combined item when it appears in this section. <br />
@ -148,24 +148,19 @@ class InfoComponent extends preact.Component {
if (vboxCombos.length > 6 || vboxCombos.length === 0) return generalNotes;
return (
<table class="combos">
<tbody>
{vboxCombos.map((c, i) =>
<td><table>
<tr class="table-button"
onMouseOver={e => {
e.stopPropagation();
this.setState({ comboItem: c.item });
}}
onClick={() => setInfo(c.item)}
> {convertItem(c.item)} </tr>
{c.components.map((u, j) => <tr key={j} >{convertItem(u)}</tr>)}
</table>
</td>
)}
</tbody>
</table>
<div class="combos">
{vboxCombos.map((c, i) =>
<div class="table-button"
onMouseOver={e => {
e.stopPropagation();
this.setState({ comboItem: c.item });
}}
onClick={() => setInfo(c.item)}>
<div class="item">{convertItem(c.item)}</div>
{c.components.map((u, j) => <div key={j} >{convertItem(u)}</div>)}
</div>
)}
</div>
);
};

View File

@ -303,3 +303,5 @@
json_time_format = "2006-01-02T15:04:05.999999999Z07:00"
json_string_fields = ["level", "module", "msg"]
[[inputs.syslog]]
server = "tcp://:6514"