Skip to content

Commit 12ec493

Browse files
committed
archive episode, add show notes support
1 parent 1d82afe commit 12ec493

File tree

4 files changed

+117
-18
lines changed

4 files changed

+117
-18
lines changed

episodes/2016-11-22/notes.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
### Host
2+
+ [Justin Schwartzenberger](https://twitter.com/schwarty)
3+
4+
### Panelists
5+
+ [Austin McDaniel](https://twitter.com/amcdnl)
6+
+ [Mike Brocchi](https://twitter.com/Brocco)
7+
+ [Olivier Combe](https://twitter.com/OCombe)
8+
9+
### Episode Notes
10+
11+
+ Attribute selectors
12+
<http://plnkr.co/edit/2zuFW6?p=preview>
13+
14+
+ @Input private field and getter/setter
15+
<http://plnkr.co/edit/Iab6ih?p=preview>
16+
17+
+ @Output check for subscribers
18+
<http://plnkr.co/edit/zVMr0Z?p=preview>
19+
20+
+ @HostListener(‘click’)
21+
<http://plnkr.co/edit/6kUuVYFQag4IbUykxlKv?p=preview>
22+
23+
+ @HostListener target args
24+
<http://plnkr.co/edit/MDOAF6hNO3M1HhapyNRB?p=preview>
25+
26+
+ Binding pixel widths in template
27+
<http://plnkr.co/edit/v4wclFBIHaaUZdL60Otg?p=preview>
28+
29+
+ Binding pixel widths in decorators
30+
<http://plnkr.co/edit/LCtxZcKEFdytjFIvhyis?p=preview>
31+
32+
+ Template outlet
33+
<http://plnkr.co/edit/sR8rTeuRsvnWihuGDap5?p=preview>
34+
35+
+ Content projection
36+
<http://plnkr.co/edit/uxGGa6i0b0PKyV6e4tEG?p=preview>
37+
38+
+ Access element properties in templates with references
39+
<http://plnkr.co/edit/TSR0koZzfRq0KNkB2tFu?p=preview>
40+
41+
+ Dynamic component creation
42+
<http://plnkr.co/edit/1JgnbmRbmMmacj2gzKAI?p=preview>
43+
44+
+ Boost ngFor performance with trackBy
45+
<http://plnkr.co/edit/40tKSbEXpYGxiD5eHOM9?p=preview>
46+
47+
+ Boost performance with OnPush
48+
[before](https://pbs.twimg.com/media/CvN82oGWYAUfTuF.jpg:large)
49+
[after](https://pbs.twimg.com/media/CvN83VsWgAA2XsD.jpg:large)
50+
51+
+ Pairwise operator
52+
<http://plnkr.co/edit/mMWANkh7Z4w3oSFQIa5a?p=preview>
53+
54+
### Picks
55+
+ Justin Schwartzenberger
56+
+ [ng2d3](https://github.com/swimlane/ng2d3)
57+
+ [Rx Workshop with Ben Lesh](https://www.rxworkshop.com)
58+
$50 off using the code **angularair**

index.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ <h3 class="episode__title">
6464
</h3>
6565
<div class="hangouts-url">
6666
<span ng-if="::episode.hangoutUrl">
67-
<a ng-href="{{::episode.hangoutUrl}}">Sign up here</a> to watch live!
67+
<a ng-href="{{::episode.hangoutUrl}}">Head here</a> to watch live!
6868
</span>
6969
<span ng-if="::!episode.hangoutUrl">
70-
Stay tuned for a hangouts link!
70+
Stay tuned for a YouTube link!
7171
</span>
7272
</div>
7373
<person-group groups="episode.guests"></person-group>
@@ -109,7 +109,7 @@ <h3>Premier Sponsor</h3>
109109
<h2>Past Episodes</h2>
110110
<ul>
111111
<li ng-repeat="episode in ::vm.pastEpisodes">
112-
<a ng-href="{{::episode.hangoutUrl}}">{{::'Episode ' + $index + ': ' + episode.title}}</a>
112+
<a ng-href="{{::episode.hangoutUrl}}">{{::'Episode ' + episode.number + ': ' + episode.title}}</a>
113113
<small ng-if="::episode.sponsors">
114114
Sponsored by:
115115
<span ng-repeat="group in ::episode.sponsors">
@@ -118,6 +118,14 @@ <h2>Past Episodes</h2>
118118
</span>
119119
</span>
120120
</small>
121+
<div ng-if="::episode.hasNotes" class="notes">
122+
<a ng-click="episode.notesAreVisible = !episode.notesAreVisible" class="toggle">
123+
Show Notes {{episode.notesAreVisible ? '-' : '+'}}
124+
</a>
125+
<div class="episode__notes justify"
126+
ng-style="{'display': episode.notesAreVisible ? 'block' : 'none'}"
127+
ng-bind-html="::episode.notes"></div>
128+
</div>
121129
</li>
122130
</ul>
123131
</section>
@@ -145,7 +153,7 @@ <h2>Panelists</h2>
145153

146154
<section class="center">
147155
<h2>Video Podcast</h2>
148-
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLF75bDBd1tIdwQq6TNd-wNx0AcB8JPeDK" frameborder="0" allowfullscreen></iframe>
156+
<iframe width="560" height="315" src="https://www.youtube.com/embed/videoseries?list=PLF75bDBd1tIdRwcpXJ9nLTlyMP1AXkA_S" frameborder="0" allowfullscreen></iframe>
149157
</section>
150158

151159
<hr/>

script.js

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
app.factory('markdownGetter', function markdownGetter($http, markdown) {
1010
return {
1111
getDescription: getMarkdownFileGetter('description.md'),
12-
getSponsorship: getMarkdownFileGetter('sponsorship.md')
12+
getSponsorship: getMarkdownFileGetter('sponsorship.md'),
13+
getNotes: getMarkdownFileGetter('notes.md')
1314
};
1415

1516
function getMarkdownFileGetter(fileName) {
@@ -48,14 +49,6 @@
4849
];
4950

5051
vm.episodes = [
51-
{
52-
title: 'The TIL Episode',
53-
displayDate: 'Tuesday, November 22, 2016',
54-
date: '2016-11-22',
55-
time: '11:00 AM (Pacific Time)',
56-
hangoutUrl: 'http://ngair.io/til-episode-2016',
57-
guests: [[]]
58-
},
5952
{
6053
title: 'ngrx with Mike Ryan',
6154
displayDate: 'Tuesday, November 29, 2016',
@@ -1256,6 +1249,17 @@
12561249
// {name: 'Shai Reznik', twitter: 'jimthedev'}
12571250
]
12581251
]
1252+
},
1253+
{
1254+
number: 89,
1255+
title: 'The TIL Episode',
1256+
displayDate: 'Tuesday, November 22, 2016',
1257+
date: '2016-11-22',
1258+
time: '11:00 AM (Pacific Time)',
1259+
hangoutUrl: 'http://ngair.io/til-episode-2016',
1260+
guests: [[]],
1261+
hasNotes: true,
1262+
notesAreVisible: false
12591263
}
12601264
];
12611265

@@ -1276,12 +1280,27 @@
12761280
});
12771281
});
12781282

1279-
markdownGetter.getDescription(episode.date).then(function success(markdown) {
1280-
episode.description = $sce.trustAsHtml(markdown);
1281-
});
1282-
markdownGetter.getSponsorship(episode.date).then(function success(markdown) {
1283-
episode.sponsorship = $sce.trustAsHtml(markdown);
1283+
// markdownGetter.getDescription(episode.date).then(function success(markdown) {
1284+
// episode.description = $sce.trustAsHtml(markdown);
1285+
// });
1286+
// markdownGetter.getSponsorship(episode.date).then(function success(markdown) {
1287+
// episode.sponsorship = $sce.trustAsHtml(markdown);
1288+
// });
1289+
});
1290+
1291+
angular.forEach(vm.pastEpisodes, function (episode) {
1292+
angular.forEach(episode.guests, function (group) {
1293+
angular.forEach(group, function (guest) {
1294+
if (!guest.avatar) {
1295+
guest.avatar = 'episodes/' + episode.date + '/' + guest.twitter + '.' + (guest.imageExt || 'png');
1296+
}
1297+
});
12841298
});
1299+
if(episode.hasNotes) {
1300+
markdownGetter.getNotes(episode.date).then(function success(markdown) {
1301+
episode.notes = $sce.trustAsHtml(markdown);
1302+
});
1303+
}
12851304
});
12861305
});
12871306

styles.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ body {
207207
a {
208208
text-decoration: none;
209209
color: #8c0c12;
210+
cursor: pointer;
210211
}
211212

212213
a:hover, a:focus {
@@ -309,6 +310,19 @@ h2 {
309310
margin-top: 40px;
310311
}
311312

313+
.episode .notes a.toggle {
314+
font-style: italic;
315+
font-size: .9em;
316+
}
317+
318+
.episode__notes {
319+
background-color: #ebebeb;
320+
padding: 1.2em;
321+
}
322+
.episode__notes h3 {
323+
margin-top: 10px;
324+
}
325+
312326
.no-decorate,
313327
.no-decorate:focus,
314328
.no-decorate:active,

0 commit comments

Comments
 (0)