-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtemplate-video.php
More file actions
93 lines (85 loc) · 3.31 KB
/
template-video.php
File metadata and controls
93 lines (85 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
/**
* Template Name: Video Transcript
* Template Post Type: page
*/
?>
<?php get_header(); the_post(); ?>
<?php
$full_transcript = get_field( 'video_full_transcript', $post->ID );
$transcript = get_field( 'video_full_transcript', $post->ID );
$video_sections = get_field( 'video_sections', $post->ID );
$spotlight = get_field( 'video_spotlight', $post->ID );
$additional_content = get_field( 'video_additional_content', $post->ID );
?>
<div class="video-template-content mb-4">
<div class="container pt-5">
<?php echo the_content(); ?>
<div class="row mt-5">
<div class="col-md-7">
<div class="row">
<div class="col-lg-7">
<h2 class="heading-underline my-3 h3">Video Highlights</h2>
</div>
<?php if ( $transcript ) : ?>
<div class="col-lg-5 text-lg-right py-3 align-content-end">
<a class="" href="#transcript" data-toggle="modal" data-target="#transcripts"><span class="fas fa-file-alt mr-2"></span>Full Transcript</a>
</div>
<?php endif; ?>
</div>
<div id="video-chapters" role="tablist">
<?php foreach( $video_sections as $idx => $section ) : ?>
<?php $section_id = sanitize_title( $section['section_title'] ); ?>
<div class="card">
<div class="card-header" id="<?php echo $section_id; ?>-id">
<h3 class="h5 mb-0">
<a class="font-size-base text-secondary" data-toggle="collapse" href="#<?php echo $section_id; ?>"<?php echo ( $idx === 0 ) ? "aria-expanded=\"true\"" : ""; ?> aria-controls="<?php echo $section_id; ?>">
<?php echo $section['section_title']; ?>
</a>
</h3>
</div>
<div class="collapse<?php echo ( $idx === 0 ) ? " show" : ""; ?>" id="<?php echo $section_id; ?>" role="tabpanel" aria-labelledby="#<?php echo $section_id; ?>-id" data-parent="#video-chapters">
<div class="card-block">
<p class="text-center h5"><?php echo $section['section_time_stamp']; ?></p>
<div class="font-slab-serif font-size-lg line-height-5">
<?php echo wpautop( $section['section_summary'] ); ?>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<div class="col-md-5">
<div class="card card-faded">
<img class="img-fliod card-top" src="<?php echo $spotlight['spotlight_image']; ?>" alt="" />
<div class="card-block">
<h2 class="heading-underline mb-3 h3"><?php echo $spotlight['spotlight_title']; ?></h2>
<?php echo wpautop( $spotlight['spotlight_content'] ); ?>
</div>
</div>
</div>
</div>
</div>
<?php if ( $additional_content ) : ?>
<?php echo $additional_content; ?>
<?php endif; ?>
<?php if ( $transcript ) : ?>
<!-- Transcript Modal -->
<div class="modal fade" id="transcripts" tabindex="-1" role="dialog" aria-labelledby="transcriptLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="transcriptLabel">Full Transcript</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body font-slab-serif">
<?php echo wpautop( $transcript ); ?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php get_footer(); ?>