File tree 5 files changed +49
-1
lines changed
5 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ copyright: © My Company 2013
13
13
# Build settings
14
14
markdown : kramdown
15
15
16
+ # The video that plays.
17
+ video : " u7deClndzQw"
18
+
19
+ # The navigation.
16
20
navigation :
17
21
left :
18
22
links :
@@ -31,6 +35,7 @@ navigation:
31
35
right :
32
36
content : nav/right.html
33
37
38
+ # The footer section.
34
39
footer :
35
40
sections :
36
41
- title : Useful Links 1
Original file line number Diff line number Diff line change 1
1
< h1 > Hello, world!</ h1 >
2
2
< p > This is a template for a simple marketing or informational website. It includes a large callout called a jumbotron and three supporting pieces of content. Use it as a starting point to create something more unique.</ p >
3
- < p > < a href ="/about/ " class ="btn btn-primary btn-lg " role ="button "> Learn more »</ a > </ p >
3
+ < p >
4
+ < a href ="/about/ " class ="btn btn-primary btn-lg " role ="button "> Learn more »</ a >
5
+ < a class ="btn btn-primary btn-lg " data-toggle ="modal " data-target ="#video-modal "> < span class ="glyphicon glyphicon-play-circle "> </ span > Watch Video</ a >
6
+ {% include modal.html id='video' title='Amazing Video' body='modals/video.html' %}
7
+ </ p >
Original file line number Diff line number Diff line change
1
+ < div class ="modal fade " id ="{{ include.id }}-modal " tabindex ="-1 " role ="dialog " aria-labelledby ="{{ include.id }}ModalLabel " aria-hidden ="true ">
2
+ < div class ="modal-dialog modal-lg ">
3
+ < div class ="modal-content ">
4
+ < div class ="modal-header ">
5
+ < button type ="button " class ="close " data-dismiss ="modal "> < span aria-hidden ="true "> ×</ span > < span class ="sr-only "> Close</ span > </ button >
6
+ < h4 class ="modal-title " id ="{{ include.id }}ModalLabel "> {{ include.title }}</ h4 >
7
+ </ div >
8
+ {% if include.body %}
9
+ < div class ="modal-body ">
10
+ {% include {{ include.body }} %}
11
+ </ div >
12
+ {% endif %}
13
+ {% if include.footer %}
14
+ < div class ="modal-footer ">
15
+ {% include {{ include.footer }} %}
16
+ </ div >
17
+ {% endif %}
18
+ </ div >
19
+ </ div >
20
+ </ div >
Original file line number Diff line number Diff line change
1
+ < script type ="text/template " id ="video-template ">
2
+ < iframe src = "//www.youtube.com/embed/{{ site.video }}" frameborder = "0" allowfullscreen > </ iframe >
3
+ </ script >
4
+ < div class ="embed-responsive embed-responsive-16by9 "> </ div >
Original file line number Diff line number Diff line change 1
1
/** Your custom JavaScript goes here. **/
2
+ ( function ( $ ) {
3
+ $ ( function ( ) {
4
+
5
+ // Handle the video modal.
6
+ $ ( '#video-modal' ) . on ( 'shown.bs.modal' , function ( event ) {
7
+
8
+ // Load the video.
9
+ $ ( '.modal-body .embed-responsive' , this ) . append ( $ ( '#video-template' ) . html ( ) ) ;
10
+ } ) . on ( 'hidden.bs.modal' , function ( event ) {
11
+
12
+ // Remove the video
13
+ $ ( '.modal-body .embed-responsive iframe' , this ) . remove ( ) ;
14
+ } ) ;
15
+ } ) ;
16
+ } ) ( jQuery ) ;
You can’t perform that action at this time.
0 commit comments