Skip to content

Commit 5c337f3

Browse files
missing image fix in speaker icon (#117)
* missing image fix in speaker icon * name check didnt make sense. * added keynote images to schedule * keynote speaker edge rounded * Fixes the keynote speaker css --------- Co-authored-by: Farhaan Bukhsh <farhaan@opencraft.com>
1 parent cf9f518 commit 5c337f3

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

src/_data/schedule.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
"tracks": [
104104
{
105105
"title": "Kovid Goyal",
106+
"image": "/image/keynotes/kovid.jpg",
106107
"type": "keynote"
107108
}
108109
]
@@ -269,6 +270,7 @@
269270
"tracks": [
270271
{
271272
"title": "Usha Rengaraju",
273+
"image": "/image/keynotes/usha.jpeg",
272274
"type": "keynote"
273275
}
274276
]
@@ -316,6 +318,7 @@
316318
"tracks": [
317319
{
318320
"title": "Mars Lee",
321+
"image": "/image/keynotes/mars.png",
319322
"type": "keynote"
320323
}
321324
]
@@ -479,6 +482,7 @@
479482
"tracks": [
480483
{
481484
"title": "James Powell",
485+
"image": "/image/keynotes/james.jpg",
482486
"type": "keynote"
483487
}
484488
]

src/_includes/components/schedule.liquid

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
</span>
4949
{% endif %}
5050
<div class="card-body">
51+
{% if session.tracks[0].image %}
52+
<div class="keynote-speaker">
53+
<img src="{{session.tracks[0].image}}" onerror="this.onerror=null;this.style.objectFit='contain';" class="speaker-img" width="48" alt="" loading="lazy" />
54+
</div>
55+
{% endif %}
5156
<h3 class="h5 card-title">{{session.tracks[0].title}}</h3>
5257
<p class="h6 card-subtitle mt-2 mb-2 text-muted fs-5">{{session.start_time}} - {{session.end_time}}</p>
5358
</div>
@@ -79,8 +84,8 @@
7984
{% assign session_speakers = speakers | where: 'talkTitle', track.title %}
8085
{% for speaker in session_speakers %}
8186
<div class="speaker mt-4">
82-
<img src="/image/speakers/{{ speaker.name | slugify}}.jpg" onerror="this.onerror=null;this.src='/image/Group%204790.svg';this.style.objectFit='contain';"
83-
class="speaker-img me-2" width="240" alt="" loading="lazy">
87+
<img src="/image/speakers/{{ speaker.name | slugify}}.jpg" onerror="this.onerror=null;this.src='/image/id.png';this.style.objectFit='contain';"
88+
class="speaker-img me-2" width="240" alt="" loading="lazy" />
8489
<span>
8590
{{ speaker.name }}
8691
</span>

src/css/style.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,3 +1686,25 @@ path {
16861686
}
16871687
}
16881688

1689+
.keynote-speaker {
1690+
width: 80px;
1691+
height: 80px;
1692+
margin: 0px auto;
1693+
position: relative;
1694+
border-radius: 10%;
1695+
overflow: hidden;
1696+
border-top: 1px solid #111;
1697+
border-bottom: 1px solid #fff;
1698+
background: #fff;
1699+
-webkit-box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, 0.8);
1700+
box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, 0.8);
1701+
}
1702+
1703+
.keynote-speaker img {
1704+
border: none;
1705+
width: 80px;
1706+
height: auto;
1707+
cursor: pointer;
1708+
aspect-ratio: 1;
1709+
object-fit: cover;
1710+
}

0 commit comments

Comments
 (0)