Update CharacterResult
same shit
This commit is contained in:
parent
5c1d19aceb
commit
29f20ec33c
2 changed files with 63 additions and 42 deletions
|
|
@ -1,48 +1,63 @@
|
||||||
.CharacterResult {
|
.CharacterResult {
|
||||||
-webkit-font-smoothing: antialiased;
|
|
||||||
|
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
display: flex;
|
display: flex;
|
||||||
font-family: -apple-system, "Helvetica Neue", "Lucida Grande";
|
gap: $unit;
|
||||||
gap: 8px;
|
padding: $unit * 1.5;
|
||||||
padding: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CharacterResult img {
|
&:hover {
|
||||||
background: #e9e9e9;
|
background: $grey-90;
|
||||||
border-radius: 6px;
|
cursor: pointer;
|
||||||
display: inline-block;
|
}
|
||||||
height: 72px;
|
|
||||||
width: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.CharacterResult h5 {
|
img {
|
||||||
color: #555;
|
background: $grey-80;
|
||||||
display: inline-block;
|
border-radius: 6px;
|
||||||
font-size: $font-large;
|
display: inline-block;
|
||||||
font-weight: 500;
|
height: 72px;
|
||||||
margin: 2px 4px 4px 0;
|
width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.CharacterResult .WeaponLabelIcon {
|
.Info {
|
||||||
margin-right: 4px;
|
display: flex;
|
||||||
}
|
flex-direction: column;
|
||||||
|
flex-grow: 1;
|
||||||
|
gap: $unit / 2;
|
||||||
|
|
||||||
.CharacterResult .stars {
|
h5 {
|
||||||
display: inline-block;
|
color: #555;
|
||||||
color: #FFA15E;
|
display: inline-block;
|
||||||
font-size: $font-xlarge;
|
font-size: $font-medium;
|
||||||
}
|
font-weight: $medium;
|
||||||
|
}
|
||||||
|
|
||||||
.CharacterResult .stars > span {
|
.UncapIndicator {
|
||||||
color: #65DAFF;
|
justify-content: left;
|
||||||
}
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.CharacterResult:hover {
|
.stars {
|
||||||
background: #e9e9e9;
|
display: inline-block;
|
||||||
cursor: pointer;
|
color: #FFA15E;
|
||||||
}
|
font-size: $font-xlarge;
|
||||||
|
|
||||||
.CharacterResult:hover .image_placeholder {
|
& > span {
|
||||||
background: #dadada;
|
color: #65DAFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: $unit / 2;
|
||||||
|
|
||||||
|
.WeaponLabelIcon {
|
||||||
|
$aspect-ratio: calc(25 / 60);
|
||||||
|
$height: 22px;
|
||||||
|
background-size: calc($height / $aspect-ratio) $height;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
height: $height;
|
||||||
|
width: calc($height/ $aspect-ratio);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import UncapIndicator from '~components/UncapIndicator'
|
||||||
import WeaponLabelIcon from '~components/WeaponLabelIcon'
|
import WeaponLabelIcon from '~components/WeaponLabelIcon'
|
||||||
|
|
||||||
import './index.scss'
|
import './index.scss'
|
||||||
|
|
@ -17,12 +18,17 @@ class CharacterResult extends React.Component<Props> {
|
||||||
return (
|
return (
|
||||||
<li className="CharacterResult" onClick={this.props.onClick}>
|
<li className="CharacterResult" onClick={this.props.onClick}>
|
||||||
<img alt={character.name.en} src={`${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/chara-grid/${character.granblue_id}_01.jpg`} />
|
<img alt={character.name.en} src={`${process.env.NEXT_PUBLIC_SIERO_IMG_URL}/chara-grid/${character.granblue_id}_01.jpg`} />
|
||||||
<div>
|
<div className="Info">
|
||||||
<div>
|
<h5>{character.name.en}</h5>
|
||||||
<h5>{character.name.en}</h5>
|
<UncapIndicator
|
||||||
<div className="stars">{(character.rarity == 2) ? '⭑⭑⭑' : '⭑⭑⭑⭑'}{(character.uncap.flb) ? <span>⭑</span> : ''}</div>
|
type="character"
|
||||||
|
flb={character.uncap.flb}
|
||||||
|
ulb={character.uncap.ulb}
|
||||||
|
special={character.special}
|
||||||
|
/>
|
||||||
|
<div className="tags">
|
||||||
|
<WeaponLabelIcon labelType={Element[character.element]} />
|
||||||
</div>
|
</div>
|
||||||
<WeaponLabelIcon labelType={Element[character.element]} />
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue