File tree Expand file tree Collapse file tree 3 files changed +60
-2
lines changed Expand file tree Collapse file tree 3 files changed +60
-2
lines changed Original file line number Diff line number Diff line change
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 ( ) ;
Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ const presentationsData = [
212
212
]
213
213
}
214
214
] ;
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 ' ;
216
216
217
217
const createCard = ( presentation ) => html `
218
218
< div class ="column ">
Original file line number Diff line number Diff line change 7
7
< script src ="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js "> </ script >
8
8
< link rel ="stylesheet " href ="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/semantic.min.css ">
9
9
< 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 >
11
10
12
11
13
12
@@ -33,7 +32,18 @@ <h1 class="ui left floated header" style="padding-bottom: 0">My Talks</h1>
33
32
< div id ="cardContainer " class ="ui three column stackable grid container "> </ div >
34
33
</ div >
35
34
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
+
36
45
< script type ="module " src ="assets/build-presentation-list.js "> </ script >
46
+ < script type ="module " src ="assets/build-podcasts-list.js "> </ script >
37
47
38
48
</ div >
39
49
</ body >
You can’t perform that action at this time.
0 commit comments