Skip to content

Commit f5512a8

Browse files
committed
fix page, add podcasts
1 parent 4c563e6 commit f5512a8

File tree

3 files changed

+60
-2
lines changed

3 files changed

+60
-2
lines changed

assets/build-podcasts-list.js

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Sample data in JSON format
2+
const podcastsData = [
3+
{
4+
title: "Modelling the Business Domain",
5+
description: "Scala Space",
6+
meta: "Nov 22, 2024",
7+
link: "https://www.youtube.com/watch?v=-8k3WfXVHkc&t=291s",
8+
},
9+
{
10+
title: "Discover SwissBorg",
11+
description: "Scala for Fun & Profit",
12+
meta: "Mar 5, 2024",
13+
link: "https://www.youtube.com/watch?v=NfU0NJRvrfE",
14+
},
15+
];
16+
17+
import {html, render} from 'https://cdn.jsdelivr.net/npm/lit-html@3.2.1';
18+
19+
const createCard = (podcast) => html`
20+
<div class="column">
21+
<div class="ui fluid card">
22+
<div class="content">
23+
<div class="header">${podcast.title}
24+
<a href="${podcast.link}" target="_blank" class="ui right floated icon" title="Video">
25+
<i class="video icon"></i>
26+
</a>
27+
</div>
28+
</div>
29+
<div class="content">
30+
<div class="description">
31+
<span class="conference-name">
32+
${podcast.description}
33+
<span class="right floated">${podcast.meta}</span>
34+
</span>
35+
</div>
36+
</div>
37+
</div>
38+
</div>
39+
`;
40+
41+
const renderCards = () => {
42+
const cardsTemplate = html`
43+
${podcastsData.map(podcast => createCard(podcast))}
44+
`;
45+
render(cardsTemplate, document.getElementById('podcastsContainer'));
46+
};
47+
48+
renderCards();

assets/build-presentation-list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ const presentationsData = [
212212
]
213213
}
214214
];
215-
import { html, render } from 'https://unpkg.com/lit-html@2.0.2/lit-html.js';
215+
import { html, render } from 'https://cdn.jsdelivr.net/npm/lit-html@3.2.1';
216216

217217
const createCard = (presentation) => html`
218218
<div class="column">

index.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
88
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/semantic.min.css">
99
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/semantic.min.js"></script>
10-
<script type="module" src="https://unpkg.com/lit-html@2.0.2/lit-html.js"></script>
1110

1211

1312

@@ -33,7 +32,18 @@ <h1 class="ui left floated header" style="padding-bottom: 0">My Talks</h1>
3332
<div id="cardContainer" class="ui three column stackable grid container"></div>
3433
</div>
3534

35+
<div class="ui basic clearing segment">
36+
<h2 class="ui left floated header" style="padding-bottom: 0">Podcasts</h2>
37+
</div>
38+
39+
<hr/>
40+
41+
<div class="ui basic segment">
42+
<div id="podcastsContainer" class="ui three column stackable grid container"></div>
43+
</div>
44+
3645
<script type="module" src="assets/build-presentation-list.js"></script>
46+
<script type="module" src="assets/build-podcasts-list.js"></script>
3747

3848
</div>
3949
</body>

0 commit comments

Comments
 (0)