dlg-ui 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ <div class='player-wrapper'>
2
+ <div class='player-card'>
3
+ <div class='player-pos'>
4
+ {{@position}}
5
+ </div>
6
+ <div class='player-name'>
7
+ <span class='player-text'>
8
+ {{@player}}
9
+ </span>
10
+ <span class='player-points'>
11
+ {{@points}}
12
+ pts
13
+ </span>
14
+ </div>
15
+ <div class='player-pic'>
16
+ <img src={{@picture}} alt='Player Picture' />
17
+ </div>
18
+ <div class={{this.trophyClass}} style={{this.trophyStyle}}>
19
+ <img src='/trophy-removebg-preview.png' alt='Player Trophy' />
20
+ </div>
21
+ </div>
22
+ </div>
@@ -0,0 +1,14 @@
1
+ import Component from '@glimmer/component';
2
+
3
+ export default class PlayerCardComponent extends Component {
4
+ get trophyClass() {
5
+ return this.args.trophyCount ? 'player-trophy has-trophy' : 'player-trophy';
6
+ }
7
+
8
+ get trophyStyle() {
9
+ if (this.args.trophyCount) {
10
+ return `--trophy-count: "${this.args.trophyCount}"`;
11
+ }
12
+ return '';
13
+ }
14
+ }
@@ -9,13 +9,11 @@
9
9
  }
10
10
 
11
11
  .content-header {
12
- min-height: 20%;
13
12
  height: fit-content;
14
13
  margin-bottom: 1em;
15
14
  }
16
15
 
17
16
  .content-body {
18
- min-height: 80%;
19
17
  height: fit-content;
20
18
  }
21
19
 
@@ -266,6 +264,86 @@
266
264
  padding-top: 8px;
267
265
  }
268
266
 
267
+ .player-card {
268
+ display: flex;
269
+ flex-direction: row;
270
+ padding: 0.5em;
271
+ font-size: 1em;
272
+ background-color: #f6f6f6;
273
+ border: solid;
274
+ }
275
+
276
+ .player-name {
277
+ width: 40%;
278
+ display: flex;
279
+ flex-direction: column;
280
+ justify-content: center;
281
+ align-items: center;
282
+ }
283
+
284
+ .player-pic {
285
+ width: 30%;
286
+ display: flex;
287
+ flex-direction: column;
288
+ justify-content: center;
289
+ align-items: center;
290
+ }
291
+
292
+ .player-points {
293
+ font-size: 0.8em;
294
+ }
295
+
296
+ .player-pos {
297
+ width: 10%;
298
+ display: flex;
299
+ flex-direction: column;
300
+ justify-content: center;
301
+ align-items: center;
302
+ }
303
+
304
+ .player-text {
305
+ text-align: center;
306
+ }
307
+
308
+ .player-trophy {
309
+ width: 20%;
310
+ display: flex;
311
+ flex-direction: column;
312
+ justify-content: center;
313
+ align-items: center;
314
+ position: relative;
315
+ }
316
+
317
+ .has-trophy::after {
318
+ content: '\00D7'var(--trophy-count);
319
+ color: Blue;
320
+ font-weight: 900;
321
+ font-size: 1.3em;
322
+ position: absolute;
323
+ left: 50%;
324
+ top: 30%;
325
+ transform: translate(-50%, -60%);
326
+ pointer-events: none;
327
+ text-shadow: 1px 1px 2px #0002;
328
+ }
329
+
330
+ .player-pic img,
331
+ .player-trophy img {
332
+ width: 100%;
333
+ height: auto;
334
+ display: block;
335
+ object-fit: contain;
336
+ }
337
+
338
+ .player-pic img {
339
+ border-radius: 50%;
340
+ }
341
+
342
+ .player-wrapper {
343
+ container-type: inline-size;
344
+ width: 100%;
345
+ }
346
+
269
347
  .radio-label {
270
348
  font-weight: bold;
271
349
  }
@@ -275,3 +353,34 @@
275
353
  flex-direction: column;
276
354
  margin: 5px 0px 5px 0px;
277
355
  }
356
+
357
+ @container (min-width: 100px) {
358
+ .player-card {
359
+ font-size: 0.6rem;
360
+ }
361
+ }
362
+ @container (min-width: 200px) {
363
+ .player-card {
364
+ font-size: 0.8rem;
365
+ }
366
+ }
367
+ @container (min-width: 300px) {
368
+ .player-card {
369
+ font-size: 1rem;
370
+ }
371
+ }
372
+ @container (min-width: 400px) {
373
+ .player-card {
374
+ font-size: 1.4rem;
375
+ }
376
+ }
377
+ @container (min-width: 500px) {
378
+ .player-card {
379
+ font-size: 1.5rem;
380
+ }
381
+ }
382
+ @container (min-width: 600px) {
383
+ .player-card {
384
+ font-size: 2rem;
385
+ }
386
+ }
@@ -0,0 +1 @@
1
+ export { default } from 'dlg-ui/components/player/card';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlg-ui",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "The default blueprint for ember-cli addons.",
5
5
  "keywords": [
6
6
  "ember-addon"