diff --git a/fab-ui/index.html b/fab-ui/index.html index 512fff4..c29f6df 100644 --- a/fab-ui/index.html +++ b/fab-ui/index.html @@ -4,34 +4,38 @@ -
${this.rarity}
+ `;
+ }
+
+ static styles = css`
+ .fab-rarity-icon {
+ font-family: monospace;
+ display: inline-block;
+ width: 1.2em;
+ height: 1.2em;
+ line-height: 1.1em;
+ text-align: center;
+ border-radius: 50%;
+ color: #fff;
+ font-size: 0.7em;
+ }
+
+ .fab-rarity-icon.fab-rarity-m {
+ background-color: red;
+ }
+
+ .fab-rarity-icon.fab-rarity-r {
+ background-color: blue;
+ }
+
+ .fab-rarity-icon.fab-rarity-p {
+ background-color: green;
+ }
+
+ .fab-rarity-icon.fab-rarity-c {
+ background-color: gray;
+ }
+
+ .fab-rarity-icon.fab-rarity-l {
+ background-color: orange;
+ }
+ `;
+}
+
@customElement('fab-card')
export class FabCard extends LitElement {
@property({ type: String })
- cardSetId = '';
+ setId = '';
@property({ type: String })
- cardName = '';
+ name = '';
@property({ type: String })
- cardColor = '';
+ color = '';
@property({ type: String })
- cardComment = '';
+ rarity = '';
+ @property({ type: String })
+ comment = '';
@property({ type: String })
foiling = 'S';
@@ -18,14 +66,15 @@ export class FabCard extends LitElement {
return html`