Skip to content

Commit a03824f

Browse files
committed
feat: Use track colors in session item
1 parent 3cd3ad6 commit a03824f

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

app/templates/components/public/session-item.hbs renamed to app/components/public/session-item.hbs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<UiAccordion>
2-
<div class="title" {{action 'hideSpeakerImage'}} role="button">
1+
<UiAccordion class="segment p-0" style={{css background-color=@session.track.color border-color='lightgray'}}>
2+
<div class="title p-4" {{action 'hideSpeakerImage'}} role="button" style={{css color=(text-color @session.track.color)}}>
33
<div class="ui">
4-
<h3 class="ui header" id="session-id-{{@session.id}}">
4+
<h3 class="ui header" id="session-id-{{@session.id}}" style={{css color=(text-color @session.track.color)}}>
55
{{@session.title}}
6-
<div class="sub header">
6+
<div class="sub header" style={{css color=(text-color @session.track.color) opacity=0.6}}>
77
{{@session.sessionType.name}}
88
</div>
99
</h3>
@@ -41,7 +41,7 @@
4141
</div>
4242
</div>
4343
</div>
44-
<div class="content">
44+
<div class="content pt-0 p-4 rounded-t-none" style={{css background-color='white' border-radius='0.2rem'}}>
4545
{{#each @session.speakers as |speaker|}}
4646
<div class="ui divider"></div>
4747
<img alt="speaker" class="ui tiny avatar image" src="{{if speaker.thumbnailImageUrl speaker.thumbnailImageUrl (if speaker.photoUrl speaker.photoUrl '/images/placeholders/avatar.png')}}">

app/components/public/session-item.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
import classic from 'ember-classic-decorator';
21
import { action } from '@ember/object';
3-
import { classNames } from '@ember-decorators/component';
4-
import Component from '@ember/component';
2+
import Component from '@glimmer/component';
53

6-
@classic
7-
@classNames('ui', 'segment')
84
export default class SessionItem extends Component {
95
hideImage = false;
106

117
@action
128
hideSpeakerImage() {
13-
this.toggleProperty('hideImage');
14-
if (!this.session.speakers.length) {
15-
this.set('hideImage', false);
9+
this.hideImage = !this.hideImage;
10+
if (!this.args.session.speakers.length) {
11+
this.hideImage = false;
1612
}
1713
}
1814
}

app/styles/partials/utils.scss

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,19 @@
1919
}
2020

2121
.rounded-default {
22-
border-radius: .3rem;
22+
border-radius: .28571429rem;
2323
}
2424

2525
.rounded-none {
2626
border-radius: 0 !important;
2727
}
2828

29+
.rounded-t-none {
30+
31+
border-top-left-radius: 0 !important;
32+
border-top-right-radius: 0 !important;
33+
}
34+
2935
.rounded-r-none {
3036
border-bottom-right-radius: 0 !important;
3137
border-top-right-radius: 0 !important;
@@ -36,10 +42,18 @@
3642
border-top-left-radius: 0 !important;
3743
}
3844

45+
.p-0 {
46+
padding: 0 !important;
47+
}
48+
3949
.p-4 {
4050
padding: 1rem !important;
4151
}
4252

53+
.pt-0 {
54+
padding-top: 0 !important;
55+
}
56+
4357
.mt-8 {
4458
margin-top: 2rem;
4559
}

0 commit comments

Comments
 (0)